@hpcc-js/wasm 1.14.2 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expat.es6.js +5 -5
- package/dist/expat.es6.js.map +1 -1
- package/dist/expat.js +5 -5
- package/dist/expat.js.map +1 -1
- package/dist/graphviz.es6.js +5 -5
- package/dist/graphviz.es6.js.map +1 -1
- package/dist/graphviz.js +5 -5
- package/dist/graphviz.js.map +1 -1
- package/dist/graphvizlib.wasm +0 -0
- package/dist/index.es6.js +5 -5
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
- package/types/util.d.ts +0 -2
- package/types/util.d.ts.map +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["@hpcc-js/wasm"]={})}(this,(function(r){"use strict";var e,t=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(e=e||__filename),function(r){var t,n,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,e){t=r,n=e}));var a,i,s,u,c,p=Object.assign({},o),f="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,m="";h?(m=d?require("path").dirname(m)+"/":__dirname+"/",c=()=>{u||(s=require("fs"),u=require("path"))},a=function(r,e){return c(),r=u.normalize(r),s.readFileSync(r,e?void 0:"utf8")},i=r=>{var e=a(r,!0);return e.buffer||(e=new Uint8Array(e)),e},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof G))throw r})),process.on("unhandledRejection",(function(r){throw r})),o.inspect=function(){return"[Emscripten Module object]"}):(l||d)&&(d?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),e&&(m=e),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},d&&(i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}));var _,v,y=o.print||console.log.bind(console),w=o.printErr||console.warn.bind(console);Object.assign(o,p),p=null,o.arguments&&o.arguments,o.thisProgram&&(f=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(_=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&I("no native wasm support detected");var E=!1;function g(r,e){r||I(e)}var b,k,S,D,A,x,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function C(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&P)return P.decode(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}function F(r,e){return r?C(S,r,e):""}function M(r){b=r,o.HEAP8=k=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=S=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=A=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=x=new Float64Array(r)}o.INITIAL_MEMORY;var R,z,j=[],T=[],O=[],B=0,N=null;function I(r){o.onAbort&&o.onAbort(r),w(r="Aborted("+r+")"),E=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}function L(r){return r.startsWith("data:application/octet-stream;base64,")}function U(r){try{if(r==R&&_)return new Uint8Array(_);if(i)return i(r);throw"both async and sync fetching of the wasm failed"}catch(r){I(r)}}L(R="expatlib.wasm")||(z=R,R=o.locateFile?o.locateFile(z,m):m+z);var H={11534:r=>{var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},11752:r=>{var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},11964:r=>{var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function G(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function q(r){for(;r.length>0;)r.shift()(o)}var W=[];function J(r){try{return v.grow(r-b.byteLength+65535>>>16),M(v.buffer),1}catch(r){}}var V={};function X(){if(!X.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",_:f||"./this.program"};for(var e in V)void 0===V[e]?delete r[e]:r[e]=V[e];var t=[];for(var e in r)t.push(e+"="+r[e]);X.strings=t}return X.strings}var $=[null,[],[]];function Y(r,e){var t=$[r];0===e||10===e?((1===r?y:w)(C(t,0)),t.length=0):t.push(e)}var K={g:function(r,e,t,n){},j:function(){return Date.now()},c:function(){I("")},a:function(r,e,t){var n=function(r,e){var t;for(W.length=0,e>>=2;t=S[r++];)e+=105!=t&e,W.push(105==t?D[e]:x[e++>>1]),++e;return W}(e,t);return H[r].apply(null,n)},k:function(r,e,t){S.copyWithin(r,e,e+t)},e:function(r){var e,t,n=S.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),J(Math.min(o,(e=Math.max(r,i))+((t=65536)-e%t)%t)))return!0}return!1},h:function(r,e){var t=0;return X().forEach((function(n,o){var a=e+t;A[r+4*o>>2]=a,function(r,e,t){for(var n=0;n<r.length;++n)k[e++>>0]=r.charCodeAt(n);t||(k[e>>0]=0)}(n,a),t+=n.length+1})),0},i:function(r,e){var t=X();A[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),A[e>>2]=n,0},d:function(r){return 52},f:function(r,e,t,n){return 52},l:function(r,e,t,n,o){return 70},b:function(r,e,t,n){for(var o=0,a=0;a<t;a++){var i=A[e>>2],s=A[e+4>>2];e+=8;for(var u=0;u<s;u++)Y(r,S[i+u]);o+=s}return A[n>>2]=o,0}};!function(){var r={a:K};function e(r,e){var t,n=r.exports;o.asm=n,M((v=o.asm.m).buffer),o.asm.G,t=o.asm.n,T.unshift(t),function(r){if(B--,o.monitorRunDependencies&&o.monitorRunDependencies(B),0==B&&N){var e=N;N=null,e()}}()}function t(r){e(r.instance)}function a(e){return(_||!l&&!d||"function"!=typeof fetch?Promise.resolve().then((function(){return U(R)})):fetch(R,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+R+"'";return r.arrayBuffer()})).catch((function(){return U(R)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){w("failed to asynchronously prepare wasm: "+r),I(r)}))}if(B++,o.monitorRunDependencies&&o.monitorRunDependencies(B),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return w("Module.instantiateWasm callback failed with error: "+r),!1}(_||"function"!=typeof WebAssembly.instantiateStreaming||L(R)||h||"function"!=typeof fetch?a(t):fetch(R,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return w("wasm streaming compile failed: "+r),w("falling back to ArrayBuffer instantiation"),a(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var Q,Z=o._emscripten_bind_CExpat_CExpat_0=function(){return(Z=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},rr=o._emscripten_bind_CExpat_version_0=function(){return(rr=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},er=o._emscripten_bind_CExpat_create_0=function(){return(er=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},tr=o._emscripten_bind_CExpat_destroy_0=function(){return(tr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},nr=o._emscripten_bind_CExpat_parse_1=function(){return(nr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},or=o._emscripten_bind_CExpat_tag_0=function(){return(or=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},ar=o._emscripten_bind_CExpat_attrs_0=function(){return(ar=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},ir=o._emscripten_bind_CExpat_content_0=function(){return(ir=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},sr=o._emscripten_bind_CExpat_startElement_0=function(){return(sr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},ur=o._emscripten_bind_CExpat_endElement_0=function(){return(ur=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},cr=o._emscripten_bind_CExpat_characterData_0=function(){return(cr=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},pr=o._emscripten_bind_CExpat___destroy___0=function(){return(pr=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},fr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(fr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},lr=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(lr=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},dr=o._emscripten_bind_CExpatJS_startElement_0=function(){return(dr=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},hr=o._emscripten_bind_CExpatJS_endElement_0=function(){return(hr=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},mr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(mr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},_r=o._emscripten_bind_CExpatJS___destroy___0=function(){return(_r=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function vr(r){function e(){Q||(Q=!0,o.calledRun=!0,E||(q(T),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),O.unshift(r);var r;q(O)}()))}B>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),j.unshift(r);var r;q(j)}(),B>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},o.___start_em_js=11436,o.___stop_em_js=11534,N=function r(){Q||vr(),Q||(N=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function yr(){}function wr(r){return(r||yr).__cache__}function Er(r,e){var t=wr(e),n=t[r];return n||((n=Object.create((e||yr).prototype)).ptr=r,t[r]=n)}vr(),yr.prototype=Object.create(yr.prototype),yr.prototype.constructor=yr,yr.prototype.__class__=yr,yr.__cache__={},o.WrapperObject=yr,o.getCache=wr,o.wrapPointer=Er,o.castObject=function(r,e){return Er(r.ptr,e)},o.NULL=Er(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete wr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var gr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(gr.needed){for(var r=0;r<gr.temps.length;r++)o._free(gr.temps[r]);gr.temps.length=0,o._free(gr.buffer),gr.buffer=0,gr.size+=gr.needed,gr.needed=0}gr.buffer||(gr.size+=128,gr.buffer=o._malloc(gr.size),g(gr.buffer)),gr.pos=0},alloc:function(r,e){g(gr.buffer);var t,n=e.BYTES_PER_ELEMENT,a=r.length*n;return a=a+7&-8,gr.pos+a>=gr.size?(g(a>0),gr.needed+=a,t=o._malloc(a),gr.temps.push(t)):(t=gr.buffer+gr.pos,gr.pos+=a),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function br(r){if("string"==typeof r){var e=(n=r,i=a>0?a:function(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}(n)+1,s=new Array(i),u=function(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)),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}(n,s,0,s.length),o&&(s.length=u),s),t=gr.alloc(e,k);return gr.copy(e,k,t),t}var n,o,a,i,s,u;return r}function kr(){this.ptr=Z(),wr(kr)[this.ptr]=this}function Sr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Dr(){this.ptr=lr(),wr(Dr)[this.ptr]=this}return kr.prototype=Object.create(yr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},o.CExpat=kr,kr.prototype.version=kr.prototype.version=function(){var r=this.ptr;return F(rr(r))},kr.prototype.create=kr.prototype.create=function(){var r=this.ptr;return!!er(r)},kr.prototype.destroy=kr.prototype.destroy=function(){var r=this.ptr;tr(r)},kr.prototype.parse=kr.prototype.parse=function(r){var e=this.ptr;return gr.prepare(),r=r&&"object"==typeof r?r.ptr:br(r),!!nr(e,r)},kr.prototype.tag=kr.prototype.tag=function(){var r=this.ptr;return F(or(r))},kr.prototype.attrs=kr.prototype.attrs=function(){var r=this.ptr;return F(ar(r))},kr.prototype.content=kr.prototype.content=function(){var r=this.ptr;return F(ir(r))},kr.prototype.startElement=kr.prototype.startElement=function(){var r=this.ptr;sr(r)},kr.prototype.endElement=kr.prototype.endElement=function(){var r=this.ptr;ur(r)},kr.prototype.characterData=kr.prototype.characterData=function(){var r=this.ptr;cr(r)},kr.prototype.__destroy__=kr.prototype.__destroy__=function(){var r=this.ptr;pr(r)},Sr.prototype=Object.create(yr.prototype),Sr.prototype.constructor=Sr,Sr.prototype.__class__=Sr,Sr.__cache__={},o.VoidPtr=Sr,Sr.prototype.__destroy__=Sr.prototype.__destroy__=function(){var r=this.ptr;fr(r)},Dr.prototype=Object.create(kr.prototype),Dr.prototype.constructor=Dr,Dr.prototype.__class__=Dr,Dr.__cache__={},o.CExpatJS=Dr,Dr.prototype.startElement=Dr.prototype.startElement=function(){var r=this.ptr;dr(r)},Dr.prototype.endElement=Dr.prototype.endElement=function(){var r=this.ptr;hr(r)},Dr.prototype.characterData=Dr.prototype.characterData=function(){var r=this.ptr;mr(r)},Dr.prototype.__destroy__=Dr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},r.ready}),n=Object.freeze({__proto__:null,default:t});let o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function a(r){if(!arguments.length)return o;const e=o;return o=r,e}let i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:"undefined"!=typeof __filename?__filename:"undefined"!=typeof document&&document.currentScript?document.currentScript.src:"";i=i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1);const s={};async function u(r,e,t,n){return s[e]||(s[e]=async function(r,e,t,n){const o=r.default||r,s=`${function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(t||a()||i||".","/")}/${function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(`${e}.wasm`,"/")}`;n||(n=await("object"==typeof process&&"function"==typeof require?async function(r){return require("fs/promises").readFile(r,void 0)}(s):async function(r){return fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()})).catch((r=>{throw r}))}(s)));return await o({wasm:n})}(r,e,t,n)),s[e]}class c{constructor(r,e){this.tag=r,this.attrs=e,this._content=""}get content(){return this._content}appendContent(r){this._content+=r}}function p(r,e,t,o){return u(n,"expatlib",t,o).then((t=>{const n=new t.CExpatJS;n.startElement=function(){e.startElement(this.tag(),function(r){const e={},t=r,n=`${String.fromCharCode(1)}`,o=`${n}${n}`;return t.split(o).filter((r=>!!r)).forEach((r=>{const t=r.split(n);e[t[0]]=t[1]})),e}(this.attrs()))},n.endElement=function(){e.endElement(this.tag())},n.characterData=function(){e.characterData(this.content())},n.create();const o=n.parse(r);return n.destroy(),t.destroy(n),o}))}var f=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(r=r||__filename),function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var a,i,s,u,c,p,f=Object.assign({},o),l="./this.program",d=(r,e)=>{throw e},h="object"==typeof window,m="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";_?(v=m?require("path").dirname(v)+"/":__dirname+"/",p=()=>{c||(u=require("fs"),c=require("path"))},a=function(r,e){return p(),r=c.normalize(r),u.readFileSync(r,e?void 0:"utf8")},s=r=>{var e=a(r,!0);return e.buffer||(e=new Uint8Array(e)),e},i=(r,e,t)=>{p(),r=c.normalize(r),u.readFile(r,(function(r,n){r?t(r):e(n.buffer)}))},process.argv.length>1&&(l=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof rr))throw r})),process.on("unhandledRejection",(function(r){throw r})),d=(r,e)=>{if(U())throw process.exitCode=r,e;!function(r){if(r instanceof rr)return;E("exiting due to exception: "+r)}(e),process.exit(r)},o.inspect=function(){return"[Emscripten Module object]"}):(h||m)&&(m?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),r&&(v=r),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},m&&(s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),i=(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 y,w=o.print||console.log.bind(console),E=o.printErr||console.warn.bind(console);Object.assign(o,f),f=null,o.arguments&&o.arguments,o.thisProgram&&(l=o.thisProgram),o.quit&&(d=o.quit),o.wasmBinary&&(y=o.wasmBinary);var g,b=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&J("no native wasm support detected");var k=!1;function S(r,e){r||J(e)}var D,A,x,P,C,F,M,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&R)return R.decode(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}function j(r,e){return r?z(x,r,e):""}function T(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 O(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}function B(r){D=r,o.HEAP8=A=new Int8Array(r),o.HEAP16=P=new Int16Array(r),o.HEAP32=C=new Int32Array(r),o.HEAPU8=x=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=F=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=M=new Float64Array(r)}o.INITIAL_MEMORY;var N=[],I=[],L=[];function U(){return b}var H=0,G=null;function q(r){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function W(r){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&G){var e=G;G=null,e()}}function J(r){o.onAbort&&o.onAbort(r),E(r="Aborted("+r+")"),k=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var V,X,$,Y;function K(r){return r.startsWith("data:application/octet-stream;base64,")}function Q(r){try{if(r==V&&y)return new Uint8Array(y);if(s)return s(r);throw"both async and sync fetching of the wasm failed"}catch(r){J(r)}}K(V="graphvizlib.wasm")||(X=V,V=o.locateFile?o.locateFile(X,v):v+X);var Z={163520:(r,e)=>{var t=j(r),n=j(e);ur.createPath("/",tr.dirname(t)),ur.writeFile(tr.join("/",t),n)}};function rr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function er(r){for(;r.length>0;)r.shift()(o)}var tr={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=tr.isAbs(r),t="/"===r.substr(-1);return(r=tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=tr.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=tr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments,0);return tr.normalize(r.join("/"))},join2:(r,e)=>tr.normalize(r+"/"+e)};var nr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:ur.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=tr.isAbs(n)}return(e?"/":"")+(r=tr.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=nr.resolve(r).substr(1),e=nr.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("/")}};function or(r,e,t){var n=t>0?t:O(r)+1,o=new Array(n),a=T(r,o,0,o.length);return e&&(o.length=a),o}var ar={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){ar.ttys[r]={input:[],output:[],ops:e},ur.registerDevice(r,ar.stream_ops)},stream_ops:{open:function(r){var e=ar.ttys[r.node.rdev];if(!e)throw new ur.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ur.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 ur.ErrnoError(29)}if(void 0===s&&0===a)throw new ur.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ur.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new ur.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(_){var t=Buffer.alloc(256),n=0;try{n=u.readSync(process.stdin.fd,t,0,256,-1)}catch(r){if(!r.toString().includes("EOF"))throw r;n=0}e=n>0?t.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;r.input=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(w(z(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(w(z(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(E(z(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(E(z(r.output,0)),r.output=[])}}};function ir(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=Pr(65536,r);return e?(function(r,e){x.fill(0,r,r+e)}(e,r),e):0}var sr={ops_table:null,mount:function(r){return sr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(ur.isBlkdev(t)||ur.isFIFO(t))throw new ur.ErrnoError(63);sr.ops_table||(sr.ops_table={dir:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr,lookup:sr.node_ops.lookup,mknod:sr.node_ops.mknod,rename:sr.node_ops.rename,unlink:sr.node_ops.unlink,rmdir:sr.node_ops.rmdir,readdir:sr.node_ops.readdir,symlink:sr.node_ops.symlink},stream:{llseek:sr.stream_ops.llseek}},file:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr},stream:{llseek:sr.stream_ops.llseek,read:sr.stream_ops.read,write:sr.stream_ops.write,allocate:sr.stream_ops.allocate,mmap:sr.stream_ops.mmap,msync:sr.stream_ops.msync}},link:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr,readlink:sr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr},stream:ur.chrdev_stream_ops}});var o=ur.createNode(r,e,t,n);return ur.isDir(o.mode)?(o.node_ops=sr.ops_table.dir.node,o.stream_ops=sr.ops_table.dir.stream,o.contents={}):ur.isFile(o.mode)?(o.node_ops=sr.ops_table.file.node,o.stream_ops=sr.ops_table.file.stream,o.usedBytes=0,o.contents=null):ur.isLink(o.mode)?(o.node_ops=sr.ops_table.link.node,o.stream_ops=sr.ops_table.link.stream):ur.isChrdev(o.mode)&&(o.node_ops=sr.ops_table.chrdev.node,o.stream_ops=sr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(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:function(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:function(r){var e={};return e.dev=ur.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,ur.isDir(r.mode)?e.size=4096:ur.isFile(r.mode)?e.size=r.usedBytes:ur.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:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&sr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw ur.genericErrors[44]},mknod:function(r,e,t,n){return sr.createNode(r,e,t,n)},rename:function(r,e,t){if(ur.isDir(r.mode)){var n;try{n=ur.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new ur.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:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=ur.lookupNode(r,e);for(var n in t.contents)throw new ur.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=sr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!ur.isLink(r.mode))throw new ur.ErrnoError(28);return r.link}},stream_ops:{read:function(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:function(r,e,t,n,o,a){if(e.buffer===A.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(sr.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ur.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ur.ErrnoError(28);return n},allocate:function(r,e,t){sr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==D){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),i=!0,!(a=ir(e)))throw new ur.ErrnoError(48);A.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);return 2&o||sr.stream_ops.write(r,e,0,n,t,!1),0}}};var ur={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=nr.resolve(ur.cwd(),r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ur.ErrnoError(32);for(var t=tr.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=ur.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&e.parent)break;if(n=ur.lookupNode(n,t[a]),o=tr.join2(o,t[a]),ur.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;ur.isLink(n.mode);){var u=ur.readlink(o);if(o=nr.resolve(tr.dirname(o),u),n=ur.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new ur.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(ur.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)%ur.nameTable.length},hashAddNode:r=>{var e=ur.hashName(r.parent.id,r.name);r.name_next=ur.nameTable[e],ur.nameTable[e]=r},hashRemoveNode:r=>{var e=ur.hashName(r.parent.id,r.name);if(ur.nameTable[e]===r)ur.nameTable[e]=r.name_next;else for(var t=ur.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=ur.mayLookup(r);if(t)throw new ur.ErrnoError(t,r);for(var n=ur.hashName(r.id,e),o=ur.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ur.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new ur.FSNode(r,e,t,n);return ur.hashAddNode(o),o},destroyNode:r=>{ur.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),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=ur.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ur.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=ur.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{ur.lookupNode(r,e);return 20}catch(r){}return ur.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=ur.lookupNode(r,e)}catch(r){return r.errno}var o=ur.nodePermissions(r,"wx");if(o)return o;if(t){if(!ur.isDir(n.mode))return 54;if(ur.isRoot(n)||ur.getPath(n)===ur.cwd())return 10}else if(ur.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ur.isLink(r.mode)?32:ur.isDir(r.mode)&&("r"!==ur.flagsToPermissionString(e)||512&e)?31:ur.nodePermissions(r,ur.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=ur.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!ur.streams[t])return t;throw new ur.ErrnoError(33)},getStream:r=>ur.streams[r],createStream:(r,e,t)=>{ur.FSStream||(ur.FSStream=function(){this.shared={}},ur.FSStream.prototype={},Object.defineProperties(ur.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new ur.FSStream,r);var n=ur.nextfd(e,t);return r.fd=n,ur.streams[n]=r,r},closeStream:r=>{ur.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=ur.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new ur.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{ur.devices[r]={stream_ops:e}},getDevice:r=>ur.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),ur.syncFSRequests++,ur.syncFSRequests>1&&E("warning: "+ur.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=ur.getMounts(ur.root.mount),n=0;function o(r){return ur.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&&ur.root)throw new ur.ErrnoError(10);if(!o&&!a){var i=ur.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ur.isMountpoint(n))throw new ur.ErrnoError(10);if(!ur.isDir(n.mode))throw new ur.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?ur.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=ur.lookupPath(r,{follow_mount:!1});if(!ur.isMountpoint(e.node))throw new ur.ErrnoError(28);var t=e.node,n=t.mounted,o=ur.getMounts(n);Object.keys(ur.nameTable).forEach((r=>{for(var e=ur.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ur.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=ur.lookupPath(r,{parent:!0}).node,o=tr.basename(r);if(!o||"."===o||".."===o)throw new ur.ErrnoError(28);var a=ur.mayCreate(n,o);if(a)throw new ur.ErrnoError(a);if(!n.node_ops.mknod)throw new ur.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ur.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ur.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{ur.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ur.mknod(r,e,t)),symlink:(r,e)=>{if(!nr.resolve(r))throw new ur.ErrnoError(44);var t=ur.lookupPath(e,{parent:!0}).node;if(!t)throw new ur.ErrnoError(44);var n=tr.basename(e),o=ur.mayCreate(t,n);if(o)throw new ur.ErrnoError(o);if(!t.node_ops.symlink)throw new ur.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=tr.dirname(r),a=tr.dirname(e),i=tr.basename(r),s=tr.basename(e);if(t=ur.lookupPath(r,{parent:!0}).node,n=ur.lookupPath(e,{parent:!0}).node,!t||!n)throw new ur.ErrnoError(44);if(t.mount!==n.mount)throw new ur.ErrnoError(75);var u,c=ur.lookupNode(t,i),p=nr.relative(r,a);if("."!==p.charAt(0))throw new ur.ErrnoError(28);if("."!==(p=nr.relative(e,o)).charAt(0))throw new ur.ErrnoError(55);try{u=ur.lookupNode(n,s)}catch(r){}if(c!==u){var f=ur.isDir(c.mode),l=ur.mayDelete(t,i,f);if(l)throw new ur.ErrnoError(l);if(l=u?ur.mayDelete(n,s,f):ur.mayCreate(n,s))throw new ur.ErrnoError(l);if(!t.node_ops.rename)throw new ur.ErrnoError(63);if(ur.isMountpoint(c)||u&&ur.isMountpoint(u))throw new ur.ErrnoError(10);if(n!==t&&(l=ur.nodePermissions(t,"w")))throw new ur.ErrnoError(l);ur.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{ur.hashAddNode(c)}}},rmdir:r=>{var e=ur.lookupPath(r,{parent:!0}).node,t=tr.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!0);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.rmdir)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.rmdir(e,t),ur.destroyNode(n)},readdir:r=>{var e=ur.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ur.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=ur.lookupPath(r,{parent:!0}).node;if(!e)throw new ur.ErrnoError(44);var t=tr.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!1);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.unlink)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.unlink(e,t),ur.destroyNode(n)},readlink:r=>{var e=ur.lookupPath(r).node;if(!e)throw new ur.ErrnoError(44);if(!e.node_ops.readlink)throw new ur.ErrnoError(28);return nr.resolve(ur.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=ur.lookupPath(r,{follow:!e}).node;if(!t)throw new ur.ErrnoError(44);if(!t.node_ops.getattr)throw new ur.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ur.stat(r,!0),chmod:(r,e,t)=>{var n;"string"==typeof r?n=ur.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new ur.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{ur.chmod(r,e,!0)},fchmod:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);ur.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;"string"==typeof r?o=ur.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new ur.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{ur.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=ur.getStream(r);if(!n)throw new ur.ErrnoError(8);ur.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new ur.ErrnoError(28);var t;"string"==typeof r?t=ur.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new ur.ErrnoError(63);if(ur.isDir(t.mode))throw new ur.ErrnoError(31);if(!ur.isFile(t.mode))throw new ur.ErrnoError(28);var n=ur.nodePermissions(t,"w");if(n)throw new ur.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);if(0==(2097155&t.flags))throw new ur.ErrnoError(28);ur.truncate(t.node,e)},utime:(r,e,t)=>{var n=ur.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new ur.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?ur.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=tr.normalize(r);try{n=ur.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var a=!1;if(64&e)if(n){if(128&e)throw new ur.ErrnoError(20)}else n=ur.mknod(r,t,0),a=!0;if(!n)throw new ur.ErrnoError(44);if(ur.isChrdev(n.mode)&&(e&=-513),65536&e&&!ur.isDir(n.mode))throw new ur.ErrnoError(54);if(!a){var i=ur.mayOpen(n,e);if(i)throw new ur.ErrnoError(i)}512&e&&!a&&ur.truncate(n,0),e&=-131713;var s=ur.createStream({node:n,path:ur.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&e||(ur.readFiles||(ur.readFiles={}),r in ur.readFiles||(ur.readFiles[r]=1)),s},close:r=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{ur.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ur.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ur.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 ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(1==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.read)throw new ur.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ur.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 ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(0==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.write)throw new ur.ErrnoError(28);r.seekable&&1024&r.flags&&ur.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new ur.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(ur.isClosed(r))throw new ur.ErrnoError(8);if(e<0||t<=0)throw new ur.ErrnoError(28);if(0==(2097155&r.flags))throw new ur.ErrnoError(8);if(!ur.isFile(r.node.mode)&&!ur.isDir(r.node.mode))throw new ur.ErrnoError(43);if(!r.stream_ops.allocate)throw new ur.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 ur.ErrnoError(2);if(1==(2097155&r.flags))throw new ur.ErrnoError(2);if(!r.stream_ops.mmap)throw new ur.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&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 ur.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=ur.open(r,e.flags),o=ur.stat(r).size,a=new Uint8Array(o);return ur.read(n,a,0,o,0),"utf8"===e.encoding?t=z(a,0):"binary"===e.encoding&&(t=a),ur.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=ur.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(O(e)+1),a=T(e,o,0,o.length);ur.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ur.write(n,e,0,e.byteLength,void 0,t.canOwn)}ur.close(n)},cwd:()=>ur.currentPath,chdir:r=>{var e=ur.lookupPath(r,{follow:!0});if(null===e.node)throw new ur.ErrnoError(44);if(!ur.isDir(e.node.mode))throw new ur.ErrnoError(54);var t=ur.nodePermissions(e.node,"x");if(t)throw new ur.ErrnoError(t);ur.currentPath=e.path},createDefaultDirectories:()=>{ur.mkdir("/tmp"),ur.mkdir("/home"),ur.mkdir("/home/web_user")},createDefaultDevices:()=>{ur.mkdir("/dev"),ur.registerDevice(ur.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),ur.mkdev("/dev/null",ur.makedev(1,3)),ar.register(ur.makedev(5,0),ar.default_tty_ops),ar.register(ur.makedev(6,0),ar.default_tty1_ops),ur.mkdev("/dev/tty",ur.makedev(5,0)),ur.mkdev("/dev/tty1",ur.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}if(_)try{var e=require("crypto");return()=>e.randomBytes(1)[0]}catch(r){}return()=>J("randomDevice")}();ur.createDevice("/dev","random",r),ur.createDevice("/dev","urandom",r),ur.mkdir("/dev/shm"),ur.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ur.mkdir("/proc");var r=ur.mkdir("/proc/self");ur.mkdir("/proc/self/fd"),ur.mount({mount:()=>{var e=ur.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=ur.getStream(t);if(!n)throw new ur.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?ur.createDevice("/dev","stdin",o.stdin):ur.symlink("/dev/tty","/dev/stdin"),o.stdout?ur.createDevice("/dev","stdout",null,o.stdout):ur.symlink("/dev/tty","/dev/stdout"),o.stderr?ur.createDevice("/dev","stderr",null,o.stderr):ur.symlink("/dev/tty1","/dev/stderr"),ur.open("/dev/stdin",0),ur.open("/dev/stdout",1),ur.open("/dev/stderr",1)},ensureErrnoError:()=>{ur.ErrnoError||(ur.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},ur.ErrnoError.prototype=new Error,ur.ErrnoError.prototype.constructor=ur.ErrnoError,[44].forEach((r=>{ur.genericErrors[r]=new ur.ErrnoError(r),ur.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{ur.ensureErrnoError(),ur.nameTable=new Array(4096),ur.mount(sr,{},"/"),ur.createDefaultDirectories(),ur.createDefaultDevices(),ur.createSpecialDirectories(),ur.filesystems={MEMFS:sr}},init:(r,e,t)=>{ur.init.initialized=!0,ur.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,ur.createStandardStreams()},quit:()=>{ur.init.initialized=!1;for(var r=0;r<ur.streams.length;r++){var e=ur.streams[r];e&&ur.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=ur.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=ur.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=ur.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=tr.basename(r),n=ur.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:ur.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=tr.join2(r,a);try{ur.mkdir(i)}catch(r){}r=i}}return i},createFile:(r,e,t,n,o)=>{var a=tr.join2("string"==typeof r?r:ur.getPath(r),e),i=ur.getMode(n,o);return ur.create(a,i)},createDataFile:(r,e,t,n,o,a)=>{var i=e;r&&(r="string"==typeof r?r:ur.getPath(r),i=e?tr.join2(r,e):r);var s=ur.getMode(n,o),u=ur.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),p=0,f=t.length;p<f;++p)c[p]=t.charCodeAt(p);t=c}ur.chmod(u,146|s);var l=ur.open(u,577);ur.write(l,t,0,t.length,0,a),ur.close(l),ur.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=tr.join2("string"==typeof r?r:ur.getPath(r),e),a=ur.getMode(!!t,!!n);ur.createDevice.major||(ur.createDevice.major=64);var i=ur.makedev(ur.createDevice.major++,0);return ur.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 ur.ErrnoError(29)}if(void 0===u&&0===i)throw new ur.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 ur.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),ur.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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=or(a(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new ur.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.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]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=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=n);var s=this;s.setDataGetter((r=>{var e=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==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 "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):or(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=ur.createFile(r,e,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function p(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(u.stream_ops).forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return ur.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(ur.forceLoadFile(u),p(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{ur.forceLoadFile(u);var a=ir(e);if(!a)throw new ur.ErrnoError(48);return p(r,A,a,e,t),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,a,s,u,c,p)=>{var f=e?nr.resolve(tr.join2(r,e)):r;function l(t){function i(t){p&&p(),u||ur.createDataFile(r,e,t,n,o,c),a&&a(),W()}Browser.handledByPreloadPlugin(t,f,i,(()=>{s&&s(),W()}))||i(t)}q(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;i(r,(t=>{S(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&W()}),(e=>{if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&q()}(t,(r=>l(r)),s):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(ur.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ur.DB_STORE_NAME],"readwrite"),a=n.objectStore(ur.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=a.put(ur.analyzePath(r).object.contents,r);e.onsuccess=()=>{++i+s==u&&c()},e.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([ur.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var i=a.objectStore(ur.DB_STORE_NAME),s=0,u=0,c=r.length;function p(){0==u?e():t()}r.forEach((r=>{var e=i.get(r);e.onsuccess=()=>{ur.analyzePath(r).exists&&ur.unlink(r),ur.createDataFile(tr.dirname(r),tr.basename(r),e.result,!0,!0,!0),++s+u==c&&p()},e.onerror=()=>{u++,s+u==c&&p()}})),a.onerror=t},o.onerror=t}},cr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(tr.isAbs(e))return e;var n;if(-100===r)n=ur.cwd();else{var o=ur.getStream(r);if(!o)throw new ur.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new ur.ErrnoError(44);return n}return tr.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&tr.normalize(e)!==tr.normalize(ur.getPath(r.node)))return-54;throw r}return C[t>>2]=n.dev,C[t+8>>2]=n.ino,C[t+12>>2]=n.mode,C[t+16>>2]=n.nlink,C[t+20>>2]=n.uid,C[t+24>>2]=n.gid,C[t+28>>2]=n.rdev,Y=[n.size>>>0,($=n.size,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+40>>2]=Y[0],C[t+44>>2]=Y[1],C[t+48>>2]=4096,C[t+52>>2]=n.blocks,Y=[Math.floor(n.atime.getTime()/1e3)>>>0,($=Math.floor(n.atime.getTime()/1e3),+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+56>>2]=Y[0],C[t+60>>2]=Y[1],C[t+64>>2]=0,Y=[Math.floor(n.mtime.getTime()/1e3)>>>0,($=Math.floor(n.mtime.getTime()/1e3),+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+72>>2]=Y[0],C[t+76>>2]=Y[1],C[t+80>>2]=0,Y=[Math.floor(n.ctime.getTime()/1e3)>>>0,($=Math.floor(n.ctime.getTime()/1e3),+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+88>>2]=Y[0],C[t+92>>2]=Y[1],C[t+96>>2]=0,Y=[n.ino>>>0,($=n.ino,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+104>>2]=Y[0],C[t+108>>2]=Y[1],0},doMsync:function(r,e,t,n,o){var a=x.slice(r,r+t);ur.msync(e,a,o,t,n)},varargs:void 0,get:function(){return cr.varargs+=4,C[cr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var e=ur.getStream(r);if(!e)throw new ur.ErrnoError(8);return e}};var pr=[];function fr(r){try{return g.grow(r-D.byteLength+65535>>>16),B(g.buffer),1}catch(r){}}var lr={};function dr(){if(!dr.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",_:l||"./this.program"};for(var e in lr)void 0===lr[e]?delete r[e]:r[e]=lr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);dr.strings=t}return dr.strings}var hr=function(r,e){var t;t=r,U()||(o.onExit&&o.onExit(t),k=!0),d(t,new rr(t))};var mr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=ur.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},_r=365,vr=146;Object.defineProperties(mr.prototype,{read:{get:function(){return(this.mode&_r)===_r},set:function(r){r?this.mode|=_r:this.mode&=-366}},write:{get:function(){return(this.mode&vr)===vr},set:function(r){r?this.mode|=vr:this.mode&=-147}},isFolder:{get:function(){return ur.isDir(this.mode)}},isDevice:{get:function(){return ur.isChrdev(this.mode)}}}),ur.FSNode=mr,ur.staticInit();var yr={k:function(r,e,t,n){try{if(e=cr.getStr(e),e=cr.calculateAt(r,e),-8&t)return-28;var o=ur.lookupPath(e,{follow:!0}).node;if(!o)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&ur.nodePermissions(o,a)?-2:0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},f:function(r,e,t){cr.varargs=t;try{var n=cr.getStreamFromFD(r);switch(e){case 0:return(o=cr.get())<0?-28:ur.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=cr.get();return n.flags|=o,0;case 5:o=cr.get();return P[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,C[xr()>>2]=a,-1}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}var a},u:function(r,e){try{var t=cr.getStreamFromFD(r);return cr.doStat(ur.stat,t.path,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},v:function(r,e,t){cr.varargs=t;try{var n=cr.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=cr.get();return C[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=cr.get();return ur.ioctl(n,e,o);default:return-28}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},s:function(r,e,t,n){try{e=cr.getStr(e);var o=256&n,a=4096&n;return n&=-4353,e=cr.calculateAt(r,e,a),cr.doStat(o?ur.lstat:ur.stat,e,t)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},c:function(r,e,t,n){cr.varargs=n;try{e=cr.getStr(e),e=cr.calculateAt(r,e);var o=n?cr.get():0;return ur.open(e,t,o).fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},t:function(r,e){try{return r=cr.getStr(r),cr.doStat(ur.stat,r,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},n:function(r,e,t){try{return e=cr.getStr(e),e=cr.calculateAt(r,e),0===t?ur.unlink(e):512===t?ur.rmdir(e):J("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},d:function(){return Date.now()},i:function(){return true},o:function(r,e,t,n,o,a){try{var i=ur.getStream(n);if(!i)return-8;var s=ur.mmap(i,r,o,e,t),u=s.ptr;return C[a>>2]=s.allocated,u}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o,a){try{var i=ur.getStream(o);i&&(2&t&&cr.doMsync(r,i,e,n,a),ur.munmap(i))}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},a:function(){J("")},w:function(r,e,t){var n=function(r,e){var t;for(pr.length=0,e>>=2;t=x[r++];)e+=105!=t&e,pr.push(105==t?C[e]:M[e++>>1]),++e;return pr}(e,t);return Z[r].apply(null,n)},j:function(r,e,t){x.copyWithin(r,e,e+t)},m:function(r){var e,t,n=x.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),fr(Math.min(o,(e=Math.max(r,i))+((t=65536)-e%t)%t)))return!0}return!1},q:function(r,e){var t=0;return dr().forEach((function(n,o){var a=e+t;F[r+4*o>>2]=a,function(r,e,t){for(var n=0;n<r.length;++n)A[e++>>0]=r.charCodeAt(n);t||(A[e>>0]=0)}(n,a),t+=n.length+1})),0},r:function(r,e){var t=dr();F[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),F[e>>2]=n,0},e:hr,b:function(r){try{var e=cr.getStreamFromFD(r);return ur.close(e),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,a=0;a<t;a++){var i=F[e>>2],s=F[e+4>>2];e+=8;var u=ur.read(r,A,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(cr.getStreamFromFD(r),e,t);return F[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var a=(u=t)+2097152>>>0<4194305-!!(s=e)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=cr.getStreamFromFD(r);return ur.llseek(i,a,n),Y=[i.position>>>0,($=i.position,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[o>>2]=Y[0],C[o+4>>2]=Y[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}var s,u},h:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,a=0;a<t;a++){var i=F[e>>2],s=F[e+4>>2];e+=8;var u=ur.write(r,A,i,s,n);if(u<0)return-1;o+=u}return o}(cr.getStreamFromFD(r),e,t);return F[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}}};!function(){var r={a:yr};function e(r,e){var t,n=r.exports;o.asm=n,B((g=o.asm.x).buffer),o.asm.G,t=o.asm.y,I.unshift(t),W()}function t(r){e(r.instance)}function a(e){return(y||!h&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(V)})):fetch(V,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+V+"'";return r.arrayBuffer()})).catch((function(){return Q(V)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){E("failed to asynchronously prepare wasm: "+r),J(r)}))}if(q(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return E("Module.instantiateWasm callback failed with error: "+r),!1}(y||"function"!=typeof WebAssembly.instantiateStreaming||K(V)||_||"function"!=typeof fetch?a(t):fetch(V,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return E("wasm streaming compile failed: "+r),E("falling back to ArrayBuffer instantiation"),a(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.y).apply(null,arguments)};var wr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(wr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.z).apply(null,arguments)},Er=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(Er=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.A).apply(null,arguments)},gr=o._emscripten_bind_Graphviz_version_0=function(){return(gr=o._emscripten_bind_Graphviz_version_0=o.asm.B).apply(null,arguments)},br=o._emscripten_bind_Graphviz_lastError_0=function(){return(br=o._emscripten_bind_Graphviz_lastError_0=o.asm.C).apply(null,arguments)},kr=o._emscripten_bind_Graphviz_layout_3=function(){return(kr=o._emscripten_bind_Graphviz_layout_3=o.asm.D).apply(null,arguments)},Sr=o._emscripten_bind_Graphviz_createFile_2=function(){return(Sr=o._emscripten_bind_Graphviz_createFile_2=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_Graphviz___destroy___0=function(){return(Dr=o._emscripten_bind_Graphviz___destroy___0=o.asm.F).apply(null,arguments)};o._free=function(){return(o._free=o.asm.H).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.I).apply(null,arguments)};var Ar,xr=o.___errno_location=function(){return(xr=o.___errno_location=o.asm.J).apply(null,arguments)},Pr=o._emscripten_builtin_memalign=function(){return(Pr=o._emscripten_builtin_memalign=o.asm.K).apply(null,arguments)};function Cr(r){function e(){Ar||(Ar=!0,o.calledRun=!0,k||(o.noFSInit||ur.init.initialized||ur.init(),ur.ignorePermissions=!1,er(I),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),L.unshift(r);var r;er(L)}()))}H>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;er(N)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.___start_em_js=163664,o.___stop_em_js=163762,G=function r(){Ar||Cr(),Ar||(G=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Fr(){}function Mr(r){return(r||Fr).__cache__}function Rr(r,e){var t=Mr(e),n=t[r];return n||((n=Object.create((e||Fr).prototype)).ptr=r,t[r]=n)}Cr(),Fr.prototype=Object.create(Fr.prototype),Fr.prototype.constructor=Fr,Fr.prototype.__class__=Fr,Fr.__cache__={},o.WrapperObject=Fr,o.getCache=Mr,o.wrapPointer=Rr,o.castObject=function(r,e){return Rr(r.ptr,e)},o.NULL=Rr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Mr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var zr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(zr.needed){for(var r=0;r<zr.temps.length;r++)o._free(zr.temps[r]);zr.temps.length=0,o._free(zr.buffer),zr.buffer=0,zr.size+=zr.needed,zr.needed=0}zr.buffer||(zr.size+=128,zr.buffer=o._malloc(zr.size),S(zr.buffer)),zr.pos=0},alloc:function(r,e){S(zr.buffer);var t,n=e.BYTES_PER_ELEMENT,a=r.length*n;return a=a+7&-8,zr.pos+a>=zr.size?(S(a>0),zr.needed+=a,t=o._malloc(a),zr.temps.push(t)):(t=zr.buffer+zr.pos,zr.pos+=a),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function jr(r){if("string"==typeof r){var e=or(r),t=zr.alloc(e,A);return zr.copy(e,A,t),t}return r}function Tr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Or(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=Er(r,e),Mr(Or)[this.ptr]=this}return Tr.prototype=Object.create(Fr.prototype),Tr.prototype.constructor=Tr,Tr.prototype.__class__=Tr,Tr.__cache__={},o.VoidPtr=Tr,Tr.prototype.__destroy__=Tr.prototype.__destroy__=function(){var r=this.ptr;wr(r)},Or.prototype=Object.create(Fr.prototype),Or.prototype.constructor=Or,Or.prototype.__class__=Or,Or.__cache__={},o.Graphviz=Or,Or.prototype.version=Or.prototype.version=function(){var r=this.ptr;return j(gr(r))},Or.prototype.lastError=Or.prototype.lastError=function(){var r=this.ptr;return j(br(r))},Or.prototype.layout=Or.prototype.layout=function(r,e,t){var n=this.ptr;return zr.prepare(),r=r&&"object"==typeof r?r.ptr:jr(r),e=e&&"object"==typeof e?e.ptr:jr(e),t=t&&"object"==typeof t?t.ptr:jr(t),j(kr(n,r,e,t))},Or.prototype.createFile=Or.prototype.createFile=function(r,e){var t=this.ptr;zr.prepare(),r=r&&"object"==typeof r?r.ptr:jr(r),e=e&&"object"==typeof e?e.ptr:jr(e),Sr(t,r,e)},Or.prototype.__destroy__=Or.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},e.ready}})(),l=Object.freeze({__proto__:null,default:f});function d(r){return{path:r.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg width="${r.width}" height="${r.height}"></svg>`}}function h(r,e){const t={images:[],files:[],...e};var n;[...t.files,...(n=t.images,n.map(d))].forEach((e=>r.createFile(e.path,e.data)))}const m={layout:(r,e="svg",t="dot",n)=>r?u(l,"graphvizlib",null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((o=>{const a=new o.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);h(a,n);const i=a.layout(r,e,t);if(o.destroy(a),!i)throw new Error(o.Graphviz.prototype.lastError());return i})):Promise.resolve(""),circo(r,e="svg",t){return this.layout(r,e,"circo",t)},dot(r,e="svg",t){return this.layout(r,e,"dot",t)},fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)},sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)},neato(r,e="svg",t){return this.layout(r,e,"neato",t)},osage(r,e="svg",t){return this.layout(r,e,"osage",t)},patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)},twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}};class _{constructor(r){this._wasm=r}layout(r,e="svg",t="dot",n){if(!r)return"";const o=new this._wasm.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);h(o,n);const a=o.layout(r,e,t);if(this._wasm.destroy(o),!a)throw new Error(this._wasm.Graphviz.prototype.lastError());return a}circo(r,e="svg",t){return this.layout(r,e,"circo",t)}dot(r,e="svg",t){return this.layout(r,e,"dot",t)}fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)}sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)}neato(r,e="svg",t){return this.layout(r,e,"neato",t)}osage(r,e="svg",t){return this.layout(r,e,"osage",t)}patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)}twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}}r.GraphvizSync=_,r.StackElement=c,r.StackParser=class{constructor(){this._stack=[]}parse(r,e,t){return p(r,this,e,t)}top(){return this._stack[this._stack.length-1]}startElement(r,e){const t=new c(r,e);return this._stack.push(t),t}endElement(r){return this._stack.pop()}characterData(r){this.top().appendContent(r)}},r.expatVersion=function(r,e){return u(n,"expatlib",r,e).then((r=>r.CExpat.prototype.version()))},r.graphviz=m,r.graphvizSync=function(r,e){return u(l,"graphvizlib",r,e).then((r=>new _(r)))},r.graphvizVersion=function(r,e){return u(l,"graphvizlib",r,e).then((r=>r.Graphviz.prototype.version()))},r.parse=p,r.wasmFolder=a,Object.defineProperty(r,"__esModule",{value:!0})}));
|
|
1
|
+
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["@hpcc-js/wasm"]={})}(this,(function(r){"use strict";var e,t=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(e=e||__filename),function(r){var t,n,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,e){t=r,n=e}));var a,i,s,u,c,p=Object.assign({},o),f="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,m="";h?(m=d?require("path").dirname(m)+"/":__dirname+"/",c=()=>{u||(s=require("fs"),u=require("path"))},a=function(r,e){return c(),r=u.normalize(r),s.readFileSync(r,e?void 0:"utf8")},i=r=>{var e=a(r,!0);return e.buffer||(e=new Uint8Array(e)),e},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof G))throw r})),process.on("unhandledRejection",(function(r){throw r})),o.inspect=function(){return"[Emscripten Module object]"}):(l||d)&&(d?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),e&&(m=e),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},d&&(i=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}));var _,v,y=o.print||console.log.bind(console),w=o.printErr||console.warn.bind(console);Object.assign(o,p),p=null,o.arguments&&o.arguments,o.thisProgram&&(f=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(_=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&I("no native wasm support detected");var E=!1;function g(r,e){r||I(e)}var b,k,S,D,A,x,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function C(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&P)return P.decode(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}function F(r,e){return r?C(S,r,e):""}function M(r){b=r,o.HEAP8=k=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=S=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=A=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=x=new Float64Array(r)}o.INITIAL_MEMORY;var R,z,j=[],T=[],O=[],B=0,N=null;function I(r){o.onAbort&&o.onAbort(r),w(r="Aborted("+r+")"),E=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}function L(r){return r.startsWith("data:application/octet-stream;base64,")}function U(r){try{if(r==R&&_)return new Uint8Array(_);if(i)return i(r);throw"both async and sync fetching of the wasm failed"}catch(r){I(r)}}L(R="expatlib.wasm")||(z=R,R=o.locateFile?o.locateFile(z,m):m+z);var H={11534:r=>{var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},11752:r=>{var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},11964:r=>{var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function G(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function q(r){for(;r.length>0;)r.shift()(o)}var W=[];function J(r){try{return v.grow(r-b.byteLength+65535>>>16),M(v.buffer),1}catch(r){}}var V={};function X(){if(!X.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",_:f||"./this.program"};for(var e in V)void 0===V[e]?delete r[e]:r[e]=V[e];var t=[];for(var e in r)t.push(e+"="+r[e]);X.strings=t}return X.strings}var $=[null,[],[]];function Y(r,e){var t=$[r];0===e||10===e?((1===r?y:w)(C(t,0)),t.length=0):t.push(e)}var K={g:function(r,e,t,n){},j:function(){return Date.now()},c:function(){I("")},a:function(r,e,t){var n=function(r,e){var t;for(W.length=0,e>>=2;t=S[r++];)e+=105!=t&e,W.push(105==t?D[e]:x[e++>>1]),++e;return W}(e,t);return H[r].apply(null,n)},k:function(r,e,t){S.copyWithin(r,e,e+t)},e:function(r){var e,t,n=S.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),J(Math.min(o,(e=Math.max(r,i))+((t=65536)-e%t)%t)))return!0}return!1},h:function(r,e){var t=0;return X().forEach((function(n,o){var a=e+t;A[r+4*o>>2]=a,function(r,e,t){for(var n=0;n<r.length;++n)k[e++>>0]=r.charCodeAt(n);t||(k[e>>0]=0)}(n,a),t+=n.length+1})),0},i:function(r,e){var t=X();A[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),A[e>>2]=n,0},d:function(r){return 52},f:function(r,e,t,n){return 52},l:function(r,e,t,n,o){return 70},b:function(r,e,t,n){for(var o=0,a=0;a<t;a++){var i=A[e>>2],s=A[e+4>>2];e+=8;for(var u=0;u<s;u++)Y(r,S[i+u]);o+=s}return A[n>>2]=o,0}};!function(){var r={a:K};function e(r,e){var t,n=r.exports;o.asm=n,M((v=o.asm.m).buffer),o.asm.G,t=o.asm.n,T.unshift(t),function(r){if(B--,o.monitorRunDependencies&&o.monitorRunDependencies(B),0==B&&N){var e=N;N=null,e()}}()}function t(r){e(r.instance)}function a(e){return(_||!l&&!d||"function"!=typeof fetch?Promise.resolve().then((function(){return U(R)})):fetch(R,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+R+"'";return r.arrayBuffer()})).catch((function(){return U(R)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){w("failed to asynchronously prepare wasm: "+r),I(r)}))}if(B++,o.monitorRunDependencies&&o.monitorRunDependencies(B),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return w("Module.instantiateWasm callback failed with error: "+r),!1}(_||"function"!=typeof WebAssembly.instantiateStreaming||L(R)||h||"function"!=typeof fetch?a(t):fetch(R,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return w("wasm streaming compile failed: "+r),w("falling back to ArrayBuffer instantiation"),a(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var Q,Z=o._emscripten_bind_CExpat_CExpat_0=function(){return(Z=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},rr=o._emscripten_bind_CExpat_version_0=function(){return(rr=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},er=o._emscripten_bind_CExpat_create_0=function(){return(er=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},tr=o._emscripten_bind_CExpat_destroy_0=function(){return(tr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},nr=o._emscripten_bind_CExpat_parse_1=function(){return(nr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},or=o._emscripten_bind_CExpat_tag_0=function(){return(or=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},ar=o._emscripten_bind_CExpat_attrs_0=function(){return(ar=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},ir=o._emscripten_bind_CExpat_content_0=function(){return(ir=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},sr=o._emscripten_bind_CExpat_startElement_0=function(){return(sr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},ur=o._emscripten_bind_CExpat_endElement_0=function(){return(ur=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},cr=o._emscripten_bind_CExpat_characterData_0=function(){return(cr=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},pr=o._emscripten_bind_CExpat___destroy___0=function(){return(pr=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},fr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(fr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},lr=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(lr=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},dr=o._emscripten_bind_CExpatJS_startElement_0=function(){return(dr=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},hr=o._emscripten_bind_CExpatJS_endElement_0=function(){return(hr=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},mr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(mr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},_r=o._emscripten_bind_CExpatJS___destroy___0=function(){return(_r=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function vr(r){function e(){Q||(Q=!0,o.calledRun=!0,E||(q(T),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),O.unshift(r);var r;q(O)}()))}B>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),j.unshift(r);var r;q(j)}(),B>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},o.___start_em_js=11436,o.___stop_em_js=11534,N=function r(){Q||vr(),Q||(N=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function yr(){}function wr(r){return(r||yr).__cache__}function Er(r,e){var t=wr(e),n=t[r];return n||((n=Object.create((e||yr).prototype)).ptr=r,t[r]=n)}vr(),yr.prototype=Object.create(yr.prototype),yr.prototype.constructor=yr,yr.prototype.__class__=yr,yr.__cache__={},o.WrapperObject=yr,o.getCache=wr,o.wrapPointer=Er,o.castObject=function(r,e){return Er(r.ptr,e)},o.NULL=Er(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete wr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var gr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(gr.needed){for(var r=0;r<gr.temps.length;r++)o._free(gr.temps[r]);gr.temps.length=0,o._free(gr.buffer),gr.buffer=0,gr.size+=gr.needed,gr.needed=0}gr.buffer||(gr.size+=128,gr.buffer=o._malloc(gr.size),g(gr.buffer)),gr.pos=0},alloc:function(r,e){g(gr.buffer);var t,n=e.BYTES_PER_ELEMENT,a=r.length*n;return a=a+7&-8,gr.pos+a>=gr.size?(g(a>0),gr.needed+=a,t=o._malloc(a),gr.temps.push(t)):(t=gr.buffer+gr.pos,gr.pos+=a),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function br(r){if("string"==typeof r){var e=(n=r,i=a>0?a:function(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}(n)+1,s=new Array(i),u=function(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)),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}(n,s,0,s.length),o&&(s.length=u),s),t=gr.alloc(e,k);return gr.copy(e,k,t),t}var n,o,a,i,s,u;return r}function kr(){this.ptr=Z(),wr(kr)[this.ptr]=this}function Sr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Dr(){this.ptr=lr(),wr(Dr)[this.ptr]=this}return kr.prototype=Object.create(yr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},o.CExpat=kr,kr.prototype.version=kr.prototype.version=function(){var r=this.ptr;return F(rr(r))},kr.prototype.create=kr.prototype.create=function(){var r=this.ptr;return!!er(r)},kr.prototype.destroy=kr.prototype.destroy=function(){var r=this.ptr;tr(r)},kr.prototype.parse=kr.prototype.parse=function(r){var e=this.ptr;return gr.prepare(),r=r&&"object"==typeof r?r.ptr:br(r),!!nr(e,r)},kr.prototype.tag=kr.prototype.tag=function(){var r=this.ptr;return F(or(r))},kr.prototype.attrs=kr.prototype.attrs=function(){var r=this.ptr;return F(ar(r))},kr.prototype.content=kr.prototype.content=function(){var r=this.ptr;return F(ir(r))},kr.prototype.startElement=kr.prototype.startElement=function(){var r=this.ptr;sr(r)},kr.prototype.endElement=kr.prototype.endElement=function(){var r=this.ptr;ur(r)},kr.prototype.characterData=kr.prototype.characterData=function(){var r=this.ptr;cr(r)},kr.prototype.__destroy__=kr.prototype.__destroy__=function(){var r=this.ptr;pr(r)},Sr.prototype=Object.create(yr.prototype),Sr.prototype.constructor=Sr,Sr.prototype.__class__=Sr,Sr.__cache__={},o.VoidPtr=Sr,Sr.prototype.__destroy__=Sr.prototype.__destroy__=function(){var r=this.ptr;fr(r)},Dr.prototype=Object.create(kr.prototype),Dr.prototype.constructor=Dr,Dr.prototype.__class__=Dr,Dr.__cache__={},o.CExpatJS=Dr,Dr.prototype.startElement=Dr.prototype.startElement=function(){var r=this.ptr;dr(r)},Dr.prototype.endElement=Dr.prototype.endElement=function(){var r=this.ptr;hr(r)},Dr.prototype.characterData=Dr.prototype.characterData=function(){var r=this.ptr;mr(r)},Dr.prototype.__destroy__=Dr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},r.ready}),n=Object.freeze({__proto__:null,default:t});let o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function a(r){if(!arguments.length)return o;const e=o;return o=r,e}let i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:"undefined"!=typeof __filename?__filename:"undefined"!=typeof document&&document.currentScript?document.currentScript.src:"";i=i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1);const s={};async function u(r,e,t,n){const o=`${function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(t||a()||i||".","/")}/${function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(`${e}.wasm`,"/")}`;return s[o]||(s[o]=async function(r,e,t){const n=r.default||r;t||(t=await("object"==typeof process&&"function"==typeof require?async function(r){return require("fs/promises").readFile(r,void 0)}(e):async function(r){return fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()})).catch((r=>{throw r}))}(e)));return await n({wasm:t})}(r,o,n)),s[o]}class c{constructor(r,e){this.tag=r,this.attrs=e,this._content=""}get content(){return this._content}appendContent(r){this._content+=r}}function p(r,e,t,o){return u(n,"expatlib",t,o).then((t=>{const n=new t.CExpatJS;n.startElement=function(){e.startElement(this.tag(),function(r){const e={},t=r,n=`${String.fromCharCode(1)}`,o=`${n}${n}`;return t.split(o).filter((r=>!!r)).forEach((r=>{const t=r.split(n);e[t[0]]=t[1]})),e}(this.attrs()))},n.endElement=function(){e.endElement(this.tag())},n.characterData=function(){e.characterData(this.content())},n.create();const o=n.parse(r);return n.destroy(),t.destroy(n),o}))}var f=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(r=r||__filename),function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var a,i,s,u,c,p,f=Object.assign({},o),l="./this.program",d=(r,e)=>{throw e},h="object"==typeof window,m="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";_?(v=m?require("path").dirname(v)+"/":__dirname+"/",p=()=>{c||(u=require("fs"),c=require("path"))},a=function(r,e){return p(),r=c.normalize(r),u.readFileSync(r,e?void 0:"utf8")},s=r=>{var e=a(r,!0);return e.buffer||(e=new Uint8Array(e)),e},i=(r,e,t)=>{p(),r=c.normalize(r),u.readFile(r,(function(r,n){r?t(r):e(n.buffer)}))},process.argv.length>1&&(l=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(r){if(!(r instanceof rr))throw r})),process.on("unhandledRejection",(function(r){throw r})),d=(r,e)=>{if(U())throw process.exitCode=r,e;!function(r){if(r instanceof rr)return;E("exiting due to exception: "+r)}(e),process.exit(r)},o.inspect=function(){return"[Emscripten Module object]"}):(h||m)&&(m?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),r&&(v=r),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},m&&(s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),i=(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 y,w=o.print||console.log.bind(console),E=o.printErr||console.warn.bind(console);Object.assign(o,f),f=null,o.arguments&&o.arguments,o.thisProgram&&(l=o.thisProgram),o.quit&&(d=o.quit),o.wasmBinary&&(y=o.wasmBinary);var g,b=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&J("no native wasm support detected");var k=!1;function S(r,e){r||J(e)}var D,A,x,P,C,F,M,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&R)return R.decode(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}function j(r,e){return r?z(x,r,e):""}function T(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 O(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}function B(r){D=r,o.HEAP8=A=new Int8Array(r),o.HEAP16=P=new Int16Array(r),o.HEAP32=C=new Int32Array(r),o.HEAPU8=x=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=F=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=M=new Float64Array(r)}o.INITIAL_MEMORY;var N=[],I=[],L=[];function U(){return b}var H=0,G=null;function q(r){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function W(r){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&G){var e=G;G=null,e()}}function J(r){o.onAbort&&o.onAbort(r),E(r="Aborted("+r+")"),k=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var V,X,$,Y;function K(r){return r.startsWith("data:application/octet-stream;base64,")}function Q(r){try{if(r==V&&y)return new Uint8Array(y);if(s)return s(r);throw"both async and sync fetching of the wasm failed"}catch(r){J(r)}}K(V="graphvizlib.wasm")||(X=V,V=o.locateFile?o.locateFile(X,v):v+X);var Z={163520:(r,e)=>{var t=j(r),n=j(e);ur.createPath("/",tr.dirname(t)),ur.writeFile(tr.join("/",t),n)}};function rr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function er(r){for(;r.length>0;)r.shift()(o)}var tr={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=tr.isAbs(r),t="/"===r.substr(-1);return(r=tr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=tr.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=tr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments,0);return tr.normalize(r.join("/"))},join2:(r,e)=>tr.normalize(r+"/"+e)};var nr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:ur.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=tr.isAbs(n)}return(e?"/":"")+(r=tr.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=nr.resolve(r).substr(1),e=nr.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("/")}};function or(r,e,t){var n=t>0?t:O(r)+1,o=new Array(n),a=T(r,o,0,o.length);return e&&(o.length=a),o}var ar={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){ar.ttys[r]={input:[],output:[],ops:e},ur.registerDevice(r,ar.stream_ops)},stream_ops:{open:function(r){var e=ar.ttys[r.node.rdev];if(!e)throw new ur.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ur.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 ur.ErrnoError(29)}if(void 0===s&&0===a)throw new ur.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ur.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new ur.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(_){var t=Buffer.alloc(256),n=0;try{n=u.readSync(process.stdin.fd,t,0,256,-1)}catch(r){if(!r.toString().includes("EOF"))throw r;n=0}e=n>0?t.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;r.input=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(w(z(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(w(z(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(E(z(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(E(z(r.output,0)),r.output=[])}}};function ir(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=Pr(65536,r);return e?(function(r,e){x.fill(0,r,r+e)}(e,r),e):0}var sr={ops_table:null,mount:function(r){return sr.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(ur.isBlkdev(t)||ur.isFIFO(t))throw new ur.ErrnoError(63);sr.ops_table||(sr.ops_table={dir:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr,lookup:sr.node_ops.lookup,mknod:sr.node_ops.mknod,rename:sr.node_ops.rename,unlink:sr.node_ops.unlink,rmdir:sr.node_ops.rmdir,readdir:sr.node_ops.readdir,symlink:sr.node_ops.symlink},stream:{llseek:sr.stream_ops.llseek}},file:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr},stream:{llseek:sr.stream_ops.llseek,read:sr.stream_ops.read,write:sr.stream_ops.write,allocate:sr.stream_ops.allocate,mmap:sr.stream_ops.mmap,msync:sr.stream_ops.msync}},link:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr,readlink:sr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:sr.node_ops.getattr,setattr:sr.node_ops.setattr},stream:ur.chrdev_stream_ops}});var o=ur.createNode(r,e,t,n);return ur.isDir(o.mode)?(o.node_ops=sr.ops_table.dir.node,o.stream_ops=sr.ops_table.dir.stream,o.contents={}):ur.isFile(o.mode)?(o.node_ops=sr.ops_table.file.node,o.stream_ops=sr.ops_table.file.stream,o.usedBytes=0,o.contents=null):ur.isLink(o.mode)?(o.node_ops=sr.ops_table.link.node,o.stream_ops=sr.ops_table.link.stream):ur.isChrdev(o.mode)&&(o.node_ops=sr.ops_table.chrdev.node,o.stream_ops=sr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(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:function(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:function(r){var e={};return e.dev=ur.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,ur.isDir(r.mode)?e.size=4096:ur.isFile(r.mode)?e.size=r.usedBytes:ur.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:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&sr.resizeFileStorage(r,e.size)},lookup:function(r,e){throw ur.genericErrors[44]},mknod:function(r,e,t,n){return sr.createNode(r,e,t,n)},rename:function(r,e,t){if(ur.isDir(r.mode)){var n;try{n=ur.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new ur.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:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=ur.lookupNode(r,e);for(var n in t.contents)throw new ur.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=sr.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!ur.isLink(r.mode))throw new ur.ErrnoError(28);return r.link}},stream_ops:{read:function(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:function(r,e,t,n,o,a){if(e.buffer===A.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(sr.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ur.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ur.ErrnoError(28);return n},allocate:function(r,e,t){sr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==D){if((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),i=!0,!(a=ir(e)))throw new ur.ErrnoError(48);A.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);return 2&o||sr.stream_ops.write(r,e,0,n,t,!1),0}}};var ur={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=nr.resolve(ur.cwd(),r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ur.ErrnoError(32);for(var t=tr.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=ur.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&e.parent)break;if(n=ur.lookupNode(n,t[a]),o=tr.join2(o,t[a]),ur.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;ur.isLink(n.mode);){var u=ur.readlink(o);if(o=nr.resolve(tr.dirname(o),u),n=ur.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new ur.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(ur.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)%ur.nameTable.length},hashAddNode:r=>{var e=ur.hashName(r.parent.id,r.name);r.name_next=ur.nameTable[e],ur.nameTable[e]=r},hashRemoveNode:r=>{var e=ur.hashName(r.parent.id,r.name);if(ur.nameTable[e]===r)ur.nameTable[e]=r.name_next;else for(var t=ur.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=ur.mayLookup(r);if(t)throw new ur.ErrnoError(t,r);for(var n=ur.hashName(r.id,e),o=ur.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ur.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new ur.FSNode(r,e,t,n);return ur.hashAddNode(o),o},destroyNode:r=>{ur.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),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=ur.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ur.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=ur.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{ur.lookupNode(r,e);return 20}catch(r){}return ur.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=ur.lookupNode(r,e)}catch(r){return r.errno}var o=ur.nodePermissions(r,"wx");if(o)return o;if(t){if(!ur.isDir(n.mode))return 54;if(ur.isRoot(n)||ur.getPath(n)===ur.cwd())return 10}else if(ur.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ur.isLink(r.mode)?32:ur.isDir(r.mode)&&("r"!==ur.flagsToPermissionString(e)||512&e)?31:ur.nodePermissions(r,ur.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=ur.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!ur.streams[t])return t;throw new ur.ErrnoError(33)},getStream:r=>ur.streams[r],createStream:(r,e,t)=>{ur.FSStream||(ur.FSStream=function(){this.shared={}},ur.FSStream.prototype={},Object.defineProperties(ur.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new ur.FSStream,r);var n=ur.nextfd(e,t);return r.fd=n,ur.streams[n]=r,r},closeStream:r=>{ur.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=ur.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new ur.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{ur.devices[r]={stream_ops:e}},getDevice:r=>ur.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),ur.syncFSRequests++,ur.syncFSRequests>1&&E("warning: "+ur.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=ur.getMounts(ur.root.mount),n=0;function o(r){return ur.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&&ur.root)throw new ur.ErrnoError(10);if(!o&&!a){var i=ur.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ur.isMountpoint(n))throw new ur.ErrnoError(10);if(!ur.isDir(n.mode))throw new ur.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?ur.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=ur.lookupPath(r,{follow_mount:!1});if(!ur.isMountpoint(e.node))throw new ur.ErrnoError(28);var t=e.node,n=t.mounted,o=ur.getMounts(n);Object.keys(ur.nameTable).forEach((r=>{for(var e=ur.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ur.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=ur.lookupPath(r,{parent:!0}).node,o=tr.basename(r);if(!o||"."===o||".."===o)throw new ur.ErrnoError(28);var a=ur.mayCreate(n,o);if(a)throw new ur.ErrnoError(a);if(!n.node_ops.mknod)throw new ur.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ur.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ur.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{ur.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ur.mknod(r,e,t)),symlink:(r,e)=>{if(!nr.resolve(r))throw new ur.ErrnoError(44);var t=ur.lookupPath(e,{parent:!0}).node;if(!t)throw new ur.ErrnoError(44);var n=tr.basename(e),o=ur.mayCreate(t,n);if(o)throw new ur.ErrnoError(o);if(!t.node_ops.symlink)throw new ur.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=tr.dirname(r),a=tr.dirname(e),i=tr.basename(r),s=tr.basename(e);if(t=ur.lookupPath(r,{parent:!0}).node,n=ur.lookupPath(e,{parent:!0}).node,!t||!n)throw new ur.ErrnoError(44);if(t.mount!==n.mount)throw new ur.ErrnoError(75);var u,c=ur.lookupNode(t,i),p=nr.relative(r,a);if("."!==p.charAt(0))throw new ur.ErrnoError(28);if("."!==(p=nr.relative(e,o)).charAt(0))throw new ur.ErrnoError(55);try{u=ur.lookupNode(n,s)}catch(r){}if(c!==u){var f=ur.isDir(c.mode),l=ur.mayDelete(t,i,f);if(l)throw new ur.ErrnoError(l);if(l=u?ur.mayDelete(n,s,f):ur.mayCreate(n,s))throw new ur.ErrnoError(l);if(!t.node_ops.rename)throw new ur.ErrnoError(63);if(ur.isMountpoint(c)||u&&ur.isMountpoint(u))throw new ur.ErrnoError(10);if(n!==t&&(l=ur.nodePermissions(t,"w")))throw new ur.ErrnoError(l);ur.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{ur.hashAddNode(c)}}},rmdir:r=>{var e=ur.lookupPath(r,{parent:!0}).node,t=tr.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!0);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.rmdir)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.rmdir(e,t),ur.destroyNode(n)},readdir:r=>{var e=ur.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ur.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=ur.lookupPath(r,{parent:!0}).node;if(!e)throw new ur.ErrnoError(44);var t=tr.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!1);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.unlink)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.unlink(e,t),ur.destroyNode(n)},readlink:r=>{var e=ur.lookupPath(r).node;if(!e)throw new ur.ErrnoError(44);if(!e.node_ops.readlink)throw new ur.ErrnoError(28);return nr.resolve(ur.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=ur.lookupPath(r,{follow:!e}).node;if(!t)throw new ur.ErrnoError(44);if(!t.node_ops.getattr)throw new ur.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ur.stat(r,!0),chmod:(r,e,t)=>{var n;"string"==typeof r?n=ur.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new ur.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{ur.chmod(r,e,!0)},fchmod:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);ur.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;"string"==typeof r?o=ur.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new ur.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{ur.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=ur.getStream(r);if(!n)throw new ur.ErrnoError(8);ur.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new ur.ErrnoError(28);var t;"string"==typeof r?t=ur.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new ur.ErrnoError(63);if(ur.isDir(t.mode))throw new ur.ErrnoError(31);if(!ur.isFile(t.mode))throw new ur.ErrnoError(28);var n=ur.nodePermissions(t,"w");if(n)throw new ur.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);if(0==(2097155&t.flags))throw new ur.ErrnoError(28);ur.truncate(t.node,e)},utime:(r,e,t)=>{var n=ur.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new ur.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?ur.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=tr.normalize(r);try{n=ur.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var a=!1;if(64&e)if(n){if(128&e)throw new ur.ErrnoError(20)}else n=ur.mknod(r,t,0),a=!0;if(!n)throw new ur.ErrnoError(44);if(ur.isChrdev(n.mode)&&(e&=-513),65536&e&&!ur.isDir(n.mode))throw new ur.ErrnoError(54);if(!a){var i=ur.mayOpen(n,e);if(i)throw new ur.ErrnoError(i)}512&e&&!a&&ur.truncate(n,0),e&=-131713;var s=ur.createStream({node:n,path:ur.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&e||(ur.readFiles||(ur.readFiles={}),r in ur.readFiles||(ur.readFiles[r]=1)),s},close:r=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{ur.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ur.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ur.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 ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(1==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.read)throw new ur.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ur.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 ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(0==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.write)throw new ur.ErrnoError(28);r.seekable&&1024&r.flags&&ur.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new ur.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(ur.isClosed(r))throw new ur.ErrnoError(8);if(e<0||t<=0)throw new ur.ErrnoError(28);if(0==(2097155&r.flags))throw new ur.ErrnoError(8);if(!ur.isFile(r.node.mode)&&!ur.isDir(r.node.mode))throw new ur.ErrnoError(43);if(!r.stream_ops.allocate)throw new ur.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 ur.ErrnoError(2);if(1==(2097155&r.flags))throw new ur.ErrnoError(2);if(!r.stream_ops.mmap)throw new ur.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r&&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 ur.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=ur.open(r,e.flags),o=ur.stat(r).size,a=new Uint8Array(o);return ur.read(n,a,0,o,0),"utf8"===e.encoding?t=z(a,0):"binary"===e.encoding&&(t=a),ur.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=ur.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(O(e)+1),a=T(e,o,0,o.length);ur.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ur.write(n,e,0,e.byteLength,void 0,t.canOwn)}ur.close(n)},cwd:()=>ur.currentPath,chdir:r=>{var e=ur.lookupPath(r,{follow:!0});if(null===e.node)throw new ur.ErrnoError(44);if(!ur.isDir(e.node.mode))throw new ur.ErrnoError(54);var t=ur.nodePermissions(e.node,"x");if(t)throw new ur.ErrnoError(t);ur.currentPath=e.path},createDefaultDirectories:()=>{ur.mkdir("/tmp"),ur.mkdir("/home"),ur.mkdir("/home/web_user")},createDefaultDevices:()=>{ur.mkdir("/dev"),ur.registerDevice(ur.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),ur.mkdev("/dev/null",ur.makedev(1,3)),ar.register(ur.makedev(5,0),ar.default_tty_ops),ar.register(ur.makedev(6,0),ar.default_tty1_ops),ur.mkdev("/dev/tty",ur.makedev(5,0)),ur.mkdev("/dev/tty1",ur.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}if(_)try{var e=require("crypto");return()=>e.randomBytes(1)[0]}catch(r){}return()=>J("randomDevice")}();ur.createDevice("/dev","random",r),ur.createDevice("/dev","urandom",r),ur.mkdir("/dev/shm"),ur.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ur.mkdir("/proc");var r=ur.mkdir("/proc/self");ur.mkdir("/proc/self/fd"),ur.mount({mount:()=>{var e=ur.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=ur.getStream(t);if(!n)throw new ur.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?ur.createDevice("/dev","stdin",o.stdin):ur.symlink("/dev/tty","/dev/stdin"),o.stdout?ur.createDevice("/dev","stdout",null,o.stdout):ur.symlink("/dev/tty","/dev/stdout"),o.stderr?ur.createDevice("/dev","stderr",null,o.stderr):ur.symlink("/dev/tty1","/dev/stderr"),ur.open("/dev/stdin",0),ur.open("/dev/stdout",1),ur.open("/dev/stderr",1)},ensureErrnoError:()=>{ur.ErrnoError||(ur.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},ur.ErrnoError.prototype=new Error,ur.ErrnoError.prototype.constructor=ur.ErrnoError,[44].forEach((r=>{ur.genericErrors[r]=new ur.ErrnoError(r),ur.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{ur.ensureErrnoError(),ur.nameTable=new Array(4096),ur.mount(sr,{},"/"),ur.createDefaultDirectories(),ur.createDefaultDevices(),ur.createSpecialDirectories(),ur.filesystems={MEMFS:sr}},init:(r,e,t)=>{ur.init.initialized=!0,ur.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,ur.createStandardStreams()},quit:()=>{ur.init.initialized=!1;for(var r=0;r<ur.streams.length;r++){var e=ur.streams[r];e&&ur.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=ur.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=ur.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=ur.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=tr.basename(r),n=ur.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:ur.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=tr.join2(r,a);try{ur.mkdir(i)}catch(r){}r=i}}return i},createFile:(r,e,t,n,o)=>{var a=tr.join2("string"==typeof r?r:ur.getPath(r),e),i=ur.getMode(n,o);return ur.create(a,i)},createDataFile:(r,e,t,n,o,a)=>{var i=e;r&&(r="string"==typeof r?r:ur.getPath(r),i=e?tr.join2(r,e):r);var s=ur.getMode(n,o),u=ur.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),p=0,f=t.length;p<f;++p)c[p]=t.charCodeAt(p);t=c}ur.chmod(u,146|s);var l=ur.open(u,577);ur.write(l,t,0,t.length,0,a),ur.close(l),ur.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=tr.join2("string"==typeof r?r:ur.getPath(r),e),a=ur.getMode(!!t,!!n);ur.createDevice.major||(ur.createDevice.major=64);var i=ur.makedev(ur.createDevice.major++,0);return ur.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 ur.ErrnoError(29)}if(void 0===u&&0===i)throw new ur.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 ur.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),ur.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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=or(a(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new ur.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.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]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=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=n);var s=this;s.setDataGetter((r=>{var e=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==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 "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):or(o.responseText||"",!0)})(e,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var u=ur.createFile(r,e,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function p(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(u.stream_ops).forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return ur.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(ur.forceLoadFile(u),p(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{ur.forceLoadFile(u);var a=ir(e);if(!a)throw new ur.ErrnoError(48);return p(r,A,a,e,t),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,a,s,u,c,p)=>{var f=e?nr.resolve(tr.join2(r,e)):r;function l(t){function i(t){p&&p(),u||ur.createDataFile(r,e,t,n,o,c),a&&a(),W()}Browser.handledByPreloadPlugin(t,f,i,(()=>{s&&s(),W()}))||i(t)}q(),"string"==typeof t?function(r,e,t,n){var o=n?"":"al "+r;i(r,(t=>{S(t,'Loading data file "'+r+'" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&W()}),(e=>{if(!t)throw'Loading data file "'+r+'" failed.';t()})),o&&q()}(t,(r=>l(r)),s):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(ur.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ur.DB_STORE_NAME],"readwrite"),a=n.objectStore(ur.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=a.put(ur.analyzePath(r).object.contents,r);e.onsuccess=()=>{++i+s==u&&c()},e.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([ur.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var i=a.objectStore(ur.DB_STORE_NAME),s=0,u=0,c=r.length;function p(){0==u?e():t()}r.forEach((r=>{var e=i.get(r);e.onsuccess=()=>{ur.analyzePath(r).exists&&ur.unlink(r),ur.createDataFile(tr.dirname(r),tr.basename(r),e.result,!0,!0,!0),++s+u==c&&p()},e.onerror=()=>{u++,s+u==c&&p()}})),a.onerror=t},o.onerror=t}},cr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(tr.isAbs(e))return e;var n;if(-100===r)n=ur.cwd();else{var o=ur.getStream(r);if(!o)throw new ur.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new ur.ErrnoError(44);return n}return tr.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&tr.normalize(e)!==tr.normalize(ur.getPath(r.node)))return-54;throw r}return C[t>>2]=n.dev,C[t+8>>2]=n.ino,C[t+12>>2]=n.mode,C[t+16>>2]=n.nlink,C[t+20>>2]=n.uid,C[t+24>>2]=n.gid,C[t+28>>2]=n.rdev,Y=[n.size>>>0,($=n.size,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+40>>2]=Y[0],C[t+44>>2]=Y[1],C[t+48>>2]=4096,C[t+52>>2]=n.blocks,Y=[Math.floor(n.atime.getTime()/1e3)>>>0,($=Math.floor(n.atime.getTime()/1e3),+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+56>>2]=Y[0],C[t+60>>2]=Y[1],C[t+64>>2]=0,Y=[Math.floor(n.mtime.getTime()/1e3)>>>0,($=Math.floor(n.mtime.getTime()/1e3),+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+72>>2]=Y[0],C[t+76>>2]=Y[1],C[t+80>>2]=0,Y=[Math.floor(n.ctime.getTime()/1e3)>>>0,($=Math.floor(n.ctime.getTime()/1e3),+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+88>>2]=Y[0],C[t+92>>2]=Y[1],C[t+96>>2]=0,Y=[n.ino>>>0,($=n.ino,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[t+104>>2]=Y[0],C[t+108>>2]=Y[1],0},doMsync:function(r,e,t,n,o){var a=x.slice(r,r+t);ur.msync(e,a,o,t,n)},varargs:void 0,get:function(){return cr.varargs+=4,C[cr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var e=ur.getStream(r);if(!e)throw new ur.ErrnoError(8);return e}};var pr=[];function fr(r){try{return g.grow(r-D.byteLength+65535>>>16),B(g.buffer),1}catch(r){}}var lr={};function dr(){if(!dr.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",_:l||"./this.program"};for(var e in lr)void 0===lr[e]?delete r[e]:r[e]=lr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);dr.strings=t}return dr.strings}var hr=function(r,e){var t;t=r,U()||(o.onExit&&o.onExit(t),k=!0),d(t,new rr(t))};var mr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=ur.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},_r=365,vr=146;Object.defineProperties(mr.prototype,{read:{get:function(){return(this.mode&_r)===_r},set:function(r){r?this.mode|=_r:this.mode&=-366}},write:{get:function(){return(this.mode&vr)===vr},set:function(r){r?this.mode|=vr:this.mode&=-147}},isFolder:{get:function(){return ur.isDir(this.mode)}},isDevice:{get:function(){return ur.isChrdev(this.mode)}}}),ur.FSNode=mr,ur.staticInit();var yr={k:function(r,e,t,n){try{if(e=cr.getStr(e),e=cr.calculateAt(r,e),-8&t)return-28;var o=ur.lookupPath(e,{follow:!0}).node;if(!o)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&ur.nodePermissions(o,a)?-2:0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},f:function(r,e,t){cr.varargs=t;try{var n=cr.getStreamFromFD(r);switch(e){case 0:return(o=cr.get())<0?-28:ur.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=cr.get();return n.flags|=o,0;case 5:o=cr.get();return P[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,C[xr()>>2]=a,-1}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}var a},u:function(r,e){try{var t=cr.getStreamFromFD(r);return cr.doStat(ur.stat,t.path,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},v:function(r,e,t){cr.varargs=t;try{var n=cr.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=cr.get();return C[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=cr.get();return ur.ioctl(n,e,o);default:return-28}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},s:function(r,e,t,n){try{e=cr.getStr(e);var o=256&n,a=4096&n;return n&=-4353,e=cr.calculateAt(r,e,a),cr.doStat(o?ur.lstat:ur.stat,e,t)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},c:function(r,e,t,n){cr.varargs=n;try{e=cr.getStr(e),e=cr.calculateAt(r,e);var o=n?cr.get():0;return ur.open(e,t,o).fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},t:function(r,e){try{return r=cr.getStr(r),cr.doStat(ur.stat,r,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},n:function(r,e,t){try{return e=cr.getStr(e),e=cr.calculateAt(r,e),0===t?ur.unlink(e):512===t?ur.rmdir(e):J("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},d:function(){return Date.now()},i:function(){return true},o:function(r,e,t,n,o,a){try{var i=ur.getStream(n);if(!i)return-8;var s=ur.mmap(i,r,o,e,t),u=s.ptr;return C[a>>2]=s.allocated,u}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o,a){try{var i=ur.getStream(o);i&&(2&t&&cr.doMsync(r,i,e,n,a),ur.munmap(i))}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},a:function(){J("")},w:function(r,e,t){var n=function(r,e){var t;for(pr.length=0,e>>=2;t=x[r++];)e+=105!=t&e,pr.push(105==t?C[e]:M[e++>>1]),++e;return pr}(e,t);return Z[r].apply(null,n)},j:function(r,e,t){x.copyWithin(r,e,e+t)},m:function(r){var e,t,n=x.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),fr(Math.min(o,(e=Math.max(r,i))+((t=65536)-e%t)%t)))return!0}return!1},q:function(r,e){var t=0;return dr().forEach((function(n,o){var a=e+t;F[r+4*o>>2]=a,function(r,e,t){for(var n=0;n<r.length;++n)A[e++>>0]=r.charCodeAt(n);t||(A[e>>0]=0)}(n,a),t+=n.length+1})),0},r:function(r,e){var t=dr();F[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),F[e>>2]=n,0},e:hr,b:function(r){try{var e=cr.getStreamFromFD(r);return ur.close(e),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,a=0;a<t;a++){var i=F[e>>2],s=F[e+4>>2];e+=8;var u=ur.read(r,A,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(cr.getStreamFromFD(r),e,t);return F[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var a=(u=t)+2097152>>>0<4194305-!!(s=e)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=cr.getStreamFromFD(r);return ur.llseek(i,a,n),Y=[i.position>>>0,($=i.position,+Math.abs($)>=1?$>0?(0|Math.min(+Math.floor($/4294967296),4294967295))>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],C[o>>2]=Y[0],C[o+4>>2]=Y[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}var s,u},h:function(r,e,t,n){try{var o=function(r,e,t,n){for(var o=0,a=0;a<t;a++){var i=F[e>>2],s=F[e+4>>2];e+=8;var u=ur.write(r,A,i,s,n);if(u<0)return-1;o+=u}return o}(cr.getStreamFromFD(r),e,t);return F[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}}};!function(){var r={a:yr};function e(r,e){var t,n=r.exports;o.asm=n,B((g=o.asm.x).buffer),o.asm.G,t=o.asm.y,I.unshift(t),W()}function t(r){e(r.instance)}function a(e){return(y||!h&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(V)})):fetch(V,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+V+"'";return r.arrayBuffer()})).catch((function(){return Q(V)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){E("failed to asynchronously prepare wasm: "+r),J(r)}))}if(q(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return E("Module.instantiateWasm callback failed with error: "+r),!1}(y||"function"!=typeof WebAssembly.instantiateStreaming||K(V)||_||"function"!=typeof fetch?a(t):fetch(V,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return E("wasm streaming compile failed: "+r),E("falling back to ArrayBuffer instantiation"),a(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.y).apply(null,arguments)};var wr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(wr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.z).apply(null,arguments)},Er=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(Er=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.A).apply(null,arguments)},gr=o._emscripten_bind_Graphviz_version_0=function(){return(gr=o._emscripten_bind_Graphviz_version_0=o.asm.B).apply(null,arguments)},br=o._emscripten_bind_Graphviz_lastError_0=function(){return(br=o._emscripten_bind_Graphviz_lastError_0=o.asm.C).apply(null,arguments)},kr=o._emscripten_bind_Graphviz_layout_3=function(){return(kr=o._emscripten_bind_Graphviz_layout_3=o.asm.D).apply(null,arguments)},Sr=o._emscripten_bind_Graphviz_createFile_2=function(){return(Sr=o._emscripten_bind_Graphviz_createFile_2=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_Graphviz___destroy___0=function(){return(Dr=o._emscripten_bind_Graphviz___destroy___0=o.asm.F).apply(null,arguments)};o._free=function(){return(o._free=o.asm.H).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.I).apply(null,arguments)};var Ar,xr=o.___errno_location=function(){return(xr=o.___errno_location=o.asm.J).apply(null,arguments)},Pr=o._emscripten_builtin_memalign=function(){return(Pr=o._emscripten_builtin_memalign=o.asm.K).apply(null,arguments)};function Cr(r){function e(){Ar||(Ar=!0,o.calledRun=!0,k||(o.noFSInit||ur.init.initialized||ur.init(),ur.ignorePermissions=!1,er(I),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),L.unshift(r);var r;er(L)}()))}H>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;er(N)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.___start_em_js=163664,o.___stop_em_js=163762,G=function r(){Ar||Cr(),Ar||(G=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Fr(){}function Mr(r){return(r||Fr).__cache__}function Rr(r,e){var t=Mr(e),n=t[r];return n||((n=Object.create((e||Fr).prototype)).ptr=r,t[r]=n)}Cr(),Fr.prototype=Object.create(Fr.prototype),Fr.prototype.constructor=Fr,Fr.prototype.__class__=Fr,Fr.__cache__={},o.WrapperObject=Fr,o.getCache=Mr,o.wrapPointer=Rr,o.castObject=function(r,e){return Rr(r.ptr,e)},o.NULL=Rr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Mr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var zr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(zr.needed){for(var r=0;r<zr.temps.length;r++)o._free(zr.temps[r]);zr.temps.length=0,o._free(zr.buffer),zr.buffer=0,zr.size+=zr.needed,zr.needed=0}zr.buffer||(zr.size+=128,zr.buffer=o._malloc(zr.size),S(zr.buffer)),zr.pos=0},alloc:function(r,e){S(zr.buffer);var t,n=e.BYTES_PER_ELEMENT,a=r.length*n;return a=a+7&-8,zr.pos+a>=zr.size?(S(a>0),zr.needed+=a,t=o._malloc(a),zr.temps.push(t)):(t=zr.buffer+zr.pos,zr.pos+=a),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function jr(r){if("string"==typeof r){var e=or(r),t=zr.alloc(e,A);return zr.copy(e,A,t),t}return r}function Tr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Or(r,e){r&&"object"==typeof r&&(r=r.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=Er(r,e),Mr(Or)[this.ptr]=this}return Tr.prototype=Object.create(Fr.prototype),Tr.prototype.constructor=Tr,Tr.prototype.__class__=Tr,Tr.__cache__={},o.VoidPtr=Tr,Tr.prototype.__destroy__=Tr.prototype.__destroy__=function(){var r=this.ptr;wr(r)},Or.prototype=Object.create(Fr.prototype),Or.prototype.constructor=Or,Or.prototype.__class__=Or,Or.__cache__={},o.Graphviz=Or,Or.prototype.version=Or.prototype.version=function(){var r=this.ptr;return j(gr(r))},Or.prototype.lastError=Or.prototype.lastError=function(){var r=this.ptr;return j(br(r))},Or.prototype.layout=Or.prototype.layout=function(r,e,t){var n=this.ptr;return zr.prepare(),r=r&&"object"==typeof r?r.ptr:jr(r),e=e&&"object"==typeof e?e.ptr:jr(e),t=t&&"object"==typeof t?t.ptr:jr(t),j(kr(n,r,e,t))},Or.prototype.createFile=Or.prototype.createFile=function(r,e){var t=this.ptr;zr.prepare(),r=r&&"object"==typeof r?r.ptr:jr(r),e=e&&"object"==typeof e?e.ptr:jr(e),Sr(t,r,e)},Or.prototype.__destroy__=Or.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},e.ready}})(),l=Object.freeze({__proto__:null,default:f});function d(r){return{path:r.path,data:`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg width="${r.width}" height="${r.height}"></svg>`}}function h(r,e){const t={images:[],files:[],...e};var n;[...t.files,...(n=t.images,n.map(d))].forEach((e=>r.createFile(e.path,e.data)))}const m={layout:(r,e="svg",t="dot",n)=>r?u(l,"graphvizlib",null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((o=>{const a=new o.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);h(a,n);const i=a.layout(r,e,t);if(o.destroy(a),!i)throw new Error(o.Graphviz.prototype.lastError());return i})):Promise.resolve(""),circo(r,e="svg",t){return this.layout(r,e,"circo",t)},dot(r,e="svg",t){return this.layout(r,e,"dot",t)},fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)},sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)},neato(r,e="svg",t){return this.layout(r,e,"neato",t)},osage(r,e="svg",t){return this.layout(r,e,"osage",t)},patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)},twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}};class _{constructor(r){this._wasm=r}layout(r,e="svg",t="dot",n){if(!r)return"";const o=new this._wasm.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);h(o,n);const a=o.layout(r,e,t);if(this._wasm.destroy(o),!a)throw new Error(this._wasm.Graphviz.prototype.lastError());return a}circo(r,e="svg",t){return this.layout(r,e,"circo",t)}dot(r,e="svg",t){return this.layout(r,e,"dot",t)}fdp(r,e="svg",t){return this.layout(r,e,"fdp",t)}sfdp(r,e="svg",t){return this.layout(r,e,"sfdp",t)}neato(r,e="svg",t){return this.layout(r,e,"neato",t)}osage(r,e="svg",t){return this.layout(r,e,"osage",t)}patchwork(r,e="svg",t){return this.layout(r,e,"patchwork",t)}twopi(r,e="svg",t){return this.layout(r,e,"twopi",t)}}r.GraphvizSync=_,r.StackElement=c,r.StackParser=class{constructor(){this._stack=[]}parse(r,e,t){return p(r,this,e,t)}top(){return this._stack[this._stack.length-1]}startElement(r,e){const t=new c(r,e);return this._stack.push(t),t}endElement(r){return this._stack.pop()}characterData(r){this.top().appendContent(r)}},r.expatVersion=function(r,e){return u(n,"expatlib",r,e).then((r=>r.CExpat.prototype.version()))},r.graphviz=m,r.graphvizSync=function(r,e){return u(l,"graphvizlib",r,e).then((r=>new _(r)))},r.graphvizVersion=function(r,e){return u(l,"graphvizlib",r,e).then((r=>r.Graphviz.prototype.version()))},r.parse=p,r.wasmFolder=a,Object.defineProperty(r,"__esModule",{value:!0})}));
|