scanbot-web-sdk 6.0.0-dev.3 → 6.0.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +231 -231
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +9 -9
- package/@types/core/bridge/compiled/CreditCardTypes.d.ts +82 -0
- package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +52 -44
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +17 -17
- package/@types/core/bridge/compiled/FrameAccumulationTypes.d.ts +41 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +8 -18
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +0 -1
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +1 -23
- package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +5 -5
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +2 -2
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +7 -5
- package/@types/core/bridge/compiled/TiffTypes.d.ts +6 -5
- package/@types/core/bridge/worker-bridge.d.ts +114 -108
- package/@types/core/worker/ScanbotSDK.Core.d.ts +12 -12
- package/@types/core-types.d.ts +1 -0
- package/@types/cropping-view.d.ts +1 -1
- package/@types/document-scanner-view.d.ts +2 -2
- package/@types/index.d.ts +1 -0
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +1 -1
- package/@types/model/configuration/document-scanner-configuration.d.ts +2 -2
- package/@types/scanbot-sdk.d.ts +62 -59
- package/@types/service/document-quality-analyzer.d.ts +1 -1
- package/@types/service/tiff-generator.d.ts +1 -1
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -1
- package/@types/ui2/model/counted-barcodes.d.ts +7 -3
- package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +3 -3
- package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +1 -2
- package/@types/ui2/views/dialog/count-edit-dialog.d.ts +3 -3
- package/@types/ui2/views/drawer/barcode-result-sidebar.d.ts +10 -0
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +1 -2
- package/@types/worker/worker-bridge.d.ts +114 -108
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +11 -11
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function n(e,t=!1){const r=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(t[r])}(e),r}function i(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:n=!0}=t||{};let i="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){i+="-simd";n&&function(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}()&&(i+="-threads")}return i}r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,d=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&m())}function m(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||l||s(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n,i=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return x.buffer!=S.buffer&&L(),S}function r(){return x.buffer!=S.buffer&&L(),k}function i(){return x.buffer!=S.buffer&&L(),A}function o(){return x.buffer!=S.buffer&&L(),P}function a(){return x.buffer!=S.buffer&&L(),R}function s(){return x.buffer!=S.buffer&&L(),M}function u(){return x.buffer!=S.buffer&&L(),O}var c,l,d=e;d.ready=new Promise(((e,t)=>{c=e,l=t}));var h,m,f,p=Object.assign({},d),g="./this.program",v=(e,t)=>{throw t},y=d.ENVIRONMENT_IS_PTHREAD||!1,w="";function b(e){return d.locateFile?d.locateFile(e,w):w+e}w=self.location.href,n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},m=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)};var _,C=d.print||console.log.bind(console),E=d.printErr||console.error.bind(console);Object.assign(d,p),p=null,d.arguments&&d.arguments,d.thisProgram&&(g=d.thisProgram),d.quit&&(v=d.quit),d.wasmBinary&&(_=d.wasmBinary);var x,F,T=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&re("no native wasm support detected");var D,S,k,A,P,R,M,W,O,Z=!1;function I(e,t){e||re(t)}function L(){var e=x.buffer;d.HEAP8=S=new Int8Array(e),d.HEAP16=A=new Int16Array(e),d.HEAPU8=k=new Uint8Array(e),d.HEAPU16=P=new Uint16Array(e),d.HEAP32=R=new Int32Array(e),d.HEAPU32=M=new Uint32Array(e),d.HEAPF32=W=new Float32Array(e),d.HEAPF64=O=new Float64Array(e)}var z,$=d.INITIAL_MEMORY||134217728;if(I($>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+$+"! (STACK_SIZE=4194304)"),y)x=d.wasmMemory;else if(d.wasmMemory)x=d.wasmMemory;else if(!((x=new WebAssembly.Memory({initial:$/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw E("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),Error("bad memory");L(),$=x.buffer.byteLength;var N=[],V=[],j=[],B=0;function H(){return T||B>0}function G(){y||(d.noFSInit||Fe.init.initialized||Fe.init(),Fe.ignorePermissions=!1,be.init(),Re(V))}function U(e){N.unshift(e)}var Y,Q,X,J=0,K=null,q=null;function ee(e){J++,d.monitorRunDependencies&&d.monitorRunDependencies(J)}function te(e){if(J--,d.monitorRunDependencies&&d.monitorRunDependencies(J),0==J&&(null!==K&&(clearInterval(K),K=null),q)){var t=q;q=null,t()}}function re(e){d.onAbort&&d.onAbort(e),E(e="Aborted("+e+")"),Z=!0,D=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function ne(e){return e.startsWith("data:application/octet-stream;base64,")}function ie(e){if(e==Y&&_)return new Uint8Array(_);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}function oe(e,t,r){return function(e){return _||"function"!=typeof fetch?Promise.resolve().then((()=>ie(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>ie(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),re(e)}))}ne(Y="ScanbotSDK.Asm-simd-threads.wasm")||(Y=b(Y));var ae={3693484:e=>nn(function(){return this[Te(e)].toString()}.apply((0,eval)("(()=>this)()")))};function se(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ue=e=>{e.terminate(),e.onmessage=e=>{}},ce=e=>{var t=Pe.pthreads[e];I(t),Pe.returnWorkerToPool(t)},le=e=>{var t=Pe.getNewWorker();if(!t)return 6;Pe.runningWorkers.push(t),Pe.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(r,e.transferList),0},de={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=de.isAbs(e),r="/"===e.substr(-1);return(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=de.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=de.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return de.normalize(e.join("/"))},join2:(e,t)=>de.normalize(e+"/"+t)},he=e=>(he=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);re("initRandomDevice")})())(e),me={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=de.isAbs(n)}return(t?"/":"")+(e=de.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=me.resolve(e).substr(1),t=me.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),o=Math.min(n.length,i.length),a=o,s=0;s<o;s++)if(n[s]!==i[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(i.slice(a))).join("/")}},fe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,pe=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&fe)return fe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,i):e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ge=[],ve=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},ye=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i};function we(e,t,r){var n=r>0?r:ve(e)+1,i=new Array(n),o=ye(e,i,0,i.length);return t&&(i.length=o),i}var be={ttys:[],init(){},shutdown(){},register(e,t){be.ttys[e]={input:[],output:[],ops:t},Fe.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var t=be.ttys[e.node.rdev];if(!t)throw new Fe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new Fe.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Fe.ErrnoError(29)}if(void 0===s&&0===o)throw new Fe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new Fe.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new Fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ge.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ge=we(e,!0)}return ge.shift()})(),put_char(e,t){null===t||10===t?(C(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(C(pe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(E(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(pe(e.output,0)),e.output=[])}}},_e=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=bn(65536,e);return t?((e,t)=>(r().fill(0,e,e+t),e))(t,e):0},Ce={ops_table:null,mount:e=>Ce.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Fe.isBlkdev(r)||Fe.isFIFO(r))throw new Fe.ErrnoError(63);Ce.ops_table||(Ce.ops_table={dir:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr,lookup:Ce.node_ops.lookup,mknod:Ce.node_ops.mknod,rename:Ce.node_ops.rename,unlink:Ce.node_ops.unlink,rmdir:Ce.node_ops.rmdir,readdir:Ce.node_ops.readdir,symlink:Ce.node_ops.symlink},stream:{llseek:Ce.stream_ops.llseek}},file:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr},stream:{llseek:Ce.stream_ops.llseek,read:Ce.stream_ops.read,write:Ce.stream_ops.write,allocate:Ce.stream_ops.allocate,mmap:Ce.stream_ops.mmap,msync:Ce.stream_ops.msync}},link:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr,readlink:Ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ce.node_ops.getattr,setattr:Ce.node_ops.setattr},stream:Fe.chrdev_stream_ops}});var i=Fe.createNode(e,t,r,n);return Fe.isDir(i.mode)?(i.node_ops=Ce.ops_table.dir.node,i.stream_ops=Ce.ops_table.dir.stream,i.contents={}):Fe.isFile(i.mode)?(i.node_ops=Ce.ops_table.file.node,i.stream_ops=Ce.ops_table.file.stream,i.usedBytes=0,i.contents=null):Fe.isLink(i.mode)?(i.node_ops=Ce.ops_table.link.node,i.stream_ops=Ce.ops_table.link.stream):Fe.isChrdev(i.mode)&&(i.node_ops=Ce.ops_table.chrdev.node,i.stream_ops=Ce.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Fe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Fe.isDir(e.mode)?t.size=4096:Fe.isFile(e.mode)?t.size=e.usedBytes:Fe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Ce.resizeFileStorage(e,t.size)},lookup(e,t){throw Fe.genericErrors[44]},mknod:(e,t,r,n)=>Ce.createNode(e,t,r,n),rename(e,t,r){if(Fe.isDir(e.mode)){var n;try{n=Fe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new Fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Fe.lookupNode(e,t);for(var n in r.contents)throw new Fe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=Ce.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Fe.isLink(e.mode))throw new Fe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,n);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),r);else for(var s=0;s<a;s++)t[r+s]=o[i+s];return a},write(e,r,n,i,o,a){if(r.buffer===t().buffer&&(a=!1),!i)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=r.subarray(n,n+i),s.usedBytes=i,i;if(0===s.usedBytes&&0===o)return s.contents=r.slice(n,n+i),s.usedBytes=i,i;if(o+i<=s.usedBytes)return s.contents.set(r.subarray(n,n+i),o),i}if(Ce.expandFileStorage(s,o+i),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+i),o);else for(var u=0;u<i;u++)s.contents[o+u]=r[n+u];return s.usedBytes=Math.max(s.usedBytes,o+i),i},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&Fe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Fe.ErrnoError(28);return n},allocate(e,t,r){Ce.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,r,n,i,o){if(!Fe.isFile(e.node.mode))throw new Fe.ErrnoError(43);var a,s,u=e.node.contents;if(2&o||u.buffer!==t().buffer){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=_e(r)))throw new Fe.ErrnoError(48);t().set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:(e,t,r,n,i)=>(Ce.stream_ops.write(e,t,0,n,r,!1),0)}},Ee=d.preloadPlugins||[],xe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=me.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Fe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Fe.root,i="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(n=Fe.lookupNode(n,r[o]),i=de.join2(i,r[o]),Fe.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;Fe.isLink(n.mode);){var u=Fe.readlink(i);if(i=me.resolve(de.dirname(i),u),n=Fe.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Fe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(Fe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Fe.nameTable.length},hashAddNode(e){var t=Fe.hashName(e.parent.id,e.name);e.name_next=Fe.nameTable[t],Fe.nameTable[t]=e},hashRemoveNode(e){var t=Fe.hashName(e.parent.id,e.name);if(Fe.nameTable[t]===e)Fe.nameTable[t]=e.name_next;else for(var r=Fe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Fe.mayLookup(e);if(r)throw new Fe.ErrnoError(r,e);for(var n=Fe.hashName(e.id,t),i=Fe.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return Fe.lookup(e,t)},createNode(e,t,r,n){var i=new Fe.FSNode(e,t,r,n);return Fe.hashAddNode(i),i},destroyNode(e){Fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Fe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Fe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Fe.lookupNode(e,t),20}catch(e){}return Fe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Fe.lookupNode(e,t)}catch(e){return e.errno}var i=Fe.nodePermissions(e,"wx");if(i)return i;if(r){if(!Fe.isDir(n.mode))return 54;if(Fe.isRoot(n)||Fe.getPath(n)===Fe.cwd())return 10}else if(Fe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Fe.isLink(e.mode)?32:Fe.isDir(e.mode)&&("r"!==Fe.flagsToPermissionString(t)||512&t)?31:Fe.nodePermissions(e,Fe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Fe.MAX_OPEN_FDS;e++)if(!Fe.streams[e])return e;throw new Fe.ErrnoError(33)},getStreamChecked(e){var t=Fe.getStream(e);if(!t)throw new Fe.ErrnoError(8);return t},getStream:e=>Fe.streams[e],createStream:(e,t=-1)=>(Fe.FSStream||(Fe.FSStream=function(){this.shared={}},Fe.FSStream.prototype={},Object.defineProperties(Fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Fe.FSStream,e),-1==t&&(t=Fe.nextfd()),e.fd=t,Fe.streams[t]=e,e),closeStream(e){Fe.streams[e]=null},chrdev_stream_ops:{open(e){var t=Fe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Fe.devices[e]={stream_ops:t}},getDevice:e=>Fe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Fe.syncFSRequests++,Fe.syncFSRequests>1&&E(`warning: ${Fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Fe.getMounts(Fe.root.mount),n=0;function i(e){return Fe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var n,i="/"===r,o=!r;if(i&&Fe.root)throw new Fe.ErrnoError(10);if(!i&&!o){var a=Fe.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,Fe.isMountpoint(n))throw new Fe.ErrnoError(10);if(!Fe.isDir(n.mode))throw new Fe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,i?Fe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=Fe.lookupPath(e,{follow_mount:!1});if(!Fe.isMountpoint(t.node))throw new Fe.ErrnoError(28);var r=t.node,n=r.mounted,i=Fe.getMounts(n);Object.keys(Fe.nameTable).forEach((e=>{for(var t=Fe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&Fe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Fe.lookupPath(e,{parent:!0}).node,i=de.basename(e);if(!i||"."===i||".."===i)throw new Fe.ErrnoError(28);var o=Fe.mayCreate(n,i);if(o)throw new Fe.ErrnoError(o);if(!n.node_ops.mknod)throw new Fe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Fe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Fe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i<r.length;++i)if(r[i]){n+="/"+r[i];try{Fe.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,Fe.mknod(e,t,r)),symlink(e,t){if(!me.resolve(e))throw new Fe.ErrnoError(44);var r=Fe.lookupPath(t,{parent:!0}).node;if(!r)throw new Fe.ErrnoError(44);var n=de.basename(t),i=Fe.mayCreate(r,n);if(i)throw new Fe.ErrnoError(i);if(!r.node_ops.symlink)throw new Fe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=de.dirname(e),o=de.dirname(t),a=de.basename(e),s=de.basename(t);if(r=Fe.lookupPath(e,{parent:!0}).node,n=Fe.lookupPath(t,{parent:!0}).node,!r||!n)throw new Fe.ErrnoError(44);if(r.mount!==n.mount)throw new Fe.ErrnoError(75);var u,c=Fe.lookupNode(r,a),l=me.relative(e,o);if("."!==l.charAt(0))throw new Fe.ErrnoError(28);if("."!==(l=me.relative(t,i)).charAt(0))throw new Fe.ErrnoError(55);try{u=Fe.lookupNode(n,s)}catch(e){}if(c!==u){var d=Fe.isDir(c.mode),h=Fe.mayDelete(r,a,d);if(h)throw new Fe.ErrnoError(h);if(h=u?Fe.mayDelete(n,s,d):Fe.mayCreate(n,s))throw new Fe.ErrnoError(h);if(!r.node_ops.rename)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(c)||u&&Fe.isMountpoint(u))throw new Fe.ErrnoError(10);if(n!==r&&(h=Fe.nodePermissions(r,"w")))throw new Fe.ErrnoError(h);Fe.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{Fe.hashAddNode(c)}}},rmdir(e){var t=Fe.lookupPath(e,{parent:!0}).node,r=de.basename(e),n=Fe.lookupNode(t,r),i=Fe.mayDelete(t,r,!0);if(i)throw new Fe.ErrnoError(i);if(!t.node_ops.rmdir)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);t.node_ops.rmdir(t,r),Fe.destroyNode(n)},readdir(e){var t=Fe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Fe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Fe.lookupPath(e,{parent:!0}).node;if(!t)throw new Fe.ErrnoError(44);var r=de.basename(e),n=Fe.lookupNode(t,r),i=Fe.mayDelete(t,r,!1);if(i)throw new Fe.ErrnoError(i);if(!t.node_ops.unlink)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);t.node_ops.unlink(t,r),Fe.destroyNode(n)},readlink(e){var t=Fe.lookupPath(e).node;if(!t)throw new Fe.ErrnoError(44);if(!t.node_ops.readlink)throw new Fe.ErrnoError(28);return me.resolve(Fe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Fe.lookupPath(e,{follow:!t}).node;if(!r)throw new Fe.ErrnoError(44);if(!r.node_ops.getattr)throw new Fe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Fe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?Fe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Fe.chmod(e,t,!0)},fchmod(e,t){var r=Fe.getStreamChecked(e);Fe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?Fe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){Fe.chown(e,t,r,!0)},fchown(e,t,r){var n=Fe.getStreamChecked(e);Fe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Fe.ErrnoError(28);var r;if(!(r="string"==typeof e?Fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);if(Fe.isDir(r.mode))throw new Fe.ErrnoError(31);if(!Fe.isFile(r.mode))throw new Fe.ErrnoError(28);var n=Fe.nodePermissions(r,"w");if(n)throw new Fe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Fe.getStreamChecked(e);if(0==(2097155&r.flags))throw new Fe.ErrnoError(28);Fe.truncate(r.node,t)},utime(e,t,r){var n=Fe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Fe.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=de.normalize(e);try{n=Fe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new Fe.ErrnoError(20)}else n=Fe.mknod(e,r,0),i=!0;if(!n)throw new Fe.ErrnoError(44);if(Fe.isChrdev(n.mode)&&(t&=-513),65536&t&&!Fe.isDir(n.mode))throw new Fe.ErrnoError(54);if(!i){var o=Fe.mayOpen(n,t);if(o)throw new Fe.ErrnoError(o)}512&t&&!i&&Fe.truncate(n,0),t&=-131713;var a=Fe.createStream({node:n,path:Fe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!d.logReadFiles||1&t||(Fe.readFiles||(Fe.readFiles={}),e in Fe.readFiles||(Fe.readFiles[e]=1)),a},close(e){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Fe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(1==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.read)throw new Fe.ErrnoError(28);var o="undefined"!=typeof i;if(o){if(!e.seekable)throw new Fe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,r,n,i);return o||(e.position+=a),a},write(e,t,r,n,i,o){if(n<0||i<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.write)throw new Fe.ErrnoError(28);e.seekable&&1024&e.flags&&Fe.llseek(e,0,2);var a="undefined"!=typeof i;if(a){if(!e.seekable)throw new Fe.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,r,n,i,o);return a||(e.position+=s),s},allocate(e,t,r){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(t<0||r<=0)throw new Fe.ErrnoError(28);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(!Fe.isFile(e.node.mode)&&!Fe.isDir(e.node.mode))throw new Fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new Fe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new Fe.ErrnoError(2);if(1==(2097155&e.flags))throw new Fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new Fe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Fe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Fe.open(e,t.flags),i=Fe.stat(e).size,o=new Uint8Array(i);return Fe.read(n,o,0,i,0),"utf8"===t.encoding?r=pe(o,0):"binary"===t.encoding&&(r=o),Fe.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=Fe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(ve(t)+1),o=ye(t,i,0,i.length);Fe.write(n,i,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Fe.write(n,t,0,t.byteLength,void 0,r.canOwn)}Fe.close(n)},cwd:()=>Fe.currentPath,chdir(e){var t=Fe.lookupPath(e,{follow:!0});if(null===t.node)throw new Fe.ErrnoError(44);if(!Fe.isDir(t.node.mode))throw new Fe.ErrnoError(54);var r=Fe.nodePermissions(t.node,"x");if(r)throw new Fe.ErrnoError(r);Fe.currentPath=t.path},createDefaultDirectories(){Fe.mkdir("/tmp"),Fe.mkdir("/home"),Fe.mkdir("/home/web_user")},createDefaultDevices(){Fe.mkdir("/dev"),Fe.registerDevice(Fe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),Fe.mkdev("/dev/null",Fe.makedev(1,3)),be.register(Fe.makedev(5,0),be.default_tty_ops),be.register(Fe.makedev(6,0),be.default_tty1_ops),Fe.mkdev("/dev/tty",Fe.makedev(5,0)),Fe.mkdev("/dev/tty1",Fe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=he(e).byteLength),e[--t]);Fe.createDevice("/dev","random",r),Fe.createDevice("/dev","urandom",r),Fe.mkdir("/dev/shm"),Fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Fe.mkdir("/proc");var e=Fe.mkdir("/proc/self");Fe.mkdir("/proc/self/fd"),Fe.mount({mount(){var t=Fe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Fe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?Fe.createDevice("/dev","stdin",d.stdin):Fe.symlink("/dev/tty","/dev/stdin"),d.stdout?Fe.createDevice("/dev","stdout",null,d.stdout):Fe.symlink("/dev/tty","/dev/stdout"),d.stderr?Fe.createDevice("/dev","stderr",null,d.stderr):Fe.symlink("/dev/tty1","/dev/stderr"),Fe.open("/dev/stdin",0),Fe.open("/dev/stdout",1),Fe.open("/dev/stderr",1)},ensureErrnoError(){Fe.ErrnoError||(Fe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Fe.ErrnoError.prototype=new Error,Fe.ErrnoError.prototype.constructor=Fe.ErrnoError,[44].forEach((e=>{Fe.genericErrors[e]=new Fe.ErrnoError(e),Fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){Fe.ensureErrnoError(),Fe.nameTable=new Array(4096),Fe.mount(Ce,{},"/"),Fe.createDefaultDirectories(),Fe.createDefaultDevices(),Fe.createSpecialDirectories(),Fe.filesystems={MEMFS:Ce}},init(e,t,r){Fe.init.initialized=!0,Fe.ensureErrnoError(),d.stdin=e||d.stdin,d.stdout=t||d.stdout,d.stderr=r||d.stderr,Fe.createStandardStreams()},quit(){Fe.init.initialized=!1;for(var e=0;e<Fe.streams.length;e++){var t=Fe.streams[e];t&&Fe.close(t)}},findObject(e,t){var r=Fe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=Fe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Fe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=de.basename(e),n=Fe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:Fe.getPath(e);for(var i=t.split("/").reverse();i.length;){var o=i.pop();if(o){var a=de.join2(e,o);try{Fe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,i){var o=de.join2("string"==typeof e?e:Fe.getPath(e),t),a=xe(n,i);return Fe.create(o,a)},createDataFile(e,t,r,n,i,o){var a=t;e&&(e="string"==typeof e?e:Fe.getPath(e),a=t?de.join2(e,t):e);var s=xe(n,i),u=Fe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),l=0,d=r.length;l<d;++l)c[l]=r.charCodeAt(l);r=c}Fe.chmod(u,146|s);var h=Fe.open(u,577);Fe.write(h,r,0,r.length,0,o),Fe.close(h),Fe.chmod(u,s)}return u},createDevice(e,t,r,n){var i=de.join2("string"==typeof e?e:Fe.getPath(e),t),o=xe(!!r,!!n);Fe.createDevice.major||(Fe.createDevice.major=64);var a=Fe.makedev(Fe.createDevice.major++,0);return Fe.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,i,o){for(var a=0,s=0;s<i;s++){var u;try{u=r()}catch(e){throw new Fe.ErrnoError(29)}if(void 0===u&&0===a)throw new Fe.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i,o){for(var a=0;a<i;a++)try{n(t[r+a])}catch(e){throw new Fe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),a}}),Fe.mkdev(i,o,a)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!h)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=we(h(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Fe.ErrnoError(29)}},createLazyFile(e,r,n,i,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):we(i.responseText||"",!0)})(t,i)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,C("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=Fe.createFile(e,r,u,i,o);u.contents?c.contents=u.contents:u.url&&(c.contents=null,c.url=u.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};function d(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,n);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[i+s];else for(s=0;s<a;s++)t[r+s]=o.get(i+s);return a}return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];l[e]=function(){return Fe.forceLoadFile(c),t.apply(null,arguments)}})),l.read=(e,t,r,n,i)=>(Fe.forceLoadFile(c),d(e,t,r,n,i)),l.mmap=(e,r,n,i,o)=>{Fe.forceLoadFile(c);var a=_e(r);if(!a)throw new Fe.ErrnoError(48);return d(e,t(),a,r,n),{ptr:a,allocated:!0}},c.stream_ops=l,c}},Te=(e,t)=>e?pe(r(),e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(de.isAbs(t))return t;var n;if(n=-100===e?Fe.cwd():De.getStreamFromFD(e).path,0==t.length){if(!r)throw new Fe.ErrnoError(44);return n}return de.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&de.normalize(t)!==de.normalize(Fe.getPath(e.node)))return-54;throw e}a()[r>>2]=n.dev,a()[r+4>>2]=n.mode,s()[r+8>>2]=n.nlink,a()[r+12>>2]=n.uid,a()[r+16>>2]=n.gid,a()[r+20>>2]=n.rdev,X=[n.size>>>0,(Q=n.size,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+24>>2]=X[0],a()[r+28>>2]=X[1],a()[r+32>>2]=4096,a()[r+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),u=n.ctime.getTime();return X=[Math.floor(i/1e3)>>>0,(Q=Math.floor(i/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+40>>2]=X[0],a()[r+44>>2]=X[1],s()[r+48>>2]=i%1e3*1e3,X=[Math.floor(o/1e3)>>>0,(Q=Math.floor(o/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+56>>2]=X[0],a()[r+60>>2]=X[1],s()[r+64>>2]=o%1e3*1e3,X=[Math.floor(u/1e3)>>>0,(Q=Math.floor(u/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+72>>2]=X[0],a()[r+76>>2]=X[1],s()[r+80>>2]=u%1e3*1e3,X=[n.ino>>>0,(Q=n.ino,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+88>>2]=X[0],a()[r+92>>2]=X[1],0},doMsync(e,t,n,i,o){if(!Fe.isFile(t.node.mode))throw new Fe.ErrnoError(43);if(2&i)return 0;var a=r().slice(e,e+n);Fe.msync(t,a,o,n,i)},varargs:void 0,get(){var e=a()[De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Te(e),getStreamFromFD:e=>Fe.getStreamChecked(e)};function Se(e){if(y)return Tr(0,1,e);D=e,H()||(Pe.terminateAllThreads(),d.onExit&&d.onExit(e),Z=!0),v(e,new se(e))}var ke=(e,t)=>{if(D=e,y)throw Me(e),"unwind";Se(e)},Ae=e=>{if(e instanceof se||"unwind"==e)return D;v(1,e)},Pe={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){y?Pe.initWorker():Pe.initMainThread()},initMainThread(){for(var e=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));e--;)Pe.allocateUnusedWorker();U((()=>{ee(),Pe.loadWasmModuleToAllWorkers((()=>te()))}))},initWorker(){T=!1},setExitStatus:e=>{D=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Pe.runningWorkers)ue(e);for(var e of Pe.unusedWorkers)ue(e);Pe.unusedWorkers=[],Pe.runningWorkers=[],Pe.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete Pe.pthreads[t],Pe.unusedWorkers.push(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(e),1),e.pthread_ptr=0,xn(t)},receiveObjectTransfer(e){},threadInitTLS(){Pe.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,i=n.cmd;if(n.targetThread&&n.targetThread!=yn()){var o=Pe.pthreads[n.targetThread];o?o.postMessage(n,n.transferList):E(`Internal error! Worker sent a message "${i}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var a;"checkMailbox"===i?xr():"spawnThread"===i?le(n):"cleanupThread"===i?ce(n.thread):"killThread"===i?(e=>{var t=Pe.pthreads[e];delete Pe.pthreads[e],ue(t),xn(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(t),1),t.pthread_ptr=0})(n.thread):"cancelThread"===i?(a=n.thread,Pe.pthreads[a].postMessage({cmd:"cancel"})):"loaded"===i?(e.loaded=!0,t(e)):"alert"===i?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===i?d[n.handler](...n.args):i&&E(`worker sent an unknown command ${i}`)}},e.onerror=e=>{throw E(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r=[];for(var i of["onExit","onAbort","print","printErr"])d.hasOwnProperty(i)&&r.push(i);e.postMessage({cmd:"load",handlers:r,urlOrBlob:d.mainScriptUrlOrBlob||n,wasmMemory:x,wasmModule:F})})),loadWasmModuleToAllWorkers(e){if(y)return e();Promise.all(Pe.unusedWorkers.map(Pe.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e,t=b("ScanbotSDK.Asm-simd-threads.worker.js");e=new Worker(t),Pe.unusedWorkers.push(e)},getNewWorker:()=>(0==Pe.unusedWorkers.length&&(Pe.allocateUnusedWorker(),Pe.loadWasmModuleToWorker(Pe.unusedWorkers[0])),Pe.unusedWorkers.pop())};d.PThread=Pe;var Re=e=>{for(;e.length>0;)e.shift()(d)};function Me(e){if(y)return Tr(1,0,e);ke(e)}d.establishStackSpace=()=>{var e=yn(),t=a()[e+52>>2],r=a()[e+56>>2];Sn(t,t-r),An(t)};var We=e=>z.get(e);d.invokeEntryPoint=(e,t)=>{!function(e){H()?Pe.setExitStatus(e):Fn(e)}(We(e)(t))};var Oe=e=>{Pe.tlsInitFunctions.push(e)},Ze=[],Ie=0,Le=0;function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(On(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var $e=e=>{var t=Le;if(!t)return wn(0),0;var r=new ze(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return wn(0),t;for(var i in e){var o=e[i];if(0===o||o===n)break;var a=r.ptr+16;if(Wn(o,n,a))return wn(o),t}return wn(n),t},Ne=()=>{var e=Ze.pop();e||re("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ze.push(e),e.set_rethrown(!0),e.set_caught(!1),Ie++),Le=t};function Ve(e,t,r,n){return y?Tr(2,1,e,t,r,n):je(e,t,r,n)}var je=(e,t,r,n)=>{if("undefined"==typeof SharedArrayBuffer)return E("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var i=[];if(y&&0===i.length)return Ve(e,t,r,n);var o={startRoutine:r,pthread_ptr:e,arg:n,transferList:i};return y?(o.cmd="spawnThread",postMessage(o,i),0):le(o)};function Be(e,t,r,n,i){if(y)return Tr(3,1,e,t,r,n,i);try{for(var o=0,s=t?a()[t>>2]:0,u=t?a()[t+4>>2]:0,c=r?a()[r>>2]:0,l=r?a()[r+4>>2]:0,d=n?a()[n>>2]:0,h=n?a()[n+4>>2]:0,m=0,f=0,p=0,g=0,v=0,w=0,b=(t?a()[t>>2]:0)|(r?a()[r>>2]:0)|(n?a()[n>>2]:0),_=(t?a()[t+4>>2]:0)|(r?a()[r+4>>2]:0)|(n?a()[n+4>>2]:0),C=function(e,t,r,n){return e<32?t&n:r&n},E=0;E<e;E++){var x=1<<E%32;if(C(E,b,_,x)){var F=De.getStreamFromFD(E),T=De.DEFAULT_POLLMASK;if(F.stream_ops.poll){var D=-1;i&&(D=1e3*((t?a()[i>>2]:0)+(t?a()[i+8>>2]:0)/1e6)),T=F.stream_ops.poll(F,D)}1&T&&C(E,s,u,x)&&(E<32?m|=x:f|=x,o++),4&T&&C(E,c,l,x)&&(E<32?p|=x:g|=x,o++),2&T&&C(E,d,h,x)&&(E<32?v|=x:w|=x,o++)}}return t&&(a()[t>>2]=m,a()[t+4>>2]=f),r&&(a()[r>>2]=p,a()[r+4>>2]=g),n&&(a()[n>>2]=v,a()[n+4>>2]=w),o}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function He(e,t,r){if(y)return Tr(4,1,e,t,r);De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((o=De.get())<0)return-28;for(;Fe.streams[o];)o++;return Fe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=De.get();return n.flags|=o,0;case 5:return o=De.getp(),i()[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,a()[vn()>>2]=s,-1}}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}var s}function Ge(e,t){if(y)return Tr(5,1,e,t);try{var r=De.getStreamFromFD(e);return De.doStat(Fe.stat,r.path,t)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ue(e,r,n){if(y)return Tr(6,1,e,r,n);De.varargs=n;try{var o=De.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return o.tty?0:-59;case 21505:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcgets){var s=o.tty.ops.ioctl_tcgets(o),u=De.getp();a()[u>>2]=s.c_iflag||0,a()[u+4>>2]=s.c_oflag||0,a()[u+8>>2]=s.c_cflag||0,a()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)t()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcsets){u=De.getp();var l=a()[u>>2],d=a()[u+4>>2],h=a()[u+8>>2],m=a()[u+12>>2],f=[];for(c=0;c<32;c++)f.push(t()[u+c+17>>0]);return o.tty.ops.ioctl_tcsets(o.tty,r,{c_iflag:l,c_oflag:d,c_cflag:h,c_lflag:m,c_cc:f})}return 0;case 21519:return o.tty?(u=De.getp(),a()[u>>2]=0,0):-59;case 21520:return o.tty?-28:-59;case 21531:return u=De.getp(),Fe.ioctl(o,r,u);case 21523:if(!o.tty)return-59;if(o.tty.ops.ioctl_tiocgwinsz){var p=o.tty.ops.ioctl_tiocgwinsz(o.tty);u=De.getp(),i()[u>>1]=p[0],i()[u+2>>1]=p[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ye(e,t,r,n){if(y)return Tr(8,1,e,t,r,n);try{t=De.getStr(t);var i=256&n,o=4096&n;return n&=-6401,t=De.calculateAt(e,t,o),De.doStat(i?Fe.lstat:Fe.stat,t,r)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Qe(e,t,r,n){if(y)return Tr(9,1,e,t,r,n);De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var i=n?De.get():0;return Fe.open(t,r,i).fd}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Xe(e){if(y)return Tr(10,1,e);try{return e=De.getStr(e),Fe.rmdir(e),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Je(e,t){if(y)return Tr(11,1,e,t);try{return e=De.getStr(e),De.doStat(Fe.stat,e,t)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ke(e,t,r){if(y)return Tr(12,1,e,t,r);try{return t=De.getStr(t),t=De.calculateAt(e,t),0===r?Fe.unlink(t):512===r?Fe.rmdir(t):re("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}var qe={},et=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function tt(e){return this.fromWireType(a()[e>>2])}var rt={},nt={},it={},ot=void 0,at=e=>{throw new ot(e)},st=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&at("Mismatched type converter count");for(var i=0;i<e.length;++i)ht(e[i],n[i])}e.forEach((function(e){it[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{nt.hasOwnProperty(e)?i[t]=nt[e]:(o.push(e),rt.hasOwnProperty(e)||(rt[e]=[]),rt[e].push((()=>{i[t]=nt[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},ut=void 0,ct=e=>{for(var t="",n=e;r()[n];)t+=ut[r()[n++]];return t},lt=void 0,dt=e=>{throw new lt(e)};function ht(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||dt(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;dt(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete it[e],rt.hasOwnProperty(e)){var i=rt[e];delete rt[e],i.forEach((e=>e()))}}(e,t,r)}var mt=8;function ft(e){if(!(this instanceof Zt))return!1;if(!(e instanceof Zt))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}var pt=e=>{dt(e.$$.ptrType.registeredClass.name+" instance already deleted")},gt=!1,vt=e=>{},yt=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},wt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=wt(e,t,r.baseClass);return null===n?null:r.downcast(n)},bt={},_t=()=>Object.keys(Dt).length,Ct=()=>{var e=[];for(var t in Dt)Dt.hasOwnProperty(t)&&e.push(Dt[t]);return e},Et=[],xt=()=>{for(;Et.length;){var e=Et.pop();e.$$.deleteScheduled=!1,e.delete()}},Ft=void 0,Tt=e=>{Ft=e,Et.length&&Ft&&Ft(xt)},Dt={},St=(e,t)=>(t=((e,t)=>{for(void 0===t&&dt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Dt[t]),kt=(e,t)=>(t.ptrType&&t.ptr||at("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t}})));function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=St(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=bt[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=wt(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Pt=e=>"undefined"==typeof FinalizationRegistry?(Pt=e=>e,e):(gt=new FinalizationRegistry((e=>{yt(e.$$)})),Pt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};gt.register(e,r,e)}return e},vt=e=>gt.unregister(e),Pt(e));function Rt(){if(this.$$.ptr||pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Mt(){this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&dt("Object already scheduled for deletion"),vt(this),yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Wt(){return!this.$$.ptr}function Ot(){return this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&dt("Object already scheduled for deletion"),Et.push(this),1===Et.length&&Ft&&Ft(xt),this.$$.deleteScheduled=!0,this}function Zt(){}var It=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function Lt(e,t){return{[e=It(e)]:function(){return t.apply(this,arguments)}}[e]}var zt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||dt(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},$t=(e,t,r)=>{d.hasOwnProperty(e)?((void 0===r||void 0!==d[e].overloadTable&&void 0!==d[e].overloadTable[r])&&dt(`Cannot register public name '${e}' twice`),zt(d,e,e),d.hasOwnProperty(r)&&dt(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),d[e].overloadTable[r]=t):(d[e]=t,void 0!==r&&(d[e].numArguments=r))};function Nt(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var Vt=(e,t,r)=>{for(;t!==r;)t.upcast||dt(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function jt(e,t){if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Vt(t.$$.ptr,r,this.registeredClass)}function Bt(e,t){var r;if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&dt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Vt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&dt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:dt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,lr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:dt("Unsupporting sharing policy")}return r}function Ht(e,t){if(null===t)return this.isReference&&dt(`null is not a valid ${this.name}`),0;t.$$||dt(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||dt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&dt(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Vt(t.$$.ptr,r,this.registeredClass)}function Gt(e){return this.fromWireType(s()[e>>2])}function Ut(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Yt(e){this.rawDestructor&&this.rawDestructor(e)}var Qt=e=>{null!==e&&e.delete()};function Xt(e,t,r,n,i,o,a,s,u,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Bt:n?(this.toWireType=jt,this.destructorFunction=null):(this.toWireType=Ht,this.destructorFunction=null)}var Jt=(e,t,r)=>{d.hasOwnProperty(e)||at("Replacing nonexistant public symbol"),void 0!==d[e].overloadTable&&void 0!==r?d[e].overloadTable[r]=t:(d[e]=t,d[e].argCount=r)},Kt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var n=d["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)})(e,t,r):We(t).apply(null,r),qt=(e,t)=>{var r,n,i,o=(e=ct(e)).includes("j")?(r=e,n=t,i=[],function(){return i.length=0,Object.assign(i,arguments),Kt(r,n,i)}):We(t);return"function"!=typeof o&&dt(`unknown function pointer with signature ${e}: ${t}`),o},er=void 0,tr=e=>{var t=_n(e),r=ct(t);return gn(t),r},rr=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||nt[t]||(it[t]?it[t].forEach(e):(r.push(t),n[t]=!0))})),new er(`${e}: `+r.map(tr).join([", "]))},nr=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(s()[t+4*n>>2]);return r};function ir(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Lt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function or(e,t,r,n,i,o){var a=t.length;a<2&&dt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var l="void"!==t[0].name,d="",h="";for(c=0;c<a-2;++c)d+=(0!==c?", ":"")+"arg"+c,h+=(0!==c?", ":"")+"arg"+c+"Wired";var m=`\n return function ${It(e)}(${d}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(m+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[dt,n,i,et,t[0],t[1]];for(s&&(m+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)m+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(s&&(h="thisWired"+(h.length>0?", ":"")+h),m+=(l||o?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",u)m+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(m+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return l&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),m+="}\n",p.push(m),ir(Function,p).apply(null,g)}function ar(){this.allocated=[void 0],this.freelist=[]}var sr=new ar,ur=e=>{e>=sr.reserved&&0==--sr.get(e).refcount&&sr.free(e)},cr=()=>{for(var e=0,t=sr.reserved;t<sr.allocated.length;++t)void 0!==sr.allocated[t]&&++e;return e},lr={toValue:e=>(e||dt("Cannot use deleted val. handle = "+e),sr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return sr.allocate({refcount:1,value:e})}}},dr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},hr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType((x.buffer!=S.buffer&&L(),W)[e>>2])};case 8:return function(e){return this.fromWireType(u()[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},mr=(e,n,u)=>{switch(n){case 1:return u?e=>t()[e>>0]:e=>r()[e>>0];case 2:return u?e=>i()[e>>1]:e=>o()[e>>1];case 4:return u?e=>a()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${n}): ${e}`)}},fr=(e,t,n)=>ye(e,r(),t,n),pr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,gr=(e,t)=>{for(var n=e,a=n>>1,s=a+t/2;!(a>=s)&&o()[a];)++a;if((n=a<<1)-e>32&&pr)return pr.decode(r().slice(e,n));for(var u="",c=0;!(c>=t/2);++c){var l=i()[e+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,a=0;a<o;++a){var s=e.charCodeAt(a);i()[t>>1]=s,t+=2}return i()[t>>1]=0,t-n},yr=e=>2*e.length,wr=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=a()[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)),a()[t>>2]=s,(t+=4)+4>i)break}return a()[t>>2]=0,t-n},_r=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},Cr=e=>{if(!Z)try{e(),(()=>{if(!H())try{y?Fn(D):ke(D)}catch(e){Ae(e)}})()}catch(e){Ae(e)}},Er=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(a(),e>>2,e).value.then(xr);var t=e+128;Atomics.store(a(),t>>2,1)}};d.__emscripten_thread_mailbox_await=Er;var xr=()=>{var e=yn();e&&(Er(e),Cr((()=>Tn())))};d.checkMailbox=xr;var Fr=e=>{var t=kn(),r=e();return An(t),r},Tr=function(e,t){var r=arguments.length-2,n=arguments;return Fr((()=>{for(var i=r,o=Pn(8*i),a=o>>3,s=0;s<r;s++){var c=n[2+s];u()[a+s]=c}return En(e,i,o,t)}))},Dr=[],Sr=(e,t)=>{var r=nt[e];return void 0===r&&dt(t+" has unknown type "+tr(e)),r},kr={},Ar=e=>{var t=kr[e];return void 0===t?ct(e):t},Pr=[],Rr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Mr=[],Wr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Or=e=>e%4==0&&(e%100!=0||e%400==0),Zr=[0,31,60,91,121,152,182,213,244,274,305,335],Ir=[0,31,59,90,120,151,181,212,243,273,304,334];function Lr(e,t,r,n,i,o,a){if(y)return Tr(14,1,e,t,r,n,i,o,a);var s=Wr(o,a);try{if(isNaN(s))return 61;var u=De.getStreamFromFD(i);2&r&&De.doMsync(e,u,t,n,s),Fe.munmap(u)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}}var zr,$r=e=>{var t=ve(e)+1,r=pn(t);return r&&fr(e,r,t),r},Nr=[],Vr=(e,t,n)=>{var i=((e,t)=>{var n;for(Nr.length=0;n=r()[e++];)t+=105!=n&&t%8?4:0,Nr.push(105==n?a()[t>>2]:u()[t>>3]),t+=105==n?4:8;return Nr})(t,n);return ae[e].apply(null,i)};zr=()=>performance.timeOrigin+performance.now();var jr=e=>{re("OOM")},Br=e=>{var t=(e-x.buffer.byteLength+65535)/65536;try{return x.grow(t),L(),1}catch(e){}},Hr={},Gr=()=>{if(!Gr.strings){var e={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",_:g||"./this.program"};for(var t in Hr)void 0===Hr[t]?delete e[t]:e[t]=Hr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Gr.strings=r}return Gr.strings},Ur=function(e,r){if(y)return Tr(15,1,e,r);var n=0;return Gr().forEach(((i,o)=>{var a=r+n;s()[e+4*o>>2]=a,((e,r)=>{for(var n=0;n<e.length;++n)t()[r++>>0]=e.charCodeAt(n);t()[r>>0]=0})(i,a),n+=i.length+1})),0},Yr=function(e,t){if(y)return Tr(16,1,e,t);var r=Gr();s()[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),s()[t>>2]=n,0};function Qr(e){if(y)return Tr(17,1,e);try{var t=De.getStreamFromFD(e);return Fe.close(t),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function Xr(e,r){if(y)return Tr(18,1,e,r);try{var n=De.getStreamFromFD(e),o=n.tty?2:Fe.isDir(n.mode)?3:Fe.isLink(n.mode)?7:4;return t()[r>>0]=o,i()[r+2>>1]=0,X=[0,(Q=0,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+8>>2]=X[0],a()[r+12>>2]=X[1],X=[0,(Q=0,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+16>>2]=X[0],a()[r+20>>2]=X[1],0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function Jr(e,r,n,i){if(y)return Tr(19,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var l=Fe.read(e,t(),u,c,i);if(l<0)return-1;if(o+=l,l<c)break;"undefined"!=typeof i&&(i+=l)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,n,i){if(y)return Tr(20,1,e,t,r,n,i);var o=Wr(t,r);try{if(isNaN(o))return 61;var s=De.getStreamFromFD(e);return Fe.llseek(s,o,n),X=[s.position>>>0,(Q=s.position,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[i>>2]=X[0],a()[i+4>>2]=X[1],s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}function qr(e,r,n,i){if(y)return Tr(21,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var l=Fe.write(e,t(),u,c,i);if(l<0)return-1;o+=l,"undefined"!=typeof i&&(i+=l)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return e.errno}}var en=[31,29,31,30,31,30,31,31,30,31,30,31],tn=[31,28,31,30,31,30,31,31,30,31,30,31],rn=(e,r,n,i)=>{var o=s()[i+40>>2],u={tm_sec:a()[i>>2],tm_min:a()[i+4>>2],tm_hour:a()[i+8>>2],tm_mday:a()[i+12>>2],tm_mon:a()[i+16>>2],tm_year:a()[i+20>>2],tm_wday:a()[i+24>>2],tm_yday:a()[i+28>>2],tm_isdst:a()[i+32>>2],tm_gmtoff:a()[i+36>>2],tm_zone:o?Te(o):""},c=Te(n),l={"%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 d in l)c=c.replace(new RegExp(d,"g"),l[d]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return f(e,t,"0")}function g(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function y(e){var t=((e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Or(r.getFullYear()),i=r.getMonth(),o=(n?en:tn)[i];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r})(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=v(r),o=v(n);return g(i,t)<=0?g(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":e=>h[e.tm_wday].substring(0,3),"%A":e=>h[e.tm_wday],"%b":e=>m[e.tm_mon].substring(0,3),"%B":e=>m[e.tm_mon],"%C":e=>p((e.tm_year+1900)/100|0,2),"%d":e=>p(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>y(e).toString().substring(2),"%G":e=>y(e),"%H":e=>p(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":e=>p(e.tm_mday+((e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r})(Or(e.tm_year+1900)?en:tn,e.tm_mon-1),3),"%m":e=>p(e.tm_mon+1,2),"%M":e=>p(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>p(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return p(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Or(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Or(e.tm_year%400-1))&&t++}return p(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return p(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),w)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),w[d](u)));var b,_,C=we(c=c.replace(/\0\0/g,"%"),!1);return C.length>r?0:(b=C,_=e,t().set(b,_),C.length-1)},nn=$r;Pe.init();var on,an,sn,un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Fe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},cn=365,ln=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&cn)===cn},set:function(e){e?this.mode|=cn:this.mode&=-366}},write:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=-147}},isFolder:{get:function(){return Fe.isDir(this.mode)}},isDevice:{get:function(){return Fe.isChrdev(this.mode)}}}),Fe.FSNode=un,Fe.createPreloadedFile=(e,t,r,n,i,o,a,s,u,c)=>{var l=t?me.resolve(de.join2(e,t)):e;function d(r){function d(r){c&&c(),s||Fe.createDataFile(e,t,r,n,i,u),o&&o(),te()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ee.forEach((o=>{i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i})(r,l,d,(()=>{a&&a(),te()}))||d(r)}ee(),"string"==typeof r?((e,t,r,n)=>{var i=n?"":`al ${e}`;m(e,(r=>{I(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&te()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&ee()})(r,(e=>d(e)),a):d(r)},Fe.staticInit(),ot=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ut=e})(),lt=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Zt.prototype.isAliasOf=ft,Zt.prototype.clone=Rt,Zt.prototype.delete=Mt,Zt.prototype.isDeleted=Wt,Zt.prototype.deleteLater=Ot,d.getInheritedInstanceCount=_t,d.getLiveInheritedInstances=Ct,d.flushPendingDeletes=xt,d.setDelayFunction=Tt,Xt.prototype.getPointee=Ut,Xt.prototype.destructor=Yt,Xt.prototype.argPackAdvance=mt,Xt.prototype.readValueFromPointer=Gt,Xt.prototype.deleteObject=Qt,Xt.prototype.fromWireType=At,er=d.UnboundTypeError=(on=Error,(sn=Lt(an="UnboundTypeError",(function(e){this.name=an,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(on.prototype),sn.prototype.constructor=sn,sn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},sn),Object.assign(ar.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),sr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),sr.reserved=sr.allocated.length,d.count_emval_handles=cr;var dn,hn=[Se,Me,Ve,Be,He,Ge,Ue,function(e,t){if(y)return Tr(7,1,e,t);try{return e=De.getStr(e),De.doStat(Fe.lstat,e,t)}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ye,Qe,Xe,Je,Ke,function(e,t,r,n,i,o,u,c){if(y)return Tr(13,1,e,t,r,n,i,o,u,c);var l=Wr(i,o);try{if(isNaN(l))return 61;var d=De.getStreamFromFD(n),h=Fe.mmap(d,e,l,t,r),m=h.ptr;return a()[u>>2]=h.allocated,s()[c>>2]=m,0}catch(e){if("undefined"==typeof Fe||"ErrnoError"!==e.name)throw e;return-e.errno}},Lr,Ur,Yr,Qr,Xr,Jr,Kr,qr],mn={t:e=>{var t=new ze(e);return t.get_caught()||(t.set_caught(!0),Ie--),t.set_rethrown(!1),Ze.push(t),Mn(t.excPtr),t.get_exception_ptr()},sb:()=>{if(!Ze.length)return 0;var e=Ze[Ze.length-1];return Mn(e.excPtr),e.excPtr},A:()=>{Dn(0,0);var e=Ze.pop();Rn(e.excPtr),Le=0},b:()=>$e([]),g:e=>$e([e]),p:(e,t)=>$e([e,t]),ua:Ne,rb:e=>{if(e){var t=new ze(e);Ze.push(t),t.set_rethrown(!0),Ne()}},q:(e,t,r)=>{throw new ze(e).init(t,r),Ie++,Le=e},tb:()=>Ie,Gb:e=>{Cn(e,!1,1,!0,4194304,!1),Pe.threadInitTLS()},ya:e=>{y?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},Cb:je,c:e=>{throw Le||(Le=e),Le},zb:Be,Ba:He,Mb:Ge,Nb:Ue,Kb:Ye,Ca:Qe,Ab:Xe,Lb:Je,Bb:Ke,_a:e=>{var t=qe[e];delete qe[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType)));st([e],o,(e=>{var o={};return i.forEach(((t,r)=>{var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],l=t.setter,d=t.setterContext;o[n]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];l(d,e,c.toWireType(r,t)),et(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var i in o)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var a=r();for(i in o)o[i].write(a,t[i]);return null!==e&&e.push(n,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:n}]}))},jb:(e,t,r,n,i)=>{},Ea:(e,t,n,i)=>{ht(e,{name:t=ct(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:mt,readValueFromPointer:function(e){return this.fromWireType(r()[e])},destructorFunction:null})},wa:(e,t,r,n,i,o,a,s,u,c,l,d,h)=>{l=ct(l),o=qt(i,o),s&&(s=qt(a,s)),c&&(c=qt(u,c)),h=qt(d,h);var m=It(l);$t(m,(function(){rr(`Cannot construct ${l} due to unbound types`,[n])})),st([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:Zt.prototype;var a=Lt(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new lt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new lt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new lt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:a}});a.prototype=u;var d=new Nt(l,a,u,h,r,o,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var f=new Xt(l,d,!0,!1,!1),p=new Xt(l+"*",d,!1,!1,!1),g=new Xt(l+" const*",d,!1,!0,!1);return bt[e]={pointerType:p,constPointerType:g},Jt(m,a),[f,p,g]}))},va:(e,t,r,n,i,o)=>{var a=nr(t,r);i=qt(n,i),st([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new lt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{rr(`Cannot construct ${e.name} due to unbound types`,a)},st([],a,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=or(r,n,null,i,o),[]))),[]}))},ga:(e,t,r,n,i,o,a,s,u)=>{var c=nr(r,n);t=ct(t),o=qt(i,o),st([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){rr(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(zt(l,t,n),l[t].overloadTable[r-2]=i),st([],c,(function(i){var s=or(n,i,e,o,a,u);return void 0===l[t].overloadTable?(s.argCount=r-2,l[t]=s):l[t].overloadTable[r-2]=s,[]})),[]}))},Da:(e,t)=>{ht(e,{name:t=ct(t),fromWireType:e=>{var t=lr.toValue(e);return ur(e),t},toWireType:(e,t)=>lr.toHandle(t),argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:null})},ma:(e,t,r)=>{ht(e,{name:t=ct(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:mt,readValueFromPointer:hr(t,r),destructorFunction:null})},H:(e,t,r,n,i,o,a)=>{var s=nr(t,r);e=ct(e),i=qt(n,i),$t(e,(function(){rr(`Cannot call ${e} due to unbound types`,s)}),t-1),st([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return Jt(e,or(e,n,null,i,o,a),t-1),[]}))},J:(e,t,r,n,i)=>{t=ct(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ht(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:mt,readValueFromPointer:mr(t,r,0!==n),destructorFunction:null})},z:(e,r,n)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=s()[e>>2],n=s()[e+4>>2];return new i(t().buffer,n,r)}ht(e,{name:n=ct(n),fromWireType:o,argPackAdvance:mt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},la:(e,t)=>{var n="std::string"===(t=ct(t));ht(e,{name:t,fromWireType:e=>{var t,i=s()[e>>2],o=e+4;if(n)for(var a=o,u=0;u<=i;++u){var c=o+u;if(u==i||0==r()[c]){var l=Te(a,c-a);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),a=c+1}}else{var d=new Array(i);for(u=0;u<i;++u)d[u]=String.fromCharCode(r()[o+u]);t=d.join("")}return gn(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||dt("Cannot pass non-string to std::string"),i=n&&o?ve(t):t.length;var a=pn(4+i+1),u=a+4;if(s()[a>>2]=i,n&&o)fr(t,u,i+1);else if(o)for(var c=0;c<i;++c){var l=t.charCodeAt(c);l>255&&(gn(u),dt("String has UTF-16 code units that do not fit in 8 bits")),r()[u+c]=l}else for(c=0;c<i;++c)r()[u+c]=t[c];return null!==e&&e.push(gn,a),a},argPackAdvance:mt,readValueFromPointer:Gt,destructorFunction:e=>gn(e)})},ba:(e,t,r)=>{var n,i,a,u,c;r=ct(r),2===t?(n=gr,i=vr,u=yr,a=()=>o(),c=1):4===t&&(n=wr,i=br,u=_r,a=()=>s(),c=2),ht(e,{name:r,fromWireType:e=>{for(var r,i=s()[e>>2],o=a(),u=e+4,l=0;l<=i;++l){var d=e+4+l*t;if(l==i||0==o[d>>c]){var h=n(u,d-u);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),u=d+t}}return gn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&dt(`Cannot pass non-string to C++ string type ${r}`);var o=u(n),a=pn(4+o+t);return s()[a>>2]=o>>c,i(n,a+4,o+t),null!==e&&e.push(gn,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:e=>gn(e)})},$a:(e,t,r,n,i,o)=>{qe[e]={name:ct(t),rawConstructor:qt(r,n),rawDestructor:qt(i,o),fields:[]}},Za:(e,t,r,n,i,o,a,s,u,c)=>{qe[e].fields.push({fieldName:ct(t),getterReturnType:r,getter:qt(n,i),getterContext:o,setterArgumentType:a,setter:qt(s,u),setterContext:c})},Fa:(e,t)=>{ht(e,{isVoid:!0,name:t=ct(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Qb:()=>!0,xb:(e,t,r)=>{if(e==t)setTimeout((()=>xr()));else if(y)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Pe.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Eb:(e,t,r,n)=>{Dr.length=r;for(var i=n>>3,o=0;o<r;o++)Dr[o]=u()[i+o];var a=e<0?ae[-e-1]:hn[e];Pe.currentProxiedOperationCallerThread=t;var s=a.apply(null,Dr);return Pe.currentProxiedOperationCallerThread=0,s},Fb:Er,Pb:e=>{},ub:()=>{throw 1/0},R:(e,t,r)=>{e=lr.toValue(e),t=Sr(t,"emval::as");var n=[],i=lr.toHandle(n);return s()[r>>2]=i,t.toWireType(n,e)},ia:(e,t,r,n,i)=>(e=Pr[e])(t=lr.toValue(t),r=Ar(r),(e=>{var t=[];return s()[e>>2]=lr.toHandle(t),t})(n),i),ha:(e,t,r,n)=>{(e=Pr[e])(t=lr.toValue(t),r=Ar(r),null,n)},mb:ur,Ua:e=>0===e?lr.toHandle(Rr()):(e=Ar(e),lr.toHandle(Rr()[e])),Q:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Sr(s()[t+4*n>>2],"parameter "+n);return r})(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Mr[i];if(void 0!==o)return o;for(var a=["retType"],u=[n],c="",l=0;l<e-1;++l)c+=(0!==l?", ":"")+"arg"+l,a.push("argType"+l),u.push(r[1+l]);var d="return function "+It("methodCaller_"+i)+"(handle, name, destructors, args) {\n",h=0;for(l=0;l<e-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(h?"+"+h:"")+");\n",h+=r[l+1].argPackAdvance;for(d+=" var rv = handle[name]("+c+");\n",l=0;l<e-1;++l)r[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",a.push(d);var m,f,p=ir(Function,a).apply(null,u);return m=p,f=Pr.length,Pr.push(m),o=f,Mr[i]=o,o},bb:(e,t)=>(e=lr.toValue(e),t=lr.toValue(t),lr.toHandle(e[t])),s:e=>{e>4&&(sr.get(e).refcount+=1)},_:()=>lr.toHandle([]),L:e=>lr.toHandle(Ar(e)),E:()=>lr.toHandle({}),ab:e=>{var t=lr.toValue(e);et(t),ur(e)},Db:(e,t,r)=>{e=lr.toValue(e),t=lr.toValue(t),r=lr.toValue(r),e[t]=r},K:(e,t)=>{var r=(e=Sr(e,"_emval_take_value")).readValueFromPointer(t);return lr.toHandle(r)},gb:function(e,t,r){var n=Wr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getUTCSeconds(),a()[r+4>>2]=i.getUTCMinutes(),a()[r+8>>2]=i.getUTCHours(),a()[r+12>>2]=i.getUTCDate(),a()[r+16>>2]=i.getUTCMonth(),a()[r+20>>2]=i.getUTCFullYear()-1900,a()[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),s=(i.getTime()-o)/864e5|0;a()[r+28>>2]=s},hb:function(e,t,r){var n=Wr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getSeconds(),a()[r+4>>2]=i.getMinutes(),a()[r+8>>2]=i.getHours(),a()[r+12>>2]=i.getDate(),a()[r+16>>2]=i.getMonth(),a()[r+20>>2]=i.getFullYear()-1900,a()[r+24>>2]=i.getDay();var o=0|(e=>(Or(e.getFullYear())?Zr:Ir)[e.getMonth()]+e.getDate()-1)(i);a()[r+28>>2]=o,a()[r+36>>2]=-60*i.getTimezoneOffset();var s=new Date(i.getFullYear(),0,1),u=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&i.getTimezoneOffset()==Math.min(c,u));a()[r+32>>2]=l},fb:Lr,wb:(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),o=new Date(n,6,1),u=i.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(u,c);function d(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}s()[e>>2]=60*l,a()[t>>2]=Number(u!=c);var h=d(i),m=d(o),f=$r(h),p=$r(m);c<u?(s()[r>>2]=f,s()[r+4>>2]=p):(s()[r>>2]=p,s()[r+4>>2]=f)},x:()=>{re("")},Va:(e,t,r)=>Vr(e,t,r),za:()=>{},U:()=>Date.now(),Ob:()=>{throw B+=1,"unwind"},yb:()=>2147483648,F:zr,oa:()=>navigator.hardwareConcurrency,vb:e=>{var t=r().length;if((e>>>=0)<=t)return!1;var n=2147483648;e>n&&jr();for(var i,o,a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var u=Math.min(n,(i=Math.max(e,s))+((o=65536)-i%o)%o);if(Br(u))return!0}jr()},Ib:Ur,Jb:Yr,na:ke,ka:Qr,Hb:Xr,Aa:Jr,ib:Kr,ja:qr,Xa:function(){return nn(location.toString())},ob:(e,t)=>(he(r().subarray(e,e+t)),0),Wa:function(){return nn((e=Bn,self[e(429,"uFZ%")][e(441,"9ZVa")]()));var e},Ya:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},G:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},N:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},fa:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},T:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Ra:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},V:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},r:function(e){var t=kn();try{return We(e)()}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},h:function(e,t){var r=kn();try{return We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Na:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},pa:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Oa:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Qa:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Pa:function(e,t,r,n,i,o,a,s){var u=kn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},f:function(e,t,r){var n=kn();try{return We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Sa:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},k:function(e,t,r,n){var i=kn();try{return We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},O:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},l:function(e,t,r,n,i){var o=kn();try{return We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},qb:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},ta:function(e,t,r,n,i,o,a){var s=kn();try{return We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},o:function(e,t,r,n,i,o){var a=kn();try{return We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},D:function(e,t,r,n,i,o,a){var s=kn();try{return We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},xa:function(e,t,r,n,i,o,a,s){var u=kn();try{return We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ha:function(e,t,r,n,i,o,a,s,u){var c=kn();try{return We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},Ga:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{return We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},aa:function(e,t,r,n,i,o,a,s,u,c,l,d){var h=kn();try{return We(e)(t,r,n,i,o,a,s,u,c,l,d)}catch(e){if(An(h),e!==e+0)throw e;Dn(1,0)}},lb:function(e,t,r,n){var i=kn();try{return Ln(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},eb:function(e){var t=kn();try{return zn(e)}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},nb:function(e,t){var r=kn();try{return Zn(e,t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},db:function(e,t,r){var n=kn();try{return $n(e,t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},cb:function(e,t,r,n,i){var o=kn();try{return Nn(e,t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},m:function(e){var t=kn();try{We(e)()}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},d:function(e,t){var r=kn();try{We(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Z:function(e,t,r){var n=kn();try{We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},ea:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},P:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ka:function(e,t,r){var n=kn();try{We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},e:function(e,t,r){var n=kn();try{We(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},v:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Y:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ca:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},La:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},S:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ma:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Ia:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ja:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},qa:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ra:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},i:function(e,t,r,n){var i=kn();try{We(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},B:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},u:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},M:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},j:function(e,t,r,n,i){var o=kn();try{We(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},da:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},n:function(e,t,r,n,i,o){var a=kn();try{We(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},y:function(e,t,r,n,i,o,a){var s=kn();try{We(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},sa:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},w:function(e,t,r,n,i,o,a,s){var u=kn();try{We(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},X:function(e,t,r,n,i,o,a,s,u){var c=kn();try{We(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},W:function(e,t,r,n,i,o,a,s,u,c){var l=kn();try{We(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},C:function(e,t,r,n,i,o,a,s,u,c,l){var d=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},$:function(e,t,r,n,i,o,a,s,u,c,l,d,h,m,f,p){var g=kn();try{We(e)(t,r,n,i,o,a,s,u,c,l,d,h,m,f,p)}catch(e){if(An(g),e!==e+0)throw e;Dn(1,0)}},kb:function(e,t,r,n){var i=kn();try{In(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},I:e=>e,a:x||d.wasmMemory,Ta:rn,pb:(e,t,r,n,i)=>rn(e,t,r,n)},fn=function(){var e,t,r,n,i={a:mn};function o(e,t){var r,n=e.exports;return Oe((fn=n).Yb),z=fn.Tb,r=fn.Rb,V.unshift(r),F=t,te(),n}if(ee(),d.instantiateWasm)try{return d.instantiateWasm(i,o)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),l(e)}return(e=_,t=Y,r=i,n=function(e){o(e.instance,e.module)},e||"function"!=typeof WebAssembly.instantiateStreaming||ne(t)||"function"!=typeof fetch?oe(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),oe(t,r,n)}))))).catch(l),{}}(),pn=d._malloc=e=>(pn=d._malloc=fn.Sb)(e),gn=d._free=e=>(gn=d._free=fn.Ub)(e),vn=()=>(vn=fn.Vb)(),yn=d._pthread_self=()=>(yn=d._pthread_self=fn.Wb)(),wn=e=>(wn=fn.Xb)(e),bn=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=fn.Yb)(),(e,t)=>(bn=fn.Zb)(e,t)),_n=e=>(_n=fn._b)(e),Cn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=fn.$b)(),d.__emscripten_thread_init=(e,t,r,n,i,o)=>(Cn=d.__emscripten_thread_init=fn.ac)(e,t,r,n,i,o)),En=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=fn.bc)(),(e,t,r,n)=>(En=fn.cc)(e,t,r,n)),xn=e=>(xn=fn.dc)(e),Fn=d.__emscripten_thread_exit=e=>(Fn=d.__emscripten_thread_exit=fn.ec)(e),Tn=d.__emscripten_check_mailbox=()=>(Tn=d.__emscripten_check_mailbox=fn.fc)(),Dn=(e,t)=>(Dn=fn.gc)(e,t),Sn=(e,t)=>(Sn=fn.hc)(e,t),kn=()=>(kn=fn.ic)(),An=e=>(An=fn.jc)(e),Pn=e=>(Pn=fn.kc)(e),Rn=e=>(Rn=fn.lc)(e),Mn=e=>(Mn=fn.mc)(e),Wn=(e,t,r)=>(Wn=fn.nc)(e,t,r),On=e=>(On=fn.oc)(e),Zn=d.dynCall_ji=(e,t)=>(Zn=d.dynCall_ji=fn.pc)(e,t),In=d.dynCall_vij=(e,t,r,n)=>(In=d.dynCall_vij=fn.qc)(e,t,r,n),Ln=d.dynCall_iij=(e,t,r,n)=>(Ln=d.dynCall_iij=fn.rc)(e,t,r,n),zn=(d.dynCall_iiiijj=(e,t,r,n,i,o,a,s)=>(d.dynCall_iiiijj=fn.sc)(e,t,r,n,i,o,a,s),d.dynCall_viijj=(e,t,r,n,i,o,a)=>(d.dynCall_viijj=fn.tc)(e,t,r,n,i,o,a),d.dynCall_viiijjj=(e,t,r,n,i,o,a,s,u,c)=>(d.dynCall_viiijjj=fn.uc)(e,t,r,n,i,o,a,s,u,c),d.dynCall_jiji=(e,t,r,n,i)=>(d.dynCall_jiji=fn.vc)(e,t,r,n,i),d.dynCall_j=e=>(zn=d.dynCall_j=fn.wc)(e)),$n=d.dynCall_jii=(e,t,r)=>($n=d.dynCall_jii=fn.xc)(e,t,r),Nn=(d.dynCall_viijii=(e,t,r,n,i,o,a)=>(d.dynCall_viijii=fn.yc)(e,t,r,n,i,o,a),d.dynCall_jiiii=(e,t,r,n,i)=>(Nn=d.dynCall_jiiii=fn.zc)(e,t,r,n,i));function Vn(){if(!(J>0)){if(y)return c(d),G(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)U(d.preRun.shift());Re(N)}(),J>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e())}function e(){dn||(dn=!0,d.calledRun=!0,Z||(G(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!y){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),j.unshift(e);var e;Re(j)}}()))}}if(d.dynCall_iiiiij=(e,t,r,n,i,o,a)=>(d.dynCall_iiiiij=fn.Ac)(e,t,r,n,i,o,a),d.dynCall_iiiiijj=(e,t,r,n,i,o,a,s,u)=>(d.dynCall_iiiiijj=fn.Bc)(e,t,r,n,i,o,a,s,u),d.dynCall_iiiiiijj=(e,t,r,n,i,o,a,s,u,c)=>(d.dynCall_iiiiiijj=fn.Cc)(e,t,r,n,i,o,a,s,u,c),d.___start_em_js=3693376,d.___stop_em_js=3693484,d.keepRuntimeAlive=H,d.wasmMemory=x,d.UTF8ToString=Te,d.stringToUTF8=fr,d.lengthBytesUTF8=ve,d.ExitStatus=se,d.allocateUTF8=nn,d.PThread=Pe,q=function e(){dn||Vn(),dn||(q=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function jn(){var e=["W67dPW9JWQtdQsvn","xuL4W73dSfpdTCk9fHK","W5JcRGWslrVcTexdVSoHWPy","WPBdGN/dKbVdUSkvW5S3Bb9H","W4ddVXumWPxcNmkeW74EvX4","WPXQWOCMW453lqy","W4xdUbKaWPddNSk8W7yEtIGX","WODzxSoPdc16za","FmoigCkMoqVdNmomW6RcSSo6WQG","oSoSWPX+WQRcVeFcMtWSWO17WOdcOa","WOxdImoVlvhcVCkFCI8","W4OrwSobW4LMdmkCW4/cLG","kmkWzvCqfmkDWP8","WOtdOSo2W6RdJmoJxdS+WPtcJmo/WRO","C2eXW7xcTmkEW4ToW47cP8o9FY9I","W7NdPCoJf2ddPmkxW4LGnG","g8kbmmkIgvmkWQtcOgZcQG","W5FcMmkNpmkwW449BfpcRa","d1LcrNpcVGlcJvC","WRtcVafyWPxdTsvv","oCo/W6NcU1BdJ8oEpSkNW7NcOJHC","oSoSWPf8WQJdVc/dJt8HWPG","d2FdKKKUsCkhWPWNy8kXnW","pSoVW4qsW53dUHhdNq"];return(jn=function(){return e})()}function Bn(e,t){var r=jn();return Bn=function(t,n){var i=r[t-=425];if(void 0===Bn.IgPDva){var o=function(e){for(var t,r,n="",i="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?n+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=n.length;s<u;s++)i+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(i)},a=function(e,t){var r,n,i=[],a=0,s="";for(e=o(e),n=0;n<256;n++)i[n]=n;for(n=0;n<256;n++)a=(a+i[n]+t.charCodeAt(n%t.length))%256,r=i[n],i[n]=i[a],i[a]=r;n=0,a=0;for(var u=0;u<e.length;u++)a=(a+i[n=(n+1)%256])%256,r=i[n],i[n]=i[a],i[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^i[(i[n]+i[a])%256]);return s};Bn.pOlgUI=a,e=arguments,Bn.IgPDva=!0}var s=r[0],u=t+s,c=e[u];return c?i=c:(void 0===Bn.GaNKxM&&(Bn.GaNKxM=!0),i=Bn.pOlgUI(i,n),e[u]=i),i},Bn(e,t)}Vn(),function(e,t){for(var r=Bn,n=e();;)try{if(470921==parseInt(r(432,"Wgw1"))/1+parseInt(r(431,"uZN0"))/2*(-parseInt(r(434,"2[@Z"))/3)+-parseInt(r(447,"Q@E5"))/4*(-parseInt(r(433,"r]yk"))/5)+-parseInt(r(425,"z#^("))/6+parseInt(r(427,"[cIO"))/7*(-parseInt(r(448,"uFZ%"))/8)+parseInt(r(446,"s@N#"))/9*(-parseInt(r(440,"rWKy"))/10)+parseInt(r(438,"#Tfs"))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(jn);var ighnua,Hn=(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}),Gn=Hn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Gn)};return e()}));return Gn(),e.ready});e.exports=i},function(e,t,r){"use strict";r.r(t),t.default="data:application/javascript;charset=utf-8;base64,InVzZSBzdHJpY3QiO3ZhciBNb2R1bGU9e307dmFyIGluaXRpYWxpemVkSlM9ZmFsc2U7ZnVuY3Rpb24gdGhyZWFkUHJpbnRFcnIoKXt2YXIgdGV4dD1BcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpLmpvaW4oIiAiKTtjb25zb2xlLmVycm9yKHRleHQpfWZ1bmN0aW9uIHRocmVhZEFsZXJ0KCl7dmFyIHRleHQ9QXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKS5qb2luKCIgIik7cG9zdE1lc3NhZ2Uoe2NtZDoiYWxlcnQiLHRleHQ6dGV4dCx0aHJlYWRJZDpNb2R1bGVbIl9wdGhyZWFkX3NlbGYiXSgpfSl9dmFyIGVycj10aHJlYWRQcmludEVycjtzZWxmLmFsZXJ0PXRocmVhZEFsZXJ0O01vZHVsZVsiaW5zdGFudGlhdGVXYXNtIl09KGluZm8scmVjZWl2ZUluc3RhbmNlKT0+e3ZhciBtb2R1bGU9TW9kdWxlWyJ3YXNtTW9kdWxlIl07TW9kdWxlWyJ3YXNtTW9kdWxlIl09bnVsbDt2YXIgaW5zdGFuY2U9bmV3IFdlYkFzc2VtYmx5Lkluc3RhbmNlKG1vZHVsZSxpbmZvKTtyZXR1cm4gcmVjZWl2ZUluc3RhbmNlKGluc3RhbmNlKX07c2VsZi5vbnVuaGFuZGxlZHJlamVjdGlvbj1lPT57dGhyb3cgZS5yZWFzb258fGV9O2Z1bmN0aW9uIGhhbmRsZU1lc3NhZ2UoZSl7dHJ5e2lmKGUuZGF0YS5jbWQ9PT0ibG9hZCIpe2xldCBtZXNzYWdlUXVldWU9W107c2VsZi5vbm1lc3NhZ2U9ZT0+bWVzc2FnZVF1ZXVlLnB1c2goZSk7c2VsZi5zdGFydFdvcmtlcj1pbnN0YW5jZT0+e01vZHVsZT1pbnN0YW5jZTtwb3N0TWVzc2FnZSh7ImNtZCI6ImxvYWRlZCJ9KTtmb3IobGV0IG1zZyBvZiBtZXNzYWdlUXVldWUpe2hhbmRsZU1lc3NhZ2UobXNnKX1zZWxmLm9ubWVzc2FnZT1oYW5kbGVNZXNzYWdlfTtNb2R1bGVbIndhc21Nb2R1bGUiXT1lLmRhdGEud2FzbU1vZHVsZTtmb3IoY29uc3QgaGFuZGxlciBvZiBlLmRhdGEuaGFuZGxlcnMpe01vZHVsZVtoYW5kbGVyXT0oLi4uYXJncyk9Pntwb3N0TWVzc2FnZSh7Y21kOiJjYWxsSGFuZGxlciIsaGFuZGxlcjpoYW5kbGVyLGFyZ3M6YXJnc30pfX1Nb2R1bGVbIndhc21NZW1vcnkiXT1lLmRhdGEud2FzbU1lbW9yeTtNb2R1bGVbImJ1ZmZlciJdPU1vZHVsZVsid2FzbU1lbW9yeSJdLmJ1ZmZlcjtNb2R1bGVbIkVOVklST05NRU5UX0lTX1BUSFJFQUQiXT10cnVlO2lmKHR5cGVvZiBlLmRhdGEudXJsT3JCbG9iPT0ic3RyaW5nIil7aW1wb3J0U2NyaXB0cyhlLmRhdGEudXJsT3JCbG9iKX1lbHNle3ZhciBvYmplY3RVcmw9VVJMLmNyZWF0ZU9iamVjdFVSTChlLmRhdGEudXJsT3JCbG9iKTtpbXBvcnRTY3JpcHRzKG9iamVjdFVybCk7VVJMLnJldm9rZU9iamVjdFVSTChvYmplY3RVcmwpfWluaXRNb2R1bGUoTW9kdWxlKX1lbHNlIGlmKGUuZGF0YS5jbWQ9PT0icnVuIil7TW9kdWxlWyJfX2Vtc2NyaXB0ZW5fdGhyZWFkX2luaXQiXShlLmRhdGEucHRocmVhZF9wdHIsMCwwLDEpO01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9tYWlsYm94X2F3YWl0Il0oZS5kYXRhLnB0aHJlYWRfcHRyKTtNb2R1bGVbImVzdGFibGlzaFN0YWNrU3BhY2UiXSgpO01vZHVsZVsiUFRocmVhZCJdLnJlY2VpdmVPYmplY3RUcmFuc2ZlcihlLmRhdGEpO01vZHVsZVsiUFRocmVhZCJdLnRocmVhZEluaXRUTFMoKTtpZighaW5pdGlhbGl6ZWRKUyl7TW9kdWxlWyJfX2VtYmluZF9pbml0aWFsaXplX2JpbmRpbmdzIl0oKTtpbml0aWFsaXplZEpTPXRydWV9dHJ5e01vZHVsZVsiaW52b2tlRW50cnlQb2ludCJdKGUuZGF0YS5zdGFydF9yb3V0aW5lLGUuZGF0YS5hcmcpfWNhdGNoKGV4KXtpZihleCE9InVud2luZCIpe3Rocm93IGV4fX19ZWxzZSBpZihlLmRhdGEuY21kPT09ImNhbmNlbCIpe2lmKE1vZHVsZVsiX3B0aHJlYWRfc2VsZiJdKCkpe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9leGl0Il0oLTEpfX1lbHNlIGlmKGUuZGF0YS50YXJnZXQ9PT0ic2V0aW1tZWRpYXRlIil7fWVsc2UgaWYoZS5kYXRhLmNtZD09PSJjaGVja01haWxib3giKXtpZihpbml0aWFsaXplZEpTKXtNb2R1bGVbImNoZWNrTWFpbGJveCJdKCl9fWVsc2UgaWYoZS5kYXRhLmNtZCl7ZXJyKGB3b3JrZXIuanMgcmVjZWl2ZWQgdW5rbm93biBjb21tYW5kICR7ZS5kYXRhLmNtZH1gKTtlcnIoZS5kYXRhKX19Y2F0Y2goZXgpe2lmKE1vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0pe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0oKX10aHJvdyBleH19c2VsZi5vbm1lc3NhZ2U9aGFuZGxlTWVzc2FnZTsK"},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Se})),r.d(t,"commands",(function(){return Me}));var n,i,o,a,s,u,c,l,d,h,m=r(0);class f{_marker(){}}class p extends f{constructor(e={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class g extends f{constructor(e={}){super(),this.attributes=new p({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new p(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class v extends f{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class y extends f{constructor(e={}){super(),this.accumulatedResultsVerifierConfig=new v({}),void 0!==e.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new v(e.accumulatedResultsVerifierConfig))}}class w extends f{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class b extends f{constructor(e={}){super(),this.qualityThresholds=[new w({symbolQuality:.5,symbolRatio:.5}),new w({symbolQuality:.7,symbolRatio:.3}),new w({symbolQuality:.85,symbolRatio:.3}),new w({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new w(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new _(e);case"CustomBinarizationFilter":return new C(e);case"ColorDocumentFilter":return new E(e);case"BrightnessFilter":return new x(e);case"ContrastFilter":return new F(e);case"GrayscaleFilter":return new T(e);case"LegacyFilter":return new D(e);case"WhiteBlackPointFilter":return new S(e);default:throw`Unknown child class name: ${t}`}}}(n||(n={}));class _ extends f{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class C extends f{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class E extends f{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class x extends f{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class F extends f{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class T extends f{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class D extends f{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class S extends f{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class k extends f{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class A extends f{constructor(e={}){super(),this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.requiredAspectRatios=[],this.rectangleOfInterest={x:0,y:0,width:0,height:0},void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.requiredAspectRatios&&(this.requiredAspectRatios=e.requiredAspectRatios.map((e=>new k(e)))),void 0!==e.rectangleOfInterest&&(this.rectangleOfInterest={x:e.rectangleOfInterest.x,y:e.rectangleOfInterest.y,width:e.rectangleOfInterest.width,height:e.rectangleOfInterest.height})}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new P(e);case"PresetContentValidator":return new R(e);case"PatternContentValidator":return new M(e);default:throw`Unknown child class name: ${t}`}}}(i||(i={}));class P extends f{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class R extends f{constructor(e={}){if(super(),this._type="PresetContentValidator",void 0===e.preset)throw new Error("preset must be present in constructor argument");this.preset=e.preset}}class M extends f{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class W extends f{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new P({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=i.From(e.validator))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new O(e);case"Code11Config":return new Z(e);case"Code39Config":return new I(e);case"Code93Config":return new L(e);case"Code128Config":return new z(e);case"Code2Of5Config":return new $(e);case"DataBarConfig":return new N(e);case"DataBarExpandedConfig":return new V(e);case"DataBarLimitedConfig":return new j(e);case"ITFConfig":return new B(e);case"MSIPlesseyConfig":return new H(e);case"UpcEanConfig":return new G(e);case"PharmaCodeConfig":return new U(e);case"AztecConfig":return new Y(e);case"QRCodeConfig":return new Q(e);case"PDF417Config":return new X(e);case"MicroPDF417Config":return new J(e);case"DataMatrixConfig":return new K(e);case"MaxiCodeConfig":return new q(e);case"AustraliaPostConfig":return new ee(e);case"JapanPostConfig":return new te(e);case"RoyalMailConfig":return new re(e);case"RoyalTNTPostConfig":return new ne(e);case"USPSIntelligentMailConfig":return new ie(e);case"PharmaCodeTwoTrackConfig":return new oe(e);case"GS1CompositeConfig":return new ae(e);case"GroupOneDConfig":return new se(e);case"GroupTwoDConfig":return new ue(e);case"GroupFourStateConfig":return new ce(e);case"GroupCommonConfig":return new le(e);default:throw`Unknown child class name: ${t}`}}}(o||(o={})),function(e){e.From=function(e){const t=e._type;switch(t){case"CodabarConfig":return new O(e);case"Code11Config":return new Z(e);case"Code39Config":return new I(e);case"Code93Config":return new L(e);case"Code128Config":return new z(e);case"Code2Of5Config":return new $(e);case"DataBarConfig":return new N(e);case"DataBarExpandedConfig":return new V(e);case"DataBarLimitedConfig":return new j(e);case"ITFConfig":return new B(e);case"MSIPlesseyConfig":return new H(e);case"UpcEanConfig":return new G(e);case"PharmaCodeConfig":return new U(e);default:throw`Unknown child class name: ${t}`}}}(a||(a={}));class O extends f{constructor(e={}){super(),this._type="CodabarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class Z extends f{constructor(e={}){super(),this._type="Code11Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class I extends f{constructor(e={}){super(),this._type="Code39Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class L extends f{constructor(e={}){super(),this._type="Code93Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class z extends f{constructor(e={}){super(),this._type="Code128Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class $ extends f{constructor(e={}){super(),this._type="Code2Of5Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class N extends f{constructor(e={}){super(),this._type="DataBarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class V extends f{constructor(e={}){super(),this._type="DataBarExpandedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class j extends f{constructor(e={}){super(),this._type="DataBarLimitedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class B extends f{constructor(e={}){super(),this._type="ITFConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class H extends f{constructor(e={}){super(),this._type="MSIPlesseyConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class G extends f{constructor(e={}){super(),this._type="UpcEanConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class U extends f{constructor(e={}){super(),this._type="PharmaCodeConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AztecConfig":return new Y(e);case"QRCodeConfig":return new Q(e);case"PDF417Config":return new X(e);case"MicroPDF417Config":return new J(e);case"DataMatrixConfig":return new K(e);case"MaxiCodeConfig":return new q(e);default:throw`Unknown child class name: ${t}`}}}(s||(s={}));class Y extends f{constructor(e={}){super(),this._type="AztecConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Q extends f{constructor(e={}){super(),this._type="QRCodeConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class X extends f{constructor(e={}){super(),this._type="PDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class J extends f{constructor(e={}){super(),this._type="MicroPDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class K extends f{constructor(e={}){super(),this._type="DataMatrixConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class q extends f{constructor(e={}){super(),this._type="MaxiCodeConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"AustraliaPostConfig":return new ee(e);case"JapanPostConfig":return new te(e);case"RoyalMailConfig":return new re(e);case"RoyalTNTPostConfig":return new ne(e);case"USPSIntelligentMailConfig":return new ie(e);case"PharmaCodeTwoTrackConfig":return new oe(e);default:throw`Unknown child class name: ${t}`}}}(u||(u={}));class ee extends f{constructor(e={}){super(),this._type="AustraliaPostConfig",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class te extends f{constructor(e={}){super(),this._type="JapanPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class re extends f{constructor(e={}){super(),this._type="RoyalMailConfig",this.regexFilter="",this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class ne extends f{constructor(e={}){super(),this._type="RoyalTNTPostConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ie extends f{constructor(e={}){super(),this._type="USPSIntelligentMailConfig",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class oe extends f{constructor(e={}){super(),this._type="PharmaCodeTwoTrackConfig",this.regexFilter="",this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class ae extends f{constructor(e={}){super(),this._type="GS1CompositeConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class se extends f{constructor(e={}){super(),this._type="GroupOneDConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends f{constructor(e={}){super(),this._type="GroupTwoDConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ce extends f{constructor(e={}){super(),this._type="GroupFourStateConfig",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class le extends f{constructor(e={}){super(),this._type="GroupCommonConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class de extends f{constructor(e={}){super()}}(c=de||(de={})).all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],c.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]};class he extends f{constructor(e={}){super(),this.configurators=[new le({})],this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==e.configurators&&(this.configurators=e.configurators.map((e=>o.From(e)))),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live),void 0!==e.acceptedDocumentFormats&&(this.acceptedDocumentFormats=e.acceptedDocumentFormats.map((e=>e))),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfig":return new me(e);case"EuropeanHealthInsuranceCardConfig":return new fe(e);case"MRZFallbackConfig":return new pe(e);case"GDRGroupConfig":return new ge(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class me extends f{constructor(e={}){super(),this._type="DateValidationConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.documentTypes=[],void 0!==e.minBirthYear&&(this.minBirthYear=e.minBirthYear),void 0!==e.maxBirthYear&&(this.maxBirthYear=e.maxBirthYear),void 0!==e.minExpirationYear&&(this.minExpirationYear=e.minExpirationYear),void 0!==e.maxExpirationYear&&(this.maxExpirationYear=e.maxExpirationYear),void 0!==e.documentTypes&&(this.documentTypes=e.documentTypes.map((e=>e)))}}class fe extends f{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.expectedCountry=null,void 0!==e.minBirthYear&&(this.minBirthYear=e.minBirthYear),void 0!==e.maxBirthYear&&(this.maxBirthYear=e.maxBirthYear),void 0!==e.minExpirationYear&&(this.minExpirationYear=e.minExpirationYear),void 0!==e.maxExpirationYear&&(this.maxExpirationYear=e.maxExpirationYear),void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry?e.expectedCountry:null)}}class pe extends f{constructor(e={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class ge extends f{constructor(e={}){super(),this._type="GDRGroupConfig",this.acceptedDocumentTypes=[],void 0!==e.acceptedDocumentTypes&&(this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e)))}}class ve extends f{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class ye extends f{constructor(e={}){super(),this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class we extends f{constructor(e={}){super(),this.resultAccumulationConfig=new ye({}),this.fieldExcludeList=[],this.configurations=[new ge({})],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new ye(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0!==e.configurations&&(this.configurations=e.configurations.map((e=>l.From(e))))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new be(e);case"UserFieldStringValue":return new _e(e);case"UserFieldIntValue":return new Ce(e);default:throw`Unknown child class name: ${t}`}}}(d||(d={}));class be extends f{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class _e extends f{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ce extends f{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ee extends f{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=d.From(e.value)}}class xe extends f{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new Ee(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?n.From(e.binarizationFilter):null)}}(h=xe||(xe={})).defaultCompression="LZW",h.binaryDocumentOptimizedCompression="CCITTFAX4";var Fe=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};let Te;class De extends Error{}class Se{constructor(e){this.id=e}}const ke={};function Ae(e){const t=Math.random().toString(36);return ke[t]=e,new Se(t)}function Pe(e){if(!ke.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return ke[e.id]}function Re(e){const t=Pe(e);t.delete&&t.delete(),delete ke[e.id]}const Me={initialize:function(e,t,n,i,o){return Fe(this,void 0,void 0,(function*(){try{const{captureConsole:a,jpegQuality:s=80,requestSuffix:u=""}=o||{};a&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const c=r(2),l=r(3),d={locateFile:function(e,r){let n;return n=t?Object(m.c)(t)?t:"":i,e.endsWith(".worker.js")&&l?l.default:new URL(n+e+u,location.href).href}},h=Object(m.b)(o),f=h.includes("-threads");d.mainScriptUrlOrBlob=d.locateFile(`ScanbotSDK.Asm${h}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=n,e.push(4*n));for(let r=0;r<e.length;r++){const n=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(d.wasmMemory=p),d.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new De("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield c(d),Te=d,Te.initialize(e||"",n,s)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return Fe(this,void 0,void 0,(function*(){return Te.getLicenseInfo()}))},encodeJpeg:function(e){return Fe(this,void 0,void 0,(function*(){const t=Ze(e);return We(Te.encodeJpeg(t))}))},detectDocument:function(e,t){return Fe(this,void 0,void 0,(function*(){const r=new Te.DocumentDetector(new A(t)),n=r.detect(Ze(e));return r.delete(),We(n)}))},detectAndCropDocument:function(e){return Fe(this,void 0,void 0,(function*(){let t=We(Te.detectAndCropDocument(Ze(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentDetector:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.DocumentDetector(new A(e)))}))},documentDetectorDetect:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).detect(Ze(t)),t)}))},parseBarcodeDocument:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.parseBarcodeDocument(e,t))}))},createBarcodeRecognizer:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.BarcodeRecognizer(new he(e)))}))},recognizeBarcodes:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ze(t)),t)}))},beginPdf:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.PdfGenerationContext(new g(e)))}))},addPageToPdf:function(e,t){return Fe(this,void 0,void 0,(function*(){We(Pe(e).addPage(Ze(t)))}))},completePdf:function(e){return Fe(this,void 0,void 0,(function*(){try{const t=Pe(e);return We(t.complete())}finally{Re(e)}}))},beginTiff:function(e){return Fe(this,void 0,void 0,(function*(){const t=new Te.TiffGenerationContext(new xe(e));return We(t.begin()),Ae(t)}))},addPageToTiff:function(e,t,r){return Fe(this,void 0,void 0,(function*(){return We(Pe(e).addPage(Ze(t),r))}))},completeTiff:function(e){return Fe(this,void 0,void 0,(function*(){try{const t=Pe(e);return We(t.complete())}finally{Re(e)}}))},createMRZRecognizer:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.MrzRecognizerContext(new y(e)))}))},recognizeMRZ:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ze(t)),t)}))},releaseObject:function(e){return Fe(this,void 0,void 0,(function*(){Re(e)}))},createOcrEngine:function(){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.TLDROcrContext)}))},performOcr:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Pe(e).performOcr(Ze(t)))}))},createGenericTextLineScanner:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.GenericTextLineScanner(new W(e)))}))},recognizeTextLine:function(e,t){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ze(t)),t)}))},cleanTextLineRecognitionQueue:function(e){return Fe(this,void 0,void 0,(function*(){Pe(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.DocumentQualityAnalyzer(new b(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Pe(e).analyze(Ze(t)))}))},imageApplyFilter:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageApplyFilter(Ze(e),n.From(t)))}))},imageCrop:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageCrop(Ze(e),t))}))},imageResize:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageResize(Ze(e),t))}))},imageRotate:function(e,t){return Fe(this,void 0,void 0,(function*(){return We(Te.imageRotate(Ze(e),t))}))},genericDocumentRecognizerCreate:function(e){return Fe(this,void 0,void 0,(function*(){return Ae(new Te.GenericDocumentRecognizer(new we(e)))}))},genericDocumentRecognizerRecognize:function(e,t,r){return Fe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Ze(t),new ve(r)),t)}))},version:function(){return Fe(this,void 0,void 0,(function*(){return"6.0.0-dev.3"}))},__hasModuleFunction:function(e){return Fe(this,void 0,void 0,(function*(){return Te.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return Fe(this,void 0,void 0,(function*(){return Te[e](...t)}))}};function We(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Oe(e,t){return Object.assign(Object.assign({},We(e)),{originalImage:t})}function Ze(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;Te||"initialize"===t?(()=>Fe(this,void 0,void 0,(function*(){return yield Me[t].apply(null,r)})))().then((e=>{const t=Object(m.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof De)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(Te.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,error:new Error("WASM module not loaded yet.")})}}]);
|
|
1
|
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";(function(e){function n(e,t=!1){const r=[];if(t)return r;return function e(t){if(t)if(t.constructor===ImageData)r.push(t.data.buffer);else if(t.constructor===ArrayBuffer)r.push(t);else if(ArrayBuffer.isView(t))r.push(t.buffer);else if(Array.isArray(t))for(let r=0;r<t.length;++r)e(t[r]);else if(t.constructor===Object)for(const r in t)t.hasOwnProperty(r)&&e(t[r])}(e),r}function i(e){return e.startsWith("http:")||e.startsWith("https:")}function o(t){const{allowSimd:r=!0,allowThreads:n=!0}=t||{};let i="";if(r&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}}()){i+="-simd";n&&function(){if("undefined"!=typeof e&&"undefined"!=typeof e.versions&&"undefined"!=typeof e.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}}()&&(i+="-threads")}return i}r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return o}))}).call(this,r(1))},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],d=!1,l=-1;function h(){d&&u&&(d=!1,u.length?c=u.concat(c):l=-1,c.length&&m())}function m(){if(!d){var e=s(h);d=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,d=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||d||s(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n,i=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return E.buffer!=S.buffer&&Z(),S}function r(){return E.buffer!=S.buffer&&Z(),k}function i(){return E.buffer!=S.buffer&&Z(),A}function o(){return E.buffer!=S.buffer&&Z(),P}function a(){return E.buffer!=S.buffer&&Z(),R}function s(){return E.buffer!=S.buffer&&Z(),W}function u(){return E.buffer!=S.buffer&&Z(),O}var c,d,l=e;l.ready=new Promise(((e,t)=>{c=e,d=t}));var h,m,f,p=Object.assign({},l),g="./this.program",v=(e,t)=>{throw t},y=l.ENVIRONMENT_IS_PTHREAD||!1,w="";function b(e){return l.locateFile?l.locateFile(e,w):w+e}w=self.location.href,n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},m=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)};var F,_=l.print||console.log.bind(console),C=l.printErr||console.error.bind(console);Object.assign(l,p),p=null,l.arguments&&l.arguments,l.thisProgram&&(g=l.thisProgram),l.quit&&(v=l.quit),l.wasmBinary&&(F=l.wasmBinary);var E,x,T=l.noExitRuntime||!0;"object"!=typeof WebAssembly&&re("no native wasm support detected");var D,S,k,A,P,R,W,M,O,B=!1;function L(e,t){e||re(t)}function Z(){var e=E.buffer;l.HEAP8=S=new Int8Array(e),l.HEAP16=A=new Int16Array(e),l.HEAPU8=k=new Uint8Array(e),l.HEAPU16=P=new Uint16Array(e),l.HEAP32=R=new Int32Array(e),l.HEAPU32=W=new Uint32Array(e),l.HEAPF32=M=new Float32Array(e),l.HEAPF64=O=new Float64Array(e)}var z,I=l.INITIAL_MEMORY||134217728;if(L(I>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+I+"! (STACK_SIZE=4194304)"),y)E=l.wasmMemory;else if(l.wasmMemory)E=l.wasmMemory;else if(!((E=new WebAssembly.Memory({initial:I/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw C("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),Error("bad memory");Z(),I=E.buffer.byteLength;var $=[],N=[],V=[],j=0;function H(){return T||j>0}function U(){y||(l.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,be.init(),Re(N))}function G(e){$.unshift(e)}var Y,Q,X,J=0,K=null,q=null;function ee(e){J++,l.monitorRunDependencies&&l.monitorRunDependencies(J)}function te(e){if(J--,l.monitorRunDependencies&&l.monitorRunDependencies(J),0==J&&(null!==K&&(clearInterval(K),K=null),q)){var t=q;q=null,t()}}function re(e){l.onAbort&&l.onAbort(e),C(e="Aborted("+e+")"),B=!0,D=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw d(t),t}function ne(e){return e.startsWith("data:application/octet-stream;base64,")}function ie(e){if(e==Y&&F)return new Uint8Array(F);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}function oe(e,t,r){return function(e){return F||"function"!=typeof fetch?Promise.resolve().then((()=>ie(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>ie(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{C(`failed to asynchronously prepare wasm: ${e}`),re(e)}))}ne(Y="ScanbotSDK.Asm-simd-threads.wasm")||(Y=b(Y));var ae={3693692:e=>nn(function(){return this[Te(e)].toString()}.apply((0,eval)("(()=>this)()")))};function se(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ue=e=>{e.terminate(),e.onmessage=e=>{}},ce=e=>{var t=Pe.pthreads[e];L(t),Pe.returnWorkerToPool(t)},de=e=>{var t=Pe.getNewWorker();if(!t)return 6;Pe.runningWorkers.push(t),Pe.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(r,e.transferList),0},le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},he=e=>(he=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);re("initRandomDevice")})())(e),me={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=le.isAbs(n)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=me.resolve(e).substr(1),t=me.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),o=Math.min(n.length,i.length),a=o,s=0;s<o;s++)if(n[s]!==i[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(i.slice(a))).join("/")}},fe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,pe=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&fe)return fe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,i):e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},ge=[],ve=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},ye=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i};function we(e,t,r){var n=r>0?r:ve(e)+1,i=new Array(n),o=ye(e,i,0,i.length);return t&&(i.length=o),i}var be={ttys:[],init(){},shutdown(){},register(e,t){be.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var t=be.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var o=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new xe.ErrnoError(29)}if(void 0===s&&0===o)throw new xe.ErrnoError(6);if(null==s)break;o++,t[r+a]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,t,r,n,i){if(!e.tty||!e.tty.ops.put_char)throw new xe.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,t[r+o])}catch(e){throw new xe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!ge.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ge=we(e,!0)}return ge.shift()})(),put_char(e,t){null===t||10===t?(_(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(_(pe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(C(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(C(pe(e.output,0)),e.output=[])}}},Fe=e=>{e=((e,t)=>Math.ceil(e/t)*t)(e,65536);var t=bn(65536,e);return t?((e,t)=>(r().fill(0,e,e+t),e))(t,e):0},_e={ops_table:null,mount:e=>_e.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);_e.ops_table||(_e.ops_table={dir:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr,lookup:_e.node_ops.lookup,mknod:_e.node_ops.mknod,rename:_e.node_ops.rename,unlink:_e.node_ops.unlink,rmdir:_e.node_ops.rmdir,readdir:_e.node_ops.readdir,symlink:_e.node_ops.symlink},stream:{llseek:_e.stream_ops.llseek}},file:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr},stream:{llseek:_e.stream_ops.llseek,read:_e.stream_ops.read,write:_e.stream_ops.write,allocate:_e.stream_ops.allocate,mmap:_e.stream_ops.mmap,msync:_e.stream_ops.msync}},link:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr,readlink:_e.node_ops.readlink},stream:{}},chrdev:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=_e.ops_table.dir.node,i.stream_ops=_e.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=_e.ops_table.file.node,i.stream_ops=_e.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=_e.ops_table.link.node,i.stream_ops=_e.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=_e.ops_table.chrdev.node,i.stream_ops=_e.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&_e.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>_e.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=_e.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,n);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),r);else for(var s=0;s<a;s++)t[r+s]=o[i+s];return a},write(e,r,n,i,o,a){if(r.buffer===t().buffer&&(a=!1),!i)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=r.subarray(n,n+i),s.usedBytes=i,i;if(0===s.usedBytes&&0===o)return s.contents=r.slice(n,n+i),s.usedBytes=i,i;if(o+i<=s.usedBytes)return s.contents.set(r.subarray(n,n+i),o),i}if(_e.expandFileStorage(s,o+i),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+i),o);else for(var u=0;u<i;u++)s.contents[o+u]=r[n+u];return s.usedBytes=Math.max(s.usedBytes,o+i),i},llseek(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&xe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new xe.ErrnoError(28);return n},allocate(e,t,r){_e.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,r,n,i,o){if(!xe.isFile(e.node.mode))throw new xe.ErrnoError(43);var a,s,u=e.node.contents;if(2&o||u.buffer!==t().buffer){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=Fe(r)))throw new xe.ErrnoError(48);t().set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:(e,t,r,n,i)=>(_e.stream_ops.write(e,t,0,n,r,!1),0)}},Ce=l.preloadPlugins||[],Ee=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=me.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",o=0;o<r.length;o++){var a=o===r.length-1;if(a&&t.parent)break;if(n=xe.lookupNode(n,r[o]),i=le.join2(i,r[o]),xe.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;xe.isLink(n.mode);){var u=xe.readlink(i);if(i=me.resolve(le.dirname(i),u),n=xe.lookupPath(i,{recurse_count:t.recurse_count+1}).node,s++>40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return xe.lookupNode(e,t),20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream:(e,t=-1)=>(xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e),closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&C(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount(e,t,r){var n,i="/"===r,o=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!o){var a=xe.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,i?xe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=le.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var o=xe.mayCreate(n,i);if(o)throw new xe.ErrnoError(o);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i<r.length;++i)if(r[i]){n+="/"+r[i];try{xe.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>("undefined"==typeof r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!me.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=le.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=le.dirname(e),o=le.dirname(t),a=le.basename(e),s=le.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var u,c=xe.lookupNode(r,a),d=me.relative(e,o);if("."!==d.charAt(0))throw new xe.ErrnoError(28);if("."!==(d=me.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{u=xe.lookupNode(n,s)}catch(e){}if(c!==u){var l=xe.isDir(c.mode),h=xe.mayDelete(r,a,l);if(h)throw new xe.ErrnoError(h);if(h=u?xe.mayDelete(n,s,l):xe.mayCreate(n,s))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(c)||u&&xe.isMountpoint(u))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{xe.hashAddNode(c)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=le.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=le.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return me.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?xe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?xe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;if(!(r="string"==typeof e?xe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r="undefined"==typeof r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=le.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),i=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!i){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!i&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!l.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var o="undefined"!=typeof i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,r,n,i);return o||(e.position+=a),a},write(e,t,r,n,i,o){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var a="undefined"!=typeof i;if(a){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,r,n,i,o);return a||(e.position+=s),s},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,o=new Uint8Array(i);return xe.read(n,o,0,i,0),"utf8"===t.encoding?r=pe(o,0):"binary"===t.encoding&&(r=o),xe.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(ve(t)+1),o=ye(t,i,0,i.length);xe.write(n,i,0,o,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),be.register(xe.makedev(5,0),be.default_tty_ops),be.register(xe.makedev(6,0),be.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=he(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){l.stdin?xe.createDevice("/dev","stdin",l.stdin):xe.symlink("/dev/tty","/dev/stdin"),l.stdout?xe.createDevice("/dev","stdout",null,l.stdout):xe.symlink("/dev/tty","/dev/stdout"),l.stderr?xe.createDevice("/dev","stderr",null,l.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(_e,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:_e}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),l.stdin=e||l.stdin,l.stdout=t||l.stdout,l.stderr=r||l.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;e<xe.streams.length;e++){var t=xe.streams[e];t&&xe.close(t)}},findObject(e,t){var r=xe.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(n=xe.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=xe.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=le.basename(e),n=xe.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,n){e="string"==typeof e?e:xe.getPath(e);for(var i=t.split("/").reverse();i.length;){var o=i.pop();if(o){var a=le.join2(e,o);try{xe.mkdir(a)}catch(e){}e=a}}return a},createFile(e,t,r,n,i){var o=le.join2("string"==typeof e?e:xe.getPath(e),t),a=Ee(n,i);return xe.create(o,a)},createDataFile(e,t,r,n,i,o){var a=t;e&&(e="string"==typeof e?e:xe.getPath(e),a=t?le.join2(e,t):e);var s=Ee(n,i),u=xe.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),d=0,l=r.length;d<l;++d)c[d]=r.charCodeAt(d);r=c}xe.chmod(u,146|s);var h=xe.open(u,577);xe.write(h,r,0,r.length,0,o),xe.close(h),xe.chmod(u,s)}return u},createDevice(e,t,r,n){var i=le.join2("string"==typeof e?e:xe.getPath(e),t),o=Ee(!!r,!!n);xe.createDevice.major||(xe.createDevice.major=64);var a=xe.makedev(xe.createDevice.major++,0);return xe.registerDevice(a,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,t,n,i,o){for(var a=0,s=0;s<i;s++){var u;try{u=r()}catch(e){throw new xe.ErrnoError(29)}if(void 0===u&&0===a)throw new xe.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i,o){for(var a=0;a<i;a++)try{n(t[r+a])}catch(e){throw new xe.ErrnoError(29)}return i&&(e.node.timestamp=Date.now()),a}}),xe.mkdev(i,o,a)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!h)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=we(h(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new xe.ErrnoError(29)}},createLazyFile(e,r,n,i,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):we(i.responseText||"",!0)})(t,i)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,_("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=xe.createFile(e,r,u,i,o);u.contents?c.contents=u.contents:u.url&&(c.contents=null,c.url=u.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var d={};function l(e,t,r,n,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,n);if(o.slice)for(var s=0;s<a;s++)t[r+s]=o[i+s];else for(s=0;s<a;s++)t[r+s]=o.get(i+s);return a}return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];d[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),d.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),l(e,t,r,n,i)),d.mmap=(e,r,n,i,o)=>{xe.forceLoadFile(c);var a=Fe(r);if(!a)throw new xe.ErrnoError(48);return l(e,t(),a,r,n),{ptr:a,allocated:!0}},c.stream_ops=d,c}},Te=(e,t)=>e?pe(r(),e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var n;if(n=-100===e?xe.cwd():De.getStreamFromFD(e).path,0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return le.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(xe.getPath(e.node)))return-54;throw e}a()[r>>2]=n.dev,a()[r+4>>2]=n.mode,s()[r+8>>2]=n.nlink,a()[r+12>>2]=n.uid,a()[r+16>>2]=n.gid,a()[r+20>>2]=n.rdev,X=[n.size>>>0,(Q=n.size,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+24>>2]=X[0],a()[r+28>>2]=X[1],a()[r+32>>2]=4096,a()[r+36>>2]=n.blocks;var i=n.atime.getTime(),o=n.mtime.getTime(),u=n.ctime.getTime();return X=[Math.floor(i/1e3)>>>0,(Q=Math.floor(i/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+40>>2]=X[0],a()[r+44>>2]=X[1],s()[r+48>>2]=i%1e3*1e3,X=[Math.floor(o/1e3)>>>0,(Q=Math.floor(o/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+56>>2]=X[0],a()[r+60>>2]=X[1],s()[r+64>>2]=o%1e3*1e3,X=[Math.floor(u/1e3)>>>0,(Q=Math.floor(u/1e3),+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+72>>2]=X[0],a()[r+76>>2]=X[1],s()[r+80>>2]=u%1e3*1e3,X=[n.ino>>>0,(Q=n.ino,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+88>>2]=X[0],a()[r+92>>2]=X[1],0},doMsync(e,t,n,i,o){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&i)return 0;var a=r().slice(e,e+n);xe.msync(t,a,o,n,i)},varargs:void 0,get(){var e=a()[De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Te(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Se(e){if(y)return Tr(0,1,e);D=e,H()||(Pe.terminateAllThreads(),l.onExit&&l.onExit(e),B=!0),v(e,new se(e))}var ke=(e,t)=>{if(D=e,y)throw We(e),"unwind";Se(e)},Ae=e=>{if(e instanceof se||"unwind"==e)return D;v(1,e)},Pe={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){y?Pe.initWorker():Pe.initMainThread()},initMainThread(){for(var e=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));e--;)Pe.allocateUnusedWorker();G((()=>{ee(),Pe.loadWasmModuleToAllWorkers((()=>te()))}))},initWorker(){T=!1},setExitStatus:e=>{D=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Pe.runningWorkers)ue(e);for(var e of Pe.unusedWorkers)ue(e);Pe.unusedWorkers=[],Pe.runningWorkers=[],Pe.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete Pe.pthreads[t],Pe.unusedWorkers.push(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(e),1),e.pthread_ptr=0,En(t)},receiveObjectTransfer(e){},threadInitTLS(){Pe.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,i=n.cmd;if(n.targetThread&&n.targetThread!=yn()){var o=Pe.pthreads[n.targetThread];o?o.postMessage(n,n.transferList):C(`Internal error! Worker sent a message "${i}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var a;"checkMailbox"===i?Er():"spawnThread"===i?de(n):"cleanupThread"===i?ce(n.thread):"killThread"===i?(e=>{var t=Pe.pthreads[e];delete Pe.pthreads[e],ue(t),En(e),Pe.runningWorkers.splice(Pe.runningWorkers.indexOf(t),1),t.pthread_ptr=0})(n.thread):"cancelThread"===i?(a=n.thread,Pe.pthreads[a].postMessage({cmd:"cancel"})):"loaded"===i?(e.loaded=!0,t(e)):"alert"===i?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===i?l[n.handler](...n.args):i&&C(`worker sent an unknown command ${i}`)}},e.onerror=e=>{throw C(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r=[];for(var i of["onExit","onAbort","print","printErr"])l.hasOwnProperty(i)&&r.push(i);e.postMessage({cmd:"load",handlers:r,urlOrBlob:l.mainScriptUrlOrBlob||n,wasmMemory:E,wasmModule:x})})),loadWasmModuleToAllWorkers(e){if(y)return e();Promise.all(Pe.unusedWorkers.map(Pe.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e,t=b("ScanbotSDK.Asm-simd-threads.worker.js");e=new Worker(t),Pe.unusedWorkers.push(e)},getNewWorker:()=>(0==Pe.unusedWorkers.length&&(Pe.allocateUnusedWorker(),Pe.loadWasmModuleToWorker(Pe.unusedWorkers[0])),Pe.unusedWorkers.pop())};l.PThread=Pe;var Re=e=>{for(;e.length>0;)e.shift()(l)};function We(e){if(y)return Tr(1,0,e);ke(e)}l.establishStackSpace=()=>{var e=yn(),t=a()[e+52>>2],r=a()[e+56>>2];Sn(t,t-r),An(t)};var Me=e=>z.get(e);l.invokeEntryPoint=(e,t)=>{!function(e){H()?Pe.setExitStatus(e):xn(e)}(Me(e)(t))};var Oe=e=>{Pe.tlsInitFunctions.push(e)},Be=[],Le=0,Ze=0;function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(On(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var Ie=e=>{var t=Ze;if(!t)return wn(0),0;var r=new ze(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return wn(0),t;for(var i in e){var o=e[i];if(0===o||o===n)break;var a=r.ptr+16;if(Mn(o,n,a))return wn(o),t}return wn(n),t},$e=()=>{var e=Be.pop();e||re("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Be.push(e),e.set_rethrown(!0),e.set_caught(!1),Le++),Ze=t};function Ne(e,t,r,n){return y?Tr(2,1,e,t,r,n):Ve(e,t,r,n)}var Ve=(e,t,r,n)=>{if("undefined"==typeof SharedArrayBuffer)return C("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var i=[];if(y&&0===i.length)return Ne(e,t,r,n);var o={startRoutine:r,pthread_ptr:e,arg:n,transferList:i};return y?(o.cmd="spawnThread",postMessage(o,i),0):de(o)};function je(e,t,r,n,i){if(y)return Tr(3,1,e,t,r,n,i);try{for(var o=0,s=t?a()[t>>2]:0,u=t?a()[t+4>>2]:0,c=r?a()[r>>2]:0,d=r?a()[r+4>>2]:0,l=n?a()[n>>2]:0,h=n?a()[n+4>>2]:0,m=0,f=0,p=0,g=0,v=0,w=0,b=(t?a()[t>>2]:0)|(r?a()[r>>2]:0)|(n?a()[n>>2]:0),F=(t?a()[t+4>>2]:0)|(r?a()[r+4>>2]:0)|(n?a()[n+4>>2]:0),_=function(e,t,r,n){return e<32?t&n:r&n},C=0;C<e;C++){var E=1<<C%32;if(_(C,b,F,E)){var x=De.getStreamFromFD(C),T=De.DEFAULT_POLLMASK;if(x.stream_ops.poll){var D=-1;i&&(D=1e3*((t?a()[i>>2]:0)+(t?a()[i+8>>2]:0)/1e6)),T=x.stream_ops.poll(x,D)}1&T&&_(C,s,u,E)&&(C<32?m|=E:f|=E,o++),4&T&&_(C,c,d,E)&&(C<32?p|=E:g|=E,o++),2&T&&_(C,l,h,E)&&(C<32?v|=E:w|=E,o++)}}return t&&(a()[t>>2]=m,a()[t+4>>2]=f),r&&(a()[r>>2]=p,a()[r+4>>2]=g),n&&(a()[n>>2]=v,a()[n+4>>2]=w),o}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function He(e,t,r){if(y)return Tr(4,1,e,t,r);De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((o=De.get())<0)return-28;for(;xe.streams[o];)o++;return xe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=De.get();return n.flags|=o,0;case 5:return o=De.getp(),i()[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,a()[vn()>>2]=s,-1}}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}var s}function Ue(e,t){if(y)return Tr(5,1,e,t);try{var r=De.getStreamFromFD(e);return De.doStat(xe.stat,r.path,t)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ge(e,r,n){if(y)return Tr(6,1,e,r,n);De.varargs=n;try{var o=De.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return o.tty?0:-59;case 21505:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcgets){var s=o.tty.ops.ioctl_tcgets(o),u=De.getp();a()[u>>2]=s.c_iflag||0,a()[u+4>>2]=s.c_oflag||0,a()[u+8>>2]=s.c_cflag||0,a()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)t()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcsets){u=De.getp();var d=a()[u>>2],l=a()[u+4>>2],h=a()[u+8>>2],m=a()[u+12>>2],f=[];for(c=0;c<32;c++)f.push(t()[u+c+17>>0]);return o.tty.ops.ioctl_tcsets(o.tty,r,{c_iflag:d,c_oflag:l,c_cflag:h,c_lflag:m,c_cc:f})}return 0;case 21519:return o.tty?(u=De.getp(),a()[u>>2]=0,0):-59;case 21520:return o.tty?-28:-59;case 21531:return u=De.getp(),xe.ioctl(o,r,u);case 21523:if(!o.tty)return-59;if(o.tty.ops.ioctl_tiocgwinsz){var p=o.tty.ops.ioctl_tiocgwinsz(o.tty);u=De.getp(),i()[u>>1]=p[0],i()[u+2>>1]=p[1]}return 0;default:return-28}}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ye(e,t,r,n){if(y)return Tr(8,1,e,t,r,n);try{t=De.getStr(t);var i=256&n,o=4096&n;return n&=-6401,t=De.calculateAt(e,t,o),De.doStat(i?xe.lstat:xe.stat,t,r)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Qe(e,t,r,n){if(y)return Tr(9,1,e,t,r,n);De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var i=n?De.get():0;return xe.open(t,r,i).fd}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Xe(e){if(y)return Tr(10,1,e);try{return e=De.getStr(e),xe.rmdir(e),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Je(e,t){if(y)return Tr(11,1,e,t);try{return e=De.getStr(e),De.doStat(xe.stat,e,t)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ke(e,t,r){if(y)return Tr(12,1,e,t,r);try{return t=De.getStr(t),t=De.calculateAt(e,t),0===r?xe.unlink(t):512===r?xe.rmdir(t):re("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var qe={},et=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function tt(e){return this.fromWireType(a()[e>>2])}var rt={},nt={},it={},ot=void 0,at=e=>{throw new ot(e)},st=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&at("Mismatched type converter count");for(var i=0;i<e.length;++i)ht(e[i],n[i])}e.forEach((function(e){it[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{nt.hasOwnProperty(e)?i[t]=nt[e]:(o.push(e),rt.hasOwnProperty(e)||(rt[e]=[]),rt[e].push((()=>{i[t]=nt[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},ut=void 0,ct=e=>{for(var t="",n=e;r()[n];)t+=ut[r()[n++]];return t},dt=void 0,lt=e=>{throw new dt(e)};function ht(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(e||lt(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;lt(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete it[e],rt.hasOwnProperty(e)){var i=rt[e];delete rt[e],i.forEach((e=>e()))}}(e,t,r)}var mt=8;function ft(e){if(!(this instanceof Bt))return!1;if(!(e instanceof Bt))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}var pt=e=>{lt(e.$$.ptrType.registeredClass.name+" instance already deleted")},gt=!1,vt=e=>{},yt=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},wt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=wt(e,t,r.baseClass);return null===n?null:r.downcast(n)},bt={},Ft=()=>Object.keys(Dt).length,_t=()=>{var e=[];for(var t in Dt)Dt.hasOwnProperty(t)&&e.push(Dt[t]);return e},Ct=[],Et=()=>{for(;Ct.length;){var e=Ct.pop();e.$$.deleteScheduled=!1,e.delete()}},xt=void 0,Tt=e=>{xt=e,Ct.length&&xt&&xt(Et)},Dt={},St=(e,t)=>(t=((e,t)=>{for(void 0===t&<("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),Dt[t]),kt=(e,t)=>(t.ptrType&&t.ptr||at("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pt(Object.create(e,{$$:{value:t}})));function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=St(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?kt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):kt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=bt[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=wt(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):kt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var Pt=e=>"undefined"==typeof FinalizationRegistry?(Pt=e=>e,e):(gt=new FinalizationRegistry((e=>{yt(e.$$)})),Pt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};gt.register(e,r,e)}return e},vt=e=>gt.unregister(e),Pt(e));function Rt(){if(this.$$.ptr||pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Pt(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Wt(){this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&<("Object already scheduled for deletion"),vt(this),yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Mt(){return!this.$$.ptr}function Ot(){return this.$$.ptr||pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&<("Object already scheduled for deletion"),Ct.push(this),1===Ct.length&&xt&&xt(Et),this.$$.deleteScheduled=!0,this}function Bt(){}var Lt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e};function Zt(e,t){return{[e=Lt(e)]:function(){return t.apply(this,arguments)}}[e]}var zt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||lt(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},It=(e,t,r)=>{l.hasOwnProperty(e)?((void 0===r||void 0!==l[e].overloadTable&&void 0!==l[e].overloadTable[r])&<(`Cannot register public name '${e}' twice`),zt(l,e,e),l.hasOwnProperty(r)&<(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),l[e].overloadTable[r]=t):(l[e]=t,void 0!==r&&(l[e].numArguments=r))};function $t(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}var Nt=(e,t,r)=>{for(;t!==r;)t.upcast||lt(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Vt(e,t){if(null===t)return this.isReference&<(`null is not a valid ${this.name}`),0;t.$$||lt(`Cannot pass "${lr(t)}" as a ${this.name}`),t.$$.ptr||lt(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Nt(t.$$.ptr,r,this.registeredClass)}function jt(e,t){var r;if(null===t)return this.isReference&<(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||lt(`Cannot pass "${lr(t)}" as a ${this.name}`),t.$$.ptr||lt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&<(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Nt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&<("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:lt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,dr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:lt("Unsupporting sharing policy")}return r}function Ht(e,t){if(null===t)return this.isReference&<(`null is not a valid ${this.name}`),0;t.$$||lt(`Cannot pass "${lr(t)}" as a ${this.name}`),t.$$.ptr||lt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&<(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Nt(t.$$.ptr,r,this.registeredClass)}function Ut(e){return this.fromWireType(s()[e>>2])}function Gt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Yt(e){this.rawDestructor&&this.rawDestructor(e)}var Qt=e=>{null!==e&&e.delete()};function Xt(e,t,r,n,i,o,a,s,u,c,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=d,i||void 0!==t.baseClass?this.toWireType=jt:n?(this.toWireType=Vt,this.destructorFunction=null):(this.toWireType=Ht,this.destructorFunction=null)}var Jt=(e,t,r)=>{l.hasOwnProperty(e)||at("Replacing nonexistant public symbol"),void 0!==l[e].overloadTable&&void 0!==r?l[e].overloadTable[r]=t:(l[e]=t,l[e].argCount=r)},Kt=(e,t,r)=>e.includes("j")?((e,t,r)=>{var n=l["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)})(e,t,r):Me(t).apply(null,r),qt=(e,t)=>{var r,n,i,o=(e=ct(e)).includes("j")?(r=e,n=t,i=[],function(){return i.length=0,Object.assign(i,arguments),Kt(r,n,i)}):Me(t);return"function"!=typeof o&<(`unknown function pointer with signature ${e}: ${t}`),o},er=void 0,tr=e=>{var t=Fn(e),r=ct(t);return gn(t),r},rr=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||nt[t]||(it[t]?it[t].forEach(e):(r.push(t),n[t]=!0))})),new er(`${e}: `+r.map(tr).join([", "]))},nr=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(s()[t+4*n>>2]);return r};function ir(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Zt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function or(e,t,r,n,i,o){var a=t.length;a<2&<("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var d="void"!==t[0].name,l="",h="";for(c=0;c<a-2;++c)l+=(0!==c?", ":"")+"arg"+c,h+=(0!==c?", ":"")+"arg"+c+"Wired";var m=`\n return function ${Lt(e)}(${l}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ${e} called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;u&&(m+="var destructors = [];\n");var f=u?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[lt,n,i,et,t[0],t[1]];for(s&&(m+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<a-2;++c)m+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),g.push(t[c+2]);if(s&&(h="thisWired"+(h.length>0?", ":"")+h),m+=(d||o?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",u)m+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var v=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(m+=v+"_dtor("+v+"); // "+t[c].name+"\n",p.push(v+"_dtor"),g.push(t[c].destructorFunction))}return d&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),m+="}\n",p.push(m),ir(Function,p).apply(null,g)}function ar(){this.allocated=[void 0],this.freelist=[]}var sr=new ar,ur=e=>{e>=sr.reserved&&0==--sr.get(e).refcount&&sr.free(e)},cr=()=>{for(var e=0,t=sr.reserved;t<sr.allocated.length;++t)void 0!==sr.allocated[t]&&++e;return e},dr={toValue:e=>(e||lt("Cannot use deleted val. handle = "+e),sr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return sr.allocate({refcount:1,value:e})}}},lr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},hr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType((E.buffer!=S.buffer&&Z(),M)[e>>2])};case 8:return function(e){return this.fromWireType(u()[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},mr=(e,n,u)=>{switch(n){case 1:return u?e=>t()[e>>0]:e=>r()[e>>0];case 2:return u?e=>i()[e>>1]:e=>o()[e>>1];case 4:return u?e=>a()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${n}): ${e}`)}},fr=(e,t,n)=>ye(e,r(),t,n),pr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,gr=(e,t)=>{for(var n=e,a=n>>1,s=a+t/2;!(a>=s)&&o()[a];)++a;if((n=a<<1)-e>32&&pr)return pr.decode(r().slice(e,n));for(var u="",c=0;!(c>=t/2);++c){var d=i()[e+2*c>>1];if(0==d)break;u+=String.fromCharCode(d)}return u},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,a=0;a<o;++a){var s=e.charCodeAt(a);i()[t>>1]=s,t+=2}return i()[t>>1]=0,t-n},yr=e=>2*e.length,wr=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=a()[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)),a()[t>>2]=s,(t+=4)+4>i)break}return a()[t>>2]=0,t-n},Fr=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},_r=e=>{if(!B)try{e(),(()=>{if(!H())try{y?xn(D):ke(D)}catch(e){Ae(e)}})()}catch(e){Ae(e)}},Cr=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(a(),e>>2,e).value.then(Er);var t=e+128;Atomics.store(a(),t>>2,1)}};l.__emscripten_thread_mailbox_await=Cr;var Er=()=>{var e=yn();e&&(Cr(e),_r((()=>Tn())))};l.checkMailbox=Er;var xr=e=>{var t=kn(),r=e();return An(t),r},Tr=function(e,t){var r=arguments.length-2,n=arguments;return xr((()=>{for(var i=r,o=Pn(8*i),a=o>>3,s=0;s<r;s++){var c=n[2+s];u()[a+s]=c}return Cn(e,i,o,t)}))},Dr=[],Sr=(e,t)=>{var r=nt[e];return void 0===r&<(t+" has unknown type "+tr(e)),r},kr={},Ar=e=>{var t=kr[e];return void 0===t?ct(e):t},Pr=[],Rr=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Wr=[],Mr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Or=e=>e%4==0&&(e%100!=0||e%400==0),Br=[0,31,60,91,121,152,182,213,244,274,305,335],Lr=[0,31,59,90,120,151,181,212,243,273,304,334];function Zr(e,t,r,n,i,o,a){if(y)return Tr(14,1,e,t,r,n,i,o,a);var s=Mr(o,a);try{if(isNaN(s))return 61;var u=De.getStreamFromFD(i);2&r&&De.doMsync(e,u,t,n,s),xe.munmap(u)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var zr,Ir=e=>{var t=ve(e)+1,r=pn(t);return r&&fr(e,r,t),r},$r=[],Nr=(e,t,n)=>{var i=((e,t)=>{var n;for($r.length=0;n=r()[e++];)t+=105!=n&&t%8?4:0,$r.push(105==n?a()[t>>2]:u()[t>>3]),t+=105==n?4:8;return $r})(t,n);return ae[e].apply(null,i)};zr=()=>performance.timeOrigin+performance.now();var Vr=e=>{re("OOM")},jr=e=>{var t=(e-E.buffer.byteLength+65535)/65536;try{return E.grow(t),Z(),1}catch(e){}},Hr={},Ur=()=>{if(!Ur.strings){var e={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",_:g||"./this.program"};for(var t in Hr)void 0===Hr[t]?delete e[t]:e[t]=Hr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Ur.strings=r}return Ur.strings},Gr=function(e,r){if(y)return Tr(15,1,e,r);var n=0;return Ur().forEach(((i,o)=>{var a=r+n;s()[e+4*o>>2]=a,((e,r)=>{for(var n=0;n<e.length;++n)t()[r++>>0]=e.charCodeAt(n);t()[r>>0]=0})(i,a),n+=i.length+1})),0},Yr=function(e,t){if(y)return Tr(16,1,e,t);var r=Ur();s()[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),s()[t>>2]=n,0};function Qr(e){if(y)return Tr(17,1,e);try{var t=De.getStreamFromFD(e);return xe.close(t),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function Xr(e,r){if(y)return Tr(18,1,e,r);try{var n=De.getStreamFromFD(e),o=n.tty?2:xe.isDir(n.mode)?3:xe.isLink(n.mode)?7:4;return t()[r>>0]=o,i()[r+2>>1]=0,X=[0,(Q=0,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+8>>2]=X[0],a()[r+12>>2]=X[1],X=[0,(Q=0,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[r+16>>2]=X[0],a()[r+20>>2]=X[1],0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function Jr(e,r,n,i){if(y)return Tr(19,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var d=xe.read(e,t(),u,c,i);if(d<0)return-1;if(o+=d,d<c)break;"undefined"!=typeof i&&(i+=d)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,n,i){if(y)return Tr(20,1,e,t,r,n,i);var o=Mr(t,r);try{if(isNaN(o))return 61;var s=De.getStreamFromFD(e);return xe.llseek(s,o,n),X=[s.position>>>0,(Q=s.position,+Math.abs(Q)>=1?Q>0?+Math.floor(Q/4294967296)>>>0:~~+Math.ceil((Q-+(~~Q>>>0))/4294967296)>>>0:0)],a()[i>>2]=X[0],a()[i+4>>2]=X[1],s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}function qr(e,r,n,i){if(y)return Tr(21,1,e,r,n,i);try{var o=((e,r,n,i)=>{for(var o=0,a=0;a<n;a++){var u=s()[r>>2],c=s()[r+4>>2];r+=8;var d=xe.write(e,t(),u,c,i);if(d<0)return-1;o+=d,"undefined"!=typeof i&&(i+=d)}return o})(De.getStreamFromFD(e),r,n);return s()[i>>2]=o,0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return e.errno}}var en=[31,29,31,30,31,30,31,31,30,31,30,31],tn=[31,28,31,30,31,30,31,31,30,31,30,31],rn=(e,r,n,i)=>{var o=s()[i+40>>2],u={tm_sec:a()[i>>2],tm_min:a()[i+4>>2],tm_hour:a()[i+8>>2],tm_mday:a()[i+12>>2],tm_mon:a()[i+16>>2],tm_year:a()[i+20>>2],tm_wday:a()[i+24>>2],tm_yday:a()[i+28>>2],tm_isdst:a()[i+32>>2],tm_gmtoff:a()[i+36>>2],tm_zone:o?Te(o):""},c=Te(n),d={"%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 l in d)c=c.replace(new RegExp(l,"g"),d[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return f(e,t,"0")}function g(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function v(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function y(e){var t=((e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Or(r.getFullYear()),i=r.getMonth(),o=(n?en:tn)[i];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r})(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=v(r),o=v(n);return g(i,t)<=0?g(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":e=>h[e.tm_wday].substring(0,3),"%A":e=>h[e.tm_wday],"%b":e=>m[e.tm_mon].substring(0,3),"%B":e=>m[e.tm_mon],"%C":e=>p((e.tm_year+1900)/100|0,2),"%d":e=>p(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>y(e).toString().substring(2),"%G":e=>y(e),"%H":e=>p(e.tm_hour,2),"%I":e=>{var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":e=>p(e.tm_mday+((e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r})(Or(e.tm_year+1900)?en:tn,e.tm_mon-1),3),"%m":e=>p(e.tm_mon+1,2),"%M":e=>p(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>p(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var t=e.tm_yday+7-e.tm_wday;return p(Math.floor(t/7),2)},"%V":e=>{var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Or(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Or(e.tm_year%400-1))&&t++}return p(t,2)},"%w":e=>e.tm_wday,"%W":e=>{var t=e.tm_yday+7-(e.tm_wday+6)%7;return p(Math.floor(t/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var l in c=c.replace(/%%/g,"\0\0"),w)c.includes(l)&&(c=c.replace(new RegExp(l,"g"),w[l](u)));var b,F,_=we(c=c.replace(/\0\0/g,"%"),!1);return _.length>r?0:(b=_,F=e,t().set(b,F),_.length-1)},nn=Ir;Pe.init();var on,an,sn,un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},cn=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&cn)===cn},set:function(e){e?this.mode|=cn:this.mode&=-366}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=-147}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=(e,t,r,n,i,o,a,s,u,c)=>{var d=t?me.resolve(le.join2(e,t)):e;function l(r){function l(r){c&&c(),s||xe.createDataFile(e,t,r,n,i,u),o&&o(),te()}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ce.forEach((o=>{i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i})(r,d,l,(()=>{a&&a(),te()}))||l(r)}ee(),"string"==typeof r?((e,t,r,n)=>{var i=n?"":`al ${e}`;m(e,(r=>{L(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&te()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&ee()})(r,(e=>l(e)),a):l(r)},xe.staticInit(),ot=l.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ut=e})(),dt=l.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Bt.prototype.isAliasOf=ft,Bt.prototype.clone=Rt,Bt.prototype.delete=Wt,Bt.prototype.isDeleted=Mt,Bt.prototype.deleteLater=Ot,l.getInheritedInstanceCount=Ft,l.getLiveInheritedInstances=_t,l.flushPendingDeletes=Et,l.setDelayFunction=Tt,Xt.prototype.getPointee=Gt,Xt.prototype.destructor=Yt,Xt.prototype.argPackAdvance=mt,Xt.prototype.readValueFromPointer=Ut,Xt.prototype.deleteObject=Qt,Xt.prototype.fromWireType=At,er=l.UnboundTypeError=(on=Error,(sn=Zt(an="UnboundTypeError",(function(e){this.name=an,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(on.prototype),sn.prototype.constructor=sn,sn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},sn),Object.assign(ar.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),sr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),sr.reserved=sr.allocated.length,l.count_emval_handles=cr;var ln,hn=[Se,We,Ne,je,He,Ue,Ge,function(e,t){if(y)return Tr(7,1,e,t);try{return e=De.getStr(e),De.doStat(xe.lstat,e,t)}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}},Ye,Qe,Xe,Je,Ke,function(e,t,r,n,i,o,u,c){if(y)return Tr(13,1,e,t,r,n,i,o,u,c);var d=Mr(i,o);try{if(isNaN(d))return 61;var l=De.getStreamFromFD(n),h=xe.mmap(l,e,d,t,r),m=h.ptr;return a()[u>>2]=h.allocated,s()[c>>2]=m,0}catch(e){if("undefined"==typeof xe||"ErrnoError"!==e.name)throw e;return-e.errno}},Zr,Gr,Yr,Qr,Xr,Jr,Kr,qr],mn={t:e=>{var t=new ze(e);return t.get_caught()||(t.set_caught(!0),Le--),t.set_rethrown(!1),Be.push(t),Wn(t.excPtr),t.get_exception_ptr()},rb:()=>{if(!Be.length)return 0;var e=Be[Be.length-1];return Wn(e.excPtr),e.excPtr},A:()=>{Dn(0,0);var e=Be.pop();Rn(e.excPtr),Ze=0},b:()=>Ie([]),g:e=>Ie([e]),p:(e,t)=>Ie([e,t]),ua:$e,qb:e=>{if(e){var t=new ze(e);Be.push(t),t.set_rethrown(!0),$e()}},q:(e,t,r)=>{throw new ze(e).init(t,r),Le++,Ze=e},sb:()=>Le,Fb:e=>{_n(e,!1,1,!0,4194304,!1),Pe.threadInitTLS()},ya:e=>{y?postMessage({cmd:"cleanupThread",thread:e}):ce(e)},Cb:Ve,c:e=>{throw Ze||(Ze=e),Ze},yb:je,Ba:He,Lb:Ue,Mb:Ge,Jb:Ye,Ca:Qe,zb:Xe,Kb:Je,Ab:Ke,Za:e=>{var t=qe[e];delete qe[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map((e=>e.getterReturnType)).concat(i.map((e=>e.setterArgumentType)));st([e],o,(e=>{var o={};return i.forEach(((t,r)=>{var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],d=t.setter,l=t.setterContext;o[n]={read:e=>a.fromWireType(s(u,e)),write:(e,t)=>{var r=[];d(l,e,c.toWireType(r,t)),et(r)}}})),[{name:t.name,fromWireType:e=>{var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:(e,t)=>{for(var i in o)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var a=r();for(i in o)o[i].write(a,t[i]);return null!==e&&e.push(n,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:n}]}))},ib:(e,t,r,n,i)=>{},Ea:(e,t,n,i)=>{ht(e,{name:t=ct(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:mt,readValueFromPointer:function(e){return this.fromWireType(r()[e])},destructorFunction:null})},wa:(e,t,r,n,i,o,a,s,u,c,d,l,h)=>{d=ct(d),o=qt(i,o),s&&(s=qt(a,s)),c&&(c=qt(u,c)),h=qt(l,h);var m=Lt(d);It(m,(function(){rr(`Cannot construct ${d} due to unbound types`,[n])})),st([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:Bt.prototype;var a=Zt(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new dt("Use 'new' to construct "+d);if(void 0===l.constructor_body)throw new dt(d+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new dt(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(l.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:a}});a.prototype=u;var l=new $t(d,a,u,h,r,o,s,c);l.baseClass&&(void 0===l.baseClass.__derivedClasses&&(l.baseClass.__derivedClasses=[]),l.baseClass.__derivedClasses.push(l));var f=new Xt(d,l,!0,!1,!1),p=new Xt(d+"*",l,!1,!1,!1),g=new Xt(d+" const*",l,!1,!0,!1);return bt[e]={pointerType:p,constPointerType:g},Jt(m,a),[f,p,g]}))},va:(e,t,r,n,i,o)=>{var a=nr(t,r);i=qt(n,i),st([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new dt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{rr(`Cannot construct ${e.name} due to unbound types`,a)},st([],a,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=or(r,n,null,i,o),[]))),[]}))},ha:(e,t,r,n,i,o,a,s,u)=>{var c=nr(r,n);t=ct(t),o=qt(i,o),st([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){rr(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,l=d[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(i.argCount=r-2,i.className=e.name,d[t]=i):(zt(d,t,n),d[t].overloadTable[r-2]=i),st([],c,(function(i){var s=or(n,i,e,o,a,u);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))},Da:(e,t)=>{ht(e,{name:t=ct(t),fromWireType:e=>{var t=dr.toValue(e);return ur(e),t},toWireType:(e,t)=>dr.toHandle(t),argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:null})},ma:(e,t,r)=>{ht(e,{name:t=ct(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:mt,readValueFromPointer:hr(t,r),destructorFunction:null})},H:(e,t,r,n,i,o,a)=>{var s=nr(t,r);e=ct(e),i=qt(n,i),It(e,(function(){rr(`Cannot call ${e} due to unbound types`,s)}),t-1),st([],s,(function(r){var n=[r[0],null].concat(r.slice(1));return Jt(e,or(e,n,null,i,o,a),t-1),[]}))},J:(e,t,r,n,i)=>{t=ct(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var a=32-8*r;o=e=>e<<a>>>a}var s=t.includes("unsigned");ht(e,{name:t,fromWireType:o,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:mt,readValueFromPointer:mr(t,r,0!==n),destructorFunction:null})},z:(e,r,n)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=s()[e>>2],n=s()[e+4>>2];return new i(t().buffer,n,r)}ht(e,{name:n=ct(n),fromWireType:o,argPackAdvance:mt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},la:(e,t)=>{var n="std::string"===(t=ct(t));ht(e,{name:t,fromWireType:e=>{var t,i=s()[e>>2],o=e+4;if(n)for(var a=o,u=0;u<=i;++u){var c=o+u;if(u==i||0==r()[c]){var d=Te(a,c-a);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),a=c+1}}else{var l=new Array(i);for(u=0;u<i;++u)l[u]=String.fromCharCode(r()[o+u]);t=l.join("")}return gn(e),t},toWireType:(e,t)=>{var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||lt("Cannot pass non-string to std::string"),i=n&&o?ve(t):t.length;var a=pn(4+i+1),u=a+4;if(s()[a>>2]=i,n&&o)fr(t,u,i+1);else if(o)for(var c=0;c<i;++c){var d=t.charCodeAt(c);d>255&&(gn(u),lt("String has UTF-16 code units that do not fit in 8 bits")),r()[u+c]=d}else for(c=0;c<i;++c)r()[u+c]=t[c];return null!==e&&e.push(gn,a),a},argPackAdvance:mt,readValueFromPointer:Ut,destructorFunction:e=>gn(e)})},ca:(e,t,r)=>{var n,i,a,u,c;r=ct(r),2===t?(n=gr,i=vr,u=yr,a=()=>o(),c=1):4===t&&(n=wr,i=br,u=Fr,a=()=>s(),c=2),ht(e,{name:r,fromWireType:e=>{for(var r,i=s()[e>>2],o=a(),u=e+4,d=0;d<=i;++d){var l=e+4+d*t;if(d==i||0==o[l>>c]){var h=n(u,l-u);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),u=l+t}}return gn(e),r},toWireType:(e,n)=>{"string"!=typeof n&<(`Cannot pass non-string to C++ string type ${r}`);var o=u(n),a=pn(4+o+t);return s()[a>>2]=o>>c,i(n,a+4,o+t),null!==e&&e.push(gn,a),a},argPackAdvance:mt,readValueFromPointer:tt,destructorFunction:e=>gn(e)})},_a:(e,t,r,n,i,o)=>{qe[e]={name:ct(t),rawConstructor:qt(r,n),rawDestructor:qt(i,o),fields:[]}},Ya:(e,t,r,n,i,o,a,s,u,c)=>{qe[e].fields.push({fieldName:ct(t),getterReturnType:r,getter:qt(n,i),getterContext:o,setterArgumentType:a,setter:qt(s,u),setterContext:c})},Fa:(e,t)=>{ht(e,{isVoid:!0,name:t=ct(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Pb:()=>!0,wb:(e,t,r)=>{if(e==t)setTimeout((()=>Er()));else if(y)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Pe.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Db:(e,t,r,n)=>{Dr.length=r;for(var i=n>>3,o=0;o<r;o++)Dr[o]=u()[i+o];var a=e<0?ae[-e-1]:hn[e];Pe.currentProxiedOperationCallerThread=t;var s=a.apply(null,Dr);return Pe.currentProxiedOperationCallerThread=0,s},Eb:Cr,Ob:e=>{},tb:()=>{throw 1/0},R:(e,t,r)=>{e=dr.toValue(e),t=Sr(t,"emval::as");var n=[],i=dr.toHandle(n);return s()[r>>2]=i,t.toWireType(n,e)},ja:(e,t,r,n,i)=>(e=Pr[e])(t=dr.toValue(t),r=Ar(r),(e=>{var t=[];return s()[e>>2]=dr.toHandle(t),t})(n),i),ia:(e,t,r,n)=>{(e=Pr[e])(t=dr.toValue(t),r=Ar(r),null,n)},kb:ur,Ta:e=>0===e?dr.toHandle(Rr()):(e=Ar(e),dr.toHandle(Rr()[e])),Q:(e,t)=>{var r=((e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Sr(s()[t+4*n>>2],"parameter "+n);return r})(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",o=Wr[i];if(void 0!==o)return o;for(var a=["retType"],u=[n],c="",d=0;d<e-1;++d)c+=(0!==d?", ":"")+"arg"+d,a.push("argType"+d),u.push(r[1+d]);var l="return function "+Lt("methodCaller_"+i)+"(handle, name, destructors, args) {\n",h=0;for(d=0;d<e-1;++d)l+=" var arg"+d+" = argType"+d+".readValueFromPointer(args"+(h?"+"+h:"")+");\n",h+=r[d+1].argPackAdvance;for(l+=" var rv = handle[name]("+c+");\n",d=0;d<e-1;++d)r[d+1].deleteObject&&(l+=" argType"+d+".deleteObject(arg"+d+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",a.push(l);var m,f,p=ir(Function,a).apply(null,u);return m=p,f=Pr.length,Pr.push(m),o=f,Wr[i]=o,o},ab:(e,t)=>(e=dr.toValue(e),t=dr.toValue(t),dr.toHandle(e[t])),s:e=>{e>4&&(sr.get(e).refcount+=1)},_:()=>dr.toHandle([]),L:e=>dr.toHandle(Ar(e)),E:()=>dr.toHandle({}),$a:e=>{var t=dr.toValue(e);et(t),ur(e)},Bb:(e,t,r)=>{e=dr.toValue(e),t=dr.toValue(t),r=dr.toValue(r),e[t]=r},K:(e,t)=>{var r=(e=Sr(e,"_emval_take_value")).readValueFromPointer(t);return dr.toHandle(r)},fb:function(e,t,r){var n=Mr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getUTCSeconds(),a()[r+4>>2]=i.getUTCMinutes(),a()[r+8>>2]=i.getUTCHours(),a()[r+12>>2]=i.getUTCDate(),a()[r+16>>2]=i.getUTCMonth(),a()[r+20>>2]=i.getUTCFullYear()-1900,a()[r+24>>2]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),s=(i.getTime()-o)/864e5|0;a()[r+28>>2]=s},gb:function(e,t,r){var n=Mr(e,t),i=new Date(1e3*n);a()[r>>2]=i.getSeconds(),a()[r+4>>2]=i.getMinutes(),a()[r+8>>2]=i.getHours(),a()[r+12>>2]=i.getDate(),a()[r+16>>2]=i.getMonth(),a()[r+20>>2]=i.getFullYear()-1900,a()[r+24>>2]=i.getDay();var o=0|(e=>(Or(e.getFullYear())?Br:Lr)[e.getMonth()]+e.getDate()-1)(i);a()[r+28>>2]=o,a()[r+36>>2]=-60*i.getTimezoneOffset();var s=new Date(i.getFullYear(),0,1),u=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),d=0|(u!=c&&i.getTimezoneOffset()==Math.min(c,u));a()[r+32>>2]=d},eb:Zr,vb:(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),o=new Date(n,6,1),u=i.getTimezoneOffset(),c=o.getTimezoneOffset(),d=Math.max(u,c);function l(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}s()[e>>2]=60*d,a()[t>>2]=Number(u!=c);var h=l(i),m=l(o),f=Ir(h),p=Ir(m);c<u?(s()[r>>2]=f,s()[r+4>>2]=p):(s()[r>>2]=p,s()[r+4>>2]=f)},x:()=>{re("")},Ua:(e,t,r)=>Nr(e,t,r),za:()=>{},U:()=>Date.now(),Nb:()=>{throw j+=1,"unwind"},xb:()=>2147483648,F:zr,oa:()=>navigator.hardwareConcurrency,ub:e=>{var t=r().length;if((e>>>=0)<=t)return!1;var n=2147483648;e>n&&Vr();for(var i,o,a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var u=Math.min(n,(i=Math.max(e,s))+((o=65536)-i%o)%o);if(jr(u))return!0}Vr()},Hb:Gr,Ib:Yr,na:ke,ba:Qr,Gb:Xr,Aa:Jr,hb:Kr,ka:qr,Wa:function(){return nn(location.toString())},nb:(e,t)=>(he(r().subarray(e,e+t)),0),Va:function(){return nn((e=Vn,self[e(283,"hj(8")][e(276,"4T(s")]()));var e},Xa:function(e,t){var r=kn();try{return Me(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},G:function(e,t,r,n,i,o){var a=kn();try{return Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},N:function(e,t,r,n){var i=kn();try{return Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},ga:function(e,t,r,n,i,o){var a=kn();try{return Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},T:function(e,t){var r=kn();try{return Me(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Qa:function(e,t,r){var n=kn();try{return Me(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},V:function(e,t,r,n){var i=kn();try{return Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},r:function(e){var t=kn();try{return Me(e)()}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},h:function(e,t){var r=kn();try{return Me(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},pa:function(e,t,r,n){var i=kn();try{return Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Na:function(e,t,r,n){var i=kn();try{return Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Pa:function(e,t,r,n,i){var o=kn();try{return Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Oa:function(e,t,r,n,i,o,a,s){var u=kn();try{return Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},f:function(e,t,r){var n=kn();try{return Me(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},Ra:function(e,t,r,n){var i=kn();try{return Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},k:function(e,t,r,n){var i=kn();try{return Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},O:function(e,t,r,n,i){var o=kn();try{return Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},l:function(e,t,r,n,i){var o=kn();try{return Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},pb:function(e,t,r,n,i,o){var a=kn();try{return Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},ta:function(e,t,r,n,i,o,a){var s=kn();try{return Me(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},o:function(e,t,r,n,i,o){var a=kn();try{return Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},D:function(e,t,r,n,i,o,a){var s=kn();try{return Me(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},xa:function(e,t,r,n,i,o,a,s){var u=kn();try{return Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ha:function(e,t,r,n,i,o,a,s,u){var c=kn();try{return Me(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},Ga:function(e,t,r,n,i,o,a,s,u,c){var d=kn();try{return Me(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},aa:function(e,t,r,n,i,o,a,s,u,c,d,l){var h=kn();try{return Me(e)(t,r,n,i,o,a,s,u,c,d,l)}catch(e){if(An(h),e!==e+0)throw e;Dn(1,0)}},lb:function(e,t,r,n){var i=kn();try{return Zn(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},db:function(e){var t=kn();try{return zn(e)}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},mb:function(e,t){var r=kn();try{return Bn(e,t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},cb:function(e,t,r){var n=kn();try{return In(e,t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},bb:function(e,t,r,n,i){var o=kn();try{return $n(e,t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},m:function(e){var t=kn();try{Me(e)()}catch(e){if(An(t),e!==e+0)throw e;Dn(1,0)}},d:function(e,t){var r=kn();try{Me(e)(t)}catch(e){if(An(r),e!==e+0)throw e;Dn(1,0)}},Z:function(e,t,r){var n=kn();try{Me(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},fa:function(e,t,r,n){var i=kn();try{Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},P:function(e,t,r,n,i,o,a,s){var u=kn();try{Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ka:function(e,t,r){var n=kn();try{Me(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},e:function(e,t,r){var n=kn();try{Me(e)(t,r)}catch(e){if(An(n),e!==e+0)throw e;Dn(1,0)}},v:function(e,t,r,n){var i=kn();try{Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},Y:function(e,t,r,n,i){var o=kn();try{Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},da:function(e,t,r,n,i,o){var a=kn();try{Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},Ma:function(e,t,r,n,i,o,a){var s=kn();try{Me(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},S:function(e,t,r,n,i,o,a,s){var u=kn();try{Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},La:function(e,t,r,n,i){var o=kn();try{Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},Ia:function(e,t,r,n,i,o,a,s){var u=kn();try{Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},Ja:function(e,t,r,n){var i=kn();try{Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},qa:function(e,t,r,n,i){var o=kn();try{Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ra:function(e,t,r,n,i,o){var a=kn();try{Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},i:function(e,t,r,n){var i=kn();try{Me(e)(t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},B:function(e,t,r,n,i,o){var a=kn();try{Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},u:function(e,t,r,n,i,o,a){var s=kn();try{Me(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},M:function(e,t,r,n,i,o){var a=kn();try{Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},j:function(e,t,r,n,i){var o=kn();try{Me(e)(t,r,n,i)}catch(e){if(An(o),e!==e+0)throw e;Dn(1,0)}},ea:function(e,t,r,n,i,o,a,s){var u=kn();try{Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},n:function(e,t,r,n,i,o){var a=kn();try{Me(e)(t,r,n,i,o)}catch(e){if(An(a),e!==e+0)throw e;Dn(1,0)}},y:function(e,t,r,n,i,o,a){var s=kn();try{Me(e)(t,r,n,i,o,a)}catch(e){if(An(s),e!==e+0)throw e;Dn(1,0)}},sa:function(e,t,r,n,i,o,a,s,u,c){var d=kn();try{Me(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},w:function(e,t,r,n,i,o,a,s){var u=kn();try{Me(e)(t,r,n,i,o,a,s)}catch(e){if(An(u),e!==e+0)throw e;Dn(1,0)}},X:function(e,t,r,n,i,o,a,s,u){var c=kn();try{Me(e)(t,r,n,i,o,a,s,u)}catch(e){if(An(c),e!==e+0)throw e;Dn(1,0)}},W:function(e,t,r,n,i,o,a,s,u,c){var d=kn();try{Me(e)(t,r,n,i,o,a,s,u,c)}catch(e){if(An(d),e!==e+0)throw e;Dn(1,0)}},C:function(e,t,r,n,i,o,a,s,u,c,d){var l=kn();try{Me(e)(t,r,n,i,o,a,s,u,c,d)}catch(e){if(An(l),e!==e+0)throw e;Dn(1,0)}},$:function(e,t,r,n,i,o,a,s,u,c,d,l,h,m,f,p){var g=kn();try{Me(e)(t,r,n,i,o,a,s,u,c,d,l,h,m,f,p)}catch(e){if(An(g),e!==e+0)throw e;Dn(1,0)}},jb:function(e,t,r,n){var i=kn();try{Ln(e,t,r,n)}catch(e){if(An(i),e!==e+0)throw e;Dn(1,0)}},I:e=>e,a:E||l.wasmMemory,Sa:rn,ob:(e,t,r,n,i)=>rn(e,t,r,n)},fn=function(){var e,t,r,n,i={a:mn};function o(e,t){var r,n=e.exports;return Oe((fn=n).Xb),z=fn.Sb,r=fn.Qb,N.unshift(r),x=t,te(),n}if(ee(),l.instantiateWasm)try{return l.instantiateWasm(i,o)}catch(e){C(`Module.instantiateWasm callback failed with error: ${e}`),d(e)}return(e=F,t=Y,r=i,n=function(e){o(e.instance,e.module)},e||"function"!=typeof WebAssembly.instantiateStreaming||ne(t)||"function"!=typeof fetch?oe(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return C(`wasm streaming compile failed: ${e}`),C("falling back to ArrayBuffer instantiation"),oe(t,r,n)}))))).catch(d),{}}(),pn=l._malloc=e=>(pn=l._malloc=fn.Rb)(e),gn=l._free=e=>(gn=l._free=fn.Tb)(e),vn=()=>(vn=fn.Ub)(),yn=l._pthread_self=()=>(yn=l._pthread_self=fn.Vb)(),wn=e=>(wn=fn.Wb)(e),bn=(l.__emscripten_tls_init=()=>(l.__emscripten_tls_init=fn.Xb)(),(e,t)=>(bn=fn.Yb)(e,t)),Fn=e=>(Fn=fn.Zb)(e),_n=(l.__embind_initialize_bindings=()=>(l.__embind_initialize_bindings=fn._b)(),l.__emscripten_thread_init=(e,t,r,n,i,o)=>(_n=l.__emscripten_thread_init=fn.$b)(e,t,r,n,i,o)),Cn=(l.__emscripten_thread_crashed=()=>(l.__emscripten_thread_crashed=fn.ac)(),(e,t,r,n)=>(Cn=fn.bc)(e,t,r,n)),En=e=>(En=fn.cc)(e),xn=l.__emscripten_thread_exit=e=>(xn=l.__emscripten_thread_exit=fn.dc)(e),Tn=l.__emscripten_check_mailbox=()=>(Tn=l.__emscripten_check_mailbox=fn.ec)(),Dn=(e,t)=>(Dn=fn.fc)(e,t),Sn=(e,t)=>(Sn=fn.gc)(e,t),kn=()=>(kn=fn.hc)(),An=e=>(An=fn.ic)(e),Pn=e=>(Pn=fn.jc)(e),Rn=e=>(Rn=fn.kc)(e),Wn=e=>(Wn=fn.lc)(e),Mn=(e,t,r)=>(Mn=fn.mc)(e,t,r),On=e=>(On=fn.nc)(e),Bn=l.dynCall_ji=(e,t)=>(Bn=l.dynCall_ji=fn.oc)(e,t),Ln=l.dynCall_vij=(e,t,r,n)=>(Ln=l.dynCall_vij=fn.pc)(e,t,r,n),Zn=l.dynCall_iij=(e,t,r,n)=>(Zn=l.dynCall_iij=fn.qc)(e,t,r,n),zn=(l.dynCall_iiiijj=(e,t,r,n,i,o,a,s)=>(l.dynCall_iiiijj=fn.rc)(e,t,r,n,i,o,a,s),l.dynCall_viijj=(e,t,r,n,i,o,a)=>(l.dynCall_viijj=fn.sc)(e,t,r,n,i,o,a),l.dynCall_viiijjj=(e,t,r,n,i,o,a,s,u,c)=>(l.dynCall_viiijjj=fn.tc)(e,t,r,n,i,o,a,s,u,c),l.dynCall_jiji=(e,t,r,n,i)=>(l.dynCall_jiji=fn.uc)(e,t,r,n,i),l.dynCall_j=e=>(zn=l.dynCall_j=fn.vc)(e)),In=l.dynCall_jii=(e,t,r)=>(In=l.dynCall_jii=fn.wc)(e,t,r),$n=(l.dynCall_viijii=(e,t,r,n,i,o,a)=>(l.dynCall_viijii=fn.xc)(e,t,r,n,i,o,a),l.dynCall_jiiii=(e,t,r,n,i)=>($n=l.dynCall_jiiii=fn.yc)(e,t,r,n,i));function Nn(){if(!(J>0)){if(y)return c(l),U(),void startWorker(l);!function(){if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.preRun]);l.preRun.length;)G(l.preRun.shift());Re($)}(),J>0||(l.setStatus?(l.setStatus("Running..."),setTimeout((function(){setTimeout((function(){l.setStatus("")}),1),e()}),1)):e())}function e(){ln||(ln=!0,l.calledRun=!0,B||(U(),c(l),l.onRuntimeInitialized&&l.onRuntimeInitialized(),function(){if(!y){if(l.postRun)for("function"==typeof l.postRun&&(l.postRun=[l.postRun]);l.postRun.length;)e=l.postRun.shift(),V.unshift(e);var e;Re(V)}}()))}}if(l.dynCall_iiiiij=(e,t,r,n,i,o,a)=>(l.dynCall_iiiiij=fn.zc)(e,t,r,n,i,o,a),l.dynCall_iiiiijj=(e,t,r,n,i,o,a,s,u)=>(l.dynCall_iiiiijj=fn.Ac)(e,t,r,n,i,o,a,s,u),l.dynCall_iiiiiijj=(e,t,r,n,i,o,a,s,u,c)=>(l.dynCall_iiiiiijj=fn.Bc)(e,t,r,n,i,o,a,s,u,c),l.___start_em_js=3693584,l.___stop_em_js=3693692,l.keepRuntimeAlive=H,l.wasmMemory=E,l.UTF8ToString=Te,l.stringToUTF8=fr,l.lengthBytesUTF8=ve,l.ExitStatus=se,l.allocateUTF8=nn,l.PThread=Pe,q=function e(){ln||Nn(),ln||(q=e)},l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();function Vn(e,t){var r=jn();return Vn=function(t,n){var i=r[t-=273];if(void 0===Vn.CiFOut){var o=function(e){for(var t,r,n="",i="",o=0,a=0;r=e.charAt(a++);~r&&(t=o%4?64*t+r:r,o++%4)?n+=String.fromCharCode(255&t>>(-2*o&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=n.length;s<u;s++)i+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(i)},a=function(e,t){var r,n,i=[],a=0,s="";for(e=o(e),n=0;n<256;n++)i[n]=n;for(n=0;n<256;n++)a=(a+i[n]+t.charCodeAt(n%t.length))%256,r=i[n],i[n]=i[a],i[a]=r;n=0,a=0;for(var u=0;u<e.length;u++)a=(a+i[n=(n+1)%256])%256,r=i[n],i[n]=i[a],i[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^i[(i[n]+i[a])%256]);return s};Vn.JUoSSl=a,e=arguments,Vn.CiFOut=!0}var s=r[0],u=t+s,c=e[u];return c?i=c:(void 0===Vn.PYLFbg&&(Vn.PYLFbg=!0),i=Vn.JUoSSl(i,n),e[u]=i),i},Vn(e,t)}function jn(){var e=["WQ17i8oZW4hdPmkvW49gWPRdGSouka","W6KLWPimWP7dKH/cUKmYW7S","dmk2W45iWPb2W6pcHGG","WPL2WQ7cUmkkWPbcdmo/W6tdUSoDWRa","kexdKZhcN0RcJCouxmo0WPddQG","W7W6WRFdTSoocIW","wwmdW5ZdP2ifESoE","DSoGpSk8W5vMoCkz","nmktWO7cGvfpWPtcMuFdTYe","h8kvWQFcS8kglCkdtSoAfwO","W6vnymkimwfLW50WWPJcJa","bCkXW4OxW60bWR/cRstdR8kAW48v","WOv2WQpdQeldLqZcGJfMWQ1Ooq","W7X+WQ9ssez2","e23dU8kfW40LWOxdUa","WP55WR4lAHux","ttlcR8kfW7O5WPVdR8oW","WQdcJCo/W4Kbp8kdac4BWOdcRKZcOW","nmoAWOnkW6GnWRpcPCkwW59RWPBcHq","WPmUpmkxWQLXW6JcP0BcQXTK","WQPYlmkHWRhcQCoCW7Pb","W7iBWQn+W4i2W6hcLmo7W7lcI8odW7hcUq","WQdcJ8o+W4uboCkhEZiCWP/cJeC","WPjrWP83rYON"];return(jn=function(){return e})()}Nn(),function(e,t){for(var r=Vn,n=e();;)try{if(786528==-parseInt(r(288,"vSHe"))/1+parseInt(r(277,"PH]U"))/2*(parseInt(r(285,"hj(8"))/3)+parseInt(r(281,"COvH"))/4+parseInt(r(282,"PjyQ"))/5*(parseInt(r(287,"#aMK"))/6)+-parseInt(r(295,"r$9B"))/7*(parseInt(r(279,"29p#"))/8)+parseInt(r(292,"k(FO"))/9*(-parseInt(r(280,"r$9B"))/10)+-parseInt(r(286,"6y#u"))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(jn);var ighnua,Hn=(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}),Un=Hn(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Un)};return e()}));return Un(),e.ready});e.exports=i},function(e,t,r){"use strict";r.r(t),t.default="data:application/javascript;charset=utf-8;base64,InVzZSBzdHJpY3QiO3ZhciBNb2R1bGU9e307dmFyIGluaXRpYWxpemVkSlM9ZmFsc2U7ZnVuY3Rpb24gdGhyZWFkUHJpbnRFcnIoKXt2YXIgdGV4dD1BcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpLmpvaW4oIiAiKTtjb25zb2xlLmVycm9yKHRleHQpfWZ1bmN0aW9uIHRocmVhZEFsZXJ0KCl7dmFyIHRleHQ9QXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKS5qb2luKCIgIik7cG9zdE1lc3NhZ2Uoe2NtZDoiYWxlcnQiLHRleHQ6dGV4dCx0aHJlYWRJZDpNb2R1bGVbIl9wdGhyZWFkX3NlbGYiXSgpfSl9dmFyIGVycj10aHJlYWRQcmludEVycjtzZWxmLmFsZXJ0PXRocmVhZEFsZXJ0O01vZHVsZVsiaW5zdGFudGlhdGVXYXNtIl09KGluZm8scmVjZWl2ZUluc3RhbmNlKT0+e3ZhciBtb2R1bGU9TW9kdWxlWyJ3YXNtTW9kdWxlIl07TW9kdWxlWyJ3YXNtTW9kdWxlIl09bnVsbDt2YXIgaW5zdGFuY2U9bmV3IFdlYkFzc2VtYmx5Lkluc3RhbmNlKG1vZHVsZSxpbmZvKTtyZXR1cm4gcmVjZWl2ZUluc3RhbmNlKGluc3RhbmNlKX07c2VsZi5vbnVuaGFuZGxlZHJlamVjdGlvbj1lPT57dGhyb3cgZS5yZWFzb258fGV9O2Z1bmN0aW9uIGhhbmRsZU1lc3NhZ2UoZSl7dHJ5e2lmKGUuZGF0YS5jbWQ9PT0ibG9hZCIpe2xldCBtZXNzYWdlUXVldWU9W107c2VsZi5vbm1lc3NhZ2U9ZT0+bWVzc2FnZVF1ZXVlLnB1c2goZSk7c2VsZi5zdGFydFdvcmtlcj1pbnN0YW5jZT0+e01vZHVsZT1pbnN0YW5jZTtwb3N0TWVzc2FnZSh7ImNtZCI6ImxvYWRlZCJ9KTtmb3IobGV0IG1zZyBvZiBtZXNzYWdlUXVldWUpe2hhbmRsZU1lc3NhZ2UobXNnKX1zZWxmLm9ubWVzc2FnZT1oYW5kbGVNZXNzYWdlfTtNb2R1bGVbIndhc21Nb2R1bGUiXT1lLmRhdGEud2FzbU1vZHVsZTtmb3IoY29uc3QgaGFuZGxlciBvZiBlLmRhdGEuaGFuZGxlcnMpe01vZHVsZVtoYW5kbGVyXT0oLi4uYXJncyk9Pntwb3N0TWVzc2FnZSh7Y21kOiJjYWxsSGFuZGxlciIsaGFuZGxlcjpoYW5kbGVyLGFyZ3M6YXJnc30pfX1Nb2R1bGVbIndhc21NZW1vcnkiXT1lLmRhdGEud2FzbU1lbW9yeTtNb2R1bGVbImJ1ZmZlciJdPU1vZHVsZVsid2FzbU1lbW9yeSJdLmJ1ZmZlcjtNb2R1bGVbIkVOVklST05NRU5UX0lTX1BUSFJFQUQiXT10cnVlO2lmKHR5cGVvZiBlLmRhdGEudXJsT3JCbG9iPT0ic3RyaW5nIil7aW1wb3J0U2NyaXB0cyhlLmRhdGEudXJsT3JCbG9iKX1lbHNle3ZhciBvYmplY3RVcmw9VVJMLmNyZWF0ZU9iamVjdFVSTChlLmRhdGEudXJsT3JCbG9iKTtpbXBvcnRTY3JpcHRzKG9iamVjdFVybCk7VVJMLnJldm9rZU9iamVjdFVSTChvYmplY3RVcmwpfWluaXRNb2R1bGUoTW9kdWxlKX1lbHNlIGlmKGUuZGF0YS5jbWQ9PT0icnVuIil7TW9kdWxlWyJfX2Vtc2NyaXB0ZW5fdGhyZWFkX2luaXQiXShlLmRhdGEucHRocmVhZF9wdHIsMCwwLDEpO01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9tYWlsYm94X2F3YWl0Il0oZS5kYXRhLnB0aHJlYWRfcHRyKTtNb2R1bGVbImVzdGFibGlzaFN0YWNrU3BhY2UiXSgpO01vZHVsZVsiUFRocmVhZCJdLnJlY2VpdmVPYmplY3RUcmFuc2ZlcihlLmRhdGEpO01vZHVsZVsiUFRocmVhZCJdLnRocmVhZEluaXRUTFMoKTtpZighaW5pdGlhbGl6ZWRKUyl7TW9kdWxlWyJfX2VtYmluZF9pbml0aWFsaXplX2JpbmRpbmdzIl0oKTtpbml0aWFsaXplZEpTPXRydWV9dHJ5e01vZHVsZVsiaW52b2tlRW50cnlQb2ludCJdKGUuZGF0YS5zdGFydF9yb3V0aW5lLGUuZGF0YS5hcmcpfWNhdGNoKGV4KXtpZihleCE9InVud2luZCIpe3Rocm93IGV4fX19ZWxzZSBpZihlLmRhdGEuY21kPT09ImNhbmNlbCIpe2lmKE1vZHVsZVsiX3B0aHJlYWRfc2VsZiJdKCkpe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9leGl0Il0oLTEpfX1lbHNlIGlmKGUuZGF0YS50YXJnZXQ9PT0ic2V0aW1tZWRpYXRlIil7fWVsc2UgaWYoZS5kYXRhLmNtZD09PSJjaGVja01haWxib3giKXtpZihpbml0aWFsaXplZEpTKXtNb2R1bGVbImNoZWNrTWFpbGJveCJdKCl9fWVsc2UgaWYoZS5kYXRhLmNtZCl7ZXJyKGB3b3JrZXIuanMgcmVjZWl2ZWQgdW5rbm93biBjb21tYW5kICR7ZS5kYXRhLmNtZH1gKTtlcnIoZS5kYXRhKX19Y2F0Y2goZXgpe2lmKE1vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0pe01vZHVsZVsiX19lbXNjcmlwdGVuX3RocmVhZF9jcmFzaGVkIl0oKX10aHJvdyBleH19c2VsZi5vbm1lc3NhZ2U9aGFuZGxlTWVzc2FnZTsK"},function(e,t,r){"use strict";r.r(t),r.d(t,"ObjectId",(function(){return Se})),r.d(t,"commands",(function(){return We}));var n,i,o,a,s,u,c,d,l,h,m=r(0);class f{_marker(){}}class p extends f{constructor(e={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==e.author&&(this.author=e.author),void 0!==e.creator&&(this.creator=e.creator),void 0!==e.title&&(this.title=e.title),void 0!==e.subject&&(this.subject=e.subject),void 0!==e.keywords&&(this.keywords=e.keywords)}}class g extends f{constructor(e={}){super(),this.attributes=new p({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==e.attributes&&(this.attributes=new p(e.attributes)),void 0!==e.pageSize&&(this.pageSize=e.pageSize),void 0!==e.pageDirection&&(this.pageDirection=e.pageDirection),void 0!==e.pageFit&&(this.pageFit=e.pageFit),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.resamplingMethod&&(this.resamplingMethod=e.resamplingMethod)}}class v extends f{constructor(e={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class y extends f{constructor(e={}){super(),this.accumulatedResultsVerifierConfig=new v({}),void 0!==e.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new v(e.accumulatedResultsVerifierConfig))}}class w extends f{constructor(e={}){if(super(),void 0===e.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=e.symbolQuality,void 0===e.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=e.symbolRatio}}class b extends f{constructor(e={}){super(),this.qualityThresholds=[new w({symbolQuality:.5,symbolRatio:.5}),new w({symbolQuality:.7,symbolRatio:.3}),new w({symbolQuality:.85,symbolRatio:.3}),new w({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==e.qualityThresholds&&(this.qualityThresholds=e.qualityThresholds.map((e=>new w(e)))),void 0!==e.qualityIndices&&(this.qualityIndices=e.qualityIndices.map((e=>e))),void 0!==e.maxImageSize&&(this.maxImageSize=e.maxImageSize),void 0!==e.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=e.minEstimatedNumberOfSymbolsForDocument),void 0!==e.minProcessedFraction&&(this.minProcessedFraction=e.minProcessedFraction),void 0!==e.maxProcessedFraction&&(this.maxProcessedFraction=e.maxProcessedFraction),void 0!==e.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=e.earlyStopIfNSymbolsFound),void 0!==e.tileSize&&(this.tileSize=e.tileSize)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"ScanbotBinarizationFilter":return new F(e);case"CustomBinarizationFilter":return new _(e);case"ColorDocumentFilter":return new C(e);case"BrightnessFilter":return new E(e);case"ContrastFilter":return new x(e);case"GrayscaleFilter":return new T(e);case"LegacyFilter":return new D(e);case"WhiteBlackPointFilter":return new S(e);default:throw`Unknown child class name: ${t}`}}}(n||(n={}));class F extends f{constructor(e={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class _ extends f{constructor(e={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class C extends f{constructor(e={}){super(),this._type="ColorDocumentFilter"}}class E extends f{constructor(e={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class x extends f{constructor(e={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class T extends f{constructor(e={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class D extends f{constructor(e={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class S extends f{constructor(e={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}class k extends f{constructor(e={}){super(),this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}class A extends f{constructor(e={}){super(),this.isLive=!1,this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.acceptedAspectRatioScore=85,this.aspectRatios=[],void 0!==e.isLive&&(this.isLive=e.isLive),void 0!==e.acceptedAngleScore&&(this.acceptedAngleScore=e.acceptedAngleScore),void 0!==e.acceptedSizeScore&&(this.acceptedSizeScore=e.acceptedSizeScore),void 0!==e.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=e.acceptedBrightnessThreshold),void 0!==e.acceptedAspectRatioScore&&(this.acceptedAspectRatioScore=e.acceptedAspectRatioScore),void 0!==e.aspectRatios&&(this.aspectRatios=e.aspectRatios.map((e=>new k(e))))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DefaultContentValidator":return new P(e);case"PresetContentValidator":return new R(e);case"PatternContentValidator":return new W(e);default:throw`Unknown child class name: ${t}`}}}(i||(i={}));class P extends f{constructor(e={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters)}}class R extends f{constructor(e={}){if(super(),this._type="PresetContentValidator",void 0===e.preset)throw new Error("preset must be present in constructor argument");this.preset=e.preset}}class W extends f{constructor(e={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==e.allowedCharacters&&(this.allowedCharacters=e.allowedCharacters),void 0===e.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=e.pattern,void 0!==e.matchSubstring&&(this.matchSubstring=e.matchSubstring)}}class M extends f{constructor(e={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new P({}),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=e.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==e.validator&&(this.validator=i.From(e.validator))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new O(e);case"BarcodeFormatCode11Configuration":return new B(e);case"BarcodeFormatCode39Configuration":return new L(e);case"BarcodeFormatCode93Configuration":return new Z(e);case"BarcodeFormatCode128Configuration":return new z(e);case"BarcodeFormatCode2Of5Configuration":return new I(e);case"BarcodeFormatDataBarConfiguration":return new $(e);case"BarcodeFormatDataBarExpandedConfiguration":return new N(e);case"BarcodeFormatDataBarLimitedConfiguration":return new V(e);case"BarcodeFormatITFConfiguration":return new j(e);case"BarcodeFormatMSIPlesseyConfiguration":return new H(e);case"BarcodeFormatUpcEanConfiguration":return new U(e);case"BarcodeFormatPharmaCodeConfiguration":return new G(e);case"BarcodeFormatAztecConfiguration":return new Y(e);case"BarcodeFormatQRCodeConfiguration":return new Q(e);case"BarcodeFormatPDF417Configuration":return new X(e);case"BarcodeFormatMicroPDF417Configuration":return new J(e);case"BarcodeFormatDataMatrixConfiguration":return new K(e);case"BarcodeFormatMaxiCodeConfiguration":return new q(e);case"BarcodeFormatAustraliaPostConfiguration":return new ee(e);case"BarcodeFormatJapanPostConfiguration":return new te(e);case"BarcodeFormatRoyalMailConfiguration":return new re(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ne(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new ie(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new oe(e);case"BarcodeFormatGS1CompositeConfiguration":return new ae(e);case"BarcodeFormatCommonOneDConfiguration":return new se(e);case"BarcodeFormatCommonTwoDConfiguration":return new ue(e);case"BarcodeFormatCommonFourStateConfiguration":return new ce(e);case"BarcodeFormatCommonConfiguration":return new de(e);default:throw`Unknown child class name: ${t}`}}}(o||(o={})),function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatCodabarConfiguration":return new O(e);case"BarcodeFormatCode11Configuration":return new B(e);case"BarcodeFormatCode39Configuration":return new L(e);case"BarcodeFormatCode93Configuration":return new Z(e);case"BarcodeFormatCode128Configuration":return new z(e);case"BarcodeFormatCode2Of5Configuration":return new I(e);case"BarcodeFormatDataBarConfiguration":return new $(e);case"BarcodeFormatDataBarExpandedConfiguration":return new N(e);case"BarcodeFormatDataBarLimitedConfiguration":return new V(e);case"BarcodeFormatITFConfiguration":return new j(e);case"BarcodeFormatMSIPlesseyConfiguration":return new H(e);case"BarcodeFormatUpcEanConfiguration":return new U(e);case"BarcodeFormatPharmaCodeConfiguration":return new G(e);default:throw`Unknown child class name: ${t}`}}}(a||(a={}));class O extends f{constructor(e={}){super(),this._type="BarcodeFormatCodabarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.returnStartEnd&&(this.returnStartEnd=e.returnStartEnd)}}class B extends f{constructor(e={}){super(),this._type="BarcodeFormatCode11Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksum&&(this.checksum=e.checksum)}}class L extends f{constructor(e={}){super(),this._type="BarcodeFormatCode39Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.code32&&(this.code32=e.code32),void 0!==e.code39&&(this.code39=e.code39),void 0!==e.pzn&&(this.pzn=e.pzn),void 0!==e.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=e.tryCode39ExtendedMode),void 0!==e.useCode39CheckDigit&&(this.useCode39CheckDigit=e.useCode39CheckDigit)}}class Z extends f{constructor(e={}){super(),this._type="BarcodeFormatCode93Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class z extends f{constructor(e={}){super(),this._type="BarcodeFormatCode128Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class I extends f{constructor(e={}){super(),this._type="BarcodeFormatCode2Of5Configuration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.iata2of5&&(this.iata2of5=e.iata2of5),void 0!==e.code25&&(this.code25=e.code25),void 0!==e.industrial2of5&&(this.industrial2of5=e.industrial2of5),void 0!==e.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=e.useIATA2OF5Checksum)}}class $ extends f{constructor(e={}){super(),this._type="BarcodeFormatDataBarConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class N extends f{constructor(e={}){super(),this._type="BarcodeFormatDataBarExpandedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class V extends f{constructor(e={}){super(),this._type="BarcodeFormatDataBarLimitedConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class j extends f{constructor(e={}){super(),this._type="BarcodeFormatITFConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumTextLength=0,this.maximumTextLength=0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength)}}class H extends f{constructor(e={}){super(),this._type="BarcodeFormatMSIPlesseyConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.checksumAlgorithms&&(this.checksumAlgorithms=e.checksumAlgorithms.map((e=>e)))}}class U extends f{constructor(e={}){super(),this._type="BarcodeFormatUpcEanConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.ean8&&(this.ean8=e.ean8),void 0!==e.ean13&&(this.ean13=e.ean13),void 0!==e.upca&&(this.upca=e.upca),void 0!==e.upce&&(this.upce=e.upce),void 0!==e.extensions&&(this.extensions=e.extensions)}}class G extends f{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue),void 0!==e.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=e.allowNarrowBarsOnly),void 0!==e.allowWideBarsOnly&&(this.allowWideBarsOnly=e.allowWideBarsOnly)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAztecConfiguration":return new Y(e);case"BarcodeFormatQRCodeConfiguration":return new Q(e);case"BarcodeFormatPDF417Configuration":return new X(e);case"BarcodeFormatMicroPDF417Configuration":return new J(e);case"BarcodeFormatDataMatrixConfiguration":return new K(e);case"BarcodeFormatMaxiCodeConfiguration":return new q(e);default:throw`Unknown child class name: ${t}`}}}(s||(s={}));class Y extends f{constructor(e={}){super(),this._type="BarcodeFormatAztecConfiguration",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class Q extends f{constructor(e={}){super(),this._type="BarcodeFormatQRCodeConfiguration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.qr&&(this.qr=e.qr),void 0!==e.microQr&&(this.microQr=e.microQr),void 0!==e.rmqr&&(this.rmqr=e.rmqr)}}class X extends f{constructor(e={}){super(),this._type="BarcodeFormatPDF417Configuration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class J extends f{constructor(e={}){super(),this._type="BarcodeFormatMicroPDF417Configuration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class K extends f{constructor(e={}){super(),this._type="BarcodeFormatDataMatrixConfiguration",this.regexFilter="",this.gs1Handling="PARSE",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling)}}class q extends f{constructor(e={}){super(),this._type="BarcodeFormatMaxiCodeConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"BarcodeFormatAustraliaPostConfiguration":return new ee(e);case"BarcodeFormatJapanPostConfiguration":return new te(e);case"BarcodeFormatRoyalMailConfiguration":return new re(e);case"BarcodeFormatRoyalTNTPostConfiguration":return new ne(e);case"BarcodeFormatUSPSIntelligentMailConfiguration":return new ie(e);case"BarcodeFormatPharmaCodeTwoTrackConfiguration":return new oe(e);default:throw`Unknown child class name: ${t}`}}}(u||(u={}));class ee extends f{constructor(e={}){super(),this._type="BarcodeFormatAustraliaPostConfiguration",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=e.australiaPostCustomerFormat)}}class te extends f{constructor(e={}){super(),this._type="BarcodeFormatJapanPostConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class re extends f{constructor(e={}){super(),this._type="BarcodeFormatRoyalMailConfiguration",this.regexFilter="",this.stripCheckDigits=!1,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits)}}class ne extends f{constructor(e={}){super(),this._type="BarcodeFormatRoyalTNTPostConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class ie extends f{constructor(e={}){super(),this._type="BarcodeFormatUSPSIntelligentMailConfiguration",this.regexFilter="",void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter)}}class oe extends f{constructor(e={}){super(),this._type="BarcodeFormatPharmaCodeTwoTrackConfiguration",this.regexFilter="",this.minimumValue=364,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimumValue&&(this.minimumValue=e.minimumValue)}}class ae extends f{constructor(e={}){super(),this._type="BarcodeFormatGS1CompositeConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode)}}class se extends f{constructor(e={}){super(),this._type="BarcodeFormatCommonOneDConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ue extends f{constructor(e={}){super(),this._type="BarcodeFormatCommonTwoDConfiguration",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class ce extends f{constructor(e={}){super(),this._type="BarcodeFormatCommonFourStateConfiguration",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class de extends f{constructor(e={}){super(),this._type="BarcodeFormatCommonConfiguration",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==e.regexFilter&&(this.regexFilter=e.regexFilter),void 0!==e.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=e.minimum1DQuietZoneSize),void 0!==e.stripCheckDigits&&(this.stripCheckDigits=e.stripCheckDigits),void 0!==e.minimumTextLength&&(this.minimumTextLength=e.minimumTextLength),void 0!==e.maximumTextLength&&(this.maximumTextLength=e.maximumTextLength),void 0!==e.gs1Handling&&(this.gs1Handling=e.gs1Handling),void 0!==e.strictMode&&(this.strictMode=e.strictMode),void 0!==e.formats&&(this.formats=e.formats.map((e=>e)))}}class le extends f{constructor(e={}){super()}}(c=le||(le={})).all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],c.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]};class he extends f{constructor(e={}){super(),this.barcodeFormatConfigurations=[new de({})],this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==e.barcodeFormatConfigurations&&(this.barcodeFormatConfigurations=e.barcodeFormatConfigurations.map((e=>o.From(e)))),void 0!==e.engineMode&&(this.engineMode=e.engineMode),void 0!==e.live&&(this.live=e.live),void 0!==e.acceptedDocumentFormats&&(this.acceptedDocumentFormats=e.acceptedDocumentFormats.map((e=>e))),void 0!==e.returnBarcodeImage&&(this.returnBarcodeImage=e.returnBarcodeImage)}}!function(e){e.From=function(e){const t=e._type;switch(t){case"DateValidationConfig":return new me(e);case"EuropeanHealthInsuranceCardConfig":return new fe(e);case"MRZFallbackConfig":return new pe(e);case"GDRGroupConfig":return new ge(e);default:throw`Unknown child class name: ${t}`}}}(d||(d={}));class me extends f{constructor(e={}){super(),this._type="DateValidationConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.documentTypes=[],void 0!==e.minBirthYear&&(this.minBirthYear=e.minBirthYear),void 0!==e.maxBirthYear&&(this.maxBirthYear=e.maxBirthYear),void 0!==e.minExpirationYear&&(this.minExpirationYear=e.minExpirationYear),void 0!==e.maxExpirationYear&&(this.maxExpirationYear=e.maxExpirationYear),void 0!==e.documentTypes&&(this.documentTypes=e.documentTypes.map((e=>e)))}}class fe extends f{constructor(e={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.expectedCountry=null,void 0!==e.minBirthYear&&(this.minBirthYear=e.minBirthYear),void 0!==e.maxBirthYear&&(this.maxBirthYear=e.maxBirthYear),void 0!==e.minExpirationYear&&(this.minExpirationYear=e.minExpirationYear),void 0!==e.maxExpirationYear&&(this.maxExpirationYear=e.maxExpirationYear),void 0!==e.expectedCountry&&(this.expectedCountry=null!=e.expectedCountry?e.expectedCountry:null)}}class pe extends f{constructor(e={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==e.acceptedCountries&&(this.acceptedCountries=e.acceptedCountries.map((e=>e))),void 0!==e.acceptedMRZTypes&&(this.acceptedMRZTypes=e.acceptedMRZTypes.map((e=>e)))}}class ge extends f{constructor(e={}){if(super(),this._type="GDRGroupConfig",void 0===e.acceptedDocumentTypes)throw new Error("acceptedDocumentTypes must be present in constructor argument");this.acceptedDocumentTypes=e.acceptedDocumentTypes.map((e=>e))}}class ve extends f{constructor(e={}){super(),this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.confirmationMethod&&(this.confirmationMethod=e.confirmationMethod),void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class ye extends f{constructor(e={}){super(),this.mode="LIVE",void 0!==e.mode&&(this.mode=e.mode)}}class we extends f{constructor(e={}){if(super(),this.resultAccumulationConfig=new ve({}),this.fieldExcludeList=[],void 0!==e.resultAccumulationConfig&&(this.resultAccumulationConfig=new ve(e.resultAccumulationConfig)),void 0!==e.fieldExcludeList&&(this.fieldExcludeList=e.fieldExcludeList.map((e=>e))),void 0===e.configurations)throw new Error("configurations must be present in constructor argument");this.configurations=e.configurations.map((e=>d.From(e)))}}!function(e){e.From=function(e){const t=e._type;switch(t){case"UserFieldDoubleValue":return new be(e);case"UserFieldStringValue":return new Fe(e);case"UserFieldIntValue":return new _e(e);default:throw`Unknown child class name: ${t}`}}}(l||(l={}));class be extends f{constructor(e={}){if(super(),this._type="UserFieldDoubleValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Fe extends f{constructor(e={}){if(super(),this._type="UserFieldStringValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class _e extends f{constructor(e={}){if(super(),this._type="UserFieldIntValue",void 0===e.value)throw new Error("value must be present in constructor argument");this.value=e.value}}class Ce extends f{constructor(e={}){if(super(),void 0===e.tag)throw new Error("tag must be present in constructor argument");if(this.tag=e.tag,void 0===e.name)throw new Error("name must be present in constructor argument");if(this.name=e.name,void 0===e.value)throw new Error("value must be present in constructor argument");this.value=l.From(e.value)}}class Ee extends f{constructor(e={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==e.compression&&(this.compression=e.compression),void 0!==e.jpegQuality&&(this.jpegQuality=e.jpegQuality),void 0!==e.zipCompressionLevel&&(this.zipCompressionLevel=e.zipCompressionLevel),void 0!==e.dpi&&(this.dpi=e.dpi),void 0!==e.userFields&&(this.userFields=e.userFields.map((e=>new Ce(e)))),void 0!==e.binarizationFilter&&(this.binarizationFilter=null!=e.binarizationFilter?n.From(e.binarizationFilter):null)}}(h=Ee||(Ee={})).defaultCompression="LZW",h.binaryDocumentOptimizedCompression="CCITTFAX4";var xe=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))};let Te;class De extends Error{}class Se{constructor(e){this.id=e}}const ke={};function Ae(e){const t=Math.random().toString(36);return ke[t]=e,new Se(t)}function Pe(e){if(!ke.hasOwnProperty(e.id))throw new Error(`Object ${e.id} does not exist`);return ke[e.id]}function Re(e){const t=Pe(e);t.delete&&t.delete(),delete ke[e.id]}const We={initialize:function(e,t,n,i,o){return xe(this,void 0,void 0,(function*(){try{const{captureConsole:a,jpegQuality:s=80,requestSuffix:u=""}=o||{};a&&(console.log=function(...e){self.postMessage({log:e})},console.error=function(...e){self.postMessage({logError:e})});const c=r(2),d=r(3),l={locateFile:function(e,r){let n;return n=t?Object(m.c)(t)?t:"":i,e.endsWith(".worker.js")&&d?d.default:new URL(n+e+u,location.href).href}},h=Object(m.b)(o),f=h.includes("-threads");l.mainScriptUrlOrBlob=l.locateFile(`ScanbotSDK.Asm${h}.js`);let p;if(!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>"Chromium"===e.brand))&&f){let e=[2147483648,805306368,536870912],t=134217728;const r=["barcode-scanner"],n=67108864;"undefined"!=typeof SCANBOTSDK_FLAVOR&&r.includes(SCANBOTSDK_FLAVOR)&&(t=n,e.push(4*n));for(let r=0;r<e.length;r++){const n=e[r];try{p=new WebAssembly.Memory({initial:0,maximum:n/65536,shared:!0}),p.grow(t/65536);break}catch(t){if(r===e.length-1)throw t}}}return p&&(l.wasmMemory=p),l.onAbort=function(e){const t="\nNo further calls to the SDK are possible until you destroy and reinitialize the SDK.";throw new De("OOM"===e?"ScanbotSDK ran out of memory. "+t:"ScanbotSDK ran into an unexpected error: "+e+t)},yield c(l),Te=l,Te.initialize(e||"",n,s)}catch(e){throw console.error(e),e}}))},getLicenseInfo:function(){return xe(this,void 0,void 0,(function*(){return Te.getLicenseInfo()}))},encodeJpeg:function(e){return xe(this,void 0,void 0,(function*(){const t=Be(e);return Me(Te.encodeJpeg(t))}))},detectDocument:function(e,t){return xe(this,void 0,void 0,(function*(){const r=new Te.DocumentDetector(new A(t)),n=r.detect(Be(e));return r.delete(),Me(n)}))},detectAndCropDocument:function(e){return xe(this,void 0,void 0,(function*(){let t=Me(Te.detectAndCropDocument(Be(e)));return null===t.originalImage&&(t.originalImage=e),t}))},createDocumentDetector:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.DocumentDetector(new A(e)))}))},documentDetectorDetect:function(e,t){return xe(this,void 0,void 0,(function*(){return Oe(Pe(e).detect(Be(t)),t)}))},parseBarcodeDocument:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Te.parseBarcodeDocument(e,t))}))},createBarcodeRecognizer:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.BarcodeRecognizer(new he(e)))}))},recognizeBarcodes:function(e,t){return xe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Be(t)),t)}))},beginPdf:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.PdfGenerationContext(new g(e)))}))},addPageToPdf:function(e,t){return xe(this,void 0,void 0,(function*(){Me(Pe(e).addPage(Be(t)))}))},completePdf:function(e){return xe(this,void 0,void 0,(function*(){try{const t=Pe(e);return Me(t.complete())}finally{Re(e)}}))},beginTiff:function(e){return xe(this,void 0,void 0,(function*(){const t=new Te.TiffGenerationContext(new Ee(e));return Me(t.begin()),Ae(t)}))},addPageToTiff:function(e,t,r){return xe(this,void 0,void 0,(function*(){return Me(Pe(e).addPage(Be(t),r))}))},completeTiff:function(e){return xe(this,void 0,void 0,(function*(){try{const t=Pe(e);return Me(t.complete())}finally{Re(e)}}))},createMRZRecognizer:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.MrzRecognizerContext(new y(e)))}))},recognizeMRZ:function(e,t){return xe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Be(t)),t)}))},releaseObject:function(e){return xe(this,void 0,void 0,(function*(){Re(e)}))},createOcrEngine:function(){return xe(this,void 0,void 0,(function*(){return Ae(new Te.TLDROcrContext)}))},performOcr:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Pe(e).performOcr(Be(t)))}))},createGenericTextLineScanner:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.GenericTextLineScanner(new M(e)))}))},recognizeTextLine:function(e,t){return xe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Be(t)),t)}))},cleanTextLineRecognitionQueue:function(e){return xe(this,void 0,void 0,(function*(){Pe(e).cleanRecognitionQueue()}))},createDocumentQualityAnalyzer:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.DocumentQualityAnalyzer(new b(e)))}))},documentQualityAnalyzerAnalyze:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Pe(e).analyze(Be(t)))}))},imageApplyFilter:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Te.imageApplyFilter(Be(e),n.From(t)))}))},imageCrop:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Te.imageCrop(Be(e),t))}))},imageResize:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Te.imageResize(Be(e),t))}))},imageRotate:function(e,t){return xe(this,void 0,void 0,(function*(){return Me(Te.imageRotate(Be(e),t))}))},genericDocumentRecognizerCreate:function(e){return xe(this,void 0,void 0,(function*(){return Ae(new Te.GenericDocumentRecognizer(new we(e)))}))},genericDocumentRecognizerRecognize:function(e,t,r){return xe(this,void 0,void 0,(function*(){return Oe(Pe(e).recognize(Be(t),new ye(r)),t)}))},version:function(){return xe(this,void 0,void 0,(function*(){return"6.0.0-dev.4"}))},__hasModuleFunction:function(e){return xe(this,void 0,void 0,(function*(){return Te.hasOwnProperty(e)}))},__callModuleFunction:function(e,t=[]){return xe(this,void 0,void 0,(function*(){return Te[e](...t)}))}};function Me(e){if(e.errorMessage)throw new Error(e.errorMessage);return e.result}function Oe(e,t){return Object.assign(Object.assign({},Me(e)),{originalImage:t})}function Be(e){if(!e)throw new Error("null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;Te||"initialize"===t?(()=>xe(this,void 0,void 0,(function*(){return yield We[t].apply(null,r)})))().then((e=>{const t=Object(m.a)(e);self.postMessage({ticket:n,result:e},t)})).catch((e=>{if(e instanceof De)self.postMessage({ticket:n,unrecoverableError:e});else{const t="number"==typeof e?Error(Te.stringFromException(e)):e;console.error(t),self.postMessage({ticket:n,recoverableError:t})}})):self.postMessage({ticket:n,recoverableError:new Error("WASM module not loaded yet.")})}}]);
|