var Vips=(()=>{var e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(t){var n,r,o,i;t=t||{},n||(n=void 0!==t?t:{}),n.ready=new Promise((function(e,t){r=e,o=t})),n.locateFile=n.locateFile||function(e,t){return(e=t+e).endsWith(".worker.js")?i||(i=URL.createObjectURL(new Blob([`importScripts('${e}');`],{type:"application/javascript"}))):e};var a,c,u,s=Object.assign({},n),f=[],l="./this.program",d=(e,t)=>{throw t},h="object"==typeof window,b="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.Pf&&"string"==typeof process.Pf.node,m=n.ENVIRONMENT_IS_PTHREAD||!1,v="";function w(e){return n.locateFile?n.locateFile(e,v):v+e}(h||b)&&(b?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),e&&(v=e),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},b&&(u=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),c=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)});var y=n.print||console.log.bind(console),g=n.printErr||console.warn.bind(console);function k(e){_||(_={}),_[e]||(_[e]=1,g(e))}Object.assign(n,s),s=null,n.arguments&&(f=n.arguments),n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit);var _,P,A,T=[],N=0;n.wasmBinary&&(A=n.wasmBinary);var E=n.noExitRuntime||!1;"object"!=typeof WebAssembly&&Ae("no native wasm support detected");var O,S,D,R=!1;function F(e){var t=new TextDecoder(e);this.fc=e=>(e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),t.decode.call(t,e))}var M=new F("utf8");function x(e){for(var t=0;e[t]&&!(NaN<=t);)++t;return M.fc(e.subarray?e.subarray(0,t):new Uint8Array(e.slice(0,t)))}function L(e,t){if(!e)return"";t=e+t;for(var n=e;!(n>=t)&&B[n];)++n;return M.fc(B.subarray(e,n))}function U(e,t,n,r){if(!(0=a)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if(127>=a){if(n>=r)break;t[n++]=a}else{if(2047>=a){if(n+1>=r)break;t[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;t[n++]=224|a>>12}else{if(n+3>=r)break;t[n++]=240|a>>18,t[n++]=128|a>>12&63}t[n++]=128|a>>6&63}t[n++]=128|63&a}}return t[n]=0,n-o}function W(e){for(var t=0,n=0;n=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),127>=r?++t:t=2047>=r?t+2:65535>=r?t+3:t+4}return t}var C,j,B,I,V,z,Q,q,H,Y,X,G=new F("utf-16le");function Z(e,t){var n=e>>1;for(t=n+t/2;!(n>=t)&&V[n];)++n;return G.fc(B.subarray(e,n<<1))}function $(e,t,n){if(void 0===n&&(n=2147483647),2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var o=0;o>1]=e.charCodeAt(o),t+=2;return I[t>>1]=0,t-r}function J(e){return 2*e.length}function K(e,t){for(var n=0,r="";!(n>=t/4);){var o=z[e+4*n>>2];if(0==o)break;++n,65536<=o?(o-=65536,r+=String.fromCharCode(55296|o>>10,56320|1023&o)):r+=String.fromCharCode(o)}return r}function ee(e,t,n){if(void 0===n&&(n=2147483647),4>n)return 0;var r=t;n=r+n-4;for(var o=0;o=i)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++o);if(z[t>>2]=i,(t+=4)+4>n)break}return z[t>>2]=0,t-r}function te(e){for(var t=0,n=0;n=r&&++n,t+=4}return t}function ne(e){var t=W(e)+1,n=Kr(t);return n&&U(e,j,n,t),n}function re(e){var t=W(e)+1,n=go(t);return U(e,j,n,t),n}m&&(C=n.buffer);var oe=n.INITIAL_MEMORY||1073741824;if(m)O=n.wasmMemory,C=n.buffer;else if(n.wasmMemory)O=n.wasmMemory;else if(!((O=new WebAssembly.Memory({initial:oe/65536,maximum:oe/65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw g("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"),p&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),Error("bad memory");O&&(C=O.buffer),oe=C.byteLength;var ie=C;C=ie,n.HEAP8=j=new Int8Array(ie),n.HEAP16=I=new Int16Array(ie),n.HEAP32=z=new Int32Array(ie),n.HEAPU8=B=new Uint8Array(ie),n.HEAPU16=V=new Uint16Array(ie),n.HEAPU32=Q=new Uint32Array(ie),n.HEAPF32=q=new Float32Array(ie),n.HEAPF64=X=new Float64Array(ie),n.HEAP64=H=new BigInt64Array(ie),n.HEAPU64=Y=new BigUint64Array(ie);var ae,ce=[],ue=[],se=[],fe=[],le=[],de=!1,he=0;function be(){return E||0>1];13===t;){var n=Q[e+8>>2],r=Q[n>>2];if(0===r){t=0;break}if(0!==Q[1+(n>>2)])break;e=r,t=V[r+6>>1]}return[e,t]}function De(e){e instanceof _o||"unwind"==e||d(1,e)}function Re(){if(!be())try{m?po(D):Ao(D)}catch(e){De(e)}}function Fe(e){if(!de&&!R)try{e(),Re()}catch(e){De(e)}}Ee=m?()=>performance.now()-n.__performance_now_clock_drift:()=>performance.now();var Me,xe,Le,Ue=!1,We=null,Ce=0,je=null,Be=0,Ie=0,Ve=0,ze=[],Qe={},qe=!1,He=!1,Ye=[];function Xe(){function e(){He=document.pointerLockElement===n.canvas||document.mozPointerLockElement===n.canvas||document.webkitPointerLockElement===n.canvas||document.msPointerLockElement===n.canvas}if(n.preloadPlugins||(n.preloadPlugins=[]),!nt){nt=!0;try{rt=!0}catch(e){rt=!1,y("warning: no blob constructor, cannot create blobs with mimetypes")}ot="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:rt?null:y("warning: no BlobBuilder"),it="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,n.ge||void 0!==it||(y("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),n.ge=!0),n.preloadPlugins.push({canHandle:function(e){return!n.ge&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,o){var i=null;if(rt)try{(i=new Blob([e],{type:tt(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:tt(t)}))}catch(e){k("Blob constructor present but fails: "+e+"; falling back to blob builder")}i||((i=new ot).append(new Uint8Array(e).buffer),i=i.getBlob());var a=it.createObjectURL(i),c=new Image;c.onload=()=>{c.complete||Ae("Image "+t+" could not be decoded");var o=document.createElement("canvas");o.width=c.width,o.height=c.height,o.getContext("2d").drawImage(c,0,0),n.preloadedImages[t]=o,it.revokeObjectURL(a),r&&r(e)},c.onerror=()=>{y("Image "+a+" could not be decoded"),o&&o()},c.src=a}}),n.preloadPlugins.push({canHandle:function(e){return!n.hg&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,o){function i(o){c||(c=!0,n.preloadedAudios[t]=o,r&&r(e))}function a(){c||(c=!0,n.preloadedAudios[t]=new Audio,o&&o())}var c=!1;if(!rt)return a();try{var u=new Blob([e],{type:tt(t)})}catch(e){return a()}u=it.createObjectURL(u);var s=new Audio;s.addEventListener("canplaythrough",(function(){i(s)}),!1),s.onerror=function(){if(!c){y("warning: browser could not fully decode audio "+t+", trying slower base64 approach");for(var n="",r=0,o=0,a=0;a>o-6&63;o-=6,n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[u]}2==o?(n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&r)<<4],n+="=="):4==o&&(n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&r)<<2],n+="="),s.src="data:audio/x-"+t.substr(-3)+";base64,"+n,i(s)}},s.src=u,function(e){he+=1,setTimeout((function(){--he,Fe(e)}),1e4)}((function(){i(s)}))}});var t=n.canvas;t&&(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock||t.msRequestPointerLock||function(){},t.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},t.exitPointerLock=t.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",e,!1),document.addEventListener("mozpointerlockchange",e,!1),document.addEventListener("webkitpointerlockchange",e,!1),document.addEventListener("mspointerlockchange",e,!1),n.elementPointerLock&&t.addEventListener("click",(function(e){!He&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),e.preventDefault())}),!1))}}var Ge=!1,Ze=void 0,$e=void 0;function Je(){return!!qe&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)}var Ke=0;function et(e){if("function"==typeof requestAnimationFrame)requestAnimationFrame(e);else{var t=Date.now();if(0===Ke)Ke=t+1e3/60;else for(;t+2>=Ke;)Ke+=1e3/60;setTimeout(e,Math.max(Ke-t,0))}}function tt(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}var nt,rt,ot,it,at=[];function ct(){var e=n.canvas;at.forEach((function(t){t(e.width,e.height)}))}function ut(e,t,r){t&&r?(e.Qf=t,e.Ze=r):(t=e.Qf,r=e.Ze);var o=t,i=r;if(n.forcedAspectRatio&&0>2]=0,dt.le(t.worker))}var dt={qc:[],Vc:[],gd:[],init:function(){m?dt.cf():dt.bf()},bf:function(){for(var e=wr()+3,t=0;t>2]=0;try{e()}finally{z[ko>>2]=1}},yf:function(){},ne:function(){for(var e in dt.gd)dt.gd.hasOwnProperty(e)&&dt.gd[e]()},de:function(t,r){t.onmessage=e=>{var o=(e=e.data).cmd;if(t.Ic&&(dt.Je=t.Ic.Hd),e.targetThread&&e.targetThread!=ao()){var i=dt.pc[e.ng];i?i.worker.postMessage(e,e.transferList):g('Internal error! Worker sent a message "'+o+'" to target pthread '+e.targetThread+", but that thread no longer exists!")}else"processQueuedMainThreadWork"===o?co():"spawnThread"===o?vt(e):"cleanupThread"===o?lt(e.thread):"killThread"===o?(e=e.thread,z[e>>2]=0,o=dt.pc[e],delete dt.pc[e],o.worker.terminate(),bo(e),dt.Vc.splice(dt.Vc.indexOf(o.worker),1),o.worker.Ic=void 0):"cancelThread"===o?dt.pc[e.thread].worker.postMessage({cmd:"cancel"}):"loaded"===o?(t.loaded=!0,r&&r(t),t.Uc&&(t.Uc(),delete t.Uc)):"print"===o?y("Thread "+e.threadId+": "+e.text):"printErr"===o?g("Thread "+e.threadId+": "+e.text):"alert"===o?alert("Thread "+e.threadId+": "+e.text):"setimmediate"===e.target?t.postMessage(e):"onAbort"===o?n.onAbort&&n.onAbort(e.arg):g("worker sent an unknown command "+o);dt.Je=void 0},t.onerror=e=>{throw g("worker sent an error! "+e.filename+":"+e.lineno+": "+e.message),e},t.postMessage({cmd:"load",urlOrBlob:n.mainScriptUrlOrBlob||e,wasmMemory:O,wasmModule:S})},Kd:function(){var e=w("vips.worker.js");dt.qc.push(new Worker(e))},Ue:function(){return 0==dt.qc.length&&(dt.Kd(),dt.de(dt.qc[0])),dt.qc.pop()}};function ht(e){if(m)return yr(1,0,e);try{Ao(e)}catch(e){De(e)}}n.establishStackSpace=function(){var e=ao(),t=z[e+44>>2];vo(t,t-z[e+48>>2]),yo(t)};var bt=[];function pt(e){var t=bt[e];return t||(e>=bt.length&&(bt.length=e+1),bt[e]=t=ae.get(e)),t}function mt(e,t){if(0===e)e=Date.now();else{if(1!==e&&4!==e)return z[to()>>2]=28,-1;e=Ee()}return z[t>>2]=e/1e3|0,z[t+4>>2]=e%1e3*1e6|0,0}function vt(e){var t=dt.Ue();if(!t)return 6;dt.Vc.push(t);var n=dt.pc[e.Bd]={worker:t,Hd:e.Bd};t.Ic=n;var r={cmd:"run",start_routine:e.Hf,arg:e.Cc,threadInfoStruct:e.Bd};return t.Uc=()=>{r.time=performance.now(),t.postMessage(r,e.Nf)},t.loaded&&(t.Uc(),delete t.Uc),0}function wt(e,t){for(var n=0,r=e.length-1;0<=r;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e}function yt(e){var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=wt(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function gt(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function kt(e){if("/"===e)return"/";var t=(e=(e=yt(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function _t(e,t){return yt(e+"/"+t)}function Pt(){for(var e="",t=!1,n=arguments.length-1;-1<=n&&!t;n--){if("string"!=typeof(t=0<=n?arguments[n]:Rt.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=wt(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}function At(e,t){function n(e){for(var t=0;tn?[]:e.slice(t,n-t+1)}e=Pt(e).substr(1),t=Pt(t).substr(1),e=n(e.split("/")),t=n(t.split("/"));for(var r=Math.min(e.length,t.length),o=r,i=0;i=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),0!=n&&(t=Math.max(t,256)),n=e.Rb,e.Rb=new Uint8Array(t),0=e.node.Vb)return 0;if(8<(e=Math.min(e.node.Vb-o,r))&&i.subarray)t.set(i.subarray(o,o+e),n);else for(r=0;rt)throw new Rt.Nb(28);return t},Lc:function(e,t,n){Dt.Ud(e.node,t+n),e.node.Vb=Math.max(e.node.Vb,t+n)},Fc:function(e,t,n,r,o,i){if(0!==t)throw new Rt.Nb(28);if(!Rt.isFile(e.node.mode))throw new Rt.Nb(43);if(e=e.node.Rb,2&i||e.buffer!==C){if((0{if(!(e=Pt(Rt.cwd(),e)))return{path:"",node:null};if(8<(t=Object.assign({qd:!0,Fd:0},t)).Fd)throw new Rt.Nb(32);e=wt(e.split("/").filter((e=>!!e)),!1);for(var n=Rt.root,r="/",o=0;o{for(var t;;){if(Rt.cd(e))return e=e.mount.fe,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}},ud:(e,t)=>{for(var n=0,r=0;r>>0)%Rt.nc.length},$d:e=>{var t=Rt.ud(e.parent.id,e.name);e.Ac=Rt.nc[t],Rt.nc[t]=e},ae:e=>{var t=Rt.ud(e.parent.id,e.name);if(Rt.nc[t]===e)Rt.nc[t]=e.Ac;else for(t=Rt.nc[t];t;){if(t.Ac===e){t.Ac=e.Ac;break}t=t.Ac}},rc:(e,t)=>{var n=Rt.gf(e);if(n)throw new Rt.Nb(n,e);for(n=Rt.nc[Rt.ud(e.id,t)];n;n=n.Ac){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return Rt.zc(e,t)},createNode:(e,t,n,r)=>(e=new Rt.oe(e,t,n,r),Rt.$d(e),e),od:e=>{Rt.ae(e)},cd:e=>e===e.parent,yc:e=>!!e.Nc,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),df:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),Qe:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},jf:e=>{var t=Rt.Qe[e];if(void 0===t)throw Error("Unknown file open mode: "+e);return t},Wd:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},wc:(e,t)=>Rt.be?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2,gf:e=>{var t=Rt.wc(e,"x");return t||(e.Pb.zc?0:2)},Ad:(e,t)=>{try{return Rt.rc(e,t),20}catch(e){}return Rt.wc(e,"wx")},ed:(e,t,n)=>{try{var r=Rt.rc(e,t)}catch(e){return e.Tb}if(e=Rt.wc(e,"wx"))return e;if(n){if(!Rt.isDir(r.mode))return 54;if(Rt.cd(r)||Rt.getPath(r)===Rt.cwd())return 10}else if(Rt.isDir(r.mode))return 31;return 0},hf:(e,t)=>e?Rt.isLink(e.mode)?32:Rt.isDir(e.mode)&&("r"!==Rt.Wd(t)||512&t)?31:Rt.wc(e,Rt.Wd(t)):44,pe:4096,mf:(e=0,t=Rt.pe)=>{for(;e<=t;e++)if(!Rt.streams[e])return e;throw new Rt.Nb(33)},lc:e=>Rt.streams[e],md:(e,t,n)=>(Rt.ld||(Rt.ld=function(){},Rt.ld.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}}}),e=Object.assign(new Rt.ld,e),t=Rt.mf(t,n),e.kc=t,Rt.streams[t]=e),Ae:e=>{Rt.streams[e]=null},ze:{open:e=>{e.Qb=Rt.Te(e.node.Sc).Qb,e.Qb.open&&e.Qb.open(e)},llseek:()=>{throw new Rt.Nb(70)}},zd:e=>e>>8,cg:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{Rt.Rd[e]={Qb:t}},Te:e=>Rt.Rd[e],Yd:e=>{var t=[];for(e=[e];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.Oc)}return t},syncfs:(e,t)=>{function n(e){return Rt.fd--,t(e)}function r(e){if(e){if(!r.Me)return r.Me=!0,n(e)}else++i>=o.length&&n(null)}"function"==typeof e&&(t=e,e=!1),Rt.fd++,1{if(!t.type.syncfs)return r(null);t.type.syncfs(t,e,r)}))},mount:(e,t,n)=>{var r="/"===n,o=!n;if(r&&Rt.root)throw new Rt.Nb(10);if(!r&&!o){var i=Rt.lookupPath(n,{qd:!1});if(n=i.path,i=i.node,Rt.yc(i))throw new Rt.Nb(10);if(!Rt.isDir(i.mode))throw new Rt.Nb(54)}return t={type:e,jg:t,fe:n,Oc:[]},(e=e.mount(t)).mount=t,t.root=e,r?Rt.root=e:i&&(i.Nc=t,i.mount&&i.mount.Oc.push(t)),e},unmount:e=>{if(e=Rt.lookupPath(e,{qd:!1}),!Rt.yc(e.node))throw new Rt.Nb(28);var t=(e=e.node).Nc,n=Rt.Yd(t);Object.keys(Rt.nc).forEach((e=>{for(e=Rt.nc[e];e;){var t=e.Ac;n.includes(e.mount)&&Rt.od(e),e=t}})),e.Nc=null,e.mount.Oc.splice(e.mount.Oc.indexOf(t),1)},zc:(e,t)=>e.Pb.zc(e,t),sc:(e,t,n)=>{var r=Rt.lookupPath(e,{parent:!0}).node;if(!(e=kt(e))||"."===e||".."===e)throw new Rt.Nb(28);var o=Rt.Ad(r,e);if(o)throw new Rt.Nb(o);if(!r.Pb.sc)throw new Rt.Nb(63);return r.Pb.sc(r,e,t,n)},create:(e,t)=>Rt.sc(e,4095&(void 0!==t?t:438)|32768,0),mkdir:(e,t)=>Rt.sc(e,1023&(void 0!==t?t:511)|16384,0),eg:(e,t)=>{e=e.split("/");for(var n="",r=0;r(void 0===n&&(n=t,t=438),Rt.sc(e,8192|t,n)),symlink:(e,t)=>{if(!Pt(e))throw new Rt.Nb(44);var n=Rt.lookupPath(t,{parent:!0}).node;if(!n)throw new Rt.Nb(44);t=kt(t);var r=Rt.Ad(n,t);if(r)throw new Rt.Nb(r);if(!n.Pb.symlink)throw new Rt.Nb(63);return n.Pb.symlink(n,t,e)},rename:(e,t)=>{var n=gt(e),r=gt(t),o=kt(e),i=kt(t),a=Rt.lookupPath(e,{parent:!0}),c=a.node;if(a=(a=Rt.lookupPath(t,{parent:!0})).node,!c||!a)throw new Rt.Nb(44);if(c.mount!==a.mount)throw new Rt.Nb(75);var u=Rt.rc(c,o);if("."!==(e=At(e,r)).charAt(0))throw new Rt.Nb(28);if("."!==(e=At(t,n)).charAt(0))throw new Rt.Nb(55);try{var s=Rt.rc(a,i)}catch(e){}if(u!==s){if(t=Rt.isDir(u.mode),o=Rt.ed(c,o,t))throw new Rt.Nb(o);if(o=s?Rt.ed(a,i,t):Rt.Ad(a,i))throw new Rt.Nb(o);if(!c.Pb.rename)throw new Rt.Nb(63);if(Rt.yc(u)||s&&Rt.yc(s))throw new Rt.Nb(10);if(a!==c&&(o=Rt.wc(c,"w")))throw new Rt.Nb(o);Rt.ae(u);try{c.Pb.rename(u,a,i)}catch(e){throw e}finally{Rt.$d(u)}}},rmdir:e=>{var t=Rt.lookupPath(e,{parent:!0}).node;e=kt(e);var n=Rt.rc(t,e),r=Rt.ed(t,e,!0);if(r)throw new Rt.Nb(r);if(!t.Pb.rmdir)throw new Rt.Nb(63);if(Rt.yc(n))throw new Rt.Nb(10);t.Pb.rmdir(t,e),Rt.od(n)},Tc:e=>{if(!(e=Rt.lookupPath(e,{follow:!0}).node).Pb.Tc)throw new Rt.Nb(54);return e.Pb.Tc(e)},unlink:e=>{var t=Rt.lookupPath(e,{parent:!0}).node;if(!t)throw new Rt.Nb(44);e=kt(e);var n=Rt.rc(t,e),r=Rt.ed(t,e,!1);if(r)throw new Rt.Nb(r);if(!t.Pb.unlink)throw new Rt.Nb(63);if(Rt.yc(n))throw new Rt.Nb(10);t.Pb.unlink(t,e),Rt.od(n)},readlink:e=>{if(!(e=Rt.lookupPath(e).node))throw new Rt.Nb(44);if(!e.Pb.readlink)throw new Rt.Nb(28);return Pt(Rt.getPath(e.parent),e.Pb.readlink(e))},stat:(e,t)=>{if(!(e=Rt.lookupPath(e,{follow:!t}).node))throw new Rt.Nb(44);if(!e.Pb.mc)throw new Rt.Nb(63);return e.Pb.mc(e)},lstat:e=>Rt.stat(e,!0),chmod:(e,t,n)=>{if(!(e="string"==typeof e?Rt.lookupPath(e,{follow:!n}).node:e).Pb.$b)throw new Rt.Nb(63);e.Pb.$b(e,{mode:4095&t|-4096&e.mode,timestamp:Date.now()})},lchmod:(e,t)=>{Rt.chmod(e,t,!0)},fchmod:(e,t)=>{if(!(e=Rt.lc(e)))throw new Rt.Nb(8);Rt.chmod(e.node,t)},chown:(e,t,n,r)=>{if(!(e="string"==typeof e?Rt.lookupPath(e,{follow:!r}).node:e).Pb.$b)throw new Rt.Nb(63);e.Pb.$b(e,{timestamp:Date.now()})},lchown:(e,t,n)=>{Rt.chown(e,t,n,!0)},fchown:(e,t,n)=>{if(!(e=Rt.lc(e)))throw new Rt.Nb(8);Rt.chown(e.node,t,n)},truncate:(e,t)=>{if(0>t)throw new Rt.Nb(28);if(!(e="string"==typeof e?Rt.lookupPath(e,{follow:!0}).node:e).Pb.$b)throw new Rt.Nb(63);if(Rt.isDir(e.mode))throw new Rt.Nb(31);if(!Rt.isFile(e.mode))throw new Rt.Nb(28);var n=Rt.wc(e,"w");if(n)throw new Rt.Nb(n);e.Pb.$b(e,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{if(!(e=Rt.lc(e)))throw new Rt.Nb(8);if(0==(2097155&e.flags))throw new Rt.Nb(28);Rt.truncate(e.node,t)},utime:(e,t,n)=>{(e=Rt.lookupPath(e,{follow:!0}).node).Pb.$b(e,{timestamp:Math.max(t,n)})},open:(e,t,r,o,i)=>{if(""===e)throw new Rt.Nb(44);if(r=64&(t="string"==typeof t?Rt.jf(t):t)?4095&(void 0===r?438:r)|32768:0,"object"==typeof e)var a=e;else{e=yt(e);try{a=Rt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var c=!1;if(64&t)if(a){if(128&t)throw new Rt.Nb(20)}else a=Rt.sc(e,r,0),c=!0;if(!a)throw new Rt.Nb(44);if(Rt.isChrdev(a.mode)&&(t&=-513),65536&t&&!Rt.isDir(a.mode))throw new Rt.Nb(54);if(!c&&(r=Rt.hf(a,t)))throw new Rt.Nb(r);return 512&t&&Rt.truncate(a,0),t&=-131713,(o=Rt.md({node:a,path:Rt.getPath(a),flags:t,seekable:!0,position:0,Qb:a.Qb,Of:[],error:!1},o,i)).Qb.open&&o.Qb.open(o),!n.logReadFiles||1&t||(Rt.Ed||(Rt.Ed={}),e in Rt.Ed||(Rt.Ed[e]=1)),o},close:e=>{if(Rt.Mc(e))throw new Rt.Nb(8);e.td&&(e.td=null);try{e.Qb.close&&e.Qb.close(e)}catch(e){throw e}finally{Rt.Ae(e.kc)}e.kc=null},Mc:e=>null===e.kc,llseek:(e,t,n)=>{if(Rt.Mc(e))throw new Rt.Nb(8);if(!e.seekable||!e.Qb.llseek)throw new Rt.Nb(70);if(0!=n&&1!=n&&2!=n)throw new Rt.Nb(28);return e.position=e.Qb.llseek(e,t,n),e.Of=[],e.position},read:(e,t,n,r,o)=>{if(0>r||0>o)throw new Rt.Nb(28);if(Rt.Mc(e))throw new Rt.Nb(8);if(1==(2097155&e.flags))throw new Rt.Nb(8);if(Rt.isDir(e.node.mode))throw new Rt.Nb(31);if(!e.Qb.read)throw new Rt.Nb(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Rt.Nb(70)}else o=e.position;return t=e.Qb.read(e,t,n,r,o),i||(e.position+=t),t},write:(e,t,n,r,o,i)=>{if(0>r||0>o)throw new Rt.Nb(28);if(Rt.Mc(e))throw new Rt.Nb(8);if(0==(2097155&e.flags))throw new Rt.Nb(8);if(Rt.isDir(e.node.mode))throw new Rt.Nb(31);if(!e.Qb.write)throw new Rt.Nb(28);e.seekable&&1024&e.flags&&Rt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new Rt.Nb(70)}else o=e.position;return t=e.Qb.write(e,t,n,r,o,i),a||(e.position+=t),t},Lc:(e,t,n)=>{if(Rt.Mc(e))throw new Rt.Nb(8);if(0>t||0>=n)throw new Rt.Nb(28);if(0==(2097155&e.flags))throw new Rt.Nb(8);if(!Rt.isFile(e.node.mode)&&!Rt.isDir(e.node.mode))throw new Rt.Nb(43);if(!e.Qb.Lc)throw new Rt.Nb(138);e.Qb.Lc(e,t,n)},Fc:(e,t,n,r,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new Rt.Nb(2);if(1==(2097155&e.flags))throw new Rt.Nb(2);if(!e.Qb.Fc)throw new Rt.Nb(43);return e.Qb.Fc(e,t,n,r,o,i)},Gc:(e,t,n,r,o)=>e&&e.Qb.Gc?e.Qb.Gc(e,t,n,r,o):0,gg:()=>0,ad:(e,t,n)=>{if(!e.Qb.ad)throw new Rt.Nb(59);return e.Qb.ad(e,t,n)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw Error('Invalid encoding type "'+t.encoding+'"');var n,r=Rt.open(e,t.flags);e=Rt.stat(e).size;var o=new Uint8Array(e);return Rt.read(r,o,0,e,0),"utf8"===t.encoding?n=x(o):"binary"===t.encoding&&(n=o),Rt.close(r),n},writeFile:(e,t,n={})=>{if(n.flags=n.flags||577,e=Rt.open(e,n.flags,n.mode),"string"==typeof t){var r=new Uint8Array(W(t)+1);t=U(t,r,0,r.length),Rt.write(e,r,0,t,void 0,n.ye)}else{if(!ArrayBuffer.isView(t))throw Error("Unsupported data type");Rt.write(e,t,0,t.byteLength,void 0,n.ye)}Rt.close(e)},cwd:()=>Rt.Pd,chdir:e=>{if(null===(e=Rt.lookupPath(e,{follow:!0})).node)throw new Rt.Nb(44);if(!Rt.isDir(e.node.mode))throw new Rt.Nb(54);var t=Rt.wc(e.node,"x");if(t)throw new Rt.Nb(t);Rt.Pd=e.path},De:()=>{Rt.mkdir("/tmp"),Rt.mkdir("/home"),Rt.mkdir("/home/web_user")},Ce:()=>{Rt.mkdir("/dev"),Rt.registerDevice(Rt.makedev(1,3),{read:()=>0,write:(e,t,n,r)=>r}),Rt.mkdev("/dev/null",Rt.makedev(1,3)),Nt(Rt.makedev(5,0),Ot),Nt(Rt.makedev(6,0),St),Rt.mkdev("/dev/tty",Rt.makedev(5,0)),Rt.mkdev("/dev/tty1",Rt.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Ae("randomDevice")}}();Rt.uc("/dev","random",e),Rt.uc("/dev","urandom",e),Rt.mkdir("/dev/shm"),Rt.mkdir("/dev/shm/tmp")},Ge:()=>{Rt.mkdir("/proc");var e=Rt.mkdir("/proc/self");Rt.mkdir("/proc/self/fd"),Rt.mount({mount:()=>{var t=Rt.createNode(e,"fd",16895,73);return t.Pb={zc:(e,t)=>{var n=Rt.lc(+t);if(!n)throw new Rt.Nb(8);return(e={parent:null,mount:{fe:"fake"},Pb:{readlink:()=>n.path}}).parent=e}},t}},{},"/proc/self/fd")},He:()=>{n.stdin?Rt.uc("/dev","stdin",n.stdin):Rt.symlink("/dev/tty","/dev/stdin"),n.stdout?Rt.uc("/dev","stdout",null,n.stdout):Rt.symlink("/dev/tty","/dev/stdout"),n.stderr?Rt.uc("/dev","stderr",null,n.stderr):Rt.symlink("/dev/tty1","/dev/stderr"),Rt.open("/dev/stdin",0),Rt.open("/dev/stdout",1),Rt.open("/dev/stderr",1)},Td:()=>{Rt.Nb||(Rt.Nb=function(e,t){this.node=t,this.Bf=function(e){this.Tb=e},this.Bf(e),this.message="FS error"},Rt.Nb.prototype=Error(),Rt.Nb.prototype.constructor=Rt.Nb,[44].forEach((e=>{Rt.rd[e]=new Rt.Nb(e),Rt.rd[e].stack=""})))},If:()=>{Rt.Td(),Rt.nc=Array(4096),Rt.mount(Dt,{},"/"),Rt.De(),Rt.Ce(),Rt.Ge(),Rt.Pe={MEMFS:Dt}},init:(e,t,r)=>{Rt.init.vd=!0,Rt.Td(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,Rt.He()},vf:()=>{Rt.init.vd=!1,oo();for(var e=0;e{var n=0;return e&&(n|=365),t&&(n|=146),n},Yf:(e,t)=>(e=Rt.analyzePath(e,t)).pd?e.object:null,analyzePath:(e,t)=>{try{var n=Rt.lookupPath(e,{follow:!t});e=n.path}catch(e){}var r={cd:!1,pd:!1,error:0,name:null,path:null,object:null,pf:!1,rf:null,qf:null};try{n=Rt.lookupPath(e,{parent:!0}),r.pf=!0,r.rf=n.path,r.qf=n.node,r.name=kt(e),n=Rt.lookupPath(e,{follow:!t}),r.pd=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.cd="/"===n.path}catch(e){r.error=e.Tb}return r},Vf:(e,t)=>{for(e="string"==typeof e?e:Rt.getPath(e),t=t.split("/").reverse();t.length;){var n=t.pop();if(n){var r=_t(e,n);try{Rt.mkdir(r)}catch(e){}e=r}}return r},Ee:(e,t,n,r,o)=>(e=_t("string"==typeof e?e:Rt.getPath(e),t),Rt.create(e,Rt.sd(r,o))),Od:(e,t,n,r,o,i)=>{var a=t;if(e&&(e="string"==typeof e?e:Rt.getPath(e),a=t?_t(e,t):e),e=Rt.sd(r,o),a=Rt.create(a,e),n){if("string"==typeof n){for(t=Array(n.length),r=0,o=n.length;r{e=_t("string"==typeof e?e:Rt.getPath(e),t),t=Rt.sd(!!n,!!r),Rt.uc.zd||(Rt.uc.zd=64);var o=Rt.makedev(Rt.uc.zd++,0);return Rt.registerDevice(o,{open:e=>{e.seekable=!1},close:()=>{r&&r.buffer&&r.buffer.length&&r(10)},read:(e,t,r,o)=>{for(var i=0,a=0;a{for(var i=0;i{if(e.wd||e.ef||e.link||e.Rb)return!0;if("undefined"!=typeof XMLHttpRequest)throw 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(!a)throw Error("Cannot load without read() or XMLHttpRequest.");try{e.Rb=$r(a(e.url),!0),e.Vb=e.Rb.length}catch(e){throw new Rt.Nb(29)}},createLazyFile:(e,t,n,r,o)=>{function i(){this.yd=!1,this.fc=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.Nd;return this.$c(e/this.Nd|0)[t]}},i.prototype.qe=function(e){this.$c=e},i.prototype.Ld=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(200<=e.status&&300>e.status||304===e.status))throw Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t;e=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t;var i=1048576;o||(i=r);var a=this;a.qe((e=>{var t=e*i,o=(e+1)*i-1;if(o=Math.min(o,r-1),void 0===a.fc[e]){var c=a.fc;if(t>o)throw Error("invalid range ("+t+", "+o+") or no bytes requested!");if(o>r-1)throw Error("only "+r+" bytes available! programmer error!");var u=new XMLHttpRequest;if(u.open("GET",n,!1),r!==i&&u.setRequestHeader("Range","bytes="+t+"-"+o),u.responseType="arraybuffer",u.overrideMimeType&&u.overrideMimeType("text/plain; charset=x-user-defined"),u.send(null),!(200<=u.status&&300>u.status||304===u.status))throw Error("Couldn't load "+n+". Status: "+u.status);t=void 0!==u.response?new Uint8Array(u.response||[]):$r(u.responseText||"",!0),c[e]=t}if(void 0===a.fc[e])throw Error("doXHR failed!");return a.fc[e]})),!e&&r||(i=r=1,i=r=this.$c(0).length,y("LazyFiles on gzip forces download of the whole file when length is accessed")),this.se=r,this.re=i,this.yd=!0},"undefined"!=typeof XMLHttpRequest){if(!b)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.yd||this.Ld(),this.se}},Nd:{get:function(){return this.yd||this.Ld(),this.re}}}),a={wd:!1,Rb:a}}else a={wd:!1,url:n};var c=Rt.Ee(e,t,a,r,o);a.Rb?c.Rb=a.Rb:a.url&&(c.Rb=null,c.url=a.url),Object.defineProperties(c,{Vb:{get:function(){return this.Rb.length}}});var u={};return Object.keys(c.Qb).forEach((e=>{var t=c.Qb[e];u[e]=function(){return Rt.Xd(c),t.apply(null,arguments)}})),u.read=(e,t,n,r,o)=>{if(Rt.Xd(c),o>=(e=e.node.Rb).length)return 0;if(r=Math.min(e.length-o,r),e.slice)for(var i=0;i{function d(r){function c(n){l&&l(),s||Rt.Od(e,t,n,o,i,f),a&&a(),Pe()}(function(e,t,r,o){Xe();var i=!1;return n.preloadPlugins.forEach((function(n){!i&&n.canHandle(t)&&(n.handle(e,t,r,o),i=!0)})),i})(r,h,c,(()=>{u&&u(),Pe()}))||c(r)}var h=t?Pt(_t(e,t)):e;_e(),"string"==typeof r?function(e,t,n){var r="al "+e;c(e,(function(n){n||Ae('Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(n)),r&&Pe()}),(function(){if(!n)throw'Loading data file "'+e+'" failed.';n()})),r&&_e()}(r,(e=>d(e)),u):d(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,Id:()=>"EM_FS_"+window.location.pathname,Jd:20,Kc:"FILE_DATA",mg:(e,t,n)=>{t=t||(()=>{}),n=n||(()=>{});var r=Rt.indexedDB();try{var o=r.open(Rt.Id(),Rt.Jd)}catch(e){return n(e)}o.onupgradeneeded=()=>{y("creating db"),o.result.createObjectStore(Rt.Kc)},o.onsuccess=()=>{var r=o.result.transaction([Rt.Kc],"readwrite"),i=r.objectStore(Rt.Kc),a=0,c=0,u=e.length;e.forEach((e=>{(e=i.put(Rt.analyzePath(e).object.Rb,e)).onsuccess=()=>{++a+c==u&&(0==c?t():n())},e.onerror=()=>{c++,a+c==u&&(0==c?t():n())}})),r.onerror=n},o.onerror=n},bg:(e,t,n)=>{t=t||(()=>{}),n=n||(()=>{});var r=Rt.indexedDB();try{var o=r.open(Rt.Id(),Rt.Jd)}catch(e){return n(e)}o.onupgradeneeded=n,o.onsuccess=()=>{var r=o.result;try{var i=r.transaction([Rt.Kc],"readonly")}catch(e){return void n(e)}var a=i.objectStore(Rt.Kc),c=0,u=0,s=e.length;e.forEach((e=>{var r=a.get(e);r.onsuccess=()=>{Rt.analyzePath(e).pd&&Rt.unlink(e),Rt.Od(gt(e),kt(e),r.result,!0,!0,!0),++c+u==s&&(0==u?t():n())},r.onerror=()=>{u++,c+u==s&&(0==u?t():n())}})),i.onerror=n},o.onerror=n}};function Ft(e,t,n){if("/"===t[0])return t;if(-100===e)e=Rt.cwd();else{if(!(e=Rt.lc(e)))throw new Rt.Nb(8);e=e.path}if(0==t.length){if(!n)throw new Rt.Nb(44);return e}return _t(e,t)}function Mt(e,t,n){try{var r=e(t)}catch(e){if(e&&e.node&&yt(t)!==yt(Rt.getPath(e.node)))return-54;throw e}return z[n>>2]=r.Ke,z[n+4>>2]=0,z[n+8>>2]=r.ce,z[n+12>>2]=r.mode,z[n+16>>2]=r.nf,z[n+20>>2]=r.uid,z[n+24>>2]=r.Ye,z[n+28>>2]=r.Sc,z[n+32>>2]=0,H[n+40>>3]=BigInt(r.size),z[n+48>>2]=4096,z[n+52>>2]=r.we,z[n+56>>2]=r.ue.getTime()/1e3|0,z[n+60>>2]=0,z[n+64>>2]=r.kf.getTime()/1e3|0,z[n+68>>2]=0,z[n+72>>2]=r.Ie.getTime()/1e3|0,z[n+76>>2]=0,H[n+80>>3]=BigInt(r.ce),0}var xt=void 0;function Lt(){return z[(xt+=4)-4>>2]}function Ut(e){if(!(e=Rt.lc(e)))throw new Rt.Nb(8);return e}function Wt(e){if(m)return yr(3,1,e);try{var t=Ut(e);return Rt.open(t.path,t.flags,0).kc}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Ct(e,t,n,r){if(m)return yr(5,1,e,t,n,r);try{if(t=Ft(e,t=L(t)),-8&n)var o=-28;else{var i=Rt.lookupPath(t,{follow:!0}).node;i?(e="",4&n&&(e+="r"),2&n&&(e+="w"),1&n&&(e+="x"),o=e&&Rt.wc(i,e)?-2:0):o=-44}return o}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function jt(e,t,n){if(m)return yr(6,1,e,t,n);xt=n;try{var r=Ut(e);switch(t){case 0:var o=Lt();return 0>o?-28:Rt.open(r.path,r.flags,0,o).kc;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:return o=Lt(),r.flags|=o,0;case 5:return o=Lt(),I[o+0>>1]=2,0;default:return-28;case 9:return z[to()>>2]=28,-1}}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Bt(e,t){if(m)return yr(7,1,e,t);try{var n=Ut(e);return Mt(Rt.stat,n.path,t)}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function It(e,t,n,r){if(m)return yr(8,1,e,t,n,r);try{t=L(t);var o=256&r;return t=Ft(e,t,4096&r),Mt(o?Rt.lstat:Rt.stat,t,n)}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Vt(e,t,n){if(m)return yr(9,1,e,t,n);try{return Rt.ftruncate(e,t),0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function zt(e,t){if(m)return yr(10,1,e,t);try{if(0===t)return-28;var n=Rt.cwd();return t>2]=0;case 21520:return r.Yb?-28:-59;case 21531:return o=Lt(),Rt.ad(r,t,o);default:Ae("bad ioctl syscall "+t)}}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function qt(e,t){if(m)return yr(12,1,e,t);try{return e=L(e),Mt(Rt.lstat,e,t)}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Ht(e,t,n){if(m)return yr(13,1,e,t,n);xt=n;try{var r=L(e),o=n?Lt():0;return Rt.open(r,t,o).kc}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}var Yt={ec:8192,mount:function(){return Rt.createNode(null,"/",16895,0)},Fe:function(){var e={Wb:[],ke:2};e.Wb.push({buffer:new Uint8Array(Yt.ec),offset:0,hc:0});var t=Yt.Pc(),n=Yt.Pc(),r=Rt.createNode(Yt.root,t,4096,0),o=Rt.createNode(Yt.root,n,4096,0);return r.Qc=e,o.Qc=e,e=Rt.md({path:t,node:r,flags:0,seekable:!1,Qb:Yt.Qb}),r.stream=e,n=Rt.md({path:n,node:o,flags:1,seekable:!1,Qb:Yt.Qb}),o.stream=n,{xf:e.kc,Rf:n.kc}},Qb:{ie:function(e){var t=e.node.Qc;if(1==(2097155&e.flags))return 260;if(0=r)return 0;if(0==o)throw new Rt.Nb(6);for(n=r=Math.min(o,r),i=o=0;i=(n=(t=t.subarray(n,n+r)).byteLength))return 0;0==e.Wb.length?(r={buffer:new Uint8Array(Yt.ec),offset:0,hc:0},e.Wb.push(r)):r=e.Wb[e.Wb.length-1],r.offset<=Yt.ec||Ae(void 0);var o=Yt.ec-r.offset;if(o>=n)return r.buffer.set(t,r.offset),r.offset+=n,n;0>2]=t.xf,z[e+4>>2]=t.Rf,0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Gt(e,t,n){if(m)return yr(15,1,e,t,n);try{for(var r=n=0;r>1],a=32,c=Rt.lc(z[o>>2]);c&&(a=5,c.Qb.ie&&(a=c.Qb.ie(c))),(a&=24|i)&&n++,I[o+6>>1]=a}return n}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Zt(e,t,n){if(m)return yr(16,1,e,t,n);try{if(e=L(e),0>=n)var r=-28;else{var o=Rt.readlink(e),i=Math.min(n,W(o)),a=j[t+i];U(o,B,t,n+1),j[t+i]=a,r=i}return r}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function $t(e){if(m)return yr(17,1,e);try{return e=L(e),Rt.rmdir(e),0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Jt(e,t){if(m)return yr(18,1,e,t);try{return e=L(e),Mt(Rt.stat,e,t)}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function Kt(e){if(m)return yr(19,1,e);try{return e=L(e),Rt.unlink(e),0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}var en={};function tn(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function nn(e){return this.fromWireType(Q[e>>2])}var rn={},on={},an={};function cn(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?"_"+e:e}function un(e,t){return e=cn(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function sn(e){var t=Error,n=un(e,(function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},n}var fn=void 0;function ln(e){throw new fn(e)}function dn(e,t,n){function r(t){(t=n(t)).length!==e.length&&ln("Mismatched type converter count");for(var r=0;r>1]};case 2:return function(e){return r[e>>2]};case 3:return function(e){return r[e>>3]}}}function Pn(e){mn(e.Ob.Xb.Sb.name+" instance already deleted")}var An=!1,Tn=!1;function Nn(){}function En(e){--e.count.value,0===e.count.value&&(e.cc?e.ic.tc(e.cc):e.Xb.Sb.tc(e.Ub))}function On(e,t,n){return t===n?e:void 0===n.jc||null===(e=On(e,t,n.jc))?null:n.Le(e)}var Sn={},Dn=[];function Rn(){for(;Dn.length;){var e=Dn.pop();e.Ob.Ec=!1,e.delete()}}var Fn=void 0,Mn={};function xn(e,t){return t.Xb&&t.Ub||ln("makeClassHandle requires ptr and ptrType"),!!t.ic!=!!t.cc&&ln("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ln(Object.create(e,{Ob:{value:t}}))}function Ln(e){return An?(Ln=e=>e.deleteLater())(e):"undefined"==typeof FinalizationRegistry?(Ln=e=>e,e):(Tn=new FinalizationRegistry((e=>{En(e.Ob)})),Nn=e=>{Tn.unregister(e)},(Ln=e=>{var t=e.Ob;return t.cc&&Tn.register(e,{Ob:t},e),e})(e))}function Un(){}function Wn(e,t,n){if(void 0===e[t].Zb){var r=e[t];e[t]=function(){return e[t].Zb.hasOwnProperty(arguments.length)||mn("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].Zb+")!"),e[t].Zb[arguments.length].apply(this,arguments)},e[t].Zb=[],e[t].Zb[r.Dc]=r}}function Cn(e,t,r){n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].Zb&&void 0!==n[e].Zb[r])&&mn("Cannot register public name '"+e+"' twice"),Wn(n,e,e),n.hasOwnProperty(r)&&mn("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),n[e].Zb[r]=t):(n[e]=t,void 0!==r&&(n[e].ig=r))}function jn(e,t,n,r,o,i,a,c){this.name=e,this.constructor=t,this.vc=n,this.tc=r,this.jc=o,this.Se=i,this.Xc=a,this.Le=c,this.tf=[]}function Bn(e,t,n){for(;t!==n;)t.Xc||mn("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.Xc(e),t=t.jc;return e}function In(e,t){return null===t?(this.xd&&mn("null is not a valid "+this.name),0):(t.Ob||mn('Cannot pass "'+kn(t)+'" as a '+this.name),t.Ob.Ub||mn("Cannot pass deleted object as a pointer of type "+this.name),Bn(t.Ob.Ub,t.Ob.Xb.Sb,this.Sb))}function Vn(e,t){if(null===t){if(this.xd&&mn("null is not a valid "+this.name),this.dd){var n=this.Dd();return null!==e&&e.push(this.tc,n),n}return 0}if(t.Ob||mn('Cannot pass "'+kn(t)+'" as a '+this.name),t.Ob.Ub||mn("Cannot pass deleted object as a pointer of type "+this.name),!this.bd&&t.Ob.Xb.bd&&mn("Cannot convert argument of type "+(t.Ob.ic?t.Ob.ic.name:t.Ob.Xb.name)+" to parameter type "+this.name),n=Bn(t.Ob.Ub,t.Ob.Xb.Sb,this.Sb),this.dd)switch(void 0===t.Ob.cc&&mn("Passing raw pointer to smart pointer is illegal"),this.Gf){case 0:t.Ob.ic===this?n=t.Ob.cc:mn("Cannot convert argument of type "+(t.Ob.ic?t.Ob.ic.name:t.Ob.Xb.name)+" to parameter type "+this.name);break;case 1:n=t.Ob.cc;break;case 2:if(t.Ob.ic===this)n=t.Ob.cc;else{var r=t.clone();n=this.wf(n,or((function(){r.delete()}))),null!==e&&e.push(this.tc,n)}break;default:mn("Unsupporting sharing policy")}return n}function zn(e,t){return null===t?(this.xd&&mn("null is not a valid "+this.name),0):(t.Ob||mn('Cannot pass "'+kn(t)+'" as a '+this.name),t.Ob.Ub||mn("Cannot pass deleted object as a pointer of type "+this.name),t.Ob.Xb.bd&&mn("Cannot convert argument of type "+t.Ob.Xb.name+" to parameter type "+this.name),Bn(t.Ob.Ub,t.Ob.Xb.Sb,this.Sb))}function Qn(e,t,n,r){this.name=e,this.Sb=t,this.xd=n,this.bd=r,this.dd=!1,this.tc=this.wf=this.Dd=this.je=this.Gf=this.sf=void 0,void 0!==t.jc?this.toWireType=Vn:(this.toWireType=r?In:zn,this.bc=null)}function qn(e,t,r){n.hasOwnProperty(e)||ln("Replacing nonexistant public symbol"),void 0!==n[e].Zb&&void 0!==r?n[e].Zb[r]=t:(n[e]=t,n[e].Dc=r)}function Hn(e,t){e=bn(e);var n=pt(t);return"function"!=typeof n&&mn("unknown function pointer with signature "+e+": "+t),n}var Yn=void 0;function Xn(e){var t=bn(e=ro(e));return eo(e),t}function Gn(e,t){var n=[],r={};throw t.forEach((function e(t){r[t]||on[t]||(an[t]?an[t].forEach(e):(n.push(t),r[t]=!0))})),new Yn(e+": "+n.map(Xn).join([", "]))}function Zn(e){var t=Function;if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var n=un(t.name||"unknownFunctionName",(function(){}));return n.prototype=t.prototype,n=new n,(e=t.apply(n,e))instanceof Object?e:n}function $n(e,t,n,r,o){var i=t.length;2>i&&mn("argTypes array size mismatch! Must at least get return value and 'this' types!");var a=null!==t[1]&&null!==n,c=!1;for(n=1;n>2)+r]);return n}function Kn(e,t,n){return e instanceof Object||mn(n+' with invalid "this": '+e),e instanceof t.Sb.constructor||mn(n+' incompatible with "this" of type '+e.constructor.name),e.Ob.Ub||mn("cannot call emscripten binding method "+n+" on deleted object"),Bn(e.Ob.Ub,e.Ob.Xb.Sb,t.Sb)}var er=[],tr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function nr(e){4>2])};case 3:return function(e){return this.fromWireType(n[e>>3])}}}function ur(e,t){for(var n=Array(e),r=0;r>2)+r],"parameter "+r);return n}var sr={};function fr(e){var t=sr[e];return void 0===t?bn(e):t}var lr=[];function dr(){return"object"==typeof globalThis?globalThis:Function("return this")()}var hr=[],br={};function pr(e,t,n,r,o,i,a,c){if(m)return yr(20,1,e,t,n,r,o,i,a,c);try{var u=Rt.lc(o);if(!u)return-8;var s=Rt.Fc(u,e,t,i,n,r),f=s.Ub;return z[a>>2]=s.te,f}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function mr(e,t,n,r,o,i){if(m)return yr(21,1,e,t,n,r,o,i);try{var a=Rt.lc(o);a&&2&n&&Rt.Gc(a,B.slice(e,e+t),i,t,r)}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return-e.Tb}}function vr(e,t,n){function r(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}if(m)return yr(22,1,e,t,n);var o=(new Date).getFullYear(),i=new Date(o,0,1),a=new Date(o,6,1);o=i.getTimezoneOffset();var c=a.getTimezoneOffset();z[e>>2]=60*Math.max(o,c),z[t>>2]=Number(o!=c),e=r(i),t=r(a),e=ne(e),t=ne(t),c>2]=e,z[n+4>>2]=t):(z[n>>2]=t,z[n+4>>2]=e)}function wr(){return navigator.hardwareConcurrency}function yr(e,t){var n=arguments.length-2,r=arguments;return ft((function(){for(var o=2*n,i=go(8*o),a=i>>3,c=0;c>2]=t,z[r.Zc+4>>2]=n),!r.he&&r.Tf?r.Zc?(function(e,t,n,r){ft((function(){var o=go(12),i=0;if(t){i=W(t)+1;var a=Kr(i);U(t,B,a,i),i=a}z[o>>2]=i,z[o+4>>2]=n,z[o+8>>2]=r,ho(e,657457152,0,i,o)}))}(r=z[r.Zc+8>>2],e=e?L(e):"",t,n),1):-4:(r.he&&(r=r.he),e=!1,r.Yc&&r.Yc.Bc&&(e=0===(e=r.Yc.Bc.getParameter(2978))[0]&&0===e[1]&&e[2]===r.width&&e[3]===r.height),r.width=t,r.height=n,e&&r.Yc.Bc.viewport(0,0,t,n),0)):-4}function Ar(e,t,n){return m?yr(23,1,e,t,n):Pr(e,t,n)}var Tr={};function Nr(e,t){e.fc||(e.fc=e.getContext,e.getContext=function(t,n){return"webgl"==t==(n=e.fc(t,n))instanceof WebGLRenderingContext?n:null});var n=e.getContext("webgl",t);return n?function(e,t){var n=Kr(8);z[n+4>>2]=ao();var r={ag:n,attributes:t,version:t.ee,Bc:e};return e.canvas&&(e.canvas.Yc=r),Tr[n]=r,(void 0===t.Sd||t.Sd)&&function(e){if(e||(e=Er),!e.af){e.af=!0;var t=e.Bc;!function(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(e,n){t.vertexAttribDivisorANGLE(e,n)},e.drawArraysInstanced=function(e,n,r,o){t.drawArraysInstancedANGLE(e,n,r,o)},e.drawElementsInstanced=function(e,n,r,o,i){t.drawElementsInstancedANGLE(e,n,r,o,i)})}(t),function(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)})}(t),function(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(e,n){t.drawBuffersWEBGL(e,n)})}(t),t.Wf=t.getExtension("EXT_disjoint_timer_query"),t.fg=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}(r),n}(n,t):0}var Er,Or,Sr={},Dr=["default","low-power","high-performance"],Rr={};function Fr(){if(!Or){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(e in Rr)void 0===Rr[e]?delete t[e]:t[e]=Rr[e];var n=[];for(e in t)n.push(e+"="+t[e]);Or=n}return Or}function Mr(e,t){if(m)return yr(24,1,e,t);var n=0;return Fr().forEach((function(r,o){var i=t+n;for(o=z[e+4*o>>2]=i,i=0;i>0]=r.charCodeAt(i);j[o>>0]=0,n+=r.length+1})),0}function xr(e,t){if(m)return yr(25,1,e,t);var n=Fr();z[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),z[t>>2]=r,0}function Lr(e){if(m)return yr(26,1,e);try{var t=Ut(e);return Rt.close(t),0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return e.Tb}}function Ur(e,t){if(m)return yr(27,1,e,t);try{var n=Ut(e),r=n.Yb?2:Rt.isDir(n.mode)?3:Rt.isLink(n.mode)?7:4;return j[t>>0]=r,0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return e.Tb}}function Wr(e,t,n,r){if(m)return yr(28,1,e,t,n,r);try{e:{for(var o=Ut(e),i=e=0;i>2],c=Rt.read(o,j,z[t+8*i>>2],a,void 0);if(0>c){var u=-1;break e}if(e+=c,c>2]=u,0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return e.Tb}}function Cr(e,t,n,r){if(m)return yr(29,1,e,t,n,r);try{var o=0|Number(t&BigInt(4294967295)),i=0|Number(t>>BigInt(32)),a=Ut(e);return-9007199254740992>=(e=4294967296*i+(o>>>0))||9007199254740992<=e?-61:(Rt.llseek(a,e,n),H[r>>3]=BigInt(a.position),a.td&&0===e&&0===n&&(a.td=null),0)}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return e.Tb}}function jr(e,t,n,r){if(m)return yr(30,1,e,t,n,r);try{e:{for(var o=Ut(e),i=e=0;i>2],z[t+(8*i+4)>>2],void 0);if(0>a){var c=-1;break e}e+=a}c=e}return z[r>>2]=c,0}catch(e){if(void 0===Rt||!(e instanceof Rt.Nb))throw e;return e.Tb}}function Br(e){if(m)return yr(31,1,e);To(e)}function Ir(e){return 0==e%4&&(0!=e%100||0==e%400)}function Vr(e,t){for(var n=0,r=0;r<=t;n+=e[r++]);return n}var zr=[31,29,31,30,31,30,31,31,30,31,30,31],Qr=[31,28,31,30,31,30,31,31,30,31,30,31];function qr(e,t){for(e=new Date(e.getTime());0r-e.getDate())){e.setDate(e.getDate()+t);break}t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function Hr(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.Nc=null,this.id=Rt.lf++,this.name=t,this.mode=n,this.Pb={},this.Qb={},this.Sc=r}n.requestFullscreen=function(e,t){!function(e,t){function r(){qe=!1;var e=o.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(o.exitFullscreen=Je,Ze&&o.requestPointerLock(),qe=!0,$e?("undefined"!=typeof SDL&&(z[SDL.screen>>2]=8388608|Q[SDL.screen>>2]),ut(n.canvas),ct()):ut(o)):(e.parentNode.insertBefore(o,e),e.parentNode.removeChild(e),$e?("undefined"!=typeof SDL&&(z[SDL.screen>>2]=-8388609&Q[SDL.screen>>2]),ut(n.canvas),ct()):ut(o)),n.onFullScreen&&n.onFullScreen(qe),n.onFullscreen&&n.onFullscreen(qe)}void 0===(Ze=e)&&(Ze=!0),void 0===($e=t)&&($e=!1);var o=n.canvas;Ge||(Ge=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var i=document.createElement("div");o.parentNode.insertBefore(i,o),i.appendChild(o),i.requestFullscreen=i.requestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen||(i.webkitRequestFullscreen?function(){i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(i.webkitRequestFullScreen?function(){i.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i.requestFullscreen()}(e,t)},n.requestAnimationFrame=function(e){et(e)},n.setCanvasSize=function(e,t,r){ut(n.canvas,e,t),r||ct()},n.pauseMainLoop=function(){We=null,Ce++},n.resumeMainLoop=function(){Ce++;var e=Be,t=Ie,r=je;je=null,function(e){function t(){return!(rXr;++Xr)Yr[Xr]=String.fromCharCode(Xr);hn=Yr,pn=n.BindingError=sn("BindingError"),Un.prototype.isAliasOf=function(e){if(!(this instanceof Un&&e instanceof Un))return!1;var t=this.Ob.Xb.Sb,n=this.Ob.Ub,r=e.Ob.Xb.Sb;for(e=e.Ob.Ub;t.jc;)n=t.Xc(n),t=t.jc;for(;r.jc;)e=r.Xc(e),r=r.jc;return t===r&&n===e},Un.prototype.clone=function(){if(this.Ob.Ub||Pn(this),this.Ob.Rc)return this.Ob.count.value+=1,this;var e=Ln,t=Object,n=t.create,r=Object.getPrototypeOf(this),o=this.Ob;return(e=e(n.call(t,r,{Ob:{value:{count:o.count,Ec:o.Ec,Rc:o.Rc,Ub:o.Ub,Xb:o.Xb,cc:o.cc,ic:o.ic}}}))).Ob.count.value+=1,e.Ob.Ec=!1,e},Un.prototype.delete=function(){this.Ob.Ub||Pn(this),this.Ob.Ec&&!this.Ob.Rc&&mn("Object already scheduled for deletion"),Nn(this),En(this.Ob),this.Ob.Rc||(this.Ob.cc=void 0,this.Ob.Ub=void 0)},Un.prototype.isDeleted=function(){return!this.Ob.Ub},Un.prototype.deleteLater=function(){return this.Ob.Ub||Pn(this),this.Ob.Ec&&!this.Ob.Rc&&mn("Object already scheduled for deletion"),Dn.push(this),1===Dn.length&&Fn&&Fn(Rn),this.Ob.Ec=!0,this},n.getInheritedInstanceCount=function(){return Object.keys(Mn).length},n.getLiveInheritedInstances=function(){var e,t=[];for(e in Mn)Mn.hasOwnProperty(e)&&t.push(Mn[e]);return t},n.setAutoDeleteLater=function(e){An=e},n.flushPendingDeletes=Rn,n.setDelayFunction=function(e){Fn=e,Dn.length&&Fn&&Fn(Rn)},Qn.prototype.Ve=function(e){return this.je&&(e=this.je(e)),e},Qn.prototype.Qd=function(e){this.tc&&this.tc(e)},Qn.prototype.argPackAdvance=8,Qn.prototype.readValueFromPointer=nn,Qn.prototype.deleteObject=function(e){null!==e&&e.delete()},Qn.prototype.fromWireType=function(e){function t(){return this.dd?xn(this.Sb.vc,{Xb:this.sf,Ub:n,ic:this,cc:e}):xn(this.Sb.vc,{Xb:this,Ub:e})}var n=this.Ve(e);if(!n)return this.Qd(e),null;var r=function(e,t){for(void 0===t&&mn("ptr should not be undefined");e.jc;)t=e.Xc(t),e=e.jc;return Mn[t]}(this.Sb,n);if(void 0!==r)return 0===r.Ob.count.value?(r.Ob.Ub=n,r.Ob.cc=e,r.clone()):(r=r.clone(),this.Qd(e),r);if(r=this.Sb.Se(n),!(r=Sn[r]))return t.call(this);r=this.bd?r.Be:r.pointerType;var o=On(n,this.Sb,r.Sb);return null===o?t.call(this):this.dd?xn(r.Sb.vc,{Xb:r,Ub:o,ic:this,cc:e}):xn(r.Sb.vc,{Xb:r,Ub:o})},Yn=n.UnboundTypeError=sn("UnboundTypeError"),n.count_emval_handles=function(){for(var e=0,t=5;t>2]=63,-1},la:function(e,t,n,r){if("undefined"==typeof SharedArrayBuffer)return g("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];return m&&0===o.length?fo(687865856,e,t,n,r):(e={Hf:n,Bd:e,Cc:r,Nf:o},m?(e.Sf="spawnThread",postMessage(e,o),0):vt(e))},Ca:Wt,Ea:Ct,B:jt,wa:Bt,ua:It,sa:Vt,ra:zt,qa:function(){return 0},Ga:Qt,ta:qt,Y:Ht,fb:Xt,eb:Gt,_a:Zt,Za:$t,va:Jt,ja:Kt,ga:function(e){var t=en[e];delete en[e];var n=t.Dd,r=t.tc,o=t.Vd;dn([e],o.map((function(e){return e.Xe})).concat(o.map((function(e){return e.Ef}))),(function(e){var i={};return o.forEach((function(t,n){var r=e[n],a=t.$c,c=t.We,u=e[n+o.length],s=t.Df,f=t.Ff;i[t.Oe]={read:function(e){return r.fromWireType(a(c,e))},write:function(e,t){var n=[];s(f,e,u.toWireType(n,t)),tn(n)}}})),[{name:t.name,fromWireType:function(e){var t,n={};for(t in i)n[t]=i[t].read(e);return r(e),n},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=n();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(r,a),a},argPackAdvance:8,readValueFromPointer:nn,bc:r}]}))},fa:function(e,t,n,r,o){t=bn(t);var i=wn(n);vn(e,{name:t,fromWireType:function(e){for(var a=Q[e>>2],c=r?yn(t,i):gn(t,i,o),u=Array(a),s=e+n,f=0;f>i)+f];return eo(e),u},toWireType:function(e,a){"number"==typeof a&&(a=[a]),Array.isArray(a)||mn("Cannot pass non-array to C++ vector type "+t);var c=(a=Array.prototype.concat.apply([],a)).length,u=r?yn(t,i):gn(t,i,o),s=Kr(n+c*n);Q[s>>2]=c;for(var f=s+n,l=0;l>i)+l]=a[l];return null!==e&&e.push(eo,s),s},argPackAdvance:8,readValueFromPointer:nn,bc:function(e){eo(e)}})},ba:function(e,t,n,r,o){t=bn(t),n=wn(n);var i=t.includes("u");i&&(o=(BigInt(1)<o)throw new TypeError('Passing a number "'+kn(n)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!");return n},argPackAdvance:8,readValueFromPointer:_n(t,n,!i),bc:null})},La:function(e,t,n,r,o){var i=wn(n);vn(e,{name:t=bn(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:o},argPackAdvance:8,readValueFromPointer:function(e){var n=gn(t,i,!0);return this.fromWireType(n[e>>i])},bc:null})},z:function(e,t,n,r,o,i,a,c,u,s,f,l,d){f=bn(f),i=Hn(o,i),c&&(c=Hn(a,c)),s&&(s=Hn(u,s)),d=Hn(l,d);var h=cn(f);Cn(h,(function(){Gn("Cannot construct "+f+" due to unbound types",[r])})),dn([e,t,n],r?[r]:[],(function(t){if(t=t[0],r)var n=t.Sb,o=n.vc;else o=Un.prototype;t=un(h,(function(){if(Object.getPrototypeOf(this)!==a)throw new pn("Use 'new' to construct "+f);if(void 0===u.xc)throw new pn(f+" has no accessible constructor");var e=u.xc[arguments.length];if(void 0===e)throw new pn("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(u.xc).toString()+") parameters instead!");return e.apply(this,arguments)}));var a=Object.create(o,{constructor:{value:t}});t.prototype=a;var u=new jn(f,t,a,d,n,i,c,s);n=new Qn(f,u,!0,!1),o=new Qn(f+"*",u,!1,!1);var l=new Qn(f+" const*",u,!1,!0);return Sn[e]={pointerType:o,Be:l},qn(h,t),[n,o,l]}))},h:function(e,t,n,r,o,i,a){var c=Jn(n,r);t=bn(t),i=Hn(o,i),dn([],[e],(function(e){function r(){Gn("Cannot call "+o+" due to unbound types",c)}var o=(e=e[0]).name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.Sb.constructor;return void 0===u[t]?(r.Dc=n-1,u[t]=r):(Wn(u,t,o),u[t].Zb[n-1]=r),dn([],c,(function(e){return e=$n(o,[e[0],null].concat(e.slice(1)),null,i,a),void 0===u[t].Zb?(e.Dc=n-1,u[t]=e):u[t].Zb[n-1]=e,[]})),[]}))},A:function(e,t,n,r,o,i){0{Gn("Cannot construct "+e.name+" due to unbound types",a)},dn([],a,(function(r){return r.splice(1,0,null),e.Sb.xc[t-1]=$n(n,r,null,o,i),[]})),[]}))},d:function(e,t,n,r,o,i,a,c){var u=Jn(n,r);t=bn(t),i=Hn(o,i),dn([],[e],(function(e){function r(){Gn("Cannot call "+o+" due to unbound types",u)}var o=(e=e[0]).name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),c&&e.Sb.tf.push(t);var s=e.Sb.vc,f=s[t];return void 0===f||void 0===f.Zb&&f.className!==e.name&&f.Dc===n-2?(r.Dc=n-2,r.className=e.name,s[t]=r):(Wn(s,t,o),s[t].Zb[n-2]=r),dn([],u,(function(r){return r=$n(o,r,e,i,a),void 0===s[t].Zb?(r.Dc=n-2,s[t]=r):s[t].Zb[n-2]=r,[]})),[]}))},w:function(e,t,n,r,o,i,a,c,u,s){t=bn(t),o=Hn(r,o),dn([],[e],(function(e){var r=(e=e[0]).name+"."+t,f={get:function(){Gn("Cannot access "+r+" due to unbound types",[n,a])},enumerable:!0,configurable:!0};return f.set=u?()=>{Gn("Cannot access "+r+" due to unbound types",[n,a])}:()=>{mn(r+" is a read-only property")},Object.defineProperty(e.Sb.vc,t,f),dn([],u?[n,a]:[n],(function(n){var a=n[0],f={get:function(){var t=Kn(this,e,r+" getter");return a.fromWireType(o(i,t))},enumerable:!0};if(u){u=Hn(c,u);var l=n[1];f.set=function(t){var n=Kn(this,e,r+" setter"),o=[];u(s,n,l.toWireType(o,t)),tn(o)}}return Object.defineProperty(e.Sb.vc,t,f),[]})),[]}))},Ka:function(e,t){vn(e,{name:t=bn(t),fromWireType:function(e){var t=rr(e);return nr(e),t},toWireType:function(e,t){return or(t)},argPackAdvance:8,readValueFromPointer:nn,bc:null})},p:function(e,t,n,r){function o(){}n=wn(n),t=bn(t),o.values={},vn(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ir(t,n,r),bc:null}),Cn(t,o)},f:function(e,t,n){var r=ar(e,"enum");t=bn(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:un(r.name+"_"+t,(function(){}))}}),e.values[n]=r,e[t]=r},aa:function(e,t,n){n=wn(n),vn(e,{name:t=bn(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:cr(t,n),bc:null})},H:function(e,t,n,r,o,i){var a=Jn(t,n);e=bn(e),o=Hn(r,o),Cn(e,(function(){Gn("Cannot call "+e+" due to unbound types",a)}),t-1),dn([],a,(function(n){return qn(e,$n(e,[n[0],null].concat(n.slice(1)),null,o,i),t-1),[]}))},E:function(e,t,n,r,o){t=bn(t),-1===o&&(o=4294967295),o=wn(n);var i=e=>e;if(0===r){var a=32-8*n;i=e=>e<>>a}n=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t},vn(e,{name:t,fromWireType:i,toWireType:n,argPackAdvance:8,readValueFromPointer:_n(t,o,0!==r),bc:null})},v:function(e,t,n){function r(e){return new o(C,Q[(e>>=2)+1],Q[e])}var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];vn(e,{name:n=bn(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{$e:!0})},$:function(e,t){var n="std::string"===(t=bn(t));vn(e,{name:t,fromWireType:function(e){var t=Q[e>>2];if(n)for(var r=e+4,o=0;o<=t;++o){var i=e+4+o;if(o==t||0==B[i]){if(r=L(r,i-r),void 0===a)var a=r;else a+=String.fromCharCode(0),a+=r;r=i+1}}else{for(a=Array(t),o=0;oW(t):()=>t.length)(),i=Kr(4+o+1);if(Q[i>>2]=o,n&&r)U(t,B,i+4,o+1);else if(r)for(r=0;r>2],c=gn(n,a,!1),u=e+4,s=0;s<=i;++s){var f=e+4+s*t;s!=i&&0!=c[f>>a]||(u=r(u,f-u),void 0===o?o=u:(o+=String.fromCharCode(0),o+=u),u=f+t)}return eo(e),o},toWireType:function(e,r){"string"!=typeof r&&mn("Cannot pass non-string to C++ string type "+n);var c=i(r),u=Kr(4+c+t);return Q[u>>2]=c>>a,o(r,u+4,c+t),null!==e&&e.push(eo,u),u},argPackAdvance:8,readValueFromPointer:nn,bc:function(e){eo(e)}})},ha:function(e,t,n,r,o,i){en[e]={name:bn(t),Dd:Hn(n,r),tc:Hn(o,i),Vd:[]}},J:function(e,t,n,r,o,i,a,c,u,s){en[e].Vd.push({Oe:bn(t),Xe:n,$c:Hn(r,o),We:i,Ef:a,Df:Hn(c,u),Ff:s})},Ma:function(e,t){vn(e,{ff:!0,name:t=bn(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},cb:function(){return 2097152},oa:function(e,t){if(e==t)postMessage({cmd:"processQueuedMainThreadWork"});else if(m)postMessage({targetThread:e,cmd:"processThreadQueue"});else{if(!(e=(e=dt.pc[e])&&e.worker))return;e.postMessage({cmd:"processThreadQueue"})}return 1},Wa:function(){throw 1/0},l:function(e,t,n){e=rr(e),t=ar(t,"emval::as");var r=[],o=or(r);return z[n>>2]=o,t.toWireType(r,e)},W:function(e,t,n,r){e=rr(e),n=ur(t,n);for(var o=Array(t),i=0;i>2]=or(i),e(t,n,i,o)},b:nr,o:function(e){return 0===e?or(dr()):(e=fr(e),or(dr()[e]))},lb:function(e,t){var n=ur(e,t),r=n[0];t=r.name+"_$"+n.slice(1).map((function(e){return e.name})).join("_")+"$";var o=hr[t];if(void 0!==o)return o;o=["retType"];for(var i=[r],a="",c=0;c>> 2) + "+a+'], "parameter '+a+'");\nvar arg'+a+" = argType"+a+".readValueFromPointer(args);\nargs += argType"+a+"['argPackAdvance'];\n";i=new Function("requireRegisteredType","Module","valueToHandle",c+"var obj = new constructor("+i+");\nreturn valueToHandle(obj);\n}\n")(ar,n,or),br[t]=i}return i(e,r,o)},n:function(e){return or(fr(e))},k:function(e){tn(rr(e)),nr(e)},K:function(e,t,n){e=rr(e),t=rr(t),n=rr(n),e[t]=n},r:function(e,t){return or(e=(e=ar(e,"_emval_take_value")).readValueFromPointer(t))},P:function(e){return or(typeof(e=rr(e)))},xa:function(e,t){e=new Date(1e3*z[e>>2]),z[t>>2]=e.getUTCSeconds(),z[t+4>>2]=e.getUTCMinutes(),z[t+8>>2]=e.getUTCHours(),z[t+12>>2]=e.getUTCDate(),z[t+16>>2]=e.getUTCMonth(),z[t+20>>2]=e.getUTCFullYear()-1900,z[t+24>>2]=e.getUTCDay(),z[t+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},ya:function(e,t){e=new Date(1e3*z[e>>2]),z[t>>2]=e.getSeconds(),z[t+4>>2]=e.getMinutes(),z[t+8>>2]=e.getHours(),z[t+12>>2]=e.getDate(),z[t+16>>2]=e.getMonth(),z[t+20>>2]=e.getFullYear()-1900,z[t+24>>2]=e.getDay();var n=new Date(e.getFullYear(),0,1);z[t+28>>2]=(e.getTime()-n.getTime())/864e5|0,z[t+36>>2]=-60*e.getTimezoneOffset();var r=new Date(e.getFullYear(),6,1).getTimezoneOffset();n=n.getTimezoneOffset(),z[t+32>>2]=0|(r!=n&&e.getTimezoneOffset()==Math.min(n,r))},gb:pr,hb:mr,za:function e(t,n,r){e.xe||(e.xe=!0,vr(t,n,r))},j:function(){Ae("")},N:mt,ab:function(){b||k("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},Va:function(){throw he+=1,"unwind"},Ya:function(){return B.length},D:Ee,Aa:function(e,t,n){B.copyWithin(e,t,t+n)},S:wr,kb:function(e,t,n){t/=2,gr.length=t,n>>=3;for(var r=0;re?Oe[-e-1]:Zr[e]).apply(null,gr)},Xa:function(){Ae("OOM")},ma:function(e,t,n){return _r(e)?Pr(e,t,n):Ar(e,t,n)},Ba:function(){throw"unwind"},na:function(e,t){return t={alpha:!!z[t>>=2],depth:!!z[t+1],stencil:!!z[t+2],antialias:!!z[t+3],premultipliedAlpha:!!z[t+4],preserveDrawingBuffer:!!z[t+5],powerPreference:Dr[z[t+6]],failIfMajorPerformanceCaveat:!!z[t+7],ee:z[t+8],dg:z[t+9],Sd:z[t+10],Ne:z[t+11],kg:z[t+12],lg:z[t+13]},!(e=_r(e))||t.Ne?0:Nr(e,t)},Ha:Mr,Ia:xr,U:function(e){Ao(e)},L:Lr,pa:Ur,_:Wr,ib:Cr,Q:jr,ca:function(e,t,n,r){var o=Q[1+(e>>2)],i=Q[6+(e>>2)],a=Q[2+(e>>2)],c=[],u=!1;if(15===(e=Se(Q[3+(e>>2)])[1]))throw Error("complex ret marshalling nyi");if(0>e||15>2)+s],l=Se(Q[(a>>2)+s]);switch(l=l[1]){case 1:case 10:case 9:case 14:c.push(Q[f>>2]);break;case 2:c.push(q[f>>2]);break;case 3:c.push(X[f>>3]);break;case 5:case 6:c.push(B[f]);break;case 7:case 8:c.push(V[f>>1]);break;case 11:case 12:c.push(Y[f>>3]);break;case 4:c.push(Y[f>>3]),c.push(Y[1+(f>>3)]);break;case 13:c.push(f);break;case 15:throw Error("complex marshalling nyi");default:throw Error("Unexpected type "+l)}}var d=wo();if(i!=o){var h=d;for(s=o-1;s>=i;s--)switch(f=Q[(r>>2)+s],l=Se(Q[(a>>2)+s]),l=l[1],l){case 5:case 6:--h,B[h&=-1]=B[f];break;case 7:case 8:h-=2,V[(h&=-2)>>1]=V[f>>1];break;case 1:case 9:case 10:case 14:case 2:h-=4,Q[(h&=-4)>>2]=Q[f>>2];break;case 3:case 11:case 12:h-=8,Q[(h&=-8)>>2]=Q[f>>2],Q[1+(h>>2)]=Q[1+(f>>2)];break;case 4:h-=16,Q[(h&=-8)>>2]=Q[f>>2],Q[1+(h>>2)]=Q[1+(f>>2)],Q[2+(h>>2)]=Q[1+(f>>2)],Q[3+(h>>2)]=Q[1+(f>>2)];break;case 13:h-=4,Q[(h&=-4)>>2]=f;break;case 15:throw Error("complex arg marshalling nyi");default:throw Error("Unexpected argtype "+l)}c.push(h),yo(h)}if(t=ae.get(t).apply(null,c),yo(d),!u)switch(e){case 0:break;case 1:case 9:case 10:case 14:Q[n>>2]=t;break;case 2:q[n>>2]=t;break;case 3:X[n>>3]=t;break;case 5:case 6:B[n+0]=t;break;case 7:case 8:V[n>>1]=t;break;case 11:case 12:Y[n>>3]=t;break;case 15:throw Error("complex ret marshalling nyi");default:throw Error("Unexpected rtype "+e)}},g:function(){return N},da:function(e){var t=Date.now();return z[e>>2]=t/1e3|0,z[e+4>>2]=t%1e3*1e3|0,0},I:function(e){var t=wo();try{return pt(e)()}catch(e){if(yo(t),e!==e+0)throw e;mo(1,0)}},u:function(e,t){var n=wo();try{return pt(e)(t)}catch(e){if(yo(n),e!==e+0)throw e;mo(1,0)}},s:function(e,t,n){var r=wo();try{return pt(e)(t,n)}catch(e){if(yo(r),e!==e+0)throw e;mo(1,0)}},t:function(e,t,n,r){var o=wo();try{return pt(e)(t,n,r)}catch(e){if(yo(o),e!==e+0)throw e;mo(1,0)}},M:function(e,t,n,r,o){var i=wo();try{return pt(e)(t,n,r,o)}catch(e){if(yo(i),e!==e+0)throw e;mo(1,0)}},Ta:function(e,t,n,r,o,i){var a=wo();try{return pt(e)(t,n,r,o,i)}catch(e){if(yo(a),e!==e+0)throw e;mo(1,0)}},Oa:function(e,t,n,r,o,i,a,c,u){var s=wo();try{return pt(e)(t,n,r,o,i,a,c,u)}catch(e){if(yo(s),e!==e+0)throw e;mo(1,0)}},V:function(e,t,n,r,o,i,a){var c=wo();try{return pt(e)(t,n,r,o,i,a)}catch(e){if(yo(c),e!==e+0)throw e;mo(1,0)}},Sa:function(e,t,n,r,o,i,a,c){var u=wo();try{return pt(e)(t,n,r,o,i,a,c)}catch(e){if(yo(u),e!==e+0)throw e;mo(1,0)}},Ra:function(e,t,n,r,o,i,a,c,u,s,f,l,d){var h=wo();try{return pt(e)(t,n,r,o,i,a,c,u,s,f,l,d)}catch(e){if(yo(h),e!==e+0)throw e;mo(1,0)}},q:function(e,t){var n=wo();try{pt(e)(t)}catch(e){if(yo(n),e!==e+0)throw e;mo(1,0)}},C:function(e,t,n){var r=wo();try{pt(e)(t,n)}catch(e){if(yo(r),e!==e+0)throw e;mo(1,0)}},y:function(e,t,n,r){var o=wo();try{pt(e)(t,n,r)}catch(e){if(yo(o),e!==e+0)throw e;mo(1,0)}},F:function(e,t,n,r,o){var i=wo();try{pt(e)(t,n,r,o)}catch(e){if(yo(i),e!==e+0)throw e;mo(1,0)}},Pa:function(e,t,n,r,o,i){var a=wo();try{pt(e)(t,n,r,o,i)}catch(e){if(yo(a),e!==e+0)throw e;mo(1,0)}},ea:function(e,t,n,r,o,i,a){var c=wo();try{pt(e)(t,n,r,o,i,a)}catch(e){if(yo(c),e!==e+0)throw e;mo(1,0)}},Qa:function(e,t,n,r,o,i,a,c,u,s){var f=wo();try{pt(e)(t,n,r,o,i,a,c,u,s)}catch(e){if(yo(f),e!==e+0)throw e;mo(1,0)}},a:O||n.wasmMemory,Fa:Br,i:function(e){N=e},Ua:function(){me()},Na:function(e,t,n,r){function o(e,t,n){for(e="number"==typeof e?e.toString():e||"";e.lengthe?-1:0=a(n,e)?0>=a(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var s=z[r+40>>2];for(var f in r={Lf:z[r>>2],Kf:z[r+4>>2],hd:z[r+8>>2],Wc:z[r+12>>2],Jc:z[r+16>>2],dc:z[r+20>>2],jd:z[r+24>>2],kd:z[r+28>>2],og:z[r+32>>2],Jf:z[r+36>>2],Mf:s?L(s):""},n=L(n),s={"%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"})n=n.replace(new RegExp(f,"g"),s[f]);var l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(f in s={"%a":function(e){return l[e.jd].substring(0,3)},"%A":function(e){return l[e.jd]},"%b":function(e){return d[e.Jc].substring(0,3)},"%B":function(e){return d[e.Jc]},"%C":function(e){return i((e.dc+1900)/100|0,2)},"%d":function(e){return i(e.Wc,2)},"%e":function(e){return o(e.Wc,2," ")},"%g":function(e){return u(e).toString().substring(2)},"%G":function(e){return u(e)},"%H":function(e){return i(e.hd,2)},"%I":function(e){return 0==(e=e.hd)?e=12:12e.hd?"AM":"PM"},"%S":function(e){return i(e.Lf,2)},"%t":function(){return"\t"},"%u":function(e){return e.jd||7},"%U":function(e){var t=new Date(e.dc+1900,0,1),n=0===t.getDay()?t:qr(t,7-t.getDay());return 0>a(n,e=new Date(e.dc+1900,e.Jc,e.Wc))?i(Math.ceil((31-n.getDate()+(Vr(Ir(e.getFullYear())?zr:Qr,e.getMonth()-1)-31)+e.getDate())/7),2):0===a(n,t)?"01":"00"},"%V":function(e){var t=new Date(e.dc+1901,0,4),n=c(new Date(e.dc+1900,0,4));t=c(t);var r=qr(new Date(e.dc+1900,0,1),e.kd);return 0>a(r,n)?"53":0>=a(t,r)?"01":i(Math.ceil((n.getFullYear()a(n,e=new Date(e.dc+1900,e.Jc,e.Wc))?i(Math.ceil((31-n.getDate()+(Vr(Ir(e.getFullYear())?zr:Qr,e.getMonth()-1)-31)+e.getDate())/7),2):0===a(n,t)?"01":"00"},"%y":function(e){return(e.dc+1900).toString().substring(2)},"%Y":function(e){return e.dc+1900},"%z":function(e){var t=0<=(e=e.Jf);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.Mf},"%%":function(){return"%"}},n=n.replace(/%%/g,"\0\0"),s)n.includes(f)&&(n=n.replace(new RegExp(f,"g"),s[f](r)));return(f=$r(n=n.replace(/\0\0/g,"%"),!1)).length>t?0:(j.set(f,e),f.length-1)},Ja:function(e){throw new TypeError(L(e))},Da:function(e){var t=n.Error.buffer();throw n.Error.clear(),Error(L(e)+"\n"+t)},T:function(e){var t=Date.now()/1e3|0;return e&&(z[e>>2]=t),t}};!function(){function e(e,t){if(n.asm=e.exports,dt.gd.push(n.asm.sb),ae=n.asm.ob,ue.unshift(n.asm.mb),S=t,!m){var r=dt.qc.length;dt.qc.forEach((function(e){dt.de(e,(function(){--r||Pe()}))}))}}function t(t){e(t.instance,t.module)}function r(e){return(A||!h&&!b||"function"!=typeof fetch?Promise.resolve().then((function(){return Ne()})):fetch(we,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+we+"'";return e.arrayBuffer()})).catch((function(){return Ne()}))).then((function(e){return WebAssembly.instantiate(e,i)})).then((function(e){return e})).then(e,(function(e){g("failed to asynchronously prepare wasm: "+e),Ae(e)}))}var i={a:Jr};if(m||_e(),n.instantiateWasm)try{return n.instantiateWasm(i,e)}catch(e){return g("Module.instantiateWasm callback failed with error: "+e),!1}(A||"function"!=typeof WebAssembly.instantiateStreaming||Te()||"function"!=typeof fetch?r(t):fetch(we,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,i).then(t,(function(e){return g("wasm streaming compile failed: "+e),g("falling back to ArrayBuffer instantiation"),r(t)}))}))).catch(o)}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.mb).apply(null,arguments)};var Kr=n._malloc=function(){return(Kr=n._malloc=n.asm.nb).apply(null,arguments)};n._main=function(){return(n._main=n.asm.pb).apply(null,arguments)};var eo=n._free=function(){return(eo=n._free=n.asm.qb).apply(null,arguments)},to=n.___errno_location=function(){return(to=n.___errno_location=n.asm.rb).apply(null,arguments)};n._emscripten_tls_init=function(){return(n._emscripten_tls_init=n.asm.sb).apply(null,arguments)};var no=n._emscripten_builtin_memalign=function(){return(no=n._emscripten_builtin_memalign=n.asm.tb).apply(null,arguments)},ro=n.___getTypeName=function(){return(ro=n.___getTypeName=n.asm.ub).apply(null,arguments)};n.___embind_register_native_and_builtin_types=function(){return(n.___embind_register_native_and_builtin_types=n.asm.vb).apply(null,arguments)};var oo=n.___stdio_exit=function(){return(oo=n.___stdio_exit=n.asm.wb).apply(null,arguments)},io=n.___funcs_on_exit=function(){return(io=n.___funcs_on_exit=n.asm.xb).apply(null,arguments)},ao=n._pthread_self=function(){return(ao=n._pthread_self=n.asm.yb).apply(null,arguments)};n.__emscripten_thread_crashed=function(){return(n.__emscripten_thread_crashed=n.asm.zb).apply(null,arguments)};var co=n._emscripten_main_thread_process_queued_calls=function(){return(co=n._emscripten_main_thread_process_queued_calls=n.asm.Ab).apply(null,arguments)},uo=n.__emscripten_thread_init=function(){return(uo=n.__emscripten_thread_init=n.asm.Bb).apply(null,arguments)};n._emscripten_current_thread_process_queued_calls=function(){return(n._emscripten_current_thread_process_queued_calls=n.asm.Cb).apply(null,arguments)};var so,fo=n._emscripten_sync_run_in_main_thread_4=function(){return(fo=n._emscripten_sync_run_in_main_thread_4=n.asm.Db).apply(null,arguments)},lo=n._emscripten_run_in_main_runtime_thread_js=function(){return(lo=n._emscripten_run_in_main_runtime_thread_js=n.asm.Eb).apply(null,arguments)},ho=n._emscripten_dispatch_to_thread_=function(){return(ho=n._emscripten_dispatch_to_thread_=n.asm.Fb).apply(null,arguments)},bo=n.__emscripten_thread_free_data=function(){return(bo=n.__emscripten_thread_free_data=n.asm.Gb).apply(null,arguments)},po=n.__emscripten_thread_exit=function(){return(po=n.__emscripten_thread_exit=n.asm.Hb).apply(null,arguments)},mo=n._setThrew=function(){return(mo=n._setThrew=n.asm.Ib).apply(null,arguments)},vo=n._emscripten_stack_set_limits=function(){return(vo=n._emscripten_stack_set_limits=n.asm.Jb).apply(null,arguments)},wo=n.stackSave=function(){return(wo=n.stackSave=n.asm.Kb).apply(null,arguments)},yo=n.stackRestore=function(){return(yo=n.stackRestore=n.asm.Lb).apply(null,arguments)},go=n.stackAlloc=function(){return(go=n.stackAlloc=n.asm.Mb).apply(null,arguments)},ko=n.__emscripten_allow_main_runtime_queued_calls=1314072;function _o(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Po(e){function t(){if(!so&&(so=!0,n.calledRun=!0,!R)){if(pe(),m||st(se),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),No){var t=e,o=n._main,i=(t=t||[]).length+1,a=go(4*(i+1));z[a>>2]=re(l);for(var c=1;c>2)+c]=re(t[c-1]);z[(a>>2)+i]=0;try{Ao(o(i,a),!0)}catch(e){De(e)}}if(!m){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)t=n.postRun.shift(),le.unshift(t);st(le)}}}if(e=e||f,!(0