scanbot-web-sdk 5.1.3-dev.1 → 5.1.3-dev.3

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.
Files changed (27) hide show
  1. package/@types/scanbot-sdk.d.ts +8 -0
  2. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
  3. package/@types/worker/worker-bridge.d.ts +1 -0
  4. package/bundle/ScanbotSDK.min.js +3 -3
  5. package/bundle/ScanbotSDK.ui2.min.js +3 -3
  6. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  7. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  8. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  9. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  10. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  11. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  12. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  13. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  14. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  15. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  16. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  17. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  18. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  19. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  20. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  21. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  22. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  23. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  24. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  25. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  26. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  27. package/package.json +1 -1
@@ -1 +1 @@
1
- var initModule=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e={}){function t(){return T.buffer!=S.buffer&&I(),S}function n(){return T.buffer!=S.buffer&&I(),A}function o(){return T.buffer!=S.buffer&&I(),F}function a(){return T.buffer!=S.buffer&&I(),D}function i(){return T.buffer!=S.buffer&&I(),W}function s(){return T.buffer!=S.buffer&&I(),M}function u(){return T.buffer!=S.buffer&&I(),O}var c,l,d=e;d.ready=new Promise(((r,e)=>{c=r,l=e}));var f,h,p,m=Object.assign({},d),v="./this.program",y=(r,e)=>{throw e},g=d.ENVIRONMENT_IS_PTHREAD||!1,w="";function _(r){return d.locateFile?d.locateFile(r,w):w+r}w=self.location.href,r&&(w=r),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},p=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},h=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var b,E=d.print||console.log.bind(console),k=d.printErr||console.error.bind(console);Object.assign(d,m),m=null,d.arguments&&d.arguments,d.thisProgram&&(v=d.thisProgram),d.quit&&(y=d.quit),d.wasmBinary&&(b=d.wasmBinary);var T,$,C=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&Q("no native wasm support detected");var P,S,A,F,D,W,M,j,O,x=!1;function R(r,e){r||Q(e)}function I(){var r=T.buffer;d.HEAP8=S=new Int8Array(r),d.HEAP16=F=new Int16Array(r),d.HEAPU8=A=new Uint8Array(r),d.HEAPU16=D=new Uint16Array(r),d.HEAP32=W=new Int32Array(r),d.HEAPU32=M=new Uint32Array(r),d.HEAPF32=j=new Float32Array(r),d.HEAPF64=O=new Float64Array(r)}var N,z=d.INITIAL_MEMORY||67108864;if(R(z>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+z+"! (STACK_SIZE=4194304)"),g)T=d.wasmMemory;else if(d.wasmMemory)T=d.wasmMemory;else if(!((T=new WebAssembly.Memory({initial:z/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw k("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");I(),z=T.buffer.byteLength;var L=[],U=[],B=[],H=0;function V(){return C||H>0}function Y(){!0,g||(d.noFSInit||$r.init.initialized||$r.init(),$r.ignorePermissions=!1,_r.init(),Wr(U))}function q(r){L.unshift(r)}var K=0,G=null,X=null;function J(r){K++,d.monitorRunDependencies&&d.monitorRunDependencies(K)}function Z(r){if(K--,d.monitorRunDependencies&&d.monitorRunDependencies(K),0==K&&(null!==G&&(clearInterval(G),G=null),X)){var e=X;X=null,e()}}function Q(r){d.onAbort&&d.onAbort(r),k(r="Aborted("+r+")"),x=!0,P=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw l(e),e}var rr,er,tr;function nr(r){return r.startsWith("data:application/octet-stream;base64,")}function or(r){if(r==rr&&b)return new Uint8Array(b);if(p)return p(r);throw"both async and sync fetching of the wasm failed"}function ar(r,e,t){return function(r){return b||"function"!=typeof fetch?Promise.resolve().then((()=>or(r))):fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()})).catch((()=>or(r)))}(r).then((r=>WebAssembly.instantiate(r,e))).then((r=>r)).then(t,(r=>{k(`failed to asynchronously prepare wasm: ${r}`),Q(r)}))}nr(rr="ScanbotSDK.Asm-simd-threads.wasm")||(rr=_(rr));var ir={1120340:r=>an(function(){return this[Cr(r)].toString()}.apply((0,eval)("(()=>this)()"))),1120454:r=>{throw new Error("Invalid barcode format: "+Cr(r))}};function sr(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var ur=r=>{r.terminate(),r.onmessage=r=>{}},cr=r=>{var e=Dr.pthreads[r];R(e),Dr.returnWorkerToPool(e)},lr=r=>{var e=Dr.getNewWorker();if(!e)return 6;Dr.runningWorkers.push(e),Dr.pthreads[r.pthread_ptr]=e,e.pthread_ptr=r.pthread_ptr;var t={cmd:"run",start_routine:r.startRoutine,arg:r.arg,pthread_ptr:r.pthread_ptr};return e.postMessage(t,r.transferList),0},dr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=dr.isAbs(r),t="/"===r.substr(-1);return(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=dr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=dr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return dr.normalize(r.join("/"))},join2:(r,e)=>dr.normalize(r+"/"+e)},fr=r=>(fr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>(r.set(crypto.getRandomValues(new Uint8Array(r.byteLength))),r);Q("initRandomDevice")})())(r),hr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:$r.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=dr.isAbs(n)}return(e?"/":"")+(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=hr.resolve(r).substr(1),e=hr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},pr="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,mr=(r,e,t)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&pr)return pr.decode(r.buffer instanceof SharedArrayBuffer?r.slice(e,o):r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var u=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},vr=[],yr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},gr=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o};function wr(r,e,t){var n=t>0?t:yr(r)+1,o=new Array(n),a=gr(r,o,0,o.length);return e&&(o.length=a),o}var _r={ttys:[],init(){},shutdown(){},register(r,e){_r.ttys[r]={input:[],output:[],ops:e},$r.registerDevice(r,_r.stream_ops)},stream_ops:{open(r){var e=_r.ttys[r.node.rdev];if(!e)throw new $r.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new $r.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new $r.ErrnoError(29)}if(void 0===s&&0===a)throw new $r.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new $r.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new $r.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>(()=>{if(!vr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;vr=wr(r,!0)}return vr.shift()})(),put_char(r,e){null===e||10===e?(E(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(E(mr(r.output,0)),r.output=[])},ioctl_tcgets:r=>({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:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(k(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(k(mr(r.output,0)),r.output=[])}}},br=r=>{r=((r,e)=>Math.ceil(r/e)*e)(r,65536);var e=En(65536,r);return e?((r,e)=>(n().fill(0,r,r+e),r))(e,r):0},Er={ops_table:null,mount:r=>Er.createNode(null,"/",16895,0),createNode(r,e,t,n){if($r.isBlkdev(t)||$r.isFIFO(t))throw new $r.ErrnoError(63);Er.ops_table||(Er.ops_table={dir:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,lookup:Er.node_ops.lookup,mknod:Er.node_ops.mknod,rename:Er.node_ops.rename,unlink:Er.node_ops.unlink,rmdir:Er.node_ops.rmdir,readdir:Er.node_ops.readdir,symlink:Er.node_ops.symlink},stream:{llseek:Er.stream_ops.llseek}},file:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:{llseek:Er.stream_ops.llseek,read:Er.stream_ops.read,write:Er.stream_ops.write,allocate:Er.stream_ops.allocate,mmap:Er.stream_ops.mmap,msync:Er.stream_ops.msync}},link:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,readlink:Er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:$r.chrdev_stream_ops}});var o=$r.createNode(r,e,t,n);return $r.isDir(o.mode)?(o.node_ops=Er.ops_table.dir.node,o.stream_ops=Er.ops_table.dir.stream,o.contents={}):$r.isFile(o.mode)?(o.node_ops=Er.ops_table.file.node,o.stream_ops=Er.ops_table.file.stream,o.usedBytes=0,o.contents=null):$r.isLink(o.mode)?(o.node_ops=Er.ops_table.link.node,o.stream_ops=Er.ops_table.link.stream):$r.isChrdev(o.mode)&&(o.node_ops=Er.ops_table.chrdev.node,o.stream_ops=Er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=$r.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,$r.isDir(r.mode)?e.size=4096:$r.isFile(r.mode)?e.size=r.usedBytes:$r.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Er.resizeFileStorage(r,e.size)},lookup(r,e){throw $r.genericErrors[44]},mknod:(r,e,t,n)=>Er.createNode(r,e,t,n),rename(r,e,t){if($r.isDir(r.mode)){var n;try{n=$r.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new $r.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=$r.lookupNode(r,e);for(var n in t.contents)throw new $r.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink(r,e,t){var n=Er.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!$r.isLink(r.mode))throw new $r.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,n,o,a,i){if(e.buffer===t().buffer&&(i=!1),!o)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=e.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=e.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(e.subarray(n,n+o),a),o}if(Er.expandFileStorage(s,a+o),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(n,n+o),a);else for(var u=0;u<o;u++)s.contents[a+u]=e[n+u];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&$r.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new $r.ErrnoError(28);return n},allocate(r,e,t){Er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,n,o,a){if(!$r.isFile(r.node.mode))throw new $r.ErrnoError(43);var i,s,u=r.node.contents;if(2&a||u.buffer!==t().buffer){if((n>0||n+e<u.length)&&(u=u.subarray?u.subarray(n,n+e):Array.prototype.slice.call(u,n,n+e)),s=!0,!(i=br(e)))throw new $r.ErrnoError(48);t().set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:(r,e,t,n,o)=>(Er.stream_ops.write(r,e,0,n,t,!1),0)}},kr=d.preloadPlugins||[],Tr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},$r={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(r,e={}){if(!(r=hr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new $r.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=$r.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&e.parent)break;if(n=$r.lookupNode(n,t[a]),o=dr.join2(o,t[a]),$r.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;$r.isLink(n.mode);){var u=$r.readlink(o);if(o=hr.resolve(dr.dirname(o),u),n=$r.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new $r.ErrnoError(32)}}return{path:o,node:n}},getPath(r){for(var e;;){if($r.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%$r.nameTable.length},hashAddNode(r){var e=$r.hashName(r.parent.id,r.name);r.name_next=$r.nameTable[e],$r.nameTable[e]=r},hashRemoveNode(r){var e=$r.hashName(r.parent.id,r.name);if($r.nameTable[e]===r)$r.nameTable[e]=r.name_next;else for(var t=$r.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=$r.mayLookup(r);if(t)throw new $r.ErrnoError(t,r);for(var n=$r.hashName(r.id,e),o=$r.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return $r.lookup(r,e)},createNode(r,e,t,n){var o=new $r.FSNode(r,e,t,n);return $r.hashAddNode(o),o},destroyNode(r){$r.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>$r.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){var e=$r.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{$r.lookupNode(r,e);return 20}catch(r){}return $r.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=$r.lookupNode(r,e)}catch(r){return r.errno}var o=$r.nodePermissions(r,"wx");if(o)return o;if(t){if(!$r.isDir(n.mode))return 54;if($r.isRoot(n)||$r.getPath(n)===$r.cwd())return 10}else if($r.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?$r.isLink(r.mode)?32:$r.isDir(r.mode)&&("r"!==$r.flagsToPermissionString(e)||512&e)?31:$r.nodePermissions(r,$r.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=$r.MAX_OPEN_FDS;r++)if(!$r.streams[r])return r;throw new $r.ErrnoError(33)},getStreamChecked(r){var e=$r.getStream(r);if(!e)throw new $r.ErrnoError(8);return e},getStream:r=>$r.streams[r],createStream:(r,e=-1)=>($r.FSStream||($r.FSStream=function(){this.shared={}},$r.FSStream.prototype={},Object.defineProperties($r.FSStream.prototype,{object:{get(){return this.node},set(r){this.node=r}},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(r){this.shared.flags=r}},position:{get(){return this.shared.position},set(r){this.shared.position=r}}})),r=Object.assign(new $r.FSStream,r),-1==e&&(e=$r.nextfd()),r.fd=e,$r.streams[e]=r,r),closeStream(r){$r.streams[r]=null},chrdev_stream_ops:{open(r){var e=$r.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek(){throw new $r.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){$r.devices[r]={stream_ops:e}},getDevice:r=>$r.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),$r.syncFSRequests++,$r.syncFSRequests>1&&k(`warning: ${$r.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=$r.getMounts($r.root.mount),n=0;function o(r){return $r.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&$r.root)throw new $r.ErrnoError(10);if(!o&&!a){var i=$r.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,$r.isMountpoint(n))throw new $r.ErrnoError(10);if(!$r.isDir(n.mode))throw new $r.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?$r.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(r){var e=$r.lookupPath(r,{follow_mount:!1});if(!$r.isMountpoint(e.node))throw new $r.ErrnoError(28);var t=e.node,n=t.mounted,o=$r.getMounts(n);Object.keys($r.nameTable).forEach((r=>{for(var e=$r.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&$r.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=$r.lookupPath(r,{parent:!0}).node,o=dr.basename(r);if(!o||"."===o||".."===o)throw new $r.ErrnoError(28);var a=$r.mayCreate(n,o);if(a)throw new $r.ErrnoError(a);if(!n.node_ops.mknod)throw new $r.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,$r.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,$r.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{$r.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,$r.mknod(r,e,t)),symlink(r,e){if(!hr.resolve(r))throw new $r.ErrnoError(44);var t=$r.lookupPath(e,{parent:!0}).node;if(!t)throw new $r.ErrnoError(44);var n=dr.basename(e),o=$r.mayCreate(t,n);if(o)throw new $r.ErrnoError(o);if(!t.node_ops.symlink)throw new $r.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=dr.dirname(r),a=dr.dirname(e),i=dr.basename(r),s=dr.basename(e);if(t=$r.lookupPath(r,{parent:!0}).node,n=$r.lookupPath(e,{parent:!0}).node,!t||!n)throw new $r.ErrnoError(44);if(t.mount!==n.mount)throw new $r.ErrnoError(75);var u,c=$r.lookupNode(t,i),l=hr.relative(r,a);if("."!==l.charAt(0))throw new $r.ErrnoError(28);if("."!==(l=hr.relative(e,o)).charAt(0))throw new $r.ErrnoError(55);try{u=$r.lookupNode(n,s)}catch(r){}if(c!==u){var d=$r.isDir(c.mode),f=$r.mayDelete(t,i,d);if(f)throw new $r.ErrnoError(f);if(f=u?$r.mayDelete(n,s,d):$r.mayCreate(n,s))throw new $r.ErrnoError(f);if(!t.node_ops.rename)throw new $r.ErrnoError(63);if($r.isMountpoint(c)||u&&$r.isMountpoint(u))throw new $r.ErrnoError(10);if(n!==t&&(f=$r.nodePermissions(t,"w")))throw new $r.ErrnoError(f);$r.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{$r.hashAddNode(c)}}},rmdir(r){var e=$r.lookupPath(r,{parent:!0}).node,t=dr.basename(r),n=$r.lookupNode(e,t),o=$r.mayDelete(e,t,!0);if(o)throw new $r.ErrnoError(o);if(!e.node_ops.rmdir)throw new $r.ErrnoError(63);if($r.isMountpoint(n))throw new $r.ErrnoError(10);e.node_ops.rmdir(e,t),$r.destroyNode(n)},readdir(r){var e=$r.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new $r.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=$r.lookupPath(r,{parent:!0}).node;if(!e)throw new $r.ErrnoError(44);var t=dr.basename(r),n=$r.lookupNode(e,t),o=$r.mayDelete(e,t,!1);if(o)throw new $r.ErrnoError(o);if(!e.node_ops.unlink)throw new $r.ErrnoError(63);if($r.isMountpoint(n))throw new $r.ErrnoError(10);e.node_ops.unlink(e,t),$r.destroyNode(n)},readlink(r){var e=$r.lookupPath(r).node;if(!e)throw new $r.ErrnoError(44);if(!e.node_ops.readlink)throw new $r.ErrnoError(28);return hr.resolve($r.getPath(e.parent),e.node_ops.readlink(e))},stat(r,e){var t=$r.lookupPath(r,{follow:!e}).node;if(!t)throw new $r.ErrnoError(44);if(!t.node_ops.getattr)throw new $r.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>$r.stat(r,!0),chmod(r,e,t){var n;"string"==typeof r?n=$r.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new $r.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){$r.chmod(r,e,!0)},fchmod(r,e){var t=$r.getStreamChecked(r);$r.chmod(t.node,e)},chown(r,e,t,n){var o;"string"==typeof r?o=$r.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new $r.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){$r.chown(r,e,t,!0)},fchown(r,e,t){var n=$r.getStreamChecked(r);$r.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new $r.ErrnoError(28);var t;"string"==typeof r?t=$r.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new $r.ErrnoError(63);if($r.isDir(t.mode))throw new $r.ErrnoError(31);if(!$r.isFile(t.mode))throw new $r.ErrnoError(28);var n=$r.nodePermissions(t,"w");if(n)throw new $r.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=$r.getStreamChecked(r);if(0==(2097155&t.flags))throw new $r.ErrnoError(28);$r.truncate(t.node,e)},utime(r,e,t){var n=$r.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t){if(""===r)throw new $r.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(e="string"==typeof e?(r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if("undefined"==typeof e)throw new Error(`Unknown file open mode: ${r}`);return e})(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=dr.normalize(r);try{n=$r.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new $r.ErrnoError(20)}else n=$r.mknod(r,t,0),o=!0;if(!n)throw new $r.ErrnoError(44);if($r.isChrdev(n.mode)&&(e&=-513),65536&e&&!$r.isDir(n.mode))throw new $r.ErrnoError(54);if(!o){var a=$r.mayOpen(n,e);if(a)throw new $r.ErrnoError(a)}512&e&&!o&&$r.truncate(n,0),e&=-131713;var i=$r.createStream({node:n,path:$r.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&e||($r.readFiles||($r.readFiles={}),r in $r.readFiles||($r.readFiles[r]=1)),i},close(r){if($r.isClosed(r))throw new $r.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{$r.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if($r.isClosed(r))throw new $r.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new $r.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new $r.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new $r.ErrnoError(28);if($r.isClosed(r))throw new $r.ErrnoError(8);if(1==(2097155&r.flags))throw new $r.ErrnoError(8);if($r.isDir(r.node.mode))throw new $r.ErrnoError(31);if(!r.stream_ops.read)throw new $r.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new $r.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new $r.ErrnoError(28);if($r.isClosed(r))throw new $r.ErrnoError(8);if(0==(2097155&r.flags))throw new $r.ErrnoError(8);if($r.isDir(r.node.mode))throw new $r.ErrnoError(31);if(!r.stream_ops.write)throw new $r.ErrnoError(28);r.seekable&&1024&r.flags&&$r.llseek(r,0,2);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new $r.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if($r.isClosed(r))throw new $r.ErrnoError(8);if(e<0||t<=0)throw new $r.ErrnoError(28);if(0==(2097155&r.flags))throw new $r.ErrnoError(8);if(!$r.isFile(r.node.mode)&&!$r.isDir(r.node.mode))throw new $r.ErrnoError(43);if(!r.stream_ops.allocate)throw new $r.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new $r.ErrnoError(2);if(1==(2097155&r.flags))throw new $r.ErrnoError(2);if(!r.stream_ops.mmap)throw new $r.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new $r.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=$r.open(r,e.flags),o=$r.stat(r).size,a=new Uint8Array(o);return $r.read(n,a,0,o,0),"utf8"===e.encoding?t=mr(a,0):"binary"===e.encoding&&(t=a),$r.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=$r.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(yr(e)+1),a=gr(e,o,0,o.length);$r.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");$r.write(n,e,0,e.byteLength,void 0,t.canOwn)}$r.close(n)},cwd:()=>$r.currentPath,chdir(r){var e=$r.lookupPath(r,{follow:!0});if(null===e.node)throw new $r.ErrnoError(44);if(!$r.isDir(e.node.mode))throw new $r.ErrnoError(54);var t=$r.nodePermissions(e.node,"x");if(t)throw new $r.ErrnoError(t);$r.currentPath=e.path},createDefaultDirectories(){$r.mkdir("/tmp"),$r.mkdir("/home"),$r.mkdir("/home/web_user")},createDefaultDevices(){$r.mkdir("/dev"),$r.registerDevice($r.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),$r.mkdev("/dev/null",$r.makedev(1,3)),_r.register($r.makedev(5,0),_r.default_tty_ops),_r.register($r.makedev(6,0),_r.default_tty1_ops),$r.mkdev("/dev/tty",$r.makedev(5,0)),$r.mkdev("/dev/tty1",$r.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=fr(r).byteLength),r[--e]);$r.createDevice("/dev","random",t),$r.createDevice("/dev","urandom",t),$r.mkdir("/dev/shm"),$r.mkdir("/dev/shm/tmp")},createSpecialDirectories(){$r.mkdir("/proc");var r=$r.mkdir("/proc/self");$r.mkdir("/proc/self/fd"),$r.mount({mount(){var e=$r.createNode(r,"fd",16895,73);return e.node_ops={lookup(r,e){var t=+e,n=$r.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?$r.createDevice("/dev","stdin",d.stdin):$r.symlink("/dev/tty","/dev/stdin"),d.stdout?$r.createDevice("/dev","stdout",null,d.stdout):$r.symlink("/dev/tty","/dev/stdout"),d.stderr?$r.createDevice("/dev","stderr",null,d.stderr):$r.symlink("/dev/tty1","/dev/stderr");$r.open("/dev/stdin",0),$r.open("/dev/stdout",1),$r.open("/dev/stderr",1)},ensureErrnoError(){$r.ErrnoError||($r.ErrnoError=function(r,e){this.name="ErrnoError",this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},$r.ErrnoError.prototype=new Error,$r.ErrnoError.prototype.constructor=$r.ErrnoError,[44].forEach((r=>{$r.genericErrors[r]=new $r.ErrnoError(r),$r.genericErrors[r].stack="<generic error, no stack>"})))},staticInit(){$r.ensureErrnoError(),$r.nameTable=new Array(4096),$r.mount(Er,{},"/"),$r.createDefaultDirectories(),$r.createDefaultDevices(),$r.createSpecialDirectories(),$r.filesystems={MEMFS:Er}},init(r,e,t){$r.init.initialized=!0,$r.ensureErrnoError(),d.stdin=r||d.stdin,d.stdout=e||d.stdout,d.stderr=t||d.stderr,$r.createStandardStreams()},quit(){$r.init.initialized=!1;for(var r=0;r<$r.streams.length;r++){var e=$r.streams[r];e&&$r.close(e)}},findObject(r,e){var t=$r.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=$r.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=$r.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(r),n=$r.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:$r.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(r,a);try{$r.mkdir(i)}catch(r){}r=i}}return i},createFile(r,e,t,n,o){var a=dr.join2("string"==typeof r?r:$r.getPath(r),e),i=Tr(n,o);return $r.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:$r.getPath(r),i=e?dr.join2(r,e):r);var s=Tr(n,o),u=$r.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}$r.chmod(u,146|s);var f=$r.open(u,577);$r.write(f,t,0,t.length,0,a),$r.close(f),$r.chmod(u,s)}return u},createDevice(r,e,t,n){var o=dr.join2("string"==typeof r?r:$r.getPath(r),e),a=Tr(!!t,!!n);$r.createDevice.major||($r.createDevice.major=64);var i=$r.makedev($r.createDevice.major++,0);return $r.registerDevice(i,{open(r){r.seekable=!1},close(r){n&&n.buffer&&n.buffer.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new $r.ErrnoError(29)}if(void 0===u&&0===i)throw new $r.ErrnoError(6);if(null==u)break;i++,e[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(r){throw new $r.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),$r.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.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(!f)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=wr(f(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new $r.ErrnoError(29)}},createLazyFile(r,e,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",n,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+n+". Status: "+r.status);var e,t=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=t);var s=this;s.setDataGetter((r=>{var e=r*i,o=(r+1)*i-1;if(o=Math.min(o,t-1),"undefined"==typeof s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):wr(o.responseText||"",!0)})(e,o)),"undefined"==typeof s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){0;var s=new i;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=$r.createFile(r,e,u,o,a);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(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((r=>{var e=c.stream_ops[r];l[r]=function(){return $r.forceLoadFile(c),e.apply(null,arguments)}})),l.read=(r,e,t,n,o)=>($r.forceLoadFile(c),d(r,e,t,n,o)),l.mmap=(r,e,n,o,a)=>{$r.forceLoadFile(c);var i=br(e);if(!i)throw new $r.ErrnoError(48);return d(r,t(),i,e,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},Cr=(r,e)=>r?mr(n(),r,e):"",Pr={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(dr.isAbs(e))return e;var n;-100===r?n=$r.cwd():n=Pr.getStreamFromFD(r).path;if(0==e.length){if(!t)throw new $r.ErrnoError(44);return n}return dr.join2(n,e)},doStat(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&dr.normalize(e)!==dr.normalize($r.getPath(r.node)))return-54;throw r}i()[t>>2]=n.dev,i()[t+4>>2]=n.mode,s()[t+8>>2]=n.nlink,i()[t+12>>2]=n.uid,i()[t+16>>2]=n.gid,i()[t+20>>2]=n.rdev,tr=[n.size>>>0,(er=n.size,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=tr[0],i()[t+28>>2]=tr[1],i()[t+32>>2]=4096,i()[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),u=n.ctime.getTime();return tr=[Math.floor(o/1e3)>>>0,(er=Math.floor(o/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=tr[0],i()[t+44>>2]=tr[1],s()[t+48>>2]=o%1e3*1e3,tr=[Math.floor(a/1e3)>>>0,(er=Math.floor(a/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=tr[0],i()[t+60>>2]=tr[1],s()[t+64>>2]=a%1e3*1e3,tr=[Math.floor(u/1e3)>>>0,(er=Math.floor(u/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=tr[0],i()[t+76>>2]=tr[1],s()[t+80>>2]=u%1e3*1e3,tr=[n.ino>>>0,(er=n.ino,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=tr[0],i()[t+92>>2]=tr[1],0},doMsync(r,e,t,o,a){if(!$r.isFile(e.node.mode))throw new $r.ErrnoError(43);if(2&o)return 0;var i=n().slice(r,r+t);$r.msync(e,i,a,t,o)},varargs:void 0,get(){var r=i()[Pr.varargs>>2];return Pr.varargs+=4,r},getp:()=>Pr.get(),getStr:r=>Cr(r),getStreamFromFD:r=>$r.getStreamChecked(r)};function Sr(r){if(g)return Dt(0,1,r);P=r,V()||(Dr.terminateAllThreads(),d.onExit&&d.onExit(r),x=!0),y(r,new sr(r))}var Ar=(r,e)=>{if(P=r,g)throw Mr(r),"unwind";Sr(r)},Fr=r=>{if(r instanceof sr||"unwind"==r)return P;y(1,r)},Dr={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){g?Dr.initWorker():Dr.initMainThread()},initMainThread(){for(var r=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));r--;)Dr.allocateUnusedWorker();q((()=>{J(),Dr.loadWasmModuleToAllWorkers((()=>Z()))}))},initWorker(){C=!1},setExitStatus:r=>{P=r},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var r of Dr.runningWorkers)ur(r);for(var r of Dr.unusedWorkers)ur(r);Dr.unusedWorkers=[],Dr.runningWorkers=[],Dr.pthreads=[]},returnWorkerToPool:r=>{var e=r.pthread_ptr;delete Dr.pthreads[e],Dr.unusedWorkers.push(r),Dr.runningWorkers.splice(Dr.runningWorkers.indexOf(r),1),r.pthread_ptr=0,Cn(e)},receiveObjectTransfer(r){},threadInitTLS(){Dr.tlsInitFunctions.forEach((r=>r()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,o=n.cmd;if(n.targetThread&&n.targetThread!=_n()){var a=Dr.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):k(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?At():"spawnThread"===o?lr(n):"cleanupThread"===o?cr(n.thread):"killThread"===o?(r=>{var e=Dr.pthreads[r];delete Dr.pthreads[r],ur(e),Cn(r),Dr.runningWorkers.splice(Dr.runningWorkers.indexOf(e),1),e.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Dr.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&k(`worker sent an unknown command ${o}`)}},e.onerror=r=>{throw k(`worker sent an error! ${r.filename}:${r.lineno}: ${r.message}`),r};var n=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&n.push(o);e.postMessage({cmd:"load",handlers:n,urlOrBlob:d.mainScriptUrlOrBlob||r,wasmMemory:T,wasmModule:$})})),loadWasmModuleToAllWorkers(r){if(g)return r();Promise.all(Dr.unusedWorkers.map(Dr.loadWasmModuleToWorker)).then(r)},allocateUnusedWorker(){var r,e=_("ScanbotSDK.Asm-simd-threads.worker.js");r=new Worker(e),Dr.unusedWorkers.push(r)},getNewWorker:()=>(0==Dr.unusedWorkers.length&&(Dr.allocateUnusedWorker(),Dr.loadWasmModuleToWorker(Dr.unusedWorkers[0])),Dr.unusedWorkers.pop())};d.PThread=Dr;var Wr=r=>{for(;r.length>0;)r.shift()(d)};function Mr(r){if(g)return Dt(1,0,r);Ar(r)}d.establishStackSpace=()=>{var r=_n(),e=i()[r+52>>2],t=i()[r+56>>2];Fn(e,e-t),Wn(e)};var jr=[],Or=r=>{var e=jr[r];return e||(r>=jr.length&&(jr.length=r+1),jr[r]=e=N.get(r)),e};d.invokeEntryPoint=(r,e)=>{!function(r){V()?Dr.setExitStatus(r):Pn(r)}(Or(r)(e))};var xr=r=>{Dr.tlsInitFunctions.push(r)},Rr=[],Ir=0,Nr=0;function zr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){s()[this.ptr+4>>2]=r},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(r){s()[this.ptr+8>>2]=r},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(r){r=r?1:0,t()[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,t()[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)},this.set_adjusted_ptr=function(r){s()[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Rn(this.get_type()))return s()[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}var Lr=r=>{var e=Nr;if(!e)return bn(0),0;var t=new zr(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return bn(0),e;for(var o in r){var a=r[o];if(0===a||a===n)break;var i=t.ptr+16;if(xn(a,n,i))return bn(a),e}return bn(n),e},Ur=()=>{var r=Rr.pop();r||Q("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(Rr.push(r),r.set_rethrown(!0),r.set_caught(!1),Ir++),Nr=e};function Br(r,e,t,n){return g?Dt(2,1,r,e,t,n):Hr(r,e,t,n)}var Hr=(r,e,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return k("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(g&&0===o.length)return Br(r,e,t,n);var a={startRoutine:t,pthread_ptr:r,arg:n,transferList:o};return g?(a.cmd="spawnThread",postMessage(a,o),0):lr(a)};function Vr(r,e,t,n,o){if(g)return Dt(3,1,r,e,t,n,o);try{for(var a=0,s=e?i()[e>>2]:0,u=e?i()[e+4>>2]:0,c=t?i()[t>>2]:0,l=t?i()[t+4>>2]:0,d=n?i()[n>>2]:0,f=n?i()[n+4>>2]:0,h=0,p=0,m=0,v=0,y=0,w=0,_=(e?i()[e>>2]:0)|(t?i()[t>>2]:0)|(n?i()[n>>2]:0),b=(e?i()[e+4>>2]:0)|(t?i()[t+4>>2]:0)|(n?i()[n+4>>2]:0),E=function(r,e,t,n){return r<32?e&n:t&n},k=0;k<r;k++){var T=1<<k%32;if(E(k,_,b,T)){var $=Pr.getStreamFromFD(k),C=Pr.DEFAULT_POLLMASK;if($.stream_ops.poll){var P=-1;if(o)P=1e3*((e?i()[o>>2]:0)+(e?i()[o+8>>2]:0)/1e6);C=$.stream_ops.poll($,P)}1&C&&E(k,s,u,T)&&(k<32?h|=T:p|=T,a++),4&C&&E(k,c,l,T)&&(k<32?m|=T:v|=T,a++),2&C&&E(k,d,f,T)&&(k<32?y|=T:w|=T,a++)}}return e&&(i()[e>>2]=h,i()[e+4>>2]=p),t&&(i()[t>>2]=m,i()[t+4>>2]=v),n&&(i()[n>>2]=y,i()[n+4>>2]=w),a}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Yr(r,e,t){if(g)return Dt(4,1,r,e,t);Pr.varargs=t;try{var n=Pr.getStreamFromFD(r);switch(e){case 0:if((a=Pr.get())<0)return-28;for(;$r.streams[a];)a++;return $r.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Pr.get();return n.flags|=a,0;case 5:a=Pr.getp();return o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[wn()>>2]=s,-1}}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}var s}function qr(r,e){if(g)return Dt(5,1,r,e);try{var t=Pr.getStreamFromFD(r);return Pr.doStat($r.stat,t.path,e)}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Kr(r,e,n){if(g)return Dt(6,1,r,e,n);Pr.varargs=n;try{var a=Pr.getStreamFromFD(r);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),u=Pr.getp();i()[u>>2]=s.c_iflag||0,i()[u+4>>2]=s.c_oflag||0,i()[u+8>>2]=s.c_cflag||0,i()[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(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){u=Pr.getp();var l=i()[u>>2],d=i()[u+4>>2],f=i()[u+8>>2],h=i()[u+12>>2],p=[];for(c=0;c<32;c++)p.push(t()[u+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,e,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:h,c_cc:p})}return 0;case 21519:if(!a.tty)return-59;u=Pr.getp();return i()[u>>2]=0,0;case 21520:return a.tty?-28:-59;case 21531:u=Pr.getp();return $r.ioctl(a,e,u);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);u=Pr.getp();o()[u>>1]=m[0],o()[u+2>>1]=m[1]}return 0;default:return-28}}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Gr(r,e,t,n){if(g)return Dt(8,1,r,e,t,n);try{e=Pr.getStr(e);var o=256&n,a=4096&n;return n&=-6401,e=Pr.calculateAt(r,e,a),Pr.doStat(o?$r.lstat:$r.stat,e,t)}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Xr(r,e,t,n){if(g)return Dt(9,1,r,e,t,n);Pr.varargs=n;try{e=Pr.getStr(e),e=Pr.calculateAt(r,e);var o=n?Pr.get():0;return $r.open(e,t,o).fd}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Jr(r){if(g)return Dt(10,1,r);try{return r=Pr.getStr(r),$r.rmdir(r),0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Zr(r,e){if(g)return Dt(11,1,r,e);try{return r=Pr.getStr(r),Pr.doStat($r.stat,r,e)}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}function Qr(r,e,t){if(g)return Dt(12,1,r,e,t);try{return e=Pr.getStr(e),e=Pr.calculateAt(r,e),0===t?$r.unlink(e):512===t?$r.rmdir(e):Q("Invalid flags passed to unlinkat"),0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}var re={},ee=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function te(r){return this.fromWireType(i()[r>>2])}var ne={},oe={},ae={},ie=void 0,se=r=>{throw new ie(r)},ue=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&se("Mismatched type converter count");for(var o=0;o<r.length;++o)pe(r[o],n[o])}r.forEach((function(r){ae[r]=e}));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{oe.hasOwnProperty(r)?o[e]=oe[r]:(a.push(r),ne.hasOwnProperty(r)||(ne[r]=[]),ne[r].push((()=>{o[e]=oe[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},ce={},le=void 0,de=r=>{for(var e="",t=r;n()[t];)e+=le[n()[t++]];return e},fe=void 0,he=r=>{throw new fe(r)};function pe(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(r,e,t={}){var n=e.name;if(r||he(`type "${n}" must have a positive integer typeid pointer`),oe.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;he(`Cannot register type '${n}' twice`)}if(oe[r]=e,delete ae[r],ne.hasOwnProperty(r)){var o=ne[r];delete ne[r],o.forEach((r=>r()))}}(r,e,t)}var me=8;function ve(r){if(!(this instanceof Ie))return!1;if(!(r instanceof Ie))return!1;for(var e=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&t===o}var ye=r=>{he(r.$$.ptrType.registeredClass.name+" instance already deleted")},ge=!1,we=r=>{},_e=r=>{r.count.value-=1,0===r.count.value&&(r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)})(r)},be=(r,e,t)=>{if(e===t)return r;if(void 0===t.baseClass)return null;var n=be(r,e,t.baseClass);return null===n?null:t.downcast(n)},Ee={},ke=()=>Object.keys(Ae).length,Te=()=>{var r=[];for(var e in Ae)Ae.hasOwnProperty(e)&&r.push(Ae[e]);return r},$e=[],Ce=()=>{for(;$e.length;){var r=$e.pop();r.$$.deleteScheduled=!1,r.delete()}},Pe=void 0,Se=r=>{Pe=r,$e.length&&Pe&&Pe(Ce)},Ae={},Fe=(r,e)=>(e=((r,e)=>{for(void 0===e&&he("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e})(r,e),Ae[e]),De=(r,e)=>(e.ptrType&&e.ptr||se("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!==!!e.smartPtr&&se("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Me(Object.create(r,{$$:{value:e}})));function We(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=Fe(this.registeredClass,e);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?De(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):De(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(e),s=Ee[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=be(e,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?De(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):De(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Me=r=>"undefined"==typeof FinalizationRegistry?(Me=r=>r,r):(ge=new FinalizationRegistry((r=>{_e(r.$$)})),Me=r=>{var e=r.$$;if(!!e.smartPtr){var t={$$:e};ge.register(r,t,r)}return r},we=r=>ge.unregister(r),Me(r));function je(){if(this.$$.ptr||ye(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,e=Me(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Oe(){this.$$.ptr||ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),we(this),_e(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function xe(){return!this.$$.ptr}function Re(){return this.$$.ptr||ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),$e.push(this),1===$e.length&&Pe&&Pe(Ce),this.$$.deleteScheduled=!0,this}function Ie(){}var Ne=r=>{if(void 0===r)return"_unknown";var e=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?`_${r}`:r};function ze(r,e){return{[r=Ne(r)]:function(){return e.apply(this,arguments)}}[r]}var Le=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(){return r[e].overloadTable.hasOwnProperty(arguments.length)||he(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[arguments.length].apply(this,arguments)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ue=(r,e,t)=>{d.hasOwnProperty(r)?((void 0===t||void 0!==d[r].overloadTable&&void 0!==d[r].overloadTable[t])&&he(`Cannot register public name '${r}' twice`),Le(d,r,r),d.hasOwnProperty(t)&&he(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[r].overloadTable[t]=e):(d[r]=e,void 0!==t&&(d[r].numArguments=t))};function Be(r,e,t,n,o,a,i,s){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var He=(r,e,t)=>{for(;e!==t;)e.upcast||he(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function Ve(r,e){if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),0;e.$$||he(`Cannot pass "${vt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass;return He(e.$$.ptr,t,this.registeredClass)}function Ye(r,e){var t;if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,t),t):0;e.$$||he(`Cannot pass "${vt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&he(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=He(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&he("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:he(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else{var o=e.clone();t=this.rawShare(t,ht.toHandle((()=>o.delete()))),null!==r&&r.push(this.rawDestructor,t)}break;default:he("Unsupporting sharing policy")}return t}function qe(r,e){if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),0;e.$$||he(`Cannot pass "${vt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&he(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass;return He(e.$$.ptr,t,this.registeredClass)}function Ke(r){return this.fromWireType(s()[r>>2])}function Ge(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function Xe(r){this.rawDestructor&&this.rawDestructor(r)}var Je=r=>{null!==r&&r.delete()};function Ze(r,e,t,n,o,a,i,s,u,c,l){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Ye:n?(this.toWireType=Ve,this.destructorFunction=null):(this.toWireType=qe,this.destructorFunction=null)}var Qe=(r,e,t)=>{d.hasOwnProperty(r)||se("Replacing nonexistant public symbol"),void 0!==d[r].overloadTable&&void 0!==t?d[r].overloadTable[t]=e:(d[r]=e,d[r].argCount=t)},rt=(r,e,t)=>r.includes("j")?((r,e,t)=>{var n=d["dynCall_"+r];return t&&t.length?n.apply(null,[e].concat(t)):n.call(null,e)})(r,e,t):Or(e).apply(null,t),et=(r,e)=>{var t,n,o,a=(r=de(r)).includes("j")?(t=r,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),rt(t,n,o)}):Or(e);return"function"!=typeof a&&he(`unknown function pointer with signature ${r}: ${e}`),a},tt=void 0,nt=r=>{var e=kn(r),t=de(e);return gn(e),t},ot=(r,e)=>{var t=[],n={};throw e.forEach((function r(e){n[e]||oe[e]||(ae[e]?ae[e].forEach(r):(t.push(e),n[e]=!0))})),new tt(`${r}: `+t.map(nt).join([", "]))},at=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(s()[e+4*n>>2]);return t};function it(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=ze(r.name||"unknownFunctionName",(function(){}));t.prototype=r.prototype;var n=new t,o=r.apply(n,e);return o instanceof Object?o:n}function st(r,e,t,n,o,a){var i=e.length;i<2&&he("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==t,u=!1,c=1;c<e.length;++c)if(null!==e[c]&&void 0===e[c].destructorFunction){u=!0;break}var l="void"!==e[0].name,d="",f="";for(c=0;c<i-2;++c)d+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${Ne(r)}(${d}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${r} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[he,n,o,ee,e[0],e[1]];s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n");for(c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+e[c+2].name+"\n",m.push("argType"+c),v.push(e[c+2]);if(s&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(l||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<e.length;++c){var y=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==e[c].destructorFunction&&(h+=y+"_dtor("+y+"); // "+e[c].name+"\n",m.push(y+"_dtor"),v.push(e[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),it(Function,m).apply(null,v)}var ut=(r,e,t)=>(r instanceof Object||he(`${t} with invalid "this": ${r}`),r instanceof e.registeredClass.constructor||he(`${t} incompatible with "this" of type ${r.constructor.name}`),r.$$.ptr||he(`cannot call emscripten binding method ${t} on deleted object`),He(r.$$.ptr,r.$$.ptrType.registeredClass,e.registeredClass));function ct(){this.allocated=[void 0],this.freelist=[]}var lt=new ct,dt=r=>{r>=lt.reserved&&0==--lt.get(r).refcount&&lt.free(r)},ft=()=>{for(var r=0,e=lt.reserved;e<lt.allocated.length;++e)void 0!==lt.allocated[e]&&++r;return r},ht={toValue:r=>(r||he("Cannot use deleted val. handle = "+r),lt.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return lt.allocate({refcount:1,value:r})}}},pt=(r,e,u)=>{switch(e){case 1:return u?function(r){return this.fromWireType(t()[r>>0])}:function(r){return this.fromWireType(n()[r>>0])};case 2:return u?function(r){return this.fromWireType(o()[r>>1])}:function(r){return this.fromWireType(a()[r>>1])};case 4:return u?function(r){return this.fromWireType(i()[r>>2])}:function(r){return this.fromWireType(s()[r>>2])};default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},mt=(r,e)=>{var t=oe[r];return void 0===t&&he(e+" has unknown type "+nt(r)),t},vt=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},yt=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType((T.buffer!=S.buffer&&I(),j)[r>>2])};case 8:return function(r){return this.fromWireType(u()[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},gt=(r,e,u)=>{switch(e){case 1:return u?r=>t()[r>>0]:r=>n()[r>>0];case 2:return u?r=>o()[r>>1]:r=>a()[r>>1];case 4:return u?r=>i()[r>>2]:r=>s()[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},wt=(r,e,t)=>gr(r,n(),e,t),_t="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,bt=(r,e)=>{for(var t=r,i=t>>1,s=i+e/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-r>32&&_t)return _t.decode(n().slice(r,t));for(var u="",c=0;!(c>=e/2);++c){var l=o()[r+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},Et=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,i=0;i<a;++i){var s=r.charCodeAt(i);o()[e>>1]=s,e+=2}return o()[e>>1]=0,e-n},kt=r=>2*r.length,Tt=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=i()[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},$t=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(i()[e>>2]=s,(e+=4)+4>o)break}return i()[e>>2]=0,e-n},Ct=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},Pt=r=>{if(!x)try{r(),(()=>{if(!V())try{g?Pn(P):Ar(P)}catch(r){Fr(r)}})()}catch(r){Fr(r)}},St=r=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),r>>2,r).value.then(At);var e=r+128;Atomics.store(i(),e>>2,1)}};d.__emscripten_thread_mailbox_await=St;var At=()=>{var r=_n();r&&(St(r),Pt((()=>Sn())))};d.checkMailbox=At;var Ft=r=>{var e=Dn(),t=r();return Wn(e),t},Dt=function(r,e){var t=arguments.length-2,n=arguments;return Ft((()=>{for(var o=t,a=Mn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return $n(r,o,a,e)}))},Wt=[],Mt={},jt=r=>{var e=Mt[r];return void 0===e?de(r):e},Ot=[],xt=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Rt=[],It=r=>r%4==0&&(r%100!=0||r%400==0),Nt=[0,31,60,91,121,152,182,213,244,274,305,335],zt=[0,31,59,90,120,151,181,212,243,273,304,334],Lt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function Ut(r,e,t,n,o,a,i){if(g)return Dt(14,1,r,e,t,n,o,a,i);var s=Lt(a,i);try{if(isNaN(s))return 61;var u=Pr.getStreamFromFD(o);2&t&&Pr.doMsync(r,u,e,n,s),$r.munmap(u)}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}}var Bt,Ht=r=>{var e=yr(r)+1,t=yn(e);return t&&wt(r,t,e),t},Vt=[],Yt=(r,e,t)=>{var o=((r,e)=>{var t;for(Vt.length=0;t=n()[r++];)e+=105!=t&&e%8?4:0,Vt.push(105==t?i()[e>>2]:u()[e>>3]),e+=105==t?4:8;return Vt})(e,t);return ir[r].apply(null,o)};Bt=()=>performance.timeOrigin+performance.now();var qt=r=>{var e=(r-T.buffer.byteLength+65535)/65536;try{return T.grow(e),I(),1}catch(r){}},Kt={},Gt=()=>{if(!Gt.strings){var r={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",_:v||"./this.program"};for(var e in Kt)void 0===Kt[e]?delete r[e]:r[e]=Kt[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Gt.strings=t}return Gt.strings},Xt=function(r,e){if(g)return Dt(15,1,r,e);var n=0;return Gt().forEach(((o,a)=>{var i=e+n;s()[r+4*a>>2]=i,((r,e)=>{for(var n=0;n<r.length;++n)t()[e++>>0]=r.charCodeAt(n);t()[e>>0]=0})(o,i),n+=o.length+1})),0},Jt=function(r,e){if(g)return Dt(16,1,r,e);var t=Gt();s()[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),s()[e>>2]=n,0};function Zt(r){if(g)return Dt(17,1,r);try{var e=Pr.getStreamFromFD(r);return $r.close(e),0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return r.errno}}function Qt(r,e,n,o){if(g)return Dt(18,1,r,e,n,o);try{var a=((r,e,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[e>>2],c=s()[e+4>>2];e+=8;var l=$r.read(r,t(),u,c,o);if(l<0)return-1;if(a+=l,l<c)break;"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),e,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return r.errno}}function rn(r,e,t,n,o){if(g)return Dt(19,1,r,e,t,n,o);var a=Lt(e,t);try{if(isNaN(a))return 61;var s=Pr.getStreamFromFD(r);return $r.llseek(s,a,n),tr=[s.position>>>0,(er=s.position,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[o>>2]=tr[0],i()[o+4>>2]=tr[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return r.errno}}function en(r,e,n,o){if(g)return Dt(20,1,r,e,n,o);try{var a=((r,e,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[e>>2],c=s()[e+4>>2];e+=8;var l=$r.write(r,t(),u,c,o);if(l<0)return-1;a+=l,"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),e,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return r.errno}}var tn=[31,29,31,30,31,30,31,31,30,31,30,31],nn=[31,28,31,30,31,30,31,31,30,31,30,31],on=(r,e,n,o)=>{var a=s()[o+40>>2],u={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?Cr(a):""},c=Cr(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 f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function m(r,e){return p(r,e,"0")}function v(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function y(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function g(r){var e=((r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=It(t.getFullYear()),o=t.getMonth(),a=(n?tn:nn)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=y(t),a=y(n);return v(o,e)<=0?v(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var w={"%a":r=>f[r.tm_wday].substring(0,3),"%A":r=>f[r.tm_wday],"%b":r=>h[r.tm_mon].substring(0,3),"%B":r=>h[r.tm_mon],"%C":r=>m((r.tm_year+1900)/100|0,2),"%d":r=>m(r.tm_mday,2),"%e":r=>p(r.tm_mday,2," "),"%g":r=>g(r).toString().substring(2),"%G":r=>g(r),"%H":r=>m(r.tm_hour,2),"%I":r=>{var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),m(e,2)},"%j":r=>m(r.tm_mday+((r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t})(It(r.tm_year+1900)?tn:nn,r.tm_mon-1),3),"%m":r=>m(r.tm_mon+1,2),"%M":r=>m(r.tm_min,2),"%n":()=>"\n","%p":r=>r.tm_hour>=0&&r.tm_hour<12?"AM":"PM","%S":r=>m(r.tm_sec,2),"%t":()=>"\t","%u":r=>r.tm_wday||7,"%U":r=>{var e=r.tm_yday+7-r.tm_wday;return m(Math.floor(e/7),2)},"%V":r=>{var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&It(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&It(r.tm_year%400-1))&&e++}return m(e,2)},"%w":r=>r.tm_wday,"%W":r=>{var e=r.tm_yday+7-(r.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":r=>(r.tm_year+1900).toString().substring(2),"%Y":r=>r.tm_year+1900,"%z":r=>{var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":r=>r.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,E=wr(c=c.replace(/\0\0/g,"%"),!1);return E.length>e?0:(_=E,b=r,t().set(_,b),E.length-1)},an=Ht;Dr.init();var sn,un,cn,ln=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=$r.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},dn=365,fn=146;Object.defineProperties(ln.prototype,{read:{get:function(){return(this.mode&dn)===dn},set:function(r){r?this.mode|=dn:this.mode&=-366}},write:{get:function(){return(this.mode&fn)===fn},set:function(r){r?this.mode|=fn:this.mode&=-147}},isFolder:{get:function(){return $r.isDir(this.mode)}},isDevice:{get:function(){return $r.isChrdev(this.mode)}}}),$r.FSNode=ln,$r.createPreloadedFile=(r,e,t,n,o,a,i,s,u,c)=>{var l=e?hr.resolve(dr.join2(r,e)):r;function d(t){function d(t){c&&c(),s||$r.createDataFile(r,e,t,n,o,u),a&&a(),Z()}((r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return kr.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o})(t,l,d,(()=>{i&&i(),Z()}))||d(t)}J(),"string"==typeof t?((r,e,t,n)=>{var o=n?"":`al ${r}`;h(r,(t=>{R(t,`Loading data file "${r}" failed (no arrayBuffer).`),e(new Uint8Array(t)),o&&Z()}),(e=>{if(!t)throw`Loading data file "${r}" failed.`;t()})),o&&J()})(t,(r=>d(r)),i):d(t)},$r.staticInit(),ie=d.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},(()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);le=r})(),fe=d.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},Ie.prototype.isAliasOf=ve,Ie.prototype.clone=je,Ie.prototype.delete=Oe,Ie.prototype.isDeleted=xe,Ie.prototype.deleteLater=Re,d.getInheritedInstanceCount=ke,d.getLiveInheritedInstances=Te,d.flushPendingDeletes=Ce,d.setDelayFunction=Se,Ze.prototype.getPointee=Ge,Ze.prototype.destructor=Xe,Ze.prototype.argPackAdvance=me,Ze.prototype.readValueFromPointer=Ke,Ze.prototype.deleteObject=Je,Ze.prototype.fromWireType=We,tt=d.UnboundTypeError=(sn=Error,(cn=ze(un="UnboundTypeError",(function(r){this.name=un,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(sn.prototype),cn.prototype.constructor=cn,cn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},cn),Object.assign(ct.prototype,{get(r){return this.allocated[r]},has(r){return void 0!==this.allocated[r]},allocate(r){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=r,e},free(r){this.allocated[r]=void 0,this.freelist.push(r)}}),lt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),lt.reserved=lt.allocated.length,d.count_emval_handles=ft;var hn,pn=[Sr,Mr,Br,Vr,Yr,qr,Kr,function(r,e){if(g)return Dt(7,1,r,e);try{return r=Pr.getStr(r),Pr.doStat($r.lstat,r,e)}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}},Gr,Xr,Jr,Zr,Qr,function(r,e,t,n,o,a,u,c){if(g)return Dt(13,1,r,e,t,n,o,a,u,c);var l=Lt(o,a);try{if(isNaN(l))return 61;var d=Pr.getStreamFromFD(n),f=$r.mmap(d,r,l,e,t),h=f.ptr;return i()[u>>2]=f.allocated,s()[c>>2]=h,0}catch(r){if("undefined"==typeof $r||"ErrnoError"!==r.name)throw r;return-r.errno}},Ut,Xt,Jt,Zt,Qt,rn,en],mn={u:r=>{var e=new zr(r);return e.get_caught()||(e.set_caught(!0),Ir--),e.set_rethrown(!1),Rr.push(e),On(e.excPtr),e.get_exception_ptr()},Eb:()=>{if(!Rr.length)return 0;var r=Rr[Rr.length-1];return On(r.excPtr),r.excPtr},z:()=>{An(0,0);var r=Rr.pop();jn(r.excPtr),Nr=0},b:()=>Lr([]),h:r=>Lr([r]),G:(r,e)=>Lr([r,e]),Ea:Ur,Db:r=>{if(r){var e=new zr(r);Rr.push(e),e.set_rethrown(!0),Ur()}},p:(r,e,t)=>{throw new zr(r).init(e,t),Ir++,Nr=r},Fb:()=>Ir,Rb:r=>{Tn(r,!1,1,!0,4194304,!1),Dr.threadInitTLS()},Ma:r=>{g?postMessage({cmd:"cleanupThread",thread:r}):cr(r)},Ob:Hr,e:r=>{throw Nr||(Nr=r),Nr},Lb:Vr,Pa:Yr,Wb:qr,Xb:Kr,Ub:Gr,Qa:Xr,Mb:Jr,Vb:Zr,Nb:Qr,lb:r=>{var e=re[r];delete re[r];var t=e.elements,n=t.length,o=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),a=e.rawConstructor,i=e.rawDestructor;ue([r],o,(function(r){return t.forEach(((e,t)=>{var o=r[t],a=e.getter,i=e.getterContext,s=r[t+n],u=e.setter,c=e.setterContext;e.read=r=>o.fromWireType(a(i,r)),e.write=(r,e)=>{var t=[];u(c,r,s.toWireType(t,e)),ee(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),o=0;o<n;++o)e[o]=t[o].read(r);return i(r),e},toWireType:(r,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==r&&r.push(i,s),s},argPackAdvance:me,readValueFromPointer:te,destructorFunction:i}]}))},mb:r=>{var e=ce[r];delete ce[r];var t=e.rawConstructor,n=e.rawDestructor,o=e.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));ue([r],a,(r=>{var a={};return o.forEach(((e,t)=>{var n=e.fieldName,i=r[t],s=e.getter,u=e.getterContext,c=r[t+o.length],l=e.setter,d=e.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,e)=>{var t=[];l(d,r,c.toWireType(t,e)),ee(t)}}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in a)e[t]=a[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var o in a)if(!(o in e))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,e[o]);return null!==r&&r.push(n,i),i},argPackAdvance:me,readValueFromPointer:te,destructorFunction:n}]}))},yb:(r,e,t,n,o)=>{},ac:(r,e,t,o)=>{pe(r,{name:e=de(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:o},argPackAdvance:me,readValueFromPointer:function(r){return this.fromWireType(n()[r])},destructorFunction:null})},V:(r,e,t,n,o,a,i,s,u,c,l,d,f)=>{l=de(l),a=et(o,a),s&&(s=et(i,s)),c&&(c=et(u,c)),f=et(d,f);var h=Ne(l);Ue(h,(function(){ot(`Cannot construct ${l} due to unbound types`,[n])})),ue([r,e,t],n?[n]:[],(function(e){var t,o;e=e[0],o=n?(t=e.registeredClass).instancePrototype:Ie.prototype;var i=ze(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new fe(l+" has no accessible constructor");var r=d.constructor_body[arguments.length];if(void 0===r)throw new fe(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var d=new Be(l,i,u,f,t,a,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Ze(l,d,!0,!1,!1),m=new Ze(l+"*",d,!1,!1,!1),v=new Ze(l+" const*",d,!1,!0,!1);return Ee[r]={pointerType:m,constPointerType:v},Qe(h,i),[p,m,v]}))},Ja:(r,e,t,n,o,a)=>{var i=at(e,t);o=et(n,o),ue([],[r],(function(r){var t=`constructor ${(r=r[0]).name}`;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[e-1])throw new fe(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${r.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return r.registeredClass.constructor_body[e-1]=()=>{ot(`Cannot construct ${r.name} due to unbound types`,i)},ue([],i,(n=>(n.splice(1,0,null),r.registeredClass.constructor_body[e-1]=st(t,n,null,o,a),[]))),[]}))},Ia:(r,e,t,n,o,a,i,s,u)=>{var c=at(t,n);e=de(e),a=et(o,a),ue([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`;function o(){ot(`Cannot call ${n} due to unbound types`,c)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(e);var l=r.registeredClass.instancePrototype,d=l[e];return void 0===d||void 0===d.overloadTable&&d.className!==r.name&&d.argCount===t-2?(o.argCount=t-2,o.className=r.name,l[e]=o):(Le(l,e,n),l[e].overloadTable[t-2]=o),ue([],c,(function(o){var s=st(n,o,r,a,i,u);return void 0===l[e].overloadTable?(s.argCount=t-2,l[e]=s):l[e].overloadTable[t-2]=s,[]})),[]}))},I:(r,e,t,n,o,a,i,s,u,c)=>{e=de(e),o=et(n,o),ue([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`,l={get(){ot(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>ot(`Cannot access ${n} due to unbound types`,[t,i]):r=>he(n+" is a read-only property"),Object.defineProperty(r.registeredClass.instancePrototype,e,l),ue([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var e=ut(this,r,n+" getter");return i.fromWireType(o(a,e))},enumerable:!0};if(u){u=et(s,u);var d=t[1];l.set=function(e){var t=ut(this,r,n+" setter"),o=[];u(c,t,d.toWireType(o,e)),ee(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,e,l),[]})),[]}))},$b:(r,e)=>{pe(r,{name:e=de(e),fromWireType:r=>{var e=ht.toValue(r);return dt(r),e},toWireType:(r,e)=>ht.toHandle(e),argPackAdvance:me,readValueFromPointer:te,destructorFunction:null})},nb:(r,e,t,n)=>{function o(){}e=de(e),o.values={},pe(r,{name:e,constructor:o,fromWireType:function(r){return this.constructor.values[r]},toWireType:(r,e)=>e.value,argPackAdvance:me,readValueFromPointer:pt(e,t,n),destructorFunction:null}),Ue(e,o)},Y:(r,e,t)=>{var n=mt(r,"enum");e=de(e);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:ze(`${n.name}_${e}`,(function(){}))}});o.values[t]=a,o[e]=a},Sa:(r,e,t)=>{pe(r,{name:e=de(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:me,readValueFromPointer:yt(e,t),destructorFunction:null})},ma:(r,e,t,n,o,a,i)=>{var s=at(e,t);r=de(r),o=et(n,o),Ue(r,(function(){ot(`Cannot call ${r} due to unbound types`,s)}),e-1),ue([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Qe(r,st(r,n,null,o,a,i),e-1),[]}))},R:(r,e,t,n,o)=>{e=de(e),-1===o&&(o=4294967295);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned");pe(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return this.name,e>>>0}:function(r,e){return this.name,e},argPackAdvance:me,readValueFromPointer:gt(e,t,0!==n),destructorFunction:null})},F:(r,e,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function a(r){var e=s()[r>>2],n=s()[r+4>>2];return new o(t().buffer,n,e)}pe(r,{name:n=de(n),fromWireType:a,argPackAdvance:me,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Ra:(r,e)=>{var t="std::string"===(e=de(e));pe(r,{name:e,fromWireType:r=>{var e,o=s()[r>>2],a=r+4;if(t)for(var i=a,u=0;u<=o;++u){var c=a+u;if(u==o||0==n()[c]){var l=Cr(i,c-i);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),i=c+1}}else{var d=new Array(o);for(u=0;u<o;++u)d[u]=String.fromCharCode(n()[a+u]);e=d.join("")}return gn(r),e},toWireType:(r,e)=>{var o;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var a="string"==typeof e;a||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||he("Cannot pass non-string to std::string"),o=t&&a?yr(e):e.length;var i=yn(4+o+1),u=i+4;if(s()[i>>2]=o,t&&a)wt(e,u,o+1);else if(a)for(var c=0;c<o;++c){var l=e.charCodeAt(c);l>255&&(gn(u),he("String has UTF-16 code units that do not fit in 8 bits")),n()[u+c]=l}else for(c=0;c<o;++c)n()[u+c]=e[c];return null!==r&&r.push(gn,i),i},argPackAdvance:me,readValueFromPointer:Ke,destructorFunction:r=>gn(r)})},ya:(r,e,t)=>{var n,o,i,u,c;t=de(t),2===e?(n=bt,o=Et,u=kt,i=()=>a(),c=1):4===e&&(n=Tt,o=$t,u=Ct,i=()=>s(),c=2),pe(r,{name:t,fromWireType:r=>{for(var t,o=s()[r>>2],a=i(),u=r+4,l=0;l<=o;++l){var d=r+4+l*e;if(l==o||0==a[d>>c]){var f=n(u,d-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=d+e}}return gn(r),t},toWireType:(r,n)=>{"string"!=typeof n&&he(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=yn(4+a+e);return s()[i>>2]=a>>c,o(n,i+4,a+e),null!==r&&r.push(gn,i),i},argPackAdvance:me,readValueFromPointer:te,destructorFunction:r=>gn(r)})},Ha:(r,e,t,n,o,a)=>{re[r]={name:de(e),rawConstructor:et(t,n),rawDestructor:et(o,a),elements:[]}},Ga:(r,e,t,n,o,a,i,s,u)=>{re[r].elements.push({getterReturnType:e,getter:et(t,n),getterContext:o,setterArgumentType:a,setter:et(i,s),setterContext:u})},S:(r,e,t,n,o,a)=>{ce[r]={name:de(e),rawConstructor:et(t,n),rawDestructor:et(o,a),fields:[]}},E:(r,e,t,n,o,a,i,s,u,c)=>{ce[r].fields.push({fieldName:de(e),getterReturnType:t,getter:et(n,o),getterContext:a,setterArgumentType:i,setter:et(s,u),setterContext:c})},bc:(r,e)=>{pe(r,{isVoid:!0,name:e=de(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},_b:()=>true,Jb:(r,e,t)=>{if(r==e)setTimeout((()=>At()));else if(g)postMessage({targetThread:r,cmd:"checkMailbox"});else{var n=Dr.pthreads[r];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Pb:(r,e,t,n)=>{Wt.length=t;for(var o=n>>3,a=0;a<t;a++)Wt[a]=u()[o+a];var i=r<0?ir[-r-1]:pn[r];Dr.currentProxiedOperationCallerThread=e;var s=i.apply(null,Wt);return Dr.currentProxiedOperationCallerThread=0,s},Qb:St,Zb:r=>{},Gb:()=>{throw 1/0},P:(r,e,t)=>{r=ht.toValue(r),e=mt(e,"emval::as");var n=[],o=ht.toHandle(n);return s()[t>>2]=o,e.toWireType(n,r)},ua:(r,e,t,n,o)=>(r=Ot[r])(e=ht.toValue(e),t=jt(t),(r=>{var e=[];return s()[r>>2]=ht.toHandle(e),e})(n),o),ja:(r,e,t,n)=>{(r=Ot[r])(e=ht.toValue(e),t=jt(t),null,n)},xb:dt,sa:r=>0===r?ht.toHandle(xt()):(r=jt(r),ht.toHandle(xt()[r])),Z:(r,e)=>{var t=((r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=mt(s()[e+4*n>>2],"parameter "+n);return t})(r,e),n=t[0],o=n.name+"_$"+t.slice(1).map((function(r){return r.name})).join("_")+"$",a=Rt[o];if(void 0!==a)return a;for(var i=["retType"],u=[n],c="",l=0;l<r-1;++l)c+=(0!==l?", ":"")+"arg"+l,i.push("argType"+l),u.push(t[1+l]);var d="return function "+Ne("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(l=0;l<r-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[l+1].argPackAdvance;d+=" var rv = handle[name]("+c+");\n";for(l=0;l<r-1;++l)t[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",i.push(d);var h,p,m=it(Function,i).apply(null,u);return h=m,p=Ot.length,Ot.push(h),a=p,Rt[o]=a,a},ob:(r,e)=>(r=ht.toValue(r),e=ht.toValue(e),ht.toHandle(r[e])),ea:r=>{r>4&&(lt.get(r).refcount+=1)},fb:(r,e)=>(r=ht.toValue(r))instanceof(e=ht.toValue(e)),gb:r=>"string"==typeof(r=ht.toValue(r)),ia:()=>ht.toHandle([]),jb:r=>{r=ht.toValue(r);for(var e=new Array(r.length),t=0;t<r.length;t++)e[t]=r[t];return ht.toHandle(e)},ta:r=>ht.toHandle(jt(r)),pb:r=>{var e=ht.toValue(r);ee(e),dt(r)},L:(r,e)=>{var t=(r=mt(r,"_emval_take_value")).readValueFromPointer(e);return ht.toHandle(t)},vb:function(r,e,t){var n=Lt(r,e),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),i()[t+4>>2]=o.getMinutes(),i()[t+8>>2]=o.getHours(),i()[t+12>>2]=o.getDate(),i()[t+16>>2]=o.getMonth(),i()[t+20>>2]=o.getFullYear()-1900,i()[t+24>>2]=o.getDay();var a=0|(r=>(It(r.getFullYear())?Nt:zt)[r.getMonth()]+r.getDate()-1)(o);i()[t+28>>2]=a,i()[t+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&o.getTimezoneOffset()==Math.min(c,u));i()[t+32>>2]=l},ub:Ut,Ib:(r,e,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),u=o.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(u,c);function d(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}s()[r>>2]=60*l,i()[e>>2]=Number(u!=c);var f=d(o),h=d(a),p=Ht(f),m=Ht(h);c<u?(s()[t>>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},x:()=>{Q("")},Fa:(r,e,t)=>Yt(r,e,t),Na:()=>{},wa:()=>Date.now(),Yb:()=>{throw H+=1,"unwind"},Kb:()=>2147483648,J:Bt,Ua:()=>navigator.hardwareConcurrency,Hb:r=>{var e=n().length;if((r>>>=0)<=e)return!1;var t=2147483648;if(r>t)return!1;for(var o,a,i=1;i<=4;i*=2){var s=e*(1+.2/i);s=Math.min(s,r+100663296);var u=Math.min(t,(o=Math.max(r,s))+((a=65536)-o%a)%a);if(qt(u))return!0}return!1},Sb:Xt,Tb:Jt,Ta:Ar,xa:Zt,Oa:Qt,wb:rn,va:en,ib:function(){return an(location.toString())},hb:function(){return an((r=qn,self[r(254,"xD[p")][r(253,"yqnk")]()));var r},Ya:function(r,e){var t=Dn();try{return Or(r)(e)}catch(r){if(Wn(t),r!==r+0)throw r;An(1,0)}},_a:function(r,e,t,n,o,a){var i=Dn();try{return Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},A:function(r,e,t,n){var o=Dn();try{return Or(r)(e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},ec:function(r,e,t,n,o,a,i,s){var u=Dn();try{return Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},q:function(r,e){var t=Dn();try{return Or(r)(e)}catch(r){if(Wn(t),r!==r+0)throw r;An(1,0)}},w:function(r,e,t){var n=Dn();try{return Or(r)(e,t)}catch(r){if(Wn(n),r!==r+0)throw r;An(1,0)}},N:function(r,e,t,n){var o=Dn();try{return Or(r)(e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},ga:function(r,e,t,n,o){var a=Dn();try{return Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},v:function(r){var e=Dn();try{return Or(r)()}catch(r){if(Wn(e),r!==r+0)throw r;An(1,0)}},j:function(r,e){var t=Dn();try{return Or(r)(e)}catch(r){if(Wn(t),r!==r+0)throw r;An(1,0)}},c:function(r,e,t){var n=Dn();try{return Or(r)(e,t)}catch(r){if(Wn(n),r!==r+0)throw r;An(1,0)}},g:function(r,e,t,n){var o=Dn();try{return Or(r)(e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},l:function(r,e,t,n,o){var a=Dn();try{return Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},La:function(r,e,t,n,o,a){var i=Dn();try{return Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},cb:function(r,e,t,n,o,a){var i=Dn();try{return Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},o:function(r,e,t,n,o,a){var i=Dn();try{return Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},y:function(r,e,t,n,o,a,i){var s=Dn();try{return Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},Ka:function(r,e,t,n,o,a,i,s){var u=Dn();try{return Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},pa:function(r,e,t,n,o,a,i,s,u){var c=Dn();try{return Or(r)(e,t,n,o,a,i,s,u)}catch(r){if(Wn(c),r!==r+0)throw r;An(1,0)}},cc:function(r,e,t,n,o,a,i,s,u,c){var l=Dn();try{return Or(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Wn(l),r!==r+0)throw r;An(1,0)}},la:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=Dn();try{return Or(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Wn(f),r!==r+0)throw r;An(1,0)}},rb:function(r,e,t,n,o,a,i){var s=Dn();try{return Bn(r,e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},Ab:function(r,e,t,n){var o=Dn();try{return zn(r,e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},tb:function(r){var e=Dn();try{return Ln(r)}catch(r){if(Wn(e),r!==r+0)throw r;An(1,0)}},Bb:function(r,e){var t=Dn();try{return In(r,e)}catch(r){if(Wn(t),r!==r+0)throw r;An(1,0)}},sb:function(r,e,t){var n=Dn();try{return Un(r,e,t)}catch(r){if(Wn(n),r!==r+0)throw r;An(1,0)}},qb:function(r,e,t,n,o){var a=Dn();try{return Hn(r,e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},m:function(r){var e=Dn();try{Or(r)()}catch(r){if(Wn(e),r!==r+0)throw r;An(1,0)}},i:function(r,e){var t=Dn();try{Or(r)(e)}catch(r){if(Wn(t),r!==r+0)throw r;An(1,0)}},kb:function(r,e,t){var n=Dn();try{Or(r)(e,t)}catch(r){if(Wn(n),r!==r+0)throw r;An(1,0)}},ha:function(r,e,t){var n=Dn();try{Or(r)(e,t)}catch(r){if(Wn(n),r!==r+0)throw r;An(1,0)}},d:function(r,e,t){var n=Dn();try{Or(r)(e,t)}catch(r){if(Wn(n),r!==r+0)throw r;An(1,0)}},X:function(r,e,t,n){var o=Dn();try{Or(r)(e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},ab:function(r,e,t,n,o){var a=Dn();try{Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},Xa:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},oa:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},ca:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},ra:function(r,e,t,n,o){var a=Dn();try{Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},M:function(r,e,t,n){var o=Dn();try{Or(r)(e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},$:function(r,e,t,n,o){var a=Dn();try{Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},Ba:function(r,e,t,n,o){var a=Dn();try{Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},qa:function(r,e,t,n,o,a){var i=Dn();try{Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},Ca:function(r,e,t,n,o,a,i,s,u){var c=Dn();try{Or(r)(e,t,n,o,a,i,s,u)}catch(r){if(Wn(c),r!==r+0)throw r;An(1,0)}},f:function(r,e,t,n){var o=Dn();try{Or(r)(e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},B:function(r,e,t,n,o,a){var i=Dn();try{Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},fc:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},K:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},C:function(r,e,t,n,o){var a=Dn();try{Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},ba:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},Wa:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},U:function(r,e,t,n,o,a){var i=Dn();try{Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},bb:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},Aa:function(r,e,t,n,o,a,i,s,u,c){var l=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Wn(l),r!==r+0)throw r;An(1,0)}},$a:function(r,e,t,n,o,a,i,s,u,c,l){var d=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Wn(d),r!==r+0)throw r;An(1,0)}},k:function(r,e,t,n,o){var a=Dn();try{Or(r)(e,t,n,o)}catch(r){if(Wn(a),r!==r+0)throw r;An(1,0)}},Da:function(r,e,t,n,o,a,i,s,u){var c=Dn();try{Or(r)(e,t,n,o,a,i,s,u)}catch(r){if(Wn(c),r!==r+0)throw r;An(1,0)}},D:function(r,e,t,n,o,a){var i=Dn();try{Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},W:function(r,e,t,n,o,a,i,s,u,c){var l=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Wn(l),r!==r+0)throw r;An(1,0)}},fa:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},n:function(r,e,t,n,o,a){var i=Dn();try{Or(r)(e,t,n,o,a)}catch(r){if(Wn(i),r!==r+0)throw r;An(1,0)}},db:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},t:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},_:function(r,e,t,n,o,a,i,s,u,c,l){var d=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Wn(d),r!==r+0)throw r;An(1,0)}},T:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},r:function(r,e,t,n,o,a,i){var s=Dn();try{Or(r)(e,t,n,o,a,i)}catch(r){if(Wn(s),r!==r+0)throw r;An(1,0)}},na:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},Va:function(r,e,t,n,o,a,i,s,u,c,l){var d=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Wn(d),r!==r+0)throw r;An(1,0)}},dc:function(r,e,t,n,o,a,i,s,u){var c=Dn();try{Or(r)(e,t,n,o,a,i,s,u)}catch(r){if(Wn(c),r!==r+0)throw r;An(1,0)}},s:function(r,e,t,n,o,a,i,s){var u=Dn();try{Or(r)(e,t,n,o,a,i,s)}catch(r){if(Wn(u),r!==r+0)throw r;An(1,0)}},H:function(r,e,t,n,o,a,i,s,u){var c=Dn();try{Or(r)(e,t,n,o,a,i,s,u)}catch(r){if(Wn(c),r!==r+0)throw r;An(1,0)}},za:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Wn(f),r!==r+0)throw r;An(1,0)}},O:function(r,e,t,n,o,a,i,s,u,c){var l=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Wn(l),r!==r+0)throw r;An(1,0)}},aa:function(r,e,t,n,o,a,i,s,u,c,l){var d=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Wn(d),r!==r+0)throw r;An(1,0)}},Za:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Wn(f),r!==r+0)throw r;An(1,0)}},da:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h){var p=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l,d,f,h)}catch(r){if(Wn(p),r!==r+0)throw r;An(1,0)}},ka:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var v=Dn();try{Or(r)(e,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(r){if(Wn(v),r!==r+0)throw r;An(1,0)}},zb:function(r,e,t,n){var o=Dn();try{Nn(r,e,t,n)}catch(r){if(Wn(o),r!==r+0)throw r;An(1,0)}},Q:r=>r,a:T||d.wasmMemory,eb:on,Cb:(r,e,t,n,o)=>on(r,e,t,n)},vn=function(){var r,e,t,n,o={a:mn};function a(r,e){var t,n=r.exports;return xr((vn=n).nc),N=vn.ic,t=vn.gc,U.unshift(t),$=e,Z(),n}if(J(),d.instantiateWasm)try{return d.instantiateWasm(o,a)}catch(r){k(`Module.instantiateWasm callback failed with error: ${r}`),l(r)}return(r=b,e=rr,t=o,n=function(r){a(r.instance,r.module)},r||"function"!=typeof WebAssembly.instantiateStreaming||nr(e)||"function"!=typeof fetch?ar(e,t,n):fetch(e,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(n,(function(r){return k(`wasm streaming compile failed: ${r}`),k("falling back to ArrayBuffer instantiation"),ar(e,t,n)}))))).catch(l),{}}(),yn=d._malloc=r=>(yn=d._malloc=vn.hc)(r),gn=d._free=r=>(gn=d._free=vn.jc)(r),wn=()=>(wn=vn.kc)(),_n=d._pthread_self=()=>(_n=d._pthread_self=vn.lc)(),bn=r=>(bn=vn.mc)(r),En=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=vn.nc)(),(r,e)=>(En=vn.oc)(r,e)),kn=r=>(kn=vn.pc)(r),Tn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=vn.qc)(),d.__emscripten_thread_init=(r,e,t,n,o,a)=>(Tn=d.__emscripten_thread_init=vn.rc)(r,e,t,n,o,a)),$n=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=vn.sc)(),(r,e,t,n)=>($n=vn.tc)(r,e,t,n)),Cn=r=>(Cn=vn.uc)(r),Pn=d.__emscripten_thread_exit=r=>(Pn=d.__emscripten_thread_exit=vn.vc)(r),Sn=d.__emscripten_check_mailbox=()=>(Sn=d.__emscripten_check_mailbox=vn.wc)(),An=(r,e)=>(An=vn.xc)(r,e),Fn=(r,e)=>(Fn=vn.yc)(r,e),Dn=()=>(Dn=vn.zc)(),Wn=r=>(Wn=vn.Ac)(r),Mn=r=>(Mn=vn.Bc)(r),jn=r=>(jn=vn.Cc)(r),On=r=>(On=vn.Dc)(r),xn=(r,e,t)=>(xn=vn.Ec)(r,e,t),Rn=r=>(Rn=vn.Fc)(r),In=d.dynCall_ji=(r,e)=>(In=d.dynCall_ji=vn.Gc)(r,e),Nn=d.dynCall_vij=(r,e,t,n)=>(Nn=d.dynCall_vij=vn.Hc)(r,e,t,n),zn=d.dynCall_iij=(r,e,t,n)=>(zn=d.dynCall_iij=vn.Ic)(r,e,t,n),Ln=(d.dynCall_viijii=(r,e,t,n,o,a,i)=>(d.dynCall_viijii=vn.Jc)(r,e,t,n,o,a,i),d.dynCall_jjj=(r,e,t,n,o)=>(d.dynCall_jjj=vn.Kc)(r,e,t,n,o),d.dynCall_iiiijj=(r,e,t,n,o,a,i,s)=>(d.dynCall_iiiijj=vn.Lc)(r,e,t,n,o,a,i,s),d.dynCall_viijj=(r,e,t,n,o,a,i)=>(d.dynCall_viijj=vn.Mc)(r,e,t,n,o,a,i),d.dynCall_viiijjj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=vn.Nc)(r,e,t,n,o,a,i,s,u,c),d.dynCall_jiji=(r,e,t,n,o)=>(d.dynCall_jiji=vn.Oc)(r,e,t,n,o),d.dynCall_j=r=>(Ln=d.dynCall_j=vn.Pc)(r)),Un=d.dynCall_jii=(r,e,t)=>(Un=d.dynCall_jii=vn.Qc)(r,e,t),Bn=d.dynCall_iiiiij=(r,e,t,n,o,a,i)=>(Bn=d.dynCall_iiiiij=vn.Rc)(r,e,t,n,o,a,i),Hn=d.dynCall_jiiii=(r,e,t,n,o)=>(Hn=d.dynCall_jiiii=vn.Sc)(r,e,t,n,o);d.dynCall_iiiiijj=(r,e,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=vn.Tc)(r,e,t,n,o,a,i,s,u),d.dynCall_iiiiiijj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_iiiiiijj=vn.Uc)(r,e,t,n,o,a,i,s,u,c),d.___start_em_js=1120232,d.___stop_em_js=1120340;function Vn(){if(!(K>0)){if(g)return c(d),Y(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)q(d.preRun.shift());Wr(L)}(),K>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),r()}),1)):r())}function r(){hn||(hn=!0,d.calledRun=!0,x||(Y(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!g){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)r=d.postRun.shift(),B.unshift(r);var r;Wr(B)}}()))}}if(d.keepRuntimeAlive=V,d.wasmMemory=T,d.UTF8ToString=Cr,d.stringToUTF8=wt,d.lengthBytesUTF8=yr,d.ExitStatus=sr,d.allocateUTF8=an,d.PThread=Dr,X=function r(){hn||Vn(),hn||(X=r)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Yn(){var r=["wCoRdhJcSNdcMSkItvxdPa","W6lcHHFcQYBcPSorWPlcJfSscKe","W6biq8o/WPRcJ2jlW458gq","WQTCxJxcRmkdvba","W78xWO7dQmoXW60Kta","W53cLSoHW6TbWQKFWRldISoJdq","W6OgoZlcJCkBxb/cPa","WQZdIYGKdmoss0NdIWyvW48","W7JcUmktjSoQW4ddHmowWOO/","WOiUWPC9W5P1W4RdGtK","W7NcUmkqjmkKW7hdUSoNWPeTW6i","W59YWPtcN8o6W4fKA8ksWPpcGfq","yeBcPSkYm107WPxcGvhcNa","WO/dJLtdLNf/iSk1W7hdGG","W5HSW6/dGSkhW4ddM8o3W6Sy","hSolwcrNWOTGxxlcI8k0eby","qCkNW65jW4BcOKn0WRtdKW","D0TqWQpcReddKSk/qSkZ","W7OKW77dONldU3BcU8krDSki"];return(Yn=function(){return r})()}function qn(r,e){var t=Yn();return qn=function(e,n){var o=t[e-=237];if(void 0===qn.OoKeOT){var a=function(r){for(var e,t,n="",o="",a=0,i=0;t=r.charAt(i++);~t&&(e=a%4?64*e+t:t,a++%4)?n+=String.fromCharCode(255&e>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,e){var t,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+e.charCodeAt(n%e.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};qn.VheXMX=i,r=arguments,qn.OoKeOT=!0}var s=t[0],u=e+s,c=r[u];return c?o=c:(void 0===qn.UOYXmg&&(qn.UOYXmg=!0),o=qn.VheXMX(o,n),r[u]=o),o},qn(r,e)}Vn(),function(r,e){for(var t=qn,n=r();;)try{if(136603===parseInt(t(255,"xlZB"))/1+-parseInt(t(252,"0j#p"))/2+-parseInt(t(238,"hfJs"))/3+-parseInt(t(237,"yqnk"))/4*(parseInt(t(244,"1DLx"))/5)+parseInt(t(249,"FgS$"))/6+-parseInt(t(247,"9Kf]"))/7*(parseInt(t(245,"Iqz^"))/8)+parseInt(t(246,"t9eD"))/9)break;n.push(n.shift())}catch(r){n.push(n.shift())}}(Yn);var ighnua,Kn=(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=Kn(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Gn)};return r()}));return Gn(),e.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=initModule:"function"==typeof define&&define.amd&&define([],(()=>initModule));
1
+ var initModule=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e={}){function t(){return T.buffer!=S.buffer&&I(),S}function n(){return T.buffer!=S.buffer&&I(),A}function o(){return T.buffer!=S.buffer&&I(),F}function a(){return T.buffer!=S.buffer&&I(),W}function i(){return T.buffer!=S.buffer&&I(),D}function s(){return T.buffer!=S.buffer&&I(),M}function u(){return T.buffer!=S.buffer&&I(),x}var c,l,d=e;d.ready=new Promise(((r,e)=>{c=r,l=e}));var f,h,p,m=Object.assign({},d),v="./this.program",y=(r,e)=>{throw e},g=d.ENVIRONMENT_IS_PTHREAD||!1,w="";function _(r){return d.locateFile?d.locateFile(r,w):w+r}w=self.location.href,r&&(w=r),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},p=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},h=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var b,E=d.print||console.log.bind(console),k=d.printErr||console.error.bind(console);Object.assign(d,m),m=null,d.arguments&&d.arguments,d.thisProgram&&(v=d.thisProgram),d.quit&&(y=d.quit),d.wasmBinary&&(b=d.wasmBinary);var T,C,$=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&J("no native wasm support detected");var P,S,A,F,W,D,M,j,x,O=!1;function R(r,e){r||J(e)}function I(){var r=T.buffer;d.HEAP8=S=new Int8Array(r),d.HEAP16=F=new Int16Array(r),d.HEAPU8=A=new Uint8Array(r),d.HEAPU16=W=new Uint16Array(r),d.HEAP32=D=new Int32Array(r),d.HEAPU32=M=new Uint32Array(r),d.HEAPF32=j=new Float32Array(r),d.HEAPF64=x=new Float64Array(r)}var z,N=d.INITIAL_MEMORY||67108864;if(R(N>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+N+"! (STACK_SIZE=4194304)"),g)T=d.wasmMemory;else if(d.wasmMemory)T=d.wasmMemory;else if(!((T=new WebAssembly.Memory({initial:N/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw k("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");I(),N=T.buffer.byteLength;var B=[],H=[],L=[],U=0;function V(){return $||U>0}function Y(){!0,g||(d.noFSInit||Cr.init.initialized||Cr.init(),Cr.ignorePermissions=!1,_r.init(),Dr(H))}function q(r){B.unshift(r)}var G=0,K=null,X=null;function Z(r){G++,d.monitorRunDependencies&&d.monitorRunDependencies(G)}function Q(r){if(G--,d.monitorRunDependencies&&d.monitorRunDependencies(G),0==G&&(null!==K&&(clearInterval(K),K=null),X)){var e=X;X=null,e()}}function J(r){d.onAbort&&d.onAbort(r),k(r="Aborted("+r+")"),O=!0,P=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw l(e),e}var rr,er,tr;function nr(r){return r.startsWith("data:application/octet-stream;base64,")}function or(r){if(r==rr&&b)return new Uint8Array(b);if(p)return p(r);throw"both async and sync fetching of the wasm failed"}function ar(r,e,t){return function(r){return b||"function"!=typeof fetch?Promise.resolve().then((()=>or(r))):fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()})).catch((()=>or(r)))}(r).then((r=>WebAssembly.instantiate(r,e))).then((r=>r)).then(t,(r=>{k(`failed to asynchronously prepare wasm: ${r}`),J(r)}))}nr(rr="ScanbotSDK.Asm-simd-threads.wasm")||(rr=_(rr));var ir={1120340:r=>an(function(){return this[$r(r)].toString()}.apply((0,eval)("(()=>this)()"))),1120454:r=>{throw new Error("Invalid barcode format: "+$r(r))}};function sr(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var ur=r=>{r.terminate(),r.onmessage=r=>{}},cr=r=>{var e=Wr.pthreads[r];R(e),Wr.returnWorkerToPool(e)},lr=r=>{var e=Wr.getNewWorker();if(!e)return 6;Wr.runningWorkers.push(e),Wr.pthreads[r.pthread_ptr]=e,e.pthread_ptr=r.pthread_ptr;var t={cmd:"run",start_routine:r.startRoutine,arg:r.arg,pthread_ptr:r.pthread_ptr};return e.postMessage(t,r.transferList),0},dr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=dr.isAbs(r),t="/"===r.substr(-1);return(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=dr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=dr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return dr.normalize(r.join("/"))},join2:(r,e)=>dr.normalize(r+"/"+e)},fr=r=>(fr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>(r.set(crypto.getRandomValues(new Uint8Array(r.byteLength))),r);J("initRandomDevice")})())(r),hr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Cr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=dr.isAbs(n)}return(e?"/":"")+(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=hr.resolve(r).substr(1),e=hr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},pr="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,mr=(r,e,t)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&pr)return pr.decode(r.buffer instanceof SharedArrayBuffer?r.slice(e,o):r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var u=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},vr=[],yr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},gr=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o};function wr(r,e,t){var n=t>0?t:yr(r)+1,o=new Array(n),a=gr(r,o,0,o.length);return e&&(o.length=a),o}var _r={ttys:[],init(){},shutdown(){},register(r,e){_r.ttys[r]={input:[],output:[],ops:e},Cr.registerDevice(r,_r.stream_ops)},stream_ops:{open(r){var e=_r.ttys[r.node.rdev];if(!e)throw new Cr.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Cr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Cr.ErrnoError(29)}if(void 0===s&&0===a)throw new Cr.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Cr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new Cr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>(()=>{if(!vr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;vr=wr(r,!0)}return vr.shift()})(),put_char(r,e){null===e||10===e?(E(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(E(mr(r.output,0)),r.output=[])},ioctl_tcgets:r=>({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:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(k(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(k(mr(r.output,0)),r.output=[])}}},br=r=>{r=((r,e)=>Math.ceil(r/e)*e)(r,65536);var e=En(65536,r);return e?((r,e)=>(n().fill(0,r,r+e),r))(e,r):0},Er={ops_table:null,mount:r=>Er.createNode(null,"/",16895,0),createNode(r,e,t,n){if(Cr.isBlkdev(t)||Cr.isFIFO(t))throw new Cr.ErrnoError(63);Er.ops_table||(Er.ops_table={dir:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,lookup:Er.node_ops.lookup,mknod:Er.node_ops.mknod,rename:Er.node_ops.rename,unlink:Er.node_ops.unlink,rmdir:Er.node_ops.rmdir,readdir:Er.node_ops.readdir,symlink:Er.node_ops.symlink},stream:{llseek:Er.stream_ops.llseek}},file:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:{llseek:Er.stream_ops.llseek,read:Er.stream_ops.read,write:Er.stream_ops.write,allocate:Er.stream_ops.allocate,mmap:Er.stream_ops.mmap,msync:Er.stream_ops.msync}},link:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,readlink:Er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:Cr.chrdev_stream_ops}});var o=Cr.createNode(r,e,t,n);return Cr.isDir(o.mode)?(o.node_ops=Er.ops_table.dir.node,o.stream_ops=Er.ops_table.dir.stream,o.contents={}):Cr.isFile(o.mode)?(o.node_ops=Er.ops_table.file.node,o.stream_ops=Er.ops_table.file.stream,o.usedBytes=0,o.contents=null):Cr.isLink(o.mode)?(o.node_ops=Er.ops_table.link.node,o.stream_ops=Er.ops_table.link.stream):Cr.isChrdev(o.mode)&&(o.node_ops=Er.ops_table.chrdev.node,o.stream_ops=Er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=Cr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Cr.isDir(r.mode)?e.size=4096:Cr.isFile(r.mode)?e.size=r.usedBytes:Cr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Er.resizeFileStorage(r,e.size)},lookup(r,e){throw Cr.genericErrors[44]},mknod:(r,e,t,n)=>Er.createNode(r,e,t,n),rename(r,e,t){if(Cr.isDir(r.mode)){var n;try{n=Cr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Cr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=Cr.lookupNode(r,e);for(var n in t.contents)throw new Cr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink(r,e,t){var n=Er.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!Cr.isLink(r.mode))throw new Cr.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,n,o,a,i){if(e.buffer===t().buffer&&(i=!1),!o)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=e.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=e.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(e.subarray(n,n+o),a),o}if(Er.expandFileStorage(s,a+o),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(n,n+o),a);else for(var u=0;u<o;u++)s.contents[a+u]=e[n+u];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Cr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Cr.ErrnoError(28);return n},allocate(r,e,t){Er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,n,o,a){if(!Cr.isFile(r.node.mode))throw new Cr.ErrnoError(43);var i,s,u=r.node.contents;if(2&a||u.buffer!==t().buffer){if((n>0||n+e<u.length)&&(u=u.subarray?u.subarray(n,n+e):Array.prototype.slice.call(u,n,n+e)),s=!0,!(i=br(e)))throw new Cr.ErrnoError(48);t().set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:(r,e,t,n,o)=>(Er.stream_ops.write(r,e,0,n,t,!1),0)}},kr=d.preloadPlugins||[],Tr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},Cr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(r,e={}){if(!(r=hr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new Cr.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=Cr.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&e.parent)break;if(n=Cr.lookupNode(n,t[a]),o=dr.join2(o,t[a]),Cr.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;Cr.isLink(n.mode);){var u=Cr.readlink(o);if(o=hr.resolve(dr.dirname(o),u),n=Cr.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new Cr.ErrnoError(32)}}return{path:o,node:n}},getPath(r){for(var e;;){if(Cr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Cr.nameTable.length},hashAddNode(r){var e=Cr.hashName(r.parent.id,r.name);r.name_next=Cr.nameTable[e],Cr.nameTable[e]=r},hashRemoveNode(r){var e=Cr.hashName(r.parent.id,r.name);if(Cr.nameTable[e]===r)Cr.nameTable[e]=r.name_next;else for(var t=Cr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=Cr.mayLookup(r);if(t)throw new Cr.ErrnoError(t,r);for(var n=Cr.hashName(r.id,e),o=Cr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return Cr.lookup(r,e)},createNode(r,e,t,n){var o=new Cr.FSNode(r,e,t,n);return Cr.hashAddNode(o),o},destroyNode(r){Cr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Cr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){var e=Cr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{Cr.lookupNode(r,e);return 20}catch(r){}return Cr.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=Cr.lookupNode(r,e)}catch(r){return r.errno}var o=Cr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Cr.isDir(n.mode))return 54;if(Cr.isRoot(n)||Cr.getPath(n)===Cr.cwd())return 10}else if(Cr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Cr.isLink(r.mode)?32:Cr.isDir(r.mode)&&("r"!==Cr.flagsToPermissionString(e)||512&e)?31:Cr.nodePermissions(r,Cr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=Cr.MAX_OPEN_FDS;r++)if(!Cr.streams[r])return r;throw new Cr.ErrnoError(33)},getStreamChecked(r){var e=Cr.getStream(r);if(!e)throw new Cr.ErrnoError(8);return e},getStream:r=>Cr.streams[r],createStream:(r,e=-1)=>(Cr.FSStream||(Cr.FSStream=function(){this.shared={}},Cr.FSStream.prototype={},Object.defineProperties(Cr.FSStream.prototype,{object:{get(){return this.node},set(r){this.node=r}},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(r){this.shared.flags=r}},position:{get(){return this.shared.position},set(r){this.shared.position=r}}})),r=Object.assign(new Cr.FSStream,r),-1==e&&(e=Cr.nextfd()),r.fd=e,Cr.streams[e]=r,r),closeStream(r){Cr.streams[r]=null},chrdev_stream_ops:{open(r){var e=Cr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek(){throw new Cr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){Cr.devices[r]={stream_ops:e}},getDevice:r=>Cr.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),Cr.syncFSRequests++,Cr.syncFSRequests>1&&k(`warning: ${Cr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Cr.getMounts(Cr.root.mount),n=0;function o(r){return Cr.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&Cr.root)throw new Cr.ErrnoError(10);if(!o&&!a){var i=Cr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Cr.isMountpoint(n))throw new Cr.ErrnoError(10);if(!Cr.isDir(n.mode))throw new Cr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Cr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(r){var e=Cr.lookupPath(r,{follow_mount:!1});if(!Cr.isMountpoint(e.node))throw new Cr.ErrnoError(28);var t=e.node,n=t.mounted,o=Cr.getMounts(n);Object.keys(Cr.nameTable).forEach((r=>{for(var e=Cr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Cr.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=Cr.lookupPath(r,{parent:!0}).node,o=dr.basename(r);if(!o||"."===o||".."===o)throw new Cr.ErrnoError(28);var a=Cr.mayCreate(n,o);if(a)throw new Cr.ErrnoError(a);if(!n.node_ops.mknod)throw new Cr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Cr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Cr.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Cr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Cr.mknod(r,e,t)),symlink(r,e){if(!hr.resolve(r))throw new Cr.ErrnoError(44);var t=Cr.lookupPath(e,{parent:!0}).node;if(!t)throw new Cr.ErrnoError(44);var n=dr.basename(e),o=Cr.mayCreate(t,n);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.symlink)throw new Cr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=dr.dirname(r),a=dr.dirname(e),i=dr.basename(r),s=dr.basename(e);if(t=Cr.lookupPath(r,{parent:!0}).node,n=Cr.lookupPath(e,{parent:!0}).node,!t||!n)throw new Cr.ErrnoError(44);if(t.mount!==n.mount)throw new Cr.ErrnoError(75);var u,c=Cr.lookupNode(t,i),l=hr.relative(r,a);if("."!==l.charAt(0))throw new Cr.ErrnoError(28);if("."!==(l=hr.relative(e,o)).charAt(0))throw new Cr.ErrnoError(55);try{u=Cr.lookupNode(n,s)}catch(r){}if(c!==u){var d=Cr.isDir(c.mode),f=Cr.mayDelete(t,i,d);if(f)throw new Cr.ErrnoError(f);if(f=u?Cr.mayDelete(n,s,d):Cr.mayCreate(n,s))throw new Cr.ErrnoError(f);if(!t.node_ops.rename)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(c)||u&&Cr.isMountpoint(u))throw new Cr.ErrnoError(10);if(n!==t&&(f=Cr.nodePermissions(t,"w")))throw new Cr.ErrnoError(f);Cr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Cr.hashAddNode(c)}}},rmdir(r){var e=Cr.lookupPath(r,{parent:!0}).node,t=dr.basename(r),n=Cr.lookupNode(e,t),o=Cr.mayDelete(e,t,!0);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.rmdir)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);e.node_ops.rmdir(e,t),Cr.destroyNode(n)},readdir(r){var e=Cr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Cr.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=Cr.lookupPath(r,{parent:!0}).node;if(!e)throw new Cr.ErrnoError(44);var t=dr.basename(r),n=Cr.lookupNode(e,t),o=Cr.mayDelete(e,t,!1);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.unlink)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);e.node_ops.unlink(e,t),Cr.destroyNode(n)},readlink(r){var e=Cr.lookupPath(r).node;if(!e)throw new Cr.ErrnoError(44);if(!e.node_ops.readlink)throw new Cr.ErrnoError(28);return hr.resolve(Cr.getPath(e.parent),e.node_ops.readlink(e))},stat(r,e){var t=Cr.lookupPath(r,{follow:!e}).node;if(!t)throw new Cr.ErrnoError(44);if(!t.node_ops.getattr)throw new Cr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Cr.stat(r,!0),chmod(r,e,t){var n;"string"==typeof r?n=Cr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new Cr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){Cr.chmod(r,e,!0)},fchmod(r,e){var t=Cr.getStreamChecked(r);Cr.chmod(t.node,e)},chown(r,e,t,n){var o;"string"==typeof r?o=Cr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new Cr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){Cr.chown(r,e,t,!0)},fchown(r,e,t){var n=Cr.getStreamChecked(r);Cr.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new Cr.ErrnoError(28);var t;"string"==typeof r?t=Cr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new Cr.ErrnoError(63);if(Cr.isDir(t.mode))throw new Cr.ErrnoError(31);if(!Cr.isFile(t.mode))throw new Cr.ErrnoError(28);var n=Cr.nodePermissions(t,"w");if(n)throw new Cr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=Cr.getStreamChecked(r);if(0==(2097155&t.flags))throw new Cr.ErrnoError(28);Cr.truncate(t.node,e)},utime(r,e,t){var n=Cr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t){if(""===r)throw new Cr.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(e="string"==typeof e?(r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if("undefined"==typeof e)throw new Error(`Unknown file open mode: ${r}`);return e})(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=dr.normalize(r);try{n=Cr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new Cr.ErrnoError(20)}else n=Cr.mknod(r,t,0),o=!0;if(!n)throw new Cr.ErrnoError(44);if(Cr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Cr.isDir(n.mode))throw new Cr.ErrnoError(54);if(!o){var a=Cr.mayOpen(n,e);if(a)throw new Cr.ErrnoError(a)}512&e&&!o&&Cr.truncate(n,0),e&=-131713;var i=Cr.createStream({node:n,path:Cr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&e||(Cr.readFiles||(Cr.readFiles={}),r in Cr.readFiles||(Cr.readFiles[r]=1)),i},close(r){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Cr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Cr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Cr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(1==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.read)throw new Cr.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.write)throw new Cr.ErrnoError(28);r.seekable&&1024&r.flags&&Cr.llseek(r,0,2);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(e<0||t<=0)throw new Cr.ErrnoError(28);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(!Cr.isFile(r.node.mode)&&!Cr.isDir(r.node.mode))throw new Cr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Cr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new Cr.ErrnoError(2);if(1==(2097155&r.flags))throw new Cr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Cr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new Cr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=Cr.open(r,e.flags),o=Cr.stat(r).size,a=new Uint8Array(o);return Cr.read(n,a,0,o,0),"utf8"===e.encoding?t=mr(a,0):"binary"===e.encoding&&(t=a),Cr.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=Cr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(yr(e)+1),a=gr(e,o,0,o.length);Cr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Cr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Cr.close(n)},cwd:()=>Cr.currentPath,chdir(r){var e=Cr.lookupPath(r,{follow:!0});if(null===e.node)throw new Cr.ErrnoError(44);if(!Cr.isDir(e.node.mode))throw new Cr.ErrnoError(54);var t=Cr.nodePermissions(e.node,"x");if(t)throw new Cr.ErrnoError(t);Cr.currentPath=e.path},createDefaultDirectories(){Cr.mkdir("/tmp"),Cr.mkdir("/home"),Cr.mkdir("/home/web_user")},createDefaultDevices(){Cr.mkdir("/dev"),Cr.registerDevice(Cr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Cr.mkdev("/dev/null",Cr.makedev(1,3)),_r.register(Cr.makedev(5,0),_r.default_tty_ops),_r.register(Cr.makedev(6,0),_r.default_tty1_ops),Cr.mkdev("/dev/tty",Cr.makedev(5,0)),Cr.mkdev("/dev/tty1",Cr.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=fr(r).byteLength),r[--e]);Cr.createDevice("/dev","random",t),Cr.createDevice("/dev","urandom",t),Cr.mkdir("/dev/shm"),Cr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Cr.mkdir("/proc");var r=Cr.mkdir("/proc/self");Cr.mkdir("/proc/self/fd"),Cr.mount({mount(){var e=Cr.createNode(r,"fd",16895,73);return e.node_ops={lookup(r,e){var t=+e,n=Cr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?Cr.createDevice("/dev","stdin",d.stdin):Cr.symlink("/dev/tty","/dev/stdin"),d.stdout?Cr.createDevice("/dev","stdout",null,d.stdout):Cr.symlink("/dev/tty","/dev/stdout"),d.stderr?Cr.createDevice("/dev","stderr",null,d.stderr):Cr.symlink("/dev/tty1","/dev/stderr");Cr.open("/dev/stdin",0),Cr.open("/dev/stdout",1),Cr.open("/dev/stderr",1)},ensureErrnoError(){Cr.ErrnoError||(Cr.ErrnoError=function(r,e){this.name="ErrnoError",this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Cr.ErrnoError.prototype=new Error,Cr.ErrnoError.prototype.constructor=Cr.ErrnoError,[44].forEach((r=>{Cr.genericErrors[r]=new Cr.ErrnoError(r),Cr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit(){Cr.ensureErrnoError(),Cr.nameTable=new Array(4096),Cr.mount(Er,{},"/"),Cr.createDefaultDirectories(),Cr.createDefaultDevices(),Cr.createSpecialDirectories(),Cr.filesystems={MEMFS:Er}},init(r,e,t){Cr.init.initialized=!0,Cr.ensureErrnoError(),d.stdin=r||d.stdin,d.stdout=e||d.stdout,d.stderr=t||d.stderr,Cr.createStandardStreams()},quit(){Cr.init.initialized=!1;for(var r=0;r<Cr.streams.length;r++){var e=Cr.streams[r];e&&Cr.close(e)}},findObject(r,e){var t=Cr.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=Cr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Cr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(r),n=Cr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:Cr.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(r,a);try{Cr.mkdir(i)}catch(r){}r=i}}return i},createFile(r,e,t,n,o){var a=dr.join2("string"==typeof r?r:Cr.getPath(r),e),i=Tr(n,o);return Cr.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:Cr.getPath(r),i=e?dr.join2(r,e):r);var s=Tr(n,o),u=Cr.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Cr.chmod(u,146|s);var f=Cr.open(u,577);Cr.write(f,t,0,t.length,0,a),Cr.close(f),Cr.chmod(u,s)}return u},createDevice(r,e,t,n){var o=dr.join2("string"==typeof r?r:Cr.getPath(r),e),a=Tr(!!t,!!n);Cr.createDevice.major||(Cr.createDevice.major=64);var i=Cr.makedev(Cr.createDevice.major++,0);return Cr.registerDevice(i,{open(r){r.seekable=!1},close(r){n&&n.buffer&&n.buffer.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Cr.ErrnoError(29)}if(void 0===u&&0===i)throw new Cr.ErrnoError(6);if(null==u)break;i++,e[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(r){throw new Cr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),Cr.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.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(!f)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=wr(f(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Cr.ErrnoError(29)}},createLazyFile(r,e,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",n,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+n+". Status: "+r.status);var e,t=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=t);var s=this;s.setDataGetter((r=>{var e=r*i,o=(r+1)*i-1;if(o=Math.min(o,t-1),"undefined"==typeof s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):wr(o.responseText||"",!0)})(e,o)),"undefined"==typeof s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){0;var s=new i;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=Cr.createFile(r,e,u,o,a);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(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((r=>{var e=c.stream_ops[r];l[r]=function(){return Cr.forceLoadFile(c),e.apply(null,arguments)}})),l.read=(r,e,t,n,o)=>(Cr.forceLoadFile(c),d(r,e,t,n,o)),l.mmap=(r,e,n,o,a)=>{Cr.forceLoadFile(c);var i=br(e);if(!i)throw new Cr.ErrnoError(48);return d(r,t(),i,e,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},$r=(r,e)=>r?mr(n(),r,e):"",Pr={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(dr.isAbs(e))return e;var n;-100===r?n=Cr.cwd():n=Pr.getStreamFromFD(r).path;if(0==e.length){if(!t)throw new Cr.ErrnoError(44);return n}return dr.join2(n,e)},doStat(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&dr.normalize(e)!==dr.normalize(Cr.getPath(r.node)))return-54;throw r}i()[t>>2]=n.dev,i()[t+4>>2]=n.mode,s()[t+8>>2]=n.nlink,i()[t+12>>2]=n.uid,i()[t+16>>2]=n.gid,i()[t+20>>2]=n.rdev,tr=[n.size>>>0,(er=n.size,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=tr[0],i()[t+28>>2]=tr[1],i()[t+32>>2]=4096,i()[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),u=n.ctime.getTime();return tr=[Math.floor(o/1e3)>>>0,(er=Math.floor(o/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=tr[0],i()[t+44>>2]=tr[1],s()[t+48>>2]=o%1e3*1e3,tr=[Math.floor(a/1e3)>>>0,(er=Math.floor(a/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=tr[0],i()[t+60>>2]=tr[1],s()[t+64>>2]=a%1e3*1e3,tr=[Math.floor(u/1e3)>>>0,(er=Math.floor(u/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=tr[0],i()[t+76>>2]=tr[1],s()[t+80>>2]=u%1e3*1e3,tr=[n.ino>>>0,(er=n.ino,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=tr[0],i()[t+92>>2]=tr[1],0},doMsync(r,e,t,o,a){if(!Cr.isFile(e.node.mode))throw new Cr.ErrnoError(43);if(2&o)return 0;var i=n().slice(r,r+t);Cr.msync(e,i,a,t,o)},varargs:void 0,get(){var r=i()[Pr.varargs>>2];return Pr.varargs+=4,r},getp:()=>Pr.get(),getStr:r=>$r(r),getStreamFromFD:r=>Cr.getStreamChecked(r)};function Sr(r){if(g)return Wt(0,1,r);P=r,V()||(Wr.terminateAllThreads(),d.onExit&&d.onExit(r),O=!0),y(r,new sr(r))}var Ar=(r,e)=>{if(P=r,g)throw Mr(r),"unwind";Sr(r)},Fr=r=>{if(r instanceof sr||"unwind"==r)return P;y(1,r)},Wr={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){g?Wr.initWorker():Wr.initMainThread()},initMainThread(){for(var r=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));r--;)Wr.allocateUnusedWorker();q((()=>{Z(),Wr.loadWasmModuleToAllWorkers((()=>Q()))}))},initWorker(){$=!1},setExitStatus:r=>{P=r},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var r of Wr.runningWorkers)ur(r);for(var r of Wr.unusedWorkers)ur(r);Wr.unusedWorkers=[],Wr.runningWorkers=[],Wr.pthreads=[]},returnWorkerToPool:r=>{var e=r.pthread_ptr;delete Wr.pthreads[e],Wr.unusedWorkers.push(r),Wr.runningWorkers.splice(Wr.runningWorkers.indexOf(r),1),r.pthread_ptr=0,$n(e)},receiveObjectTransfer(r){},threadInitTLS(){Wr.tlsInitFunctions.forEach((r=>r()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,o=n.cmd;if(n.targetThread&&n.targetThread!=_n()){var a=Wr.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):k(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?At():"spawnThread"===o?lr(n):"cleanupThread"===o?cr(n.thread):"killThread"===o?(r=>{var e=Wr.pthreads[r];delete Wr.pthreads[r],ur(e),$n(r),Wr.runningWorkers.splice(Wr.runningWorkers.indexOf(e),1),e.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Wr.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&k(`worker sent an unknown command ${o}`)}},e.onerror=r=>{throw k(`worker sent an error! ${r.filename}:${r.lineno}: ${r.message}`),r};var n=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&n.push(o);e.postMessage({cmd:"load",handlers:n,urlOrBlob:d.mainScriptUrlOrBlob||r,wasmMemory:T,wasmModule:C})})),loadWasmModuleToAllWorkers(r){if(g)return r();Promise.all(Wr.unusedWorkers.map(Wr.loadWasmModuleToWorker)).then(r)},allocateUnusedWorker(){var r,e=_("ScanbotSDK.Asm-simd-threads.worker.js");r=new Worker(e),Wr.unusedWorkers.push(r)},getNewWorker:()=>(0==Wr.unusedWorkers.length&&(Wr.allocateUnusedWorker(),Wr.loadWasmModuleToWorker(Wr.unusedWorkers[0])),Wr.unusedWorkers.pop())};d.PThread=Wr;var Dr=r=>{for(;r.length>0;)r.shift()(d)};function Mr(r){if(g)return Wt(1,0,r);Ar(r)}d.establishStackSpace=()=>{var r=_n(),e=i()[r+52>>2],t=i()[r+56>>2];Fn(e,e-t),Dn(e)};var jr=[],xr=r=>{var e=jr[r];return e||(r>=jr.length&&(jr.length=r+1),jr[r]=e=z.get(r)),e};d.invokeEntryPoint=(r,e)=>{!function(r){V()?Wr.setExitStatus(r):Pn(r)}(xr(r)(e))};var Or=r=>{Wr.tlsInitFunctions.push(r)},Rr=[],Ir=0,zr=0;function Nr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){s()[this.ptr+4>>2]=r},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(r){s()[this.ptr+8>>2]=r},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(r){r=r?1:0,t()[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,t()[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)},this.set_adjusted_ptr=function(r){s()[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Rn(this.get_type()))return s()[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}var Br=r=>{var e=zr;if(!e)return bn(0),0;var t=new Nr(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return bn(0),e;for(var o in r){var a=r[o];if(0===a||a===n)break;var i=t.ptr+16;if(On(a,n,i))return bn(a),e}return bn(n),e},Hr=()=>{var r=Rr.pop();r||J("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(Rr.push(r),r.set_rethrown(!0),r.set_caught(!1),Ir++),zr=e};function Lr(r,e,t,n){return g?Wt(2,1,r,e,t,n):Ur(r,e,t,n)}var Ur=(r,e,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return k("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(g&&0===o.length)return Lr(r,e,t,n);var a={startRoutine:t,pthread_ptr:r,arg:n,transferList:o};return g?(a.cmd="spawnThread",postMessage(a,o),0):lr(a)};function Vr(r,e,t,n,o){if(g)return Wt(3,1,r,e,t,n,o);try{for(var a=0,s=e?i()[e>>2]:0,u=e?i()[e+4>>2]:0,c=t?i()[t>>2]:0,l=t?i()[t+4>>2]:0,d=n?i()[n>>2]:0,f=n?i()[n+4>>2]:0,h=0,p=0,m=0,v=0,y=0,w=0,_=(e?i()[e>>2]:0)|(t?i()[t>>2]:0)|(n?i()[n>>2]:0),b=(e?i()[e+4>>2]:0)|(t?i()[t+4>>2]:0)|(n?i()[n+4>>2]:0),E=function(r,e,t,n){return r<32?e&n:t&n},k=0;k<r;k++){var T=1<<k%32;if(E(k,_,b,T)){var C=Pr.getStreamFromFD(k),$=Pr.DEFAULT_POLLMASK;if(C.stream_ops.poll){var P=-1;if(o)P=1e3*((e?i()[o>>2]:0)+(e?i()[o+8>>2]:0)/1e6);$=C.stream_ops.poll(C,P)}1&$&&E(k,s,u,T)&&(k<32?h|=T:p|=T,a++),4&$&&E(k,c,l,T)&&(k<32?m|=T:v|=T,a++),2&$&&E(k,d,f,T)&&(k<32?y|=T:w|=T,a++)}}return e&&(i()[e>>2]=h,i()[e+4>>2]=p),t&&(i()[t>>2]=m,i()[t+4>>2]=v),n&&(i()[n>>2]=y,i()[n+4>>2]=w),a}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Yr(r,e,t){if(g)return Wt(4,1,r,e,t);Pr.varargs=t;try{var n=Pr.getStreamFromFD(r);switch(e){case 0:if((a=Pr.get())<0)return-28;for(;Cr.streams[a];)a++;return Cr.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Pr.get();return n.flags|=a,0;case 5:a=Pr.getp();return o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[wn()>>2]=s,-1}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}var s}function qr(r,e){if(g)return Wt(5,1,r,e);try{var t=Pr.getStreamFromFD(r);return Pr.doStat(Cr.stat,t.path,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Gr(r,e,n){if(g)return Wt(6,1,r,e,n);Pr.varargs=n;try{var a=Pr.getStreamFromFD(r);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),u=Pr.getp();i()[u>>2]=s.c_iflag||0,i()[u+4>>2]=s.c_oflag||0,i()[u+8>>2]=s.c_cflag||0,i()[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(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){u=Pr.getp();var l=i()[u>>2],d=i()[u+4>>2],f=i()[u+8>>2],h=i()[u+12>>2],p=[];for(c=0;c<32;c++)p.push(t()[u+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,e,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:h,c_cc:p})}return 0;case 21519:if(!a.tty)return-59;u=Pr.getp();return i()[u>>2]=0,0;case 21520:return a.tty?-28:-59;case 21531:u=Pr.getp();return Cr.ioctl(a,e,u);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);u=Pr.getp();o()[u>>1]=m[0],o()[u+2>>1]=m[1]}return 0;default:return-28}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Kr(r,e,t,n){if(g)return Wt(8,1,r,e,t,n);try{e=Pr.getStr(e);var o=256&n,a=4096&n;return n&=-6401,e=Pr.calculateAt(r,e,a),Pr.doStat(o?Cr.lstat:Cr.stat,e,t)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Xr(r,e,t,n){if(g)return Wt(9,1,r,e,t,n);Pr.varargs=n;try{e=Pr.getStr(e),e=Pr.calculateAt(r,e);var o=n?Pr.get():0;return Cr.open(e,t,o).fd}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Zr(r){if(g)return Wt(10,1,r);try{return r=Pr.getStr(r),Cr.rmdir(r),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Qr(r,e){if(g)return Wt(11,1,r,e);try{return r=Pr.getStr(r),Pr.doStat(Cr.stat,r,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Jr(r,e,t){if(g)return Wt(12,1,r,e,t);try{return e=Pr.getStr(e),e=Pr.calculateAt(r,e),0===t?Cr.unlink(e):512===t?Cr.rmdir(e):J("Invalid flags passed to unlinkat"),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var re={},ee=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function te(r){return this.fromWireType(i()[r>>2])}var ne={},oe={},ae={},ie=void 0,se=r=>{throw new ie(r)},ue=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&se("Mismatched type converter count");for(var o=0;o<r.length;++o)pe(r[o],n[o])}r.forEach((function(r){ae[r]=e}));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{oe.hasOwnProperty(r)?o[e]=oe[r]:(a.push(r),ne.hasOwnProperty(r)||(ne[r]=[]),ne[r].push((()=>{o[e]=oe[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},ce={},le=void 0,de=r=>{for(var e="",t=r;n()[t];)e+=le[n()[t++]];return e},fe=void 0,he=r=>{throw new fe(r)};function pe(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(r,e,t={}){var n=e.name;if(r||he(`type "${n}" must have a positive integer typeid pointer`),oe.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;he(`Cannot register type '${n}' twice`)}if(oe[r]=e,delete ae[r],ne.hasOwnProperty(r)){var o=ne[r];delete ne[r],o.forEach((r=>r()))}}(r,e,t)}var me=8;function ve(r){if(!(this instanceof Ie))return!1;if(!(r instanceof Ie))return!1;for(var e=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&t===o}var ye=r=>{he(r.$$.ptrType.registeredClass.name+" instance already deleted")},ge=!1,we=r=>{},_e=r=>{r.count.value-=1,0===r.count.value&&(r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)})(r)},be=(r,e,t)=>{if(e===t)return r;if(void 0===t.baseClass)return null;var n=be(r,e,t.baseClass);return null===n?null:t.downcast(n)},Ee={},ke=()=>Object.keys(Ae).length,Te=()=>{var r=[];for(var e in Ae)Ae.hasOwnProperty(e)&&r.push(Ae[e]);return r},Ce=[],$e=()=>{for(;Ce.length;){var r=Ce.pop();r.$$.deleteScheduled=!1,r.delete()}},Pe=void 0,Se=r=>{Pe=r,Ce.length&&Pe&&Pe($e)},Ae={},Fe=(r,e)=>(e=((r,e)=>{for(void 0===e&&he("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e})(r,e),Ae[e]),We=(r,e)=>(e.ptrType&&e.ptr||se("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!==!!e.smartPtr&&se("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Me(Object.create(r,{$$:{value:e}})));function De(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=Fe(this.registeredClass,e);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?We(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):We(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(e),s=Ee[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=be(e,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?We(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):We(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Me=r=>"undefined"==typeof FinalizationRegistry?(Me=r=>r,r):(ge=new FinalizationRegistry((r=>{_e(r.$$)})),Me=r=>{var e=r.$$;if(!!e.smartPtr){var t={$$:e};ge.register(r,t,r)}return r},we=r=>ge.unregister(r),Me(r));function je(){if(this.$$.ptr||ye(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,e=Me(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function xe(){this.$$.ptr||ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),we(this),_e(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Oe(){return!this.$$.ptr}function Re(){return this.$$.ptr||ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),Ce.push(this),1===Ce.length&&Pe&&Pe($e),this.$$.deleteScheduled=!0,this}function Ie(){}var ze=r=>{if(void 0===r)return"_unknown";var e=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?`_${r}`:r};function Ne(r,e){return{[r=ze(r)]:function(){return e.apply(this,arguments)}}[r]}var Be=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(){return r[e].overloadTable.hasOwnProperty(arguments.length)||he(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[arguments.length].apply(this,arguments)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},He=(r,e,t)=>{d.hasOwnProperty(r)?((void 0===t||void 0!==d[r].overloadTable&&void 0!==d[r].overloadTable[t])&&he(`Cannot register public name '${r}' twice`),Be(d,r,r),d.hasOwnProperty(t)&&he(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[r].overloadTable[t]=e):(d[r]=e,void 0!==t&&(d[r].numArguments=t))};function Le(r,e,t,n,o,a,i,s){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Ue=(r,e,t)=>{for(;e!==t;)e.upcast||he(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function Ve(r,e){if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),0;e.$$||he(`Cannot pass "${vt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass;return Ue(e.$$.ptr,t,this.registeredClass)}function Ye(r,e){var t;if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,t),t):0;e.$$||he(`Cannot pass "${vt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&he(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=Ue(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&he("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:he(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else{var o=e.clone();t=this.rawShare(t,ht.toHandle((()=>o.delete()))),null!==r&&r.push(this.rawDestructor,t)}break;default:he("Unsupporting sharing policy")}return t}function qe(r,e){if(null===e)return this.isReference&&he(`null is not a valid ${this.name}`),0;e.$$||he(`Cannot pass "${vt(e)}" as a ${this.name}`),e.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&he(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass;return Ue(e.$$.ptr,t,this.registeredClass)}function Ge(r){return this.fromWireType(s()[r>>2])}function Ke(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function Xe(r){this.rawDestructor&&this.rawDestructor(r)}var Ze=r=>{null!==r&&r.delete()};function Qe(r,e,t,n,o,a,i,s,u,c,l){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Ye:n?(this.toWireType=Ve,this.destructorFunction=null):(this.toWireType=qe,this.destructorFunction=null)}var Je=(r,e,t)=>{d.hasOwnProperty(r)||se("Replacing nonexistant public symbol"),void 0!==d[r].overloadTable&&void 0!==t?d[r].overloadTable[t]=e:(d[r]=e,d[r].argCount=t)},rt=(r,e,t)=>r.includes("j")?((r,e,t)=>{var n=d["dynCall_"+r];return t&&t.length?n.apply(null,[e].concat(t)):n.call(null,e)})(r,e,t):xr(e).apply(null,t),et=(r,e)=>{var t,n,o,a=(r=de(r)).includes("j")?(t=r,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),rt(t,n,o)}):xr(e);return"function"!=typeof a&&he(`unknown function pointer with signature ${r}: ${e}`),a},tt=void 0,nt=r=>{var e=kn(r),t=de(e);return gn(e),t},ot=(r,e)=>{var t=[],n={};throw e.forEach((function r(e){n[e]||oe[e]||(ae[e]?ae[e].forEach(r):(t.push(e),n[e]=!0))})),new tt(`${r}: `+t.map(nt).join([", "]))},at=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(s()[e+4*n>>2]);return t};function it(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=Ne(r.name||"unknownFunctionName",(function(){}));t.prototype=r.prototype;var n=new t,o=r.apply(n,e);return o instanceof Object?o:n}function st(r,e,t,n,o,a){var i=e.length;i<2&&he("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==t,u=!1,c=1;c<e.length;++c)if(null!==e[c]&&void 0===e[c].destructorFunction){u=!0;break}var l="void"!==e[0].name,d="",f="";for(c=0;c<i-2;++c)d+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${ze(r)}(${d}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${r} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[he,n,o,ee,e[0],e[1]];s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n");for(c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+e[c+2].name+"\n",m.push("argType"+c),v.push(e[c+2]);if(s&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(l||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<e.length;++c){var y=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==e[c].destructorFunction&&(h+=y+"_dtor("+y+"); // "+e[c].name+"\n",m.push(y+"_dtor"),v.push(e[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),it(Function,m).apply(null,v)}var ut=(r,e,t)=>(r instanceof Object||he(`${t} with invalid "this": ${r}`),r instanceof e.registeredClass.constructor||he(`${t} incompatible with "this" of type ${r.constructor.name}`),r.$$.ptr||he(`cannot call emscripten binding method ${t} on deleted object`),Ue(r.$$.ptr,r.$$.ptrType.registeredClass,e.registeredClass));function ct(){this.allocated=[void 0],this.freelist=[]}var lt=new ct,dt=r=>{r>=lt.reserved&&0==--lt.get(r).refcount&&lt.free(r)},ft=()=>{for(var r=0,e=lt.reserved;e<lt.allocated.length;++e)void 0!==lt.allocated[e]&&++r;return r},ht={toValue:r=>(r||he("Cannot use deleted val. handle = "+r),lt.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return lt.allocate({refcount:1,value:r})}}},pt=(r,e,u)=>{switch(e){case 1:return u?function(r){return this.fromWireType(t()[r>>0])}:function(r){return this.fromWireType(n()[r>>0])};case 2:return u?function(r){return this.fromWireType(o()[r>>1])}:function(r){return this.fromWireType(a()[r>>1])};case 4:return u?function(r){return this.fromWireType(i()[r>>2])}:function(r){return this.fromWireType(s()[r>>2])};default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},mt=(r,e)=>{var t=oe[r];return void 0===t&&he(e+" has unknown type "+nt(r)),t},vt=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},yt=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType((T.buffer!=S.buffer&&I(),j)[r>>2])};case 8:return function(r){return this.fromWireType(u()[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},gt=(r,e,u)=>{switch(e){case 1:return u?r=>t()[r>>0]:r=>n()[r>>0];case 2:return u?r=>o()[r>>1]:r=>a()[r>>1];case 4:return u?r=>i()[r>>2]:r=>s()[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},wt=(r,e,t)=>gr(r,n(),e,t),_t="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,bt=(r,e)=>{for(var t=r,i=t>>1,s=i+e/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-r>32&&_t)return _t.decode(n().slice(r,t));for(var u="",c=0;!(c>=e/2);++c){var l=o()[r+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},Et=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,i=0;i<a;++i){var s=r.charCodeAt(i);o()[e>>1]=s,e+=2}return o()[e>>1]=0,e-n},kt=r=>2*r.length,Tt=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=i()[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ct=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(i()[e>>2]=s,(e+=4)+4>o)break}return i()[e>>2]=0,e-n},$t=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},Pt=r=>{if(!O)try{r(),(()=>{if(!V())try{g?Pn(P):Ar(P)}catch(r){Fr(r)}})()}catch(r){Fr(r)}},St=r=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),r>>2,r).value.then(At);var e=r+128;Atomics.store(i(),e>>2,1)}};d.__emscripten_thread_mailbox_await=St;var At=()=>{var r=_n();r&&(St(r),Pt((()=>Sn())))};d.checkMailbox=At;var Ft=r=>{var e=Wn(),t=r();return Dn(e),t},Wt=function(r,e){var t=arguments.length-2,n=arguments;return Ft((()=>{for(var o=t,a=Mn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return Cn(r,o,a,e)}))},Dt=[],Mt={},jt=r=>{var e=Mt[r];return void 0===e?de(r):e},xt=[],Ot=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Rt=[],It=r=>r%4==0&&(r%100!=0||r%400==0),zt=[0,31,60,91,121,152,182,213,244,274,305,335],Nt=[0,31,59,90,120,151,181,212,243,273,304,334],Bt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function Ht(r,e,t,n,o,a,i){if(g)return Wt(14,1,r,e,t,n,o,a,i);var s=Bt(a,i);try{if(isNaN(s))return 61;var u=Pr.getStreamFromFD(o);2&t&&Pr.doMsync(r,u,e,n,s),Cr.munmap(u)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var Lt,Ut=r=>{var e=yr(r)+1,t=yn(e);return t&&wt(r,t,e),t},Vt=[],Yt=(r,e,t)=>{var o=((r,e)=>{var t;for(Vt.length=0;t=n()[r++];)e+=105!=t&&e%8?4:0,Vt.push(105==t?i()[e>>2]:u()[e>>3]),e+=105==t?4:8;return Vt})(e,t);return ir[r].apply(null,o)};Lt=()=>performance.timeOrigin+performance.now();var qt=r=>{var e=(r-T.buffer.byteLength+65535)/65536;try{return T.grow(e),I(),1}catch(r){}},Gt={},Kt=()=>{if(!Kt.strings){var r={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",_:v||"./this.program"};for(var e in Gt)void 0===Gt[e]?delete r[e]:r[e]=Gt[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Kt.strings=t}return Kt.strings},Xt=function(r,e){if(g)return Wt(15,1,r,e);var n=0;return Kt().forEach(((o,a)=>{var i=e+n;s()[r+4*a>>2]=i,((r,e)=>{for(var n=0;n<r.length;++n)t()[e++>>0]=r.charCodeAt(n);t()[e>>0]=0})(o,i),n+=o.length+1})),0},Zt=function(r,e){if(g)return Wt(16,1,r,e);var t=Kt();s()[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),s()[e>>2]=n,0};function Qt(r){if(g)return Wt(17,1,r);try{var e=Pr.getStreamFromFD(r);return Cr.close(e),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Jt(r,e,n,o){if(g)return Wt(18,1,r,e,n,o);try{var a=((r,e,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[e>>2],c=s()[e+4>>2];e+=8;var l=Cr.read(r,t(),u,c,o);if(l<0)return-1;if(a+=l,l<c)break;"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),e,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function rn(r,e,t,n,o){if(g)return Wt(19,1,r,e,t,n,o);var a=Bt(e,t);try{if(isNaN(a))return 61;var s=Pr.getStreamFromFD(r);return Cr.llseek(s,a,n),tr=[s.position>>>0,(er=s.position,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[o>>2]=tr[0],i()[o+4>>2]=tr[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function en(r,e,n,o){if(g)return Wt(20,1,r,e,n,o);try{var a=((r,e,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[e>>2],c=s()[e+4>>2];e+=8;var l=Cr.write(r,t(),u,c,o);if(l<0)return-1;a+=l,"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),e,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}var tn=[31,29,31,30,31,30,31,31,30,31,30,31],nn=[31,28,31,30,31,30,31,31,30,31,30,31],on=(r,e,n,o)=>{var a=s()[o+40>>2],u={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?$r(a):""},c=$r(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 f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function m(r,e){return p(r,e,"0")}function v(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function y(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function g(r){var e=((r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=It(t.getFullYear()),o=t.getMonth(),a=(n?tn:nn)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=y(t),a=y(n);return v(o,e)<=0?v(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var w={"%a":r=>f[r.tm_wday].substring(0,3),"%A":r=>f[r.tm_wday],"%b":r=>h[r.tm_mon].substring(0,3),"%B":r=>h[r.tm_mon],"%C":r=>m((r.tm_year+1900)/100|0,2),"%d":r=>m(r.tm_mday,2),"%e":r=>p(r.tm_mday,2," "),"%g":r=>g(r).toString().substring(2),"%G":r=>g(r),"%H":r=>m(r.tm_hour,2),"%I":r=>{var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),m(e,2)},"%j":r=>m(r.tm_mday+((r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t})(It(r.tm_year+1900)?tn:nn,r.tm_mon-1),3),"%m":r=>m(r.tm_mon+1,2),"%M":r=>m(r.tm_min,2),"%n":()=>"\n","%p":r=>r.tm_hour>=0&&r.tm_hour<12?"AM":"PM","%S":r=>m(r.tm_sec,2),"%t":()=>"\t","%u":r=>r.tm_wday||7,"%U":r=>{var e=r.tm_yday+7-r.tm_wday;return m(Math.floor(e/7),2)},"%V":r=>{var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&It(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&It(r.tm_year%400-1))&&e++}return m(e,2)},"%w":r=>r.tm_wday,"%W":r=>{var e=r.tm_yday+7-(r.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":r=>(r.tm_year+1900).toString().substring(2),"%Y":r=>r.tm_year+1900,"%z":r=>{var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":r=>r.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,E=wr(c=c.replace(/\0\0/g,"%"),!1);return E.length>e?0:(_=E,b=r,t().set(_,b),E.length-1)},an=Ut;Wr.init();var sn,un,cn,ln=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Cr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},dn=365,fn=146;Object.defineProperties(ln.prototype,{read:{get:function(){return(this.mode&dn)===dn},set:function(r){r?this.mode|=dn:this.mode&=-366}},write:{get:function(){return(this.mode&fn)===fn},set:function(r){r?this.mode|=fn:this.mode&=-147}},isFolder:{get:function(){return Cr.isDir(this.mode)}},isDevice:{get:function(){return Cr.isChrdev(this.mode)}}}),Cr.FSNode=ln,Cr.createPreloadedFile=(r,e,t,n,o,a,i,s,u,c)=>{var l=e?hr.resolve(dr.join2(r,e)):r;function d(t){function d(t){c&&c(),s||Cr.createDataFile(r,e,t,n,o,u),a&&a(),Q()}((r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return kr.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o})(t,l,d,(()=>{i&&i(),Q()}))||d(t)}Z(),"string"==typeof t?((r,e,t,n)=>{var o=n?"":`al ${r}`;h(r,(t=>{R(t,`Loading data file "${r}" failed (no arrayBuffer).`),e(new Uint8Array(t)),o&&Q()}),(e=>{if(!t)throw`Loading data file "${r}" failed.`;t()})),o&&Z()})(t,(r=>d(r)),i):d(t)},Cr.staticInit(),ie=d.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},(()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);le=r})(),fe=d.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},Ie.prototype.isAliasOf=ve,Ie.prototype.clone=je,Ie.prototype.delete=xe,Ie.prototype.isDeleted=Oe,Ie.prototype.deleteLater=Re,d.getInheritedInstanceCount=ke,d.getLiveInheritedInstances=Te,d.flushPendingDeletes=$e,d.setDelayFunction=Se,Qe.prototype.getPointee=Ke,Qe.prototype.destructor=Xe,Qe.prototype.argPackAdvance=me,Qe.prototype.readValueFromPointer=Ge,Qe.prototype.deleteObject=Ze,Qe.prototype.fromWireType=De,tt=d.UnboundTypeError=(sn=Error,(cn=Ne(un="UnboundTypeError",(function(r){this.name=un,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(sn.prototype),cn.prototype.constructor=cn,cn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},cn),Object.assign(ct.prototype,{get(r){return this.allocated[r]},has(r){return void 0!==this.allocated[r]},allocate(r){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=r,e},free(r){this.allocated[r]=void 0,this.freelist.push(r)}}),lt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),lt.reserved=lt.allocated.length,d.count_emval_handles=ft;var hn,pn=[Sr,Mr,Lr,Vr,Yr,qr,Gr,function(r,e){if(g)return Wt(7,1,r,e);try{return r=Pr.getStr(r),Pr.doStat(Cr.lstat,r,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}},Kr,Xr,Zr,Qr,Jr,function(r,e,t,n,o,a,u,c){if(g)return Wt(13,1,r,e,t,n,o,a,u,c);var l=Bt(o,a);try{if(isNaN(l))return 61;var d=Pr.getStreamFromFD(n),f=Cr.mmap(d,r,l,e,t),h=f.ptr;return i()[u>>2]=f.allocated,s()[c>>2]=h,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}},Ht,Xt,Zt,Qt,Jt,rn,en],mn={u:r=>{var e=new Nr(r);return e.get_caught()||(e.set_caught(!0),Ir--),e.set_rethrown(!1),Rr.push(e),xn(e.excPtr),e.get_exception_ptr()},Eb:()=>{if(!Rr.length)return 0;var r=Rr[Rr.length-1];return xn(r.excPtr),r.excPtr},z:()=>{An(0,0);var r=Rr.pop();jn(r.excPtr),zr=0},b:()=>Br([]),h:r=>Br([r]),G:(r,e)=>Br([r,e]),Ea:Hr,Db:r=>{if(r){var e=new Nr(r);Rr.push(e),e.set_rethrown(!0),Hr()}},p:(r,e,t)=>{throw new Nr(r).init(e,t),Ir++,zr=r},Fb:()=>Ir,Rb:r=>{Tn(r,!1,1,!0,4194304,!1),Wr.threadInitTLS()},Ma:r=>{g?postMessage({cmd:"cleanupThread",thread:r}):cr(r)},Ob:Ur,e:r=>{throw zr||(zr=r),zr},Lb:Vr,Pa:Yr,Wb:qr,Xb:Gr,Ub:Kr,Qa:Xr,Mb:Zr,Vb:Qr,Nb:Jr,lb:r=>{var e=re[r];delete re[r];var t=e.elements,n=t.length,o=t.map((r=>r.getterReturnType)).concat(t.map((r=>r.setterArgumentType))),a=e.rawConstructor,i=e.rawDestructor;ue([r],o,(function(r){return t.forEach(((e,t)=>{var o=r[t],a=e.getter,i=e.getterContext,s=r[t+n],u=e.setter,c=e.setterContext;e.read=r=>o.fromWireType(a(i,r)),e.write=(r,e)=>{var t=[];u(c,r,s.toWireType(t,e)),ee(t)}})),[{name:e.name,fromWireType:r=>{for(var e=new Array(n),o=0;o<n;++o)e[o]=t[o].read(r);return i(r),e},toWireType:(r,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${o.length}`);for(var s=a(),u=0;u<n;++u)t[u].write(s,o[u]);return null!==r&&r.push(i,s),s},argPackAdvance:me,readValueFromPointer:te,destructorFunction:i}]}))},mb:r=>{var e=ce[r];delete ce[r];var t=e.rawConstructor,n=e.rawDestructor,o=e.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));ue([r],a,(r=>{var a={};return o.forEach(((e,t)=>{var n=e.fieldName,i=r[t],s=e.getter,u=e.getterContext,c=r[t+o.length],l=e.setter,d=e.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,e)=>{var t=[];l(d,r,c.toWireType(t,e)),ee(t)}}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in a)e[t]=a[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var o in a)if(!(o in e))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,e[o]);return null!==r&&r.push(n,i),i},argPackAdvance:me,readValueFromPointer:te,destructorFunction:n}]}))},yb:(r,e,t,n,o)=>{},ac:(r,e,t,o)=>{pe(r,{name:e=de(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:o},argPackAdvance:me,readValueFromPointer:function(r){return this.fromWireType(n()[r])},destructorFunction:null})},V:(r,e,t,n,o,a,i,s,u,c,l,d,f)=>{l=de(l),a=et(o,a),s&&(s=et(i,s)),c&&(c=et(u,c)),f=et(d,f);var h=ze(l);He(h,(function(){ot(`Cannot construct ${l} due to unbound types`,[n])})),ue([r,e,t],n?[n]:[],(function(e){var t,o;e=e[0],o=n?(t=e.registeredClass).instancePrototype:Ie.prototype;var i=Ne(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new fe(l+" has no accessible constructor");var r=d.constructor_body[arguments.length];if(void 0===r)throw new fe(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var d=new Le(l,i,u,f,t,a,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Qe(l,d,!0,!1,!1),m=new Qe(l+"*",d,!1,!1,!1),v=new Qe(l+" const*",d,!1,!0,!1);return Ee[r]={pointerType:m,constPointerType:v},Je(h,i),[p,m,v]}))},Ja:(r,e,t,n,o,a)=>{var i=at(e,t);o=et(n,o),ue([],[r],(function(r){var t=`constructor ${(r=r[0]).name}`;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[e-1])throw new fe(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${r.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return r.registeredClass.constructor_body[e-1]=()=>{ot(`Cannot construct ${r.name} due to unbound types`,i)},ue([],i,(n=>(n.splice(1,0,null),r.registeredClass.constructor_body[e-1]=st(t,n,null,o,a),[]))),[]}))},Ia:(r,e,t,n,o,a,i,s,u)=>{var c=at(t,n);e=de(e),a=et(o,a),ue([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`;function o(){ot(`Cannot call ${n} due to unbound types`,c)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(e);var l=r.registeredClass.instancePrototype,d=l[e];return void 0===d||void 0===d.overloadTable&&d.className!==r.name&&d.argCount===t-2?(o.argCount=t-2,o.className=r.name,l[e]=o):(Be(l,e,n),l[e].overloadTable[t-2]=o),ue([],c,(function(o){var s=st(n,o,r,a,i,u);return void 0===l[e].overloadTable?(s.argCount=t-2,l[e]=s):l[e].overloadTable[t-2]=s,[]})),[]}))},I:(r,e,t,n,o,a,i,s,u,c)=>{e=de(e),o=et(n,o),ue([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`,l={get(){ot(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return l.set=u?()=>ot(`Cannot access ${n} due to unbound types`,[t,i]):r=>he(n+" is a read-only property"),Object.defineProperty(r.registeredClass.instancePrototype,e,l),ue([],u?[t,i]:[t],(function(t){var i=t[0],l={get(){var e=ut(this,r,n+" getter");return i.fromWireType(o(a,e))},enumerable:!0};if(u){u=et(s,u);var d=t[1];l.set=function(e){var t=ut(this,r,n+" setter"),o=[];u(c,t,d.toWireType(o,e)),ee(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,e,l),[]})),[]}))},$b:(r,e)=>{pe(r,{name:e=de(e),fromWireType:r=>{var e=ht.toValue(r);return dt(r),e},toWireType:(r,e)=>ht.toHandle(e),argPackAdvance:me,readValueFromPointer:te,destructorFunction:null})},nb:(r,e,t,n)=>{function o(){}e=de(e),o.values={},pe(r,{name:e,constructor:o,fromWireType:function(r){return this.constructor.values[r]},toWireType:(r,e)=>e.value,argPackAdvance:me,readValueFromPointer:pt(e,t,n),destructorFunction:null}),He(e,o)},Y:(r,e,t)=>{var n=mt(r,"enum");e=de(e);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:Ne(`${n.name}_${e}`,(function(){}))}});o.values[t]=a,o[e]=a},Sa:(r,e,t)=>{pe(r,{name:e=de(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:me,readValueFromPointer:yt(e,t),destructorFunction:null})},ma:(r,e,t,n,o,a,i)=>{var s=at(e,t);r=de(r),o=et(n,o),He(r,(function(){ot(`Cannot call ${r} due to unbound types`,s)}),e-1),ue([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Je(r,st(r,n,null,o,a,i),e-1),[]}))},R:(r,e,t,n,o)=>{e=de(e),-1===o&&(o=4294967295);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned");pe(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return this.name,e>>>0}:function(r,e){return this.name,e},argPackAdvance:me,readValueFromPointer:gt(e,t,0!==n),destructorFunction:null})},F:(r,e,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function a(r){var e=s()[r>>2],n=s()[r+4>>2];return new o(t().buffer,n,e)}pe(r,{name:n=de(n),fromWireType:a,argPackAdvance:me,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Ra:(r,e)=>{var t="std::string"===(e=de(e));pe(r,{name:e,fromWireType:r=>{var e,o=s()[r>>2],a=r+4;if(t)for(var i=a,u=0;u<=o;++u){var c=a+u;if(u==o||0==n()[c]){var l=$r(i,c-i);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),i=c+1}}else{var d=new Array(o);for(u=0;u<o;++u)d[u]=String.fromCharCode(n()[a+u]);e=d.join("")}return gn(r),e},toWireType:(r,e)=>{var o;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var a="string"==typeof e;a||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||he("Cannot pass non-string to std::string"),o=t&&a?yr(e):e.length;var i=yn(4+o+1),u=i+4;if(s()[i>>2]=o,t&&a)wt(e,u,o+1);else if(a)for(var c=0;c<o;++c){var l=e.charCodeAt(c);l>255&&(gn(u),he("String has UTF-16 code units that do not fit in 8 bits")),n()[u+c]=l}else for(c=0;c<o;++c)n()[u+c]=e[c];return null!==r&&r.push(gn,i),i},argPackAdvance:me,readValueFromPointer:Ge,destructorFunction:r=>gn(r)})},ya:(r,e,t)=>{var n,o,i,u,c;t=de(t),2===e?(n=bt,o=Et,u=kt,i=()=>a(),c=1):4===e&&(n=Tt,o=Ct,u=$t,i=()=>s(),c=2),pe(r,{name:t,fromWireType:r=>{for(var t,o=s()[r>>2],a=i(),u=r+4,l=0;l<=o;++l){var d=r+4+l*e;if(l==o||0==a[d>>c]){var f=n(u,d-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=d+e}}return gn(r),t},toWireType:(r,n)=>{"string"!=typeof n&&he(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=yn(4+a+e);return s()[i>>2]=a>>c,o(n,i+4,a+e),null!==r&&r.push(gn,i),i},argPackAdvance:me,readValueFromPointer:te,destructorFunction:r=>gn(r)})},Ha:(r,e,t,n,o,a)=>{re[r]={name:de(e),rawConstructor:et(t,n),rawDestructor:et(o,a),elements:[]}},Ga:(r,e,t,n,o,a,i,s,u)=>{re[r].elements.push({getterReturnType:e,getter:et(t,n),getterContext:o,setterArgumentType:a,setter:et(i,s),setterContext:u})},S:(r,e,t,n,o,a)=>{ce[r]={name:de(e),rawConstructor:et(t,n),rawDestructor:et(o,a),fields:[]}},E:(r,e,t,n,o,a,i,s,u,c)=>{ce[r].fields.push({fieldName:de(e),getterReturnType:t,getter:et(n,o),getterContext:a,setterArgumentType:i,setter:et(s,u),setterContext:c})},bc:(r,e)=>{pe(r,{isVoid:!0,name:e=de(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},_b:()=>true,Jb:(r,e,t)=>{if(r==e)setTimeout((()=>At()));else if(g)postMessage({targetThread:r,cmd:"checkMailbox"});else{var n=Wr.pthreads[r];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Pb:(r,e,t,n)=>{Dt.length=t;for(var o=n>>3,a=0;a<t;a++)Dt[a]=u()[o+a];var i=r<0?ir[-r-1]:pn[r];Wr.currentProxiedOperationCallerThread=e;var s=i.apply(null,Dt);return Wr.currentProxiedOperationCallerThread=0,s},Qb:St,Zb:r=>{},Gb:()=>{throw 1/0},P:(r,e,t)=>{r=ht.toValue(r),e=mt(e,"emval::as");var n=[],o=ht.toHandle(n);return s()[t>>2]=o,e.toWireType(n,r)},ua:(r,e,t,n,o)=>(r=xt[r])(e=ht.toValue(e),t=jt(t),(r=>{var e=[];return s()[r>>2]=ht.toHandle(e),e})(n),o),ja:(r,e,t,n)=>{(r=xt[r])(e=ht.toValue(e),t=jt(t),null,n)},xb:dt,sa:r=>0===r?ht.toHandle(Ot()):(r=jt(r),ht.toHandle(Ot()[r])),Z:(r,e)=>{var t=((r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=mt(s()[e+4*n>>2],"parameter "+n);return t})(r,e),n=t[0],o=n.name+"_$"+t.slice(1).map((function(r){return r.name})).join("_")+"$",a=Rt[o];if(void 0!==a)return a;for(var i=["retType"],u=[n],c="",l=0;l<r-1;++l)c+=(0!==l?", ":"")+"arg"+l,i.push("argType"+l),u.push(t[1+l]);var d="return function "+ze("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(l=0;l<r-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[l+1].argPackAdvance;d+=" var rv = handle[name]("+c+");\n";for(l=0;l<r-1;++l)t[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",i.push(d);var h,p,m=it(Function,i).apply(null,u);return h=m,p=xt.length,xt.push(h),a=p,Rt[o]=a,a},ob:(r,e)=>(r=ht.toValue(r),e=ht.toValue(e),ht.toHandle(r[e])),ea:r=>{r>4&&(lt.get(r).refcount+=1)},fb:(r,e)=>(r=ht.toValue(r))instanceof(e=ht.toValue(e)),gb:r=>"string"==typeof(r=ht.toValue(r)),ia:()=>ht.toHandle([]),jb:r=>{r=ht.toValue(r);for(var e=new Array(r.length),t=0;t<r.length;t++)e[t]=r[t];return ht.toHandle(e)},ta:r=>ht.toHandle(jt(r)),pb:r=>{var e=ht.toValue(r);ee(e),dt(r)},L:(r,e)=>{var t=(r=mt(r,"_emval_take_value")).readValueFromPointer(e);return ht.toHandle(t)},vb:function(r,e,t){var n=Bt(r,e),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),i()[t+4>>2]=o.getMinutes(),i()[t+8>>2]=o.getHours(),i()[t+12>>2]=o.getDate(),i()[t+16>>2]=o.getMonth(),i()[t+20>>2]=o.getFullYear()-1900,i()[t+24>>2]=o.getDay();var a=0|(r=>(It(r.getFullYear())?zt:Nt)[r.getMonth()]+r.getDate()-1)(o);i()[t+28>>2]=a,i()[t+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&o.getTimezoneOffset()==Math.min(c,u));i()[t+32>>2]=l},ub:Ht,Ib:(r,e,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),u=o.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(u,c);function d(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}s()[r>>2]=60*l,i()[e>>2]=Number(u!=c);var f=d(o),h=d(a),p=Ut(f),m=Ut(h);c<u?(s()[t>>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},x:()=>{J("")},Fa:(r,e,t)=>Yt(r,e,t),Na:()=>{},wa:()=>Date.now(),Yb:()=>{throw U+=1,"unwind"},Kb:()=>2147483648,J:Lt,Ua:()=>navigator.hardwareConcurrency,Hb:r=>{var e=n().length;if((r>>>=0)<=e)return!1;var t=2147483648;if(r>t)return!1;for(var o,a,i=1;i<=4;i*=2){var s=e*(1+.2/i);s=Math.min(s,r+100663296);var u=Math.min(t,(o=Math.max(r,s))+((a=65536)-o%a)%a);if(qt(u))return!0}return!1},Sb:Xt,Tb:Zt,Ta:Ar,xa:Qt,Oa:Jt,wb:rn,va:en,ib:function(){return an(location.toString())},hb:function(){return an((r=Yn,self[r(262,"jVQI")][r(251,"i8BM")]()));var r},Ya:function(r,e){var t=Wn();try{return xr(r)(e)}catch(r){if(Dn(t),r!==r+0)throw r;An(1,0)}},_a:function(r,e,t,n,o,a){var i=Wn();try{return xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},A:function(r,e,t,n){var o=Wn();try{return xr(r)(e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},ec:function(r,e,t,n,o,a,i,s){var u=Wn();try{return xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},q:function(r,e){var t=Wn();try{return xr(r)(e)}catch(r){if(Dn(t),r!==r+0)throw r;An(1,0)}},w:function(r,e,t){var n=Wn();try{return xr(r)(e,t)}catch(r){if(Dn(n),r!==r+0)throw r;An(1,0)}},N:function(r,e,t,n){var o=Wn();try{return xr(r)(e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},ga:function(r,e,t,n,o){var a=Wn();try{return xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},v:function(r){var e=Wn();try{return xr(r)()}catch(r){if(Dn(e),r!==r+0)throw r;An(1,0)}},j:function(r,e){var t=Wn();try{return xr(r)(e)}catch(r){if(Dn(t),r!==r+0)throw r;An(1,0)}},c:function(r,e,t){var n=Wn();try{return xr(r)(e,t)}catch(r){if(Dn(n),r!==r+0)throw r;An(1,0)}},g:function(r,e,t,n){var o=Wn();try{return xr(r)(e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},l:function(r,e,t,n,o){var a=Wn();try{return xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},La:function(r,e,t,n,o,a){var i=Wn();try{return xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},cb:function(r,e,t,n,o,a){var i=Wn();try{return xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},o:function(r,e,t,n,o,a){var i=Wn();try{return xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},y:function(r,e,t,n,o,a,i){var s=Wn();try{return xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},Ka:function(r,e,t,n,o,a,i,s){var u=Wn();try{return xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},pa:function(r,e,t,n,o,a,i,s,u){var c=Wn();try{return xr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Dn(c),r!==r+0)throw r;An(1,0)}},cc:function(r,e,t,n,o,a,i,s,u,c){var l=Wn();try{return xr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Dn(l),r!==r+0)throw r;An(1,0)}},la:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=Wn();try{return xr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Dn(f),r!==r+0)throw r;An(1,0)}},rb:function(r,e,t,n,o,a,i){var s=Wn();try{return Ln(r,e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},Ab:function(r,e,t,n){var o=Wn();try{return Nn(r,e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},tb:function(r){var e=Wn();try{return Bn(r)}catch(r){if(Dn(e),r!==r+0)throw r;An(1,0)}},Bb:function(r,e){var t=Wn();try{return In(r,e)}catch(r){if(Dn(t),r!==r+0)throw r;An(1,0)}},sb:function(r,e,t){var n=Wn();try{return Hn(r,e,t)}catch(r){if(Dn(n),r!==r+0)throw r;An(1,0)}},qb:function(r,e,t,n,o){var a=Wn();try{return Un(r,e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},m:function(r){var e=Wn();try{xr(r)()}catch(r){if(Dn(e),r!==r+0)throw r;An(1,0)}},i:function(r,e){var t=Wn();try{xr(r)(e)}catch(r){if(Dn(t),r!==r+0)throw r;An(1,0)}},kb:function(r,e,t){var n=Wn();try{xr(r)(e,t)}catch(r){if(Dn(n),r!==r+0)throw r;An(1,0)}},ha:function(r,e,t){var n=Wn();try{xr(r)(e,t)}catch(r){if(Dn(n),r!==r+0)throw r;An(1,0)}},d:function(r,e,t){var n=Wn();try{xr(r)(e,t)}catch(r){if(Dn(n),r!==r+0)throw r;An(1,0)}},X:function(r,e,t,n){var o=Wn();try{xr(r)(e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},ab:function(r,e,t,n,o){var a=Wn();try{xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},Xa:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},oa:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},ca:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},ra:function(r,e,t,n,o){var a=Wn();try{xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},M:function(r,e,t,n){var o=Wn();try{xr(r)(e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},$:function(r,e,t,n,o){var a=Wn();try{xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},Ba:function(r,e,t,n,o){var a=Wn();try{xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},qa:function(r,e,t,n,o,a){var i=Wn();try{xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},Ca:function(r,e,t,n,o,a,i,s,u){var c=Wn();try{xr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Dn(c),r!==r+0)throw r;An(1,0)}},f:function(r,e,t,n){var o=Wn();try{xr(r)(e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},B:function(r,e,t,n,o,a){var i=Wn();try{xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},fc:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},K:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},C:function(r,e,t,n,o){var a=Wn();try{xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},ba:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},Wa:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},U:function(r,e,t,n,o,a){var i=Wn();try{xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},bb:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},Aa:function(r,e,t,n,o,a,i,s,u,c){var l=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Dn(l),r!==r+0)throw r;An(1,0)}},$a:function(r,e,t,n,o,a,i,s,u,c,l){var d=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Dn(d),r!==r+0)throw r;An(1,0)}},k:function(r,e,t,n,o){var a=Wn();try{xr(r)(e,t,n,o)}catch(r){if(Dn(a),r!==r+0)throw r;An(1,0)}},Da:function(r,e,t,n,o,a,i,s,u){var c=Wn();try{xr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Dn(c),r!==r+0)throw r;An(1,0)}},D:function(r,e,t,n,o,a){var i=Wn();try{xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},W:function(r,e,t,n,o,a,i,s,u,c){var l=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Dn(l),r!==r+0)throw r;An(1,0)}},fa:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},n:function(r,e,t,n,o,a){var i=Wn();try{xr(r)(e,t,n,o,a)}catch(r){if(Dn(i),r!==r+0)throw r;An(1,0)}},db:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},t:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},_:function(r,e,t,n,o,a,i,s,u,c,l){var d=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Dn(d),r!==r+0)throw r;An(1,0)}},T:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},r:function(r,e,t,n,o,a,i){var s=Wn();try{xr(r)(e,t,n,o,a,i)}catch(r){if(Dn(s),r!==r+0)throw r;An(1,0)}},na:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},Va:function(r,e,t,n,o,a,i,s,u,c,l){var d=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Dn(d),r!==r+0)throw r;An(1,0)}},dc:function(r,e,t,n,o,a,i,s,u){var c=Wn();try{xr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Dn(c),r!==r+0)throw r;An(1,0)}},s:function(r,e,t,n,o,a,i,s){var u=Wn();try{xr(r)(e,t,n,o,a,i,s)}catch(r){if(Dn(u),r!==r+0)throw r;An(1,0)}},H:function(r,e,t,n,o,a,i,s,u){var c=Wn();try{xr(r)(e,t,n,o,a,i,s,u)}catch(r){if(Dn(c),r!==r+0)throw r;An(1,0)}},za:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Dn(f),r!==r+0)throw r;An(1,0)}},O:function(r,e,t,n,o,a,i,s,u,c){var l=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(Dn(l),r!==r+0)throw r;An(1,0)}},aa:function(r,e,t,n,o,a,i,s,u,c,l){var d=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(Dn(d),r!==r+0)throw r;An(1,0)}},Za:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(Dn(f),r!==r+0)throw r;An(1,0)}},da:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h){var p=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h)}catch(r){if(Dn(p),r!==r+0)throw r;An(1,0)}},ka:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var v=Wn();try{xr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(r){if(Dn(v),r!==r+0)throw r;An(1,0)}},zb:function(r,e,t,n){var o=Wn();try{zn(r,e,t,n)}catch(r){if(Dn(o),r!==r+0)throw r;An(1,0)}},Q:r=>r,a:T||d.wasmMemory,eb:on,Cb:(r,e,t,n,o)=>on(r,e,t,n)},vn=function(){var r,e,t,n,o={a:mn};function a(r,e){var t,n=r.exports;return Or((vn=n).nc),z=vn.ic,t=vn.gc,H.unshift(t),C=e,Q(),n}if(Z(),d.instantiateWasm)try{return d.instantiateWasm(o,a)}catch(r){k(`Module.instantiateWasm callback failed with error: ${r}`),l(r)}return(r=b,e=rr,t=o,n=function(r){a(r.instance,r.module)},r||"function"!=typeof WebAssembly.instantiateStreaming||nr(e)||"function"!=typeof fetch?ar(e,t,n):fetch(e,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(n,(function(r){return k(`wasm streaming compile failed: ${r}`),k("falling back to ArrayBuffer instantiation"),ar(e,t,n)}))))).catch(l),{}}(),yn=d._malloc=r=>(yn=d._malloc=vn.hc)(r),gn=d._free=r=>(gn=d._free=vn.jc)(r),wn=()=>(wn=vn.kc)(),_n=d._pthread_self=()=>(_n=d._pthread_self=vn.lc)(),bn=r=>(bn=vn.mc)(r),En=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=vn.nc)(),(r,e)=>(En=vn.oc)(r,e)),kn=r=>(kn=vn.pc)(r),Tn=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=vn.qc)(),d.__emscripten_thread_init=(r,e,t,n,o,a)=>(Tn=d.__emscripten_thread_init=vn.rc)(r,e,t,n,o,a)),Cn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=vn.sc)(),(r,e,t,n)=>(Cn=vn.tc)(r,e,t,n)),$n=r=>($n=vn.uc)(r),Pn=d.__emscripten_thread_exit=r=>(Pn=d.__emscripten_thread_exit=vn.vc)(r),Sn=d.__emscripten_check_mailbox=()=>(Sn=d.__emscripten_check_mailbox=vn.wc)(),An=(r,e)=>(An=vn.xc)(r,e),Fn=(r,e)=>(Fn=vn.yc)(r,e),Wn=()=>(Wn=vn.zc)(),Dn=r=>(Dn=vn.Ac)(r),Mn=r=>(Mn=vn.Bc)(r),jn=r=>(jn=vn.Cc)(r),xn=r=>(xn=vn.Dc)(r),On=(r,e,t)=>(On=vn.Ec)(r,e,t),Rn=r=>(Rn=vn.Fc)(r),In=d.dynCall_ji=(r,e)=>(In=d.dynCall_ji=vn.Gc)(r,e),zn=d.dynCall_vij=(r,e,t,n)=>(zn=d.dynCall_vij=vn.Hc)(r,e,t,n),Nn=d.dynCall_iij=(r,e,t,n)=>(Nn=d.dynCall_iij=vn.Ic)(r,e,t,n),Bn=(d.dynCall_viijii=(r,e,t,n,o,a,i)=>(d.dynCall_viijii=vn.Jc)(r,e,t,n,o,a,i),d.dynCall_jjj=(r,e,t,n,o)=>(d.dynCall_jjj=vn.Kc)(r,e,t,n,o),d.dynCall_iiiijj=(r,e,t,n,o,a,i,s)=>(d.dynCall_iiiijj=vn.Lc)(r,e,t,n,o,a,i,s),d.dynCall_viijj=(r,e,t,n,o,a,i)=>(d.dynCall_viijj=vn.Mc)(r,e,t,n,o,a,i),d.dynCall_viiijjj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=vn.Nc)(r,e,t,n,o,a,i,s,u,c),d.dynCall_jiji=(r,e,t,n,o)=>(d.dynCall_jiji=vn.Oc)(r,e,t,n,o),d.dynCall_j=r=>(Bn=d.dynCall_j=vn.Pc)(r)),Hn=d.dynCall_jii=(r,e,t)=>(Hn=d.dynCall_jii=vn.Qc)(r,e,t),Ln=d.dynCall_iiiiij=(r,e,t,n,o,a,i)=>(Ln=d.dynCall_iiiiij=vn.Rc)(r,e,t,n,o,a,i),Un=d.dynCall_jiiii=(r,e,t,n,o)=>(Un=d.dynCall_jiiii=vn.Sc)(r,e,t,n,o);d.dynCall_iiiiijj=(r,e,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=vn.Tc)(r,e,t,n,o,a,i,s,u),d.dynCall_iiiiiijj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_iiiiiijj=vn.Uc)(r,e,t,n,o,a,i,s,u,c),d.___start_em_js=1120232,d.___stop_em_js=1120340;function Vn(){if(!(G>0)){if(g)return c(d),Y(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)q(d.preRun.shift());Dr(B)}(),G>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),r()}),1)):r())}function r(){hn||(hn=!0,d.calledRun=!0,O||(Y(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!g){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)r=d.postRun.shift(),L.unshift(r);var r;Dr(L)}}()))}}if(d.keepRuntimeAlive=V,d.wasmMemory=T,d.UTF8ToString=$r,d.stringToUTF8=wt,d.lengthBytesUTF8=yr,d.ExitStatus=sr,d.allocateUTF8=an,d.PThread=Wr,X=function r(){hn||Vn(),hn||(X=r)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Yn(r,e){var t=qn();return Yn=function(e,n){var o=t[e-=249];if(void 0===Yn.FyhekV){var a=function(r){for(var e,t,n="",o="",a=0,i=0;t=r.charAt(i++);~t&&(e=a%4?64*e+t:t,a++%4)?n+=String.fromCharCode(255&e>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,e){var t,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+e.charCodeAt(n%e.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Yn.lPcTKd=i,r=arguments,Yn.FyhekV=!0}var s=t[0],u=e+s,c=r[u];return c?o=c:(void 0===Yn.FoiEts&&(Yn.FoiEts=!0),o=Yn.lPcTKd(o,n),r[u]=o),o},Yn(r,e)}function qn(){var r=["WRZcUColWRrvW6Gm","bhSrymkgag0","W58ZeKrlWPa6nG7dSLFdUG","W7XtCCoqcZNcGSkBW4bCWP0PW4u","wCkdde07WQqlW4lcSaZcG8kMsG","W6ZcPCoXnhrxiG","fCoBBaPXW7rsW4K","wCkhcuG7WQOoW6VcSIhcQmk9Aa","fH4mFvqxW4iGhSk1","WQ/cHmo0m8ooW6tcKCkE","wmohCvLmA8ogbmk9W6ns","BtxcPSkeW67dMmk6Bd9bpse","j8k8hIlcRJ5oWQqCWRhdV8kAWP0","W7PwCSoFcZ3dJSktW6vEWPGe","uSkHad4jBmom","pwFdMGzJW73dIrBcKCohWQCYW44","D0jmWPldMmkjW59m","tenDkK0iW6Wp","feNcQs16WQ/dImkjW6KzW70","WQpcS8olW7ziWR/cHmouWOa5xdddSa","FmkAWPvVWRO8WQhdLfhdPG","u8khc0K6WQXeW4hcNdBcO8k6","r2lcPLVdHZein8oRWPNcIX7cJG","ANZcRmocs01HW5iCwhbisW"];return(qn=function(){return r})()}Vn(),function(r,e){for(var t=Yn,n=r();;)try{if(636407===-parseInt(t(258,"c9Bo"))/1*(-parseInt(t(270,"kbbq"))/2)+parseInt(t(268,"H3YF"))/3*(parseInt(t(259,"p017"))/4)+-parseInt(t(271,"AJNT"))/5*(-parseInt(t(254,"!aVW"))/6)+-parseInt(t(267,"YUpT"))/7+-parseInt(t(252,"i8BM"))/8+parseInt(t(260,"vZUO"))/9+parseInt(t(255,"p017"))/10*(-parseInt(t(265,"A!!F"))/11))break;n.push(n.shift())}catch(r){n.push(n.shift())}}(qn);var ighnua,Gn=(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}),Kn=Gn(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Kn)};return r()}));return Kn(),e.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=initModule:"function"==typeof define&&define.amd&&define([],(()=>initModule));