@hpcc-js/wasm-graphviz
Version:
hpcc-js - WASM Graphviz
1 lines • 745 kB
JavaScript
var sn=ArrayBuffer,q=Uint8Array,Zr=Uint16Array,hn=Int16Array;var Nr=Int32Array,oe=function(c,h,l){if(q.prototype.slice)return q.prototype.slice.call(c,h,l);(h==null||h<0)&&(h=0),(l==null||l>c.length)&&(l=c.length);var f=new q(l-h);return f.set(c.subarray(h,l)),f},Qr=function(c,h,l,f){if(q.prototype.fill)return q.prototype.fill.call(c,h,l,f);for((l==null||l<0)&&(l=0),(f==null||f>c.length)&&(f=c.length);l<f;++l)c[l]=h;return c},fn=function(c,h,l,f){if(q.prototype.copyWithin)return q.prototype.copyWithin.call(c,h,l,f);for((l==null||l<0)&&(l=0),(f==null||f>c.length)&&(f=c.length);l<f;)c[h++]=c[l++]};var vn=["invalid zstd data","window size too large (>2046MB)","invalid block type","FSE accuracy too high","match distance too far back","unexpected EOF"],Z=function(c,h,l){var f=new Error(h||vn[c]);if(f.code=c,Error.captureStackTrace&&Error.captureStackTrace(f,Z),!l)throw f;return f},Le=function(c,h,l){for(var f=0,v=0;f<l;++f)v|=c[h++]<<(f<<3);return v},pn=function(c,h){return(c[h]|c[h+1]<<8|c[h+2]<<16|c[h+3]<<24)>>>0},dn=function(c,h){var l=c[0]|c[1]<<8|c[2]<<16;if(l==3126568&&c[3]==253){var f=c[4],v=f>>5&1,_=f>>2&1,y=f&3,g=f>>6;f&8&&Z(0);var O=6-v,k=y==3?4:y,W=Le(c,O,k);O+=k;var L=g?1<<g:v,X=Le(c,O,L)+(g==1&&256),V=X;if(!v){var I=1<<10+(c[5]>>3);V=I+(I>>3)*(c[5]&7)}V>2145386496&&Z(1);var F=new q((h==1?X||V:h?0:V)+12);return F[0]=1,F[4]=4,F[8]=8,{b:O+L,y:0,l:0,d:W,w:h&&h!=1?h:F.subarray(12),e:V,o:new Nr(F.buffer,0,3),u:X,c:_,m:Math.min(131072,V)}}else if((l>>4|c[3]<<20)==25481893)return pn(c,4)+8;Z(0)},Er=function(c){for(var h=0;1<<h<=c;++h);return h-1},kr=function(c,h,l){var f=(h<<3)+4,v=(c[h]&15)+5;v>l&&Z(3);for(var _=1<<v,y=_,g=-1,O=-1,k=-1,W=_,L=new sn(512+(_<<2)),X=new hn(L,0,256),V=new Zr(L,0,256),I=new Zr(L,512,_),F=512+(_<<1),J=new q(L,F,_),ir=new q(L,F+_);g<255&&y>0;){var N=Er(y+1),T=f>>3,tr=(1<<N+1)-1,B=(c[T]|c[T+1]<<8|c[T+2]<<16)>>(f&7)&tr,b=(1<<N)-1,x=tr-y-1,rr=B&b;if(rr<x?(f+=N,B=rr):(f+=N+1,B>b&&(B-=x)),X[++g]=--B,B==-1?(y+=B,J[--W]=g):y-=B,!B)do{var d=f>>3;O=(c[d]|c[d+1]<<8)>>(f&7)&3,f+=2,g+=O}while(O==3)}(g>255||y)&&Z(0);for(var j=0,ar=(_>>1)+(_>>3)+3,nr=_-1,er=0;er<=g;++er){var K=X[er];if(K<1){V[er]=-K;continue}for(k=0;k<K;++k){J[j]=er;do j=j+ar&nr;while(j>=W)}}for(j&&Z(0),k=0;k<_;++k){var C=V[J[k]]++,A=ir[k]=v-Er(C);I[k]=(C<<A)-_}return[f+7>>3,{b:v,s:J,n:ir,t:I}]},yn=function(c,h){var l=0,f=-1,v=new q(292),_=c[h],y=v.subarray(0,256),g=v.subarray(256,268),O=new Zr(v.buffer,268);if(_<128){var k=kr(c,h+1,6),W=k[0],L=k[1];h+=_;var X=W<<3,V=c[h];V||Z(0);for(var I=0,F=0,J=L.b,ir=J,N=(++h<<3)-8+Er(V);N-=J,!(N<X);){var T=N>>3;if(I+=(c[T]|c[T+1]<<8)>>(N&7)&(1<<J)-1,y[++f]=L.s[I],N-=ir,N<X)break;T=N>>3,F+=(c[T]|c[T+1]<<8)>>(N&7)&(1<<ir)-1,y[++f]=L.s[F],J=L.n[I],I=L.t[I],ir=L.n[F],F=L.t[F]}++f>255&&Z(0)}else{for(f=_-127;l<f;l+=2){var tr=c[++h];y[l]=tr>>4,y[l+1]=tr&15}++h}var B=0;for(l=0;l<f;++l){var b=y[l];b>11&&Z(0),B+=b&&1<<b-1}var x=Er(B)+1,rr=1<<x,d=rr-B;for(d&d-1&&Z(0),y[f++]=Er(d)+1,l=0;l<f;++l){var b=y[l];++g[y[l]=b&&x+1-b]}var j=new q(rr<<1),ar=j.subarray(0,rr),nr=j.subarray(rr);for(O[x]=0,l=x;l>0;--l){var er=O[l];Qr(nr,l,er,O[l-1]=er+g[l]*(1<<x-l))}for(O[0]!=rr&&Z(0),l=0;l<f;++l){var K=y[l];if(K){var C=O[K];Qr(ar,l,C,O[K]=C+(1<<x-K))}}return[h,{n:nr,b:x,s:ar}]},_n=kr(new q([81,16,99,140,49,198,24,99,12,33,196,24,99,102,102,134,70,146,4]),0,6)[1],wn=kr(new q([33,20,196,24,99,140,33,132,16,66,8,33,132,16,66,8,33,68,68,68,68,68,68,68,68,36,9]),0,6)[1],gn=kr(new q([32,132,16,66,102,70,68,68,68,68,36,73,2]),0,5)[1],Ke=function(c,h){for(var l=c.length,f=new Nr(l),v=0;v<l;++v)f[v]=h,h+=1<<c[v];return f},ie=new q(new Nr([0,0,0,0,16843009,50528770,134678020,202050057,269422093]).buffer,0,36),Mn=Ke(ie,0),ae=new q(new Nr([0,0,0,0,0,0,0,0,16843009,50528770,117769220,185207048,252579084,16]).buffer,0,53),En=Ke(ae,3),Pr=function(c,h,l){var f=c.length,v=h.length,_=c[f-1],y=(1<<l.b)-1,g=-l.b;_||Z(0);for(var O=0,k=l.b,W=(f<<3)-8+Er(_)-k,L=-1;W>g&&L<v;){var X=W>>3,V=(c[X]|c[X+1]<<8|c[X+2]<<16)>>(W&7);O=(O<<k|V)&y,h[++L]=l.s[O],W-=k=l.n[O]}(W!=g||L+1!=v)&&Z(0)},mn=function(c,h,l){var f=6,v=h.length,_=v+3>>2,y=_<<1,g=_+y;Pr(c.subarray(f,f+=c[0]|c[1]<<8),h.subarray(0,_),l),Pr(c.subarray(f,f+=c[2]|c[3]<<8),h.subarray(_,y),l),Pr(c.subarray(f,f+=c[4]|c[5]<<8),h.subarray(y,g),l),Pr(c.subarray(f),h.subarray(g),l)},bn=function(c,h,l){var f,v=h.b,_=c[v],y=_>>1&3;h.l=_&1;var g=_>>3|c[v+1]<<5|c[v+2]<<13,O=(v+=3)+g;if(y==1)return v>=c.length?void 0:(h.b=v+1,l?(Qr(l,c[v],h.y,h.y+=g),l):Qr(new q(g),c[v]));if(!(O>c.length)){if(y==0)return h.b=O,l?(l.set(c.subarray(v,O),h.y),h.y+=g,l):oe(c,v,O);if(y==2){var k=c[v],W=k&3,L=k>>2&3,X=k>>4,V=0,I=0;W<2?L&1?X|=c[++v]<<4|(L&2&&c[++v]<<12):X=k>>3:(I=L,L<2?(X|=(c[++v]&63)<<4,V=c[v]>>6|c[++v]<<2):L==2?(X|=c[++v]<<4|(c[++v]&3)<<12,V=c[v]>>2|c[++v]<<6):(X|=c[++v]<<4|(c[++v]&63)<<12,V=c[v]>>6|c[++v]<<2|c[++v]<<10)),++v;var F=l?l.subarray(h.y,h.y+h.m):new q(h.m),J=F.length-X;if(W==0)F.set(c.subarray(v,v+=X),J);else if(W==1)Qr(F,c[v++],J);else{var ir=h.h;if(W==2){var N=yn(c,v);V+=v-(v=N[0]),h.h=ir=N[1]}else ir||Z(0);(I?mn:Pr)(c.subarray(v,v+=V),F.subarray(J),ir)}var T=c[v++];if(T){T==255?T=(c[v++]|c[v++]<<8)+32512:T>127&&(T=T-128<<8|c[v++]);var tr=c[v++];tr&3&&Z(0);for(var B=[wn,gn,_n],b=2;b>-1;--b){var x=tr>>(b<<1)+2&3;if(x==1){var rr=new q([0,0,c[v++]]);B[b]={s:rr.subarray(2,3),n:rr.subarray(0,1),t:new Zr(rr.buffer,0,1),b:0}}else x==2?(f=kr(c,v,9-(b&1)),v=f[0],B[b]=f[1]):x==3&&(h.t||Z(0),B[b]=h.t[b])}var d=h.t=B,j=d[0],ar=d[1],nr=d[2],er=c[O-1];er||Z(0);var K=(O<<3)-8+Er(er)-nr.b,C=K>>3,A=0,zr=(c[C]|c[C+1]<<8)>>(K&7)&(1<<nr.b)-1;C=(K-=ar.b)>>3;var vr=(c[C]|c[C+1]<<8)>>(K&7)&(1<<ar.b)-1;C=(K-=j.b)>>3;var pr=(c[C]|c[C+1]<<8)>>(K&7)&(1<<j.b)-1;for(++T;--T;){var mr=nr.s[zr],br=nr.n[zr],gr=j.s[pr],Gr=j.n[pr],Ur=ar.s[vr],Vr=ar.n[vr];C=(K-=Ur)>>3;var Jr=1<<Ur,yr=Jr+((c[C]|c[C+1]<<8|c[C+2]<<16|c[C+3]<<24)>>>(K&7)&Jr-1);C=(K-=ae[gr])>>3;var Mr=En[gr]+((c[C]|c[C+1]<<8|c[C+2]<<16)>>(K&7)&(1<<ae[gr])-1);C=(K-=ie[mr])>>3;var Or=Mn[mr]+((c[C]|c[C+1]<<8|c[C+2]<<16)>>(K&7)&(1<<ie[mr])-1);if(C=(K-=br)>>3,zr=nr.t[zr]+((c[C]|c[C+1]<<8)>>(K&7)&(1<<br)-1),C=(K-=Gr)>>3,pr=j.t[pr]+((c[C]|c[C+1]<<8)>>(K&7)&(1<<Gr)-1),C=(K-=Vr)>>3,vr=ar.t[vr]+((c[C]|c[C+1]<<8)>>(K&7)&(1<<Vr)-1),yr>3)h.o[2]=h.o[1],h.o[1]=h.o[0],h.o[0]=yr-=3;else{var Fr=yr-(Or!=0);Fr?(yr=Fr==3?h.o[0]-1:h.o[Fr],Fr>1&&(h.o[2]=h.o[1]),h.o[1]=h.o[0],h.o[0]=yr):yr=h.o[0]}for(var b=0;b<Or;++b)F[A+b]=F[J+b];A+=Or,J+=Or;var E=A-yr;if(E<0){var U=-E,xr=h.e+E;U>Mr&&(U=Mr);for(var b=0;b<U;++b)F[A+b]=h.w[xr+b];A+=U,Mr-=U,E=0}for(var b=0;b<Mr;++b)F[A+b]=F[E+b];A+=Mr}if(A!=J)for(;J<F.length;)F[A++]=F[J++];else A=F.length;l?h.y+=A:F=oe(F,0,A)}else if(l){if(h.y+=X,J)for(var b=0;b<X;++b)F[b]=F[J+b]}else J&&(F=oe(F,J));return h.b=O,F}Z(2)}},Gn=function(c,h){if(c.length==1)return c[0];for(var l=new q(h),f=0,v=0;f<c.length;++f){var _=c[f];l.set(_,v),v+=_.length}return l};function Pe(c,h){for(var l=[],f=+!h,v=0,_=0;c.length;){var y=dn(c,f||h);if(typeof y=="object"){for(f?(h=null,y.w.length==y.u&&(l.push(h=y.w),_+=y.u)):(l.push(h),y.e=0);!y.l;){var g=bn(c,y,h);g||Z(5),h?y.e=y.y:(l.push(g),_+=g.length,fn(y.w,0,g.length),y.w.set(g,y.w.length-g.length))}v=y.b+y.c*4}else v=y;c=c.subarray(v)}return Gn(l,_)}var On=async function(c={}){var h,l=c,f=!1,v="./this.program",_=(r,e)=>{throw e},y=import.meta.url,g="";function O(r){return g+r}var k,W,L=console.log.bind(console),X=console.error.bind(console),V,I=!1,F;function J(r,e){r||gr(e)}var ir=r=>r.startsWith("file://"),N,T,tr,B,b,x,rr,d,j,ar,nr,er=!1;function K(){var r=tr.buffer;B=new Int8Array(r),x=new Int16Array(r),b=new Uint8Array(r),rr=new Uint16Array(r),d=new Int32Array(r),j=new Uint32Array(r),ar=new Float32Array(r),nr=new Float64Array(r)}function C(){}function A(){er=!0,Ve(Jt),!l.noFSInit&&!n.initialized&&n.init(),wr.init(),Lr.B(),n.ignorePermissions=!1}function zr(){}var vr=0,pr=null;function mr(r){vr++}function br(r){if(vr--,vr==0&&pr){var e=pr;pr=null,e()}}function gr(r){r="Aborted("+r+")",X(r),I=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw T?.(e),e}var Gr;let Ur=()=>"";function Vr(r){if(r==Gr&&V)return new Uint8Array(V);if(W)return W(r);throw"both async and sync fetching of the wasm failed"}async function Jr(r){if(!V)try{var e=await k(r);return new Uint8Array(e)}catch{}return Vr(r)}async function yr(r,e){try{var t=await Jr(r),o=await WebAssembly.instantiate(t,e);return o}catch(i){X(`failed to asynchronously prepare wasm: ${i}`),gr(i)}}async function Mr(r,e,t){if(!r&&typeof WebAssembly.instantiateStreaming=="function"&&!ir(e))try{var o=fetch(e,{credentials:"same-origin"}),i=await WebAssembly.instantiateStreaming(o,t);return i}catch(a){X(`wasm streaming compile failed: ${a}`),X("falling back to ArrayBuffer instantiation")}return yr(e,t)}function Or(){return{a:nn}}async function Fr(){function r(a,u){return Lr=a.exports,tr=Lr.A,K(),tn(Lr),br("wasm-instantiate"),Lr}mr("wasm-instantiate");function e(a){return r(a.instance)}var t=Or();Gr??=Ur();var o=await Mr(V,Gr,t),i=e(o);return i}var E,U;class xr{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var Ve=r=>{for(;r.length>0;)r.shift()(l)};class Je{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){j[this.ptr+4>>2]=e}get_type(){return j[this.ptr+4>>2]}set_destructor(e){j[this.ptr+8>>2]=e}get_destructor(){return j[this.ptr+8>>2]}set_caught(e){e=e?1:0,B[this.ptr+12]=e}get_caught(){return B[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,B[this.ptr+13]=e}get_rethrown(){return B[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){j[this.ptr+16>>2]=e}get_adjusted_ptr(){return j[this.ptr+16>>2]}}var le=0,We=0,Te=(r,e,t)=>{var o=new Je(r);throw o.init(e,t),le=r,We++,le},P={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,o=r.length-1;o>=0;o--){var i=r[o];i==="."?r.splice(o,1):i===".."?(r.splice(o,1),t++):t&&(r.splice(o,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=P.isAbs(r),t=r.slice(-1)==="/";return r=P.normalizeArray(r.split("/").filter(o=>!!o),!e).join("/"),!r&&!e&&(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=P.splitPath(r),t=e[0],o=e[1];return!t&&!o?".":(o&&(o=o.slice(0,-1)),t+o)},basename:r=>r&&r.match(/([^\/]+|\/)\/*$/)[1],join:(...r)=>P.normalize(r.join("/")),join2:(r,e)=>P.normalize(r+"/"+e)},qe=()=>r=>crypto.getRandomValues(r),ce=r=>{(ce=qe())(r)},jr={resolve:(...r)=>{for(var e="",t=!1,o=r.length-1;o>=-1&&!t;o--){var i=o>=0?r[o]:n.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=P.isAbs(i)}return e=P.normalizeArray(e.split("/").filter(a=>!!a),!t).join("/"),(t?"/":"")+e||"."},relative:(r,e)=>{r=jr.resolve(r).slice(1),e=jr.resolve(e).slice(1);function t(m){for(var R=0;R<m.length&&m[R]==="";R++);for(var Q=m.length-1;Q>=0&&m[Q]==="";Q--);return R>Q?[]:m.slice(R,Q-R+1)}for(var o=t(r.split("/")),i=t(e.split("/")),a=Math.min(o.length,i.length),u=a,s=0;s<a;s++)if(o[s]!==i[s]){u=s;break}for(var p=[],s=u;s<o.length;s++)p.push("..");return p=p.concat(i.slice(u)),p.join("/")}},se=typeof TextDecoder<"u"?new TextDecoder:void 0,Dr=(r,e=0,t=NaN)=>{for(var o=e+t,i=e;r[i]&&!(i>=o);)++i;if(i-e>16&&r.buffer&&se)return se.decode(r.subarray(e,i));for(var a="";e<i;){var u=r[e++];if(!(u&128)){a+=String.fromCharCode(u);continue}var s=r[e++]&63;if((u&224)==192){a+=String.fromCharCode((u&31)<<6|s);continue}var p=r[e++]&63;if((u&240)==224?u=(u&15)<<12|s<<6|p:u=(u&7)<<18|s<<12|p<<6|r[e++]&63,u<65536)a+=String.fromCharCode(u);else{var m=u-65536;a+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return a},Ir=[],Hr=r=>{for(var e=0,t=0;t<r.length;++t){var o=r.charCodeAt(t);o<=127?e++:o<=2047?e+=2:o>=55296&&o<=57343?(e+=4,++t):e+=3}return e},he=(r,e,t,o)=>{if(!(o>0))return 0;for(var i=t,a=t+o-1,u=0;u<r.length;++u){var s=r.codePointAt(u);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|s&63}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|s&63}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|s&63,u++}}return e[t]=0,t-i},Wr=(r,e,t)=>{var o=t>0?t:Hr(r)+1,i=new Array(o),a=he(r,i,0,i.length);return e&&(i.length=a),i},Ze=()=>{if(!Ir.length){var r=null;if(!r)return null;Ir=Wr(r,!0)}return Ir.shift()},wr={ttys:[],init(){},shutdown(){},register(r,e){wr.ttys[r]={input:[],output:[],ops:e},n.registerDevice(r,wr.stream_ops)},stream_ops:{open(r){var e=wr.ttys[r.node.rdev];if(!e)throw new n.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,o,i){if(!r.tty||!r.tty.ops.get_char)throw new n.ErrnoError(60);for(var a=0,u=0;u<o;u++){var s;try{s=r.tty.ops.get_char(r.tty)}catch{throw new n.ErrnoError(29)}if(s===void 0&&a===0)throw new n.ErrnoError(6);if(s==null)break;a++,e[t+u]=s}return a&&(r.node.atime=Date.now()),a},write(r,e,t,o,i){if(!r.tty||!r.tty.ops.put_char)throw new n.ErrnoError(60);try{for(var a=0;a<o;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch{throw new n.ErrnoError(29)}return o&&(r.node.mtime=r.node.ctime=Date.now()),a}},default_tty_ops:{get_char(r){return Ze()},put_char(r,e){e===null||e===10?(L(Dr(r.output)),r.output=[]):e!=0&&r.output.push(e)},fsync(r){r.output?.length>0&&(L(Dr(r.output)),r.output=[])},ioctl_tcgets(r){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(r,e,t){return 0},ioctl_tiocgwinsz(r){return[24,80]}},default_tty1_ops:{put_char(r,e){e===null||e===10?(X(Dr(r.output)),r.output=[]):e!=0&&r.output.push(e)},fsync(r){r.output?.length>0&&(X(Dr(r.output)),r.output=[])}}},Ne=(r,e)=>b.fill(0,r,r+e),$r=(r,e)=>Math.ceil(r/e)*e,fe=r=>{r=$r(r,65536);var e=Xe(65536,r);return e&&Ne(e,r),e},G={ops_table:null,mount(r){return G.createNode(null,"/",16895,0)},createNode(r,e,t,o){if(n.isBlkdev(t)||n.isFIFO(t))throw new n.ErrnoError(63);G.ops_table||={dir:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr,lookup:G.node_ops.lookup,mknod:G.node_ops.mknod,rename:G.node_ops.rename,unlink:G.node_ops.unlink,rmdir:G.node_ops.rmdir,readdir:G.node_ops.readdir,symlink:G.node_ops.symlink},stream:{llseek:G.stream_ops.llseek}},file:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr},stream:{llseek:G.stream_ops.llseek,read:G.stream_ops.read,write:G.stream_ops.write,mmap:G.stream_ops.mmap,msync:G.stream_ops.msync}},link:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr,readlink:G.node_ops.readlink},stream:{}},chrdev:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr},stream:n.chrdev_stream_ops}};var i=n.createNode(r,e,t,o);return n.isDir(i.mode)?(i.node_ops=G.ops_table.dir.node,i.stream_ops=G.ops_table.dir.stream,i.contents={}):n.isFile(i.mode)?(i.node_ops=G.ops_table.file.node,i.stream_ops=G.ops_table.file.stream,i.usedBytes=0,i.contents=null):n.isLink(i.mode)?(i.node_ops=G.ops_table.link.node,i.stream_ops=G.ops_table.link.stream):n.isChrdev(i.mode)&&(i.node_ops=G.ops_table.chrdev.node,i.stream_ops=G.ops_table.chrdev.stream),i.atime=i.mtime=i.ctime=Date.now(),r&&(r.contents[e]=i,r.atime=r.mtime=r.ctime=i.atime),i},getFileDataAsTypedArray(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var o=1024*1024;e=Math.max(e,t*(t<o?2:1.125)>>>0),t!=0&&(e=Math.max(e,256));var i=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(i.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(e==0)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=n.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,n.isDir(r.mode)?e.size=4096:n.isFile(r.mode)?e.size=r.usedBytes:n.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.atime),e.mtime=new Date(r.mtime),e.ctime=new Date(r.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){for(let t of["mode","atime","mtime","ctime"])e[t]!=null&&(r[t]=e[t]);e.size!==void 0&&G.resizeFileStorage(r,e.size)},lookup(r,e){throw G.doesNotExistError},mknod(r,e,t,o){return G.createNode(r,e,t,o)},rename(r,e,t){var o;try{o=n.lookupNode(e,t)}catch{}if(o){if(n.isDir(r.mode))for(var i in o.contents)throw new n.ErrnoError(55);n.hashRemoveNode(o)}delete r.parent.contents[r.name],e.contents[t]=r,r.name=t,e.ctime=e.mtime=r.parent.ctime=r.parent.mtime=Date.now()},unlink(r,e){delete r.contents[e],r.ctime=r.mtime=Date.now()},rmdir(r,e){var t=n.lookupNode(r,e);for(var o in t.contents)throw new n.ErrnoError(55);delete r.contents[e],r.ctime=r.mtime=Date.now()},readdir(r){return[".","..",...Object.keys(r.contents)]},symlink(r,e,t){var o=G.createNode(r,e,41471,0);return o.link=t,o},readlink(r){if(!n.isLink(r.mode))throw new n.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,o,i){var a=r.node.contents;if(i>=r.node.usedBytes)return 0;var u=Math.min(r.node.usedBytes-i,o);if(u>8&&a.subarray)e.set(a.subarray(i,i+u),t);else for(var s=0;s<u;s++)e[t+s]=a[i+s];return u},write(r,e,t,o,i,a){if(e.buffer===B.buffer&&(a=!1),!o)return 0;var u=r.node;if(u.mtime=u.ctime=Date.now(),e.subarray&&(!u.contents||u.contents.subarray)){if(a)return u.contents=e.subarray(t,t+o),u.usedBytes=o,o;if(u.usedBytes===0&&i===0)return u.contents=e.slice(t,t+o),u.usedBytes=o,o;if(i+o<=u.usedBytes)return u.contents.set(e.subarray(t,t+o),i),o}if(G.expandFileStorage(u,i+o),u.contents.subarray&&e.subarray)u.contents.set(e.subarray(t,t+o),i);else for(var s=0;s<o;s++)u.contents[i+s]=e[t+s];return u.usedBytes=Math.max(u.usedBytes,i+o),o},llseek(r,e,t){var o=e;if(t===1?o+=r.position:t===2&&n.isFile(r.node.mode)&&(o+=r.node.usedBytes),o<0)throw new n.ErrnoError(28);return o},mmap(r,e,t,o,i){if(!n.isFile(r.node.mode))throw new n.ErrnoError(43);var a,u,s=r.node.contents;if(!(i&2)&&s&&s.buffer===B.buffer)u=!1,a=s.byteOffset;else{if(u=!0,a=fe(e),!a)throw new n.ErrnoError(48);s&&((t>0||t+e<s.length)&&(s.subarray?s=s.subarray(t,t+e):s=Array.prototype.slice.call(s,t,t+e)),B.set(s,a))}return{ptr:a,allocated:u}},msync(r,e,t,o,i){return G.stream_ops.write(r,e,0,o,t,!1),0}}},xe=async r=>{var e=await k(r);return new Uint8Array(e)},Ie=(...r)=>n.createDataFile(...r),He=r=>r,$e=[],Ae=(r,e,t,o)=>{typeof Browser<"u"&&Browser.init();var i=!1;return $e.forEach(a=>{i||a.canHandle(e)&&(a.handle(r,e,t,o),i=!0)}),i},rt=(r,e,t,o,i,a,u,s,p,m)=>{var R=e?jr.resolve(P.join2(r,e)):r,Q=He(`cp ${R}`);function D(M){function S(H){m?.(),s||Ie(r,e,H,o,i,p),a?.(),br(Q)}Ae(M,R,S,()=>{u?.(),br(Q)})||S(M)}mr(Q),typeof t=="string"?xe(t).then(D,u):D(t)},et=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},t=e[r];if(typeof t>"u")throw new Error(`Unknown file open mode: ${r}`);return t},Ar=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},n={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,ErrnoError:class{name="ErrnoError";constructor(r){this.errno=r}},FSStream:class{shared={};get object(){return this.node}set object(r){this.node=r}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(r,e,t,o){r||(r=this),this.parent=r,this.mount=r.mount,this.id=n.nextInode++,this.name=e,this.mode=t,this.rdev=o,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return n.isDir(this.mode)}get isDevice(){return n.isChrdev(this.mode)}},lookupPath(r,e={}){if(!r)throw new n.ErrnoError(44);e.follow_mount??=!0,P.isAbs(r)||(r=n.cwd()+"/"+r);r:for(var t=0;t<40;t++){for(var o=r.split("/").filter(m=>!!m),i=n.root,a="/",u=0;u<o.length;u++){var s=u===o.length-1;if(s&&e.parent)break;if(o[u]!=="."){if(o[u]===".."){if(a=P.dirname(a),n.isRoot(i)){r=a+"/"+o.slice(u+1).join("/");continue r}else i=i.parent;continue}a=P.join2(a,o[u]);try{i=n.lookupNode(i,o[u])}catch(m){if(m?.errno===44&&s&&e.noent_okay)return{path:a};throw m}if(n.isMountpoint(i)&&(!s||e.follow_mount)&&(i=i.mounted.root),n.isLink(i.mode)&&(!s||e.follow)){if(!i.node_ops.readlink)throw new n.ErrnoError(52);var p=i.node_ops.readlink(i);P.isAbs(p)||(p=P.dirname(a)+"/"+p),r=p+"/"+o.slice(u+1).join("/");continue r}}}return{path:a,node:i}}throw new n.ErrnoError(32)},getPath(r){for(var e;;){if(n.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,o=0;o<e.length;o++)t=(t<<5)-t+e.charCodeAt(o)|0;return(r+t>>>0)%n.nameTable.length},hashAddNode(r){var e=n.hashName(r.parent.id,r.name);r.name_next=n.nameTable[e],n.nameTable[e]=r},hashRemoveNode(r){var e=n.hashName(r.parent.id,r.name);if(n.nameTable[e]===r)n.nameTable[e]=r.name_next;else for(var t=n.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=n.mayLookup(r);if(t)throw new n.ErrnoError(t);for(var o=n.hashName(r.id,e),i=n.nameTable[o];i;i=i.name_next){var a=i.name;if(i.parent.id===r.id&&a===e)return i}return n.lookup(r,e)},createNode(r,e,t,o){var i=new n.FSNode(r,e,t,o);return n.hashAddNode(i),i},destroyNode(r){n.hashRemoveNode(r)},isRoot(r){return r===r.parent},isMountpoint(r){return!!r.mounted},isFile(r){return(r&61440)===32768},isDir(r){return(r&61440)===16384},isLink(r){return(r&61440)===40960},isChrdev(r){return(r&61440)===8192},isBlkdev(r){return(r&61440)===24576},isFIFO(r){return(r&61440)===4096},isSocket(r){return(r&49152)===49152},flagsToPermissionString(r){var e=["r","w","rw"][r&3];return r&512&&(e+="w"),e},nodePermissions(r,e){return n.ignorePermissions?0:e.includes("r")&&!(r.mode&292)||e.includes("w")&&!(r.mode&146)||e.includes("x")&&!(r.mode&73)?2:0},mayLookup(r){if(!n.isDir(r.mode))return 54;var e=n.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){if(!n.isDir(r.mode))return 54;try{var t=n.lookupNode(r,e);return 20}catch{}return n.nodePermissions(r,"wx")},mayDelete(r,e,t){var o;try{o=n.lookupNode(r,e)}catch(a){return a.errno}var i=n.nodePermissions(r,"wx");if(i)return i;if(t){if(!n.isDir(o.mode))return 54;if(n.isRoot(o)||n.getPath(o)===n.cwd())return 10}else if(n.isDir(o.mode))return 31;return 0},mayOpen(r,e){return r?n.isLink(r.mode)?32:n.isDir(r.mode)&&(n.flagsToPermissionString(e)!=="r"||e&576)?31:n.nodePermissions(r,n.flagsToPermissionString(e)):44},checkOpExists(r,e){if(!r)throw new n.ErrnoError(e);return r},MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=n.MAX_OPEN_FDS;r++)if(!n.streams[r])return r;throw new n.ErrnoError(33)},getStreamChecked(r){var e=n.getStream(r);if(!e)throw new n.ErrnoError(8);return e},getStream:r=>n.streams[r],createStream(r,e=-1){return r=Object.assign(new n.FSStream,r),e==-1&&(e=n.nextfd()),r.fd=e,n.streams[e]=r,r},closeStream(r){n.streams[r]=null},dupStream(r,e=-1){var t=n.createStream(r,e);return t.stream_ops?.dup?.(t),t},doSetAttr(r,e,t){var o=r?.stream_ops.setattr,i=o?r:e;o??=e.node_ops.setattr,n.checkOpExists(o,63),o(i,t)},chrdev_stream_ops:{open(r){var e=n.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r)},llseek(){throw new n.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,e)=>r<<8|e,registerDevice(r,e){n.devices[r]={stream_ops:e}},getDevice:r=>n.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var o=t.pop();e.push(o),t.push(...o.mounts)}return e},syncfs(r,e){typeof r=="function"&&(e=r,r=!1),n.syncFSRequests++,n.syncFSRequests>1&&X(`warning: ${n.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=n.getMounts(n.root.mount),o=0;function i(u){return n.syncFSRequests--,e(u)}function a(u){if(u)return a.errored?void 0:(a.errored=!0,i(u));++o>=t.length&&i(null)}t.forEach(u=>{if(!u.type.syncfs)return a(null);u.type.syncfs(u,r,a)})},mount(r,e,t){var o=t==="/",i=!t,a;if(o&&n.root)throw new n.ErrnoError(10);if(!o&&!i){var u=n.lookupPath(t,{follow_mount:!1});if(t=u.path,a=u.node,n.isMountpoint(a))throw new n.ErrnoError(10);if(!n.isDir(a.mode))throw new n.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},p=r.mount(s);return p.mount=s,s.root=p,o?n.root=p:a&&(a.mounted=s,a.mount&&a.mount.mounts.push(s)),p},unmount(r){var e=n.lookupPath(r,{follow_mount:!1});if(!n.isMountpoint(e.node))throw new n.ErrnoError(28);var t=e.node,o=t.mounted,i=n.getMounts(o);Object.keys(n.nameTable).forEach(u=>{for(var s=n.nameTable[u];s;){var p=s.name_next;i.includes(s.mount)&&n.destroyNode(s),s=p}}),t.mounted=null;var a=t.mount.mounts.indexOf(o);t.mount.mounts.splice(a,1)},lookup(r,e){return r.node_ops.lookup(r,e)},mknod(r,e,t){var o=n.lookupPath(r,{parent:!0}),i=o.node,a=P.basename(r);if(!a)throw new n.ErrnoError(28);if(a==="."||a==="..")throw new n.ErrnoError(20);var u=n.mayCreate(i,a);if(u)throw new n.ErrnoError(u);if(!i.node_ops.mknod)throw new n.ErrnoError(63);return i.node_ops.mknod(i,a,e,t)},statfs(r){return n.statfsNode(n.lookupPath(r,{follow:!0}).node)},statfsStream(r){return n.statfsNode(r.node)},statfsNode(r){var e={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:n.nextInode,ffree:n.nextInode-1,fsid:42,flags:2,namelen:255};return r.node_ops.statfs&&Object.assign(e,r.node_ops.statfs(r.mount.opts.root)),e},create(r,e=438){return e&=4095,e|=32768,n.mknod(r,e,0)},mkdir(r,e=511){return e&=1023,e|=16384,n.mknod(r,e,0)},mkdirTree(r,e){var t=r.split("/"),o="";for(var i of t)if(i){(o||P.isAbs(r))&&(o+="/"),o+=i;try{n.mkdir(o,e)}catch(a){if(a.errno!=20)throw a}}},mkdev(r,e,t){return typeof t>"u"&&(t=e,e=438),e|=8192,n.mknod(r,e,t)},symlink(r,e){if(!jr.resolve(r))throw new n.ErrnoError(44);var t=n.lookupPath(e,{parent:!0}),o=t.node;if(!o)throw new n.ErrnoError(44);var i=P.basename(e),a=n.mayCreate(o,i);if(a)throw new n.ErrnoError(a);if(!o.node_ops.symlink)throw new n.ErrnoError(63);return o.node_ops.symlink(o,i,r)},rename(r,e){var t=P.dirname(r),o=P.dirname(e),i=P.basename(r),a=P.basename(e),u,s,p;if(u=n.lookupPath(r,{parent:!0}),s=u.node,u=n.lookupPath(e,{parent:!0}),p=u.node,!s||!p)throw new n.ErrnoError(44);if(s.mount!==p.mount)throw new n.ErrnoError(75);var m=n.lookupNode(s,i),R=jr.relative(r,o);if(R.charAt(0)!==".")throw new n.ErrnoError(28);if(R=jr.relative(e,t),R.charAt(0)!==".")throw new n.ErrnoError(55);var Q;try{Q=n.lookupNode(p,a)}catch{}if(m!==Q){var D=n.isDir(m.mode),M=n.mayDelete(s,i,D);if(M)throw new n.ErrnoError(M);if(M=Q?n.mayDelete(p,a,D):n.mayCreate(p,a),M)throw new n.ErrnoError(M);if(!s.node_ops.rename)throw new n.ErrnoError(63);if(n.isMountpoint(m)||Q&&n.isMountpoint(Q))throw new n.ErrnoError(10);if(p!==s&&(M=n.nodePermissions(s,"w"),M))throw new n.ErrnoError(M);n.hashRemoveNode(m);try{s.node_ops.rename(m,p,a),m.parent=p}catch(S){throw S}finally{n.hashAddNode(m)}}},rmdir(r){var e=n.lookupPath(r,{parent:!0}),t=e.node,o=P.basename(r),i=n.lookupNode(t,o),a=n.mayDelete(t,o,!0);if(a)throw new n.ErrnoError(a);if(!t.node_ops.rmdir)throw new n.ErrnoError(63);if(n.isMountpoint(i))throw new n.ErrnoError(10);t.node_ops.rmdir(t,o),n.destroyNode(i)},readdir(r){var e=n.lookupPath(r,{follow:!0}),t=e.node,o=n.checkOpExists(t.node_ops.readdir,54);return o(t)},unlink(r){var e=n.lookupPath(r,{parent:!0}),t=e.node;if(!t)throw new n.ErrnoError(44);var o=P.basename(r),i=n.lookupNode(t,o),a=n.mayDelete(t,o,!1);if(a)throw new n.ErrnoError(a);if(!t.node_ops.unlink)throw new n.ErrnoError(63);if(n.isMountpoint(i))throw new n.ErrnoError(10);t.node_ops.unlink(t,o),n.destroyNode(i)},readlink(r){var e=n.lookupPath(r),t=e.node;if(!t)throw new n.ErrnoError(44);if(!t.node_ops.readlink)throw new n.ErrnoError(28);return t.node_ops.readlink(t)},stat(r,e){var t=n.lookupPath(r,{follow:!e}),o=t.node,i=n.checkOpExists(o.node_ops.getattr,63);return i(o)},fstat(r){var e=n.getStreamChecked(r),t=e.node,o=e.stream_ops.getattr,i=o?e:t;return o??=t.node_ops.getattr,n.checkOpExists(o,63),o(i)},lstat(r){return n.stat(r,!0)},doChmod(r,e,t,o){n.doSetAttr(r,e,{mode:t&4095|e.mode&-4096,ctime:Date.now(),dontFollow:o})},chmod(r,e,t){var o;if(typeof r=="string"){var i=n.lookupPath(r,{follow:!t});o=i.node}else o=r;n.doChmod(null,o,e,t)},lchmod(r,e){n.chmod(r,e,!0)},fchmod(r,e){var t=n.getStreamChecked(r);n.doChmod(t,t.node,e,!1)},doChown(r,e,t){n.doSetAttr(r,e,{timestamp:Date.now(),dontFollow:t})},chown(r,e,t,o){var i;if(typeof r=="string"){var a=n.lookupPath(r,{follow:!o});i=a.node}else i=r;n.doChown(null,i,o)},lchown(r,e,t){n.chown(r,e,t,!0)},fchown(r,e,t){var o=n.getStreamChecked(r);n.doChown(o,o.node,!1)},doTruncate(r,e,t){if(n.isDir(e.mode))throw new n.ErrnoError(31);if(!n.isFile(e.mode))throw new n.ErrnoError(28);var o=n.nodePermissions(e,"w");if(o)throw new n.ErrnoError(o);n.doSetAttr(r,e,{size:t,timestamp:Date.now()})},truncate(r,e){if(e<0)throw new n.ErrnoError(28);var t;if(typeof r=="string"){var o=n.lookupPath(r,{follow:!0});t=o.node}else t=r;n.doTruncate(null,t,e)},ftruncate(r,e){var t=n.getStreamChecked(r);if(e<0||(t.flags&2097155)===0)throw new n.ErrnoError(28);n.doTruncate(t,t.node,e)},utime(r,e,t){var o=n.lookupPath(r,{follow:!0}),i=o.node,a=n.checkOpExists(i.node_ops.setattr,63);a(i,{atime:e,mtime:t})},open(r,e,t=438){if(r==="")throw new n.ErrnoError(44);e=typeof e=="string"?et(e):e,e&64?t=t&4095|32768:t=0;var o,i;if(typeof r=="object")o=r;else{i=r.endsWith("/");var a=n.lookupPath(r,{follow:!(e&131072),noent_okay:!0});o=a.node,r=a.path}var u=!1;if(e&64)if(o){if(e&128)throw new n.ErrnoError(20)}else{if(i)throw new n.ErrnoError(31);o=n.mknod(r,t|511,0),u=!0}if(!o)throw new n.ErrnoError(44);if(n.isChrdev(o.mode)&&(e&=-513),e&65536&&!n.isDir(o.mode))throw new n.ErrnoError(54);if(!u){var s=n.mayOpen(o,e);if(s)throw new n.ErrnoError(s)}e&512&&!u&&n.truncate(o,0),e&=-131713;var p=n.createStream({node:o,path:n.getPath(o),flags:e,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return p.stream_ops.open&&p.stream_ops.open(p),u&&n.chmod(o,t&511),p},close(r){if(n.isClosed(r))throw new n.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{n.closeStream(r.fd)}r.fd=null},isClosed(r){return r.fd===null},llseek(r,e,t){if(n.isClosed(r))throw new n.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new n.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new n.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,o,i){if(o<0||i<0)throw new n.ErrnoError(28);if(n.isClosed(r))throw new n.ErrnoError(8);if((r.flags&2097155)===1)throw new n.ErrnoError(8);if(n.isDir(r.node.mode))throw new n.ErrnoError(31);if(!r.stream_ops.read)throw new n.ErrnoError(28);var a=typeof i<"u";if(!a)i=r.position;else if(!r.seekable)throw new n.ErrnoError(70);var u=r.stream_ops.read(r,e,t,o,i);return a||(r.position+=u),u},write(r,e,t,o,i,a){if(o<0||i<0)throw new n.ErrnoError(28);if(n.isClosed(r))throw new n.ErrnoError(8);if((r.flags&2097155)===0)throw new n.ErrnoError(8);if(n.isDir(r.node.mode))throw new n.ErrnoError(31);if(!r.stream_ops.write)throw new n.ErrnoError(28);r.seekable&&r.flags&1024&&n.llseek(r,0,2);var u=typeof i<"u";if(!u)i=r.position;else if(!r.seekable)throw new n.ErrnoError(70);var s=r.stream_ops.write(r,e,t,o,i,a);return u||(r.position+=s),s},mmap(r,e,t,o,i){if((o&2)!==0&&(i&2)===0&&(r.flags&2097155)!==2)throw new n.ErrnoError(2);if((r.flags&2097155)===1)throw new n.ErrnoError(2);if(!r.stream_ops.mmap)throw new n.ErrnoError(43);if(!e)throw new n.ErrnoError(28);return r.stream_ops.mmap(r,e,t,o,i)},msync(r,e,t,o,i){return r.stream_ops.msync?r.stream_ops.msync(r,e,t,o,i):0},ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new n.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary",e.encoding!=="utf8"&&e.encoding!=="binary")throw new Error(`Invalid encoding type "${e.encoding}"`);var t=n.open(r,e.flags),o=n.stat(r),i=o.size,a=new Uint8Array(i);return n.read(t,a,0,i,0),e.encoding==="utf8"&&(a=Dr(a)),n.close(t),a},writeFile(r,e,t={}){t.flags=t.flags||577;var o=n.open(r,t.flags,t.mode);if(typeof e=="string"&&(e=new Uint8Array(Wr(e,!0))),ArrayBuffer.isView(e))n.write(o,e,0,e.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");n.close(o)},cwd:()=>n.currentPath,chdir(r){var e=n.lookupPath(r,{follow:!0});if(e.node===null)throw new n.ErrnoError(44);if(!n.isDir(e.node.mode))throw new n.ErrnoError(54);var t=n.nodePermissions(e.node,"x");if(t)throw new n.ErrnoError(t);n.currentPath=e.path},createDefaultDirectories(){n.mkdir("/tmp"),n.mkdir("/home"),n.mkdir("/home/web_user")},createDefaultDevices(){n.mkdir("/dev"),n.registerDevice(n.makedev(1,3),{read:()=>0,write:(o,i,a,u,s)=>u,llseek:()=>0}),n.mkdev("/dev/null",n.makedev(1,3)),wr.register(n.makedev(5,0),wr.default_tty_ops),wr.register(n.makedev(6,0),wr.default_tty1_ops),n.mkdev("/dev/tty",n.makedev(5,0)),n.mkdev("/dev/tty1",n.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(e===0&&(ce(r),e=r.byteLength),r[--e]);n.createDevice("/dev","random",t),n.createDevice("/dev","urandom",t),n.mkdir("/dev/shm"),n.mkdir("/dev/shm/tmp")},createSpecialDirectories(){n.mkdir("/proc");var r=n.mkdir("/proc/self");n.mkdir("/proc/self/fd"),n.mount({mount(){var e=n.createNode(r,"fd",16895,73);return e.stream_ops={llseek:G.stream_ops.llseek},e.node_ops={lookup(t,o){var i=+o,a=n.getStreamChecked(i),u={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>a.path},id:i+1};return u.parent=u,u},readdir(){return Array.from(n.streams.entries()).filter(([t,o])=>o).map(([t,o])=>t.toString())}},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?n.createDevice("/dev","stdin",r):n.symlink("/dev/tty","/dev/stdin"),e?n.createDevice("/dev","stdout",null,e):n.symlink("/dev/tty","/dev/stdout"),t?n.createDevice("/dev","stderr",null,t):n.symlink("/dev/tty1","/dev/stderr");var o=n.open("/dev/stdin",0),i=n.open("/dev/stdout",1),a=n.open("/dev/stderr",1)},staticInit(){n.nameTable=new Array(4096),n.mount(G,{},"/"),n.createDefaultDirectories(),n.createDefaultDevices(),n.createSpecialDirectories(),n.filesystems={MEMFS:G}},init(r,e,t){n.initialized=!0,n.createStandardStreams(r,e,t)},quit(){n.initialized=!1;for(var r of n.streams)r&&n.close(r)},findObject(r,e){var t=n.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{var t=n.lookupPath(r,{follow:!e});r=t.path}catch{}var o={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=n.lookupPath(r,{parent:!0});o.parentExists=!0,o.parentPath=t.path,o.parentObject=t.node,o.name=P.basename(r),t=n.lookupPath(r,{follow:!e}),o.exists=!0,o.path=t.path,o.object=t.node,o.name=t.node.name,o.isRoot=t.path==="/"}catch(i){o.error=i.errno}return o},createPath(r,e,t,o){r=typeof r=="string"?r:n.getPath(r);for(var i=e.split("/").reverse();i.length;){var a=i.pop();if(a){var u=P.join2(r,a);try{n.mkdir(u)}catch(s){if(s.errno!=20)throw s}r=u}}return u},createFile(r,e,t,o,i){var a=P.join2(typeof r=="string"?r:n.getPath(r),e),u=Ar(o,i);return n.create(a,u)},createDataFile(r,e,t,o,i,a){var u=e;r&&(r=typeof r=="string"?r:n.getPath(r),u=e?P.join2(r,e):r);var s=Ar(o,i),p=n.create(u,s);if(t){if(typeof t=="string"){for(var m=new Array(t.length),R=0,Q=t.length;R<Q;++R)m[R]=t.charCodeAt(R);t=m}n.chmod(p,s|146);var D=n.open(p,577);n.write(D,t,0,t.length,0,a),n.close(D),n.chmod(p,s)}},createDevice(r,e,t,o){var i=P.join2(typeof r=="string"?r:n.getPath(r),e),a=Ar(!!t,!!o);n.createDevice.major??=64;var u=n.makedev(n.createDevice.major++,0);return n.registerDevice(u,{open(s){s.seekable=!1},close(s){o?.buffer?.length&&o(10)},read(s,p,m,R,Q){for(var D=0,M=0;M<R;M++){var S;try{S=t()}catch{throw new n.ErrnoError(29)}if(S===void 0&&D===0)throw new n.ErrnoError(6);if(S==null)break;D++,p[m+M]=S}return D&&(s.node.atime=Date.now()),D},write(s,p,m,R,Q){for(var D=0;D<R;D++)try{o(p[m+D])}catch{throw new n.ErrnoError(29)}return R&&(s.node.mtime=s.node.ctime=Date.now()),D}}),n.mkdev(i,a,u)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(typeof XMLHttpRequest<"u")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.");try{r.contents=W(r.url),r.usedBytes=r.contents.length}catch{throw new n.ErrnoError(29)}},createLazyFile(r,e,t,o,i){class a{lengthKnown=!1;chunks=[];get(M){if(!(M>this.length-1||M<0)){var S=M%this.chunkSize,H=M/this.chunkSize|0;return this.getter(H)[S]}}setDataGetter(M){this.getter=M}cacheLength(){var M=new XMLHttpRequest;if(M.open("HEAD",t,!1),M.send(null),!(M.status>=200&&M.status<300||M.status===304))throw new Error("Couldn't load "+t+". Status: "+M.status);var S=Number(M.getResponseHeader("Content-length")),H,sr=(H=M.getResponseHeader("Accept-Ranges"))&&H==="bytes",or=(H=M.getResponseHeader("Content-Encoding"))&&H==="gzip",hr=1024*1024;sr||(hr=S);var fr=(dr,Sr)=>{if(dr>Sr)throw new Error("invalid range ("+dr+", "+Sr+") or no bytes requested!");if(Sr>S-1)throw new Error("only "+S+" bytes available! programmer error!");var $=new XMLHttpRequest;if($.open("GET",t,!1),S!==hr&&$.setRequestHeader("Range","bytes="+dr+"-"+Sr),$.responseType="arraybuffer",$.overrideMimeType&&$.overrideMimeType("text/plain; charset=x-user-defined"),$.send(null),!($.status>=200&&$.status<300||$.status===304))throw new Error("Couldn't load "+t+". Status: "+$.status);return $.response!==void 0?new Uint8Array($.response||[]):Wr($.responseText||"",!0)},Kr=this;Kr.setDataGetter(dr=>{var Sr=dr*hr,$=(dr+1)*hr-1;if($=Math.min($,S-1),typeof Kr.chunks[dr]>"u"&&(Kr.chunks[dr]=fr(Sr,$)),typeof Kr.chunks[dr]>"u")throw new Error("doXHR failed!");return Kr.chunks[dr]}),(or||!S)&&(hr=S=1,S=this.getter(0).length,hr=S,L("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=S,this._chunkSize=hr,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!f)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var u=new a,s={isDevice:!1,contents:u}}else var s={isDevice:!1,url:t};var p=n.createFile(r,e,s,o,i);s.contents?p.contents=s.contents:s.url&&(p.contents=null,p.url=s.url),Object.defineProperties(p,{usedBytes:{get:function(){return this.contents.length}}});var m={},R=Object.keys(p.stream_ops);R.forEach(D=>{var M=p.stream_ops[D];m[D]=(...S)=>(n.forceLoadFile(p),M(...S))});function Q(D,M,S,H,sr){var or=D.node.contents;if(sr>=or.length)return 0;var hr=Math.min(or.length-sr,H);if(or.slice)for(var fr=0;fr<hr;fr++)M[S+fr]=or[sr+fr];else for(var fr=0;fr<hr;fr++)M[S+fr]=or.get(sr+fr);return hr}return m.read=(D,M,S,H,sr)=>(n.forceLoadFile(p),Q(D,M,S,H,sr)),m.mmap=(D,M,S,H,sr)=>{n.forceLoadFile(p);var or=fe(M);if(!or)throw new n.ErrnoError(48);return Q(D,B,or,M,S),{ptr:or,allocated:!0}},p.stream_ops=m,p}},ur=(r,e)=>r?Dr(b,r,e):"",Y={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(P.isAbs(e))return e;var o;if(r===-100)o=n.cwd();else{var i=Y.getStreamFromFD(r);o=i.path}if(e.length==0){if(!t)throw new n.ErrnoError(44);return o}return o+"/"+e},writeStat(r,e){d[r>>2]=e.dev,d[r+4>>2]=e.mode,j[r+8>>2]=e.nlink,d[r+12>>2]=e.uid,d[r+16>>2]=e.gid,d[r+20>>2]=e.rdev,U=[e.size>>>0,(E=e.size,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[r+24>>2]=U[0],d[r+28>>2]=U[1],d[r+32>>2]=4096,d[r+36>>2]=e.blocks;var t=e.atime.getTime(),o=e.mtime.getTime(),i=e.ctime.getTime();return U=[Math.floor(t/1e3)>>>0,(E=Math.floor(t/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[r+40>>2]=U[0],d[r+44>>2]=U[1],j[r+48>>2]=t%1e3*1e3*1e3,U=[Math.floor(o/1e3)>>>0,(E=Math.floor(o/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[r+56>>2]=U[0],d[r+60>>2]=U[1],j[r+64>>2]=o%1e3*1e3*1e3,U=[Math.floor(i/1e3)>>>0,(E=Math.floor(i/1e3),+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[r+72>>2]=U[0],d[r+76>>2]=U[1],j[r+80>>2]=i%1e3*1e3*1e3,U=[e.ino>>>0,(E=e.ino,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[r+88>>2]=U[0],d[r+92>>2]=U[1],0},writeStatFs(r,e){d[r+4>>2]=e.bsize,d[r+40>>2]=e.bsize,d[r+8>>2]=e.blocks,d[r+12>>2]=e.bfree,d[r+16>>2]=e.bavail,d[r+20>>2]=e.files,d[r+24>>2]=e.ffree,d[r+28>>2]=e.fsid,d[r+44>>2]=e.flags,d[r+36>>2]=e.namelen},doMsync(r,e,t,o,i){if(!n.isFile(e.node.mode))throw new n.ErrnoError(43);if(o&2)return 0;var a=b.slice(r,r+t);n.msync(e,a,i,t,o)},getStreamFromFD(r){var e=n.getStreamChecked(r);return e},varargs:void 0,getStr(r){var e=ur(r);return e}};function tt(r,e,t,o){try{if(e=Y.getStr(e),e=Y.calculateAt(r,e),t&-8)return-28;var i=n.lookupPath(e,{follow:!0}),a=i.node;if(!a)return-44;var u="";return t&4&&(u+="r"),t&2&&(u+="w"),t&1&&(u+="x"),u&&n.nodePermissions(a,u)?-2:0}catch(s){if(typeof n>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}var Tr=()=>{var r=d[+Y.varargs>>2];return Y.varargs+=4,r},Cr=Tr;function nt(r,e,t){Y.varargs=t;try{var o=Y.getStreamFromFD(r);switch(e){case 0:{var i=Tr();if(i<0)return-28;for(;n.streams[i];)i++;var a;return a=n.dupStream(o,i),a.fd}case 1:case 2:return 0;case 3:return o.flags;case 4:{var i=Tr();return o.flags|=i,0}case 12:{var i=Cr(),u=0;return x[i+u>>1]=2,0}case 13:case 14:return 0}return-28}catch(s){if(typeof n>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}function ot(r,e){try{return Y.writeStat(e,n.fstat(r))}catch(t){if(typeof n>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}function it(r,e,t){Y.varargs=t;try{var o=Y.getStreamFromFD(r);switch(e){case 21509:return o.tty?0:-59;case 21505:{if(!o.tty)return-59;if(o.tty.ops.ioctl_tcgets){var i=o.tty.ops.ioctl_tcgets(o),a=Cr();d[a>>2]=i.c_iflag||0,d[a+4>>2]=i.c_oflag||0,d[a+8>>2]=i.c_cflag||0,d[a+12>>2]=i.c_lflag||0;for(var u=0;u<32;u++)B[a+u+17]=i.c_cc[u]||0;return 0}return 0}case 21510:case 21511:case 21512:return o.tty?0:-59;case 21506:case 21507:case 21508:{if(!o.tty)return-59;if(o.tty.ops.ioctl_tcsets){for(var a=Cr(),s=d[a>>2],p=d[a+4>>2],m=d[a+8>>2],R=d[a+12>>2],Q=[],u=0;u<32;u++)Q.push(B[a+u+17]);return o.tty.ops.ioctl_tcsets(o.tty,e,{c_iflag:s,c_oflag:p,c_cflag:m,c_lflag:R,c_cc:Q})}return 0}case 21519:{if(!o.tty)return-59;var a=Cr();return d[a>>2]=0,0}case 21520:return o.tty?-28:-59;case 21531:{var a=Cr();return n.ioctl(o,e,a)}case 21523:{if(!o.tty)return-59;if(o.tty.ops.ioctl_tiocgwinsz){var D=o.tty.ops.ioctl_tiocgwinsz(o.tty),a=Cr();x[a>>1]=D[0],x[a+2>>1]=D[1]}return 0}case 21524:return o.tty?0:-59;case 21515:return o.tty?0:-59;default:return-28}}catch(M){if(typeof n>"u"||M.name!=="ErrnoError")throw M;return-M.errno}}function at(r,e,t,o){try{e=Y.getStr(e);var i=o&256,a=o&4096;return o=o&-6401,e=Y.calculateAt(r,e,a),Y.writeStat(t,i?n.lstat(e):n.stat(e))}catch(u){if(typeof n>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}function ut(r,e,t,o){Y.varargs=o;try{e=Y.getStr(e),e=Y.calculateAt(r,e);var i=o?Tr():0;return n.open(e,t,i).fd}catch(a){if(typeof n>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}var Br=(r,e,t)=>he(r,b,e,t);function lt(r,e,t,o){try{if(e=Y.getStr(e),e=Y.calculateAt(r,e),o<=0)return-28;var i=n.readlink(e),a=Math.min(o,Hr(i)),u=B[t+a];return Br(i,t,o+1),B[t+a]=u,a}catch(s){if(typeof n>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}function ct(r){try{return r=Y.getStr(r),n.rmdir(r),0}catch(e){if(typeof n>"u"||e.name!=="ErrnoError")throw e;return-e.errno}}function st(r,e,t){try{if(e=Y.getStr(e),e=Y.calculateAt(r,e),!t)n.unlink(e);else if(t===512)n.rmdir(e);else return-28;return 0}catch(o){if(typeof n>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}var ht=()=>gr(""),ft=r=>r%4===0&&(r%100!==0||r%400===0),vt=[0,31,60,91,121,152,182,213,244,274,305,335],pt=[0,31,59,90,120,151,181,212,243,273,304,334],dt=r=>{var e=ft(r.getFullYear()),t=e?vt:pt,o=t[r.getMonth()]+r.getDate()-1;return o},Rr=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+e*4294967296:NaN;function yt(r,e,t){var o=Rr(r,e),i=new Date(o*1e3);d[t>>2]=i.getSeconds(),d[t+4>>2]=i.getMinutes(),d[t+8>>2]=i.getHours(),d[t+12>>2]=i.getDate(),d[t+16>>2]=i.getMonth(),d[t+20>>2]=i.getFullYear()-1900,d[t+24>>2]=i.getDay();var a=dt(i)|0;d[t+28>>2]=a,d[t+36>>2]=-(i.getTimezoneOffset()*60);var u=new Date(i.getFullYear(),0,1),s=new Date(i.getFullYear(),6,1).getTimezoneOffset(),p=u.getTimezoneOffset(),m=(s!=p&&i.getTimezoneOffset()==Math.min(p,s))|0;d[t+32>>2]=m}function _t(r,e,t,o,i,a,u,s){var p=Rr(i,a);try{var m=Y.getStreamFromFD(o),R=n.mmap(m,r,p,e,t),Q=R.ptr;return d[u>>2]=R.allocated,j[s>>2]=Q,0}catch(D){if(typeof n>"u"||D.name!=="ErrnoError")throw D;return-D.errno}}function wt(r,e,t,o,i,a,u){var s=Rr(a,u);try{var p=Y.getStreamFromFD(i);t&2&&Y.doMsync(r,p,e,o,s)}catch(m){if(typeof n>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}var gt=(r,e,t,o)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),u=new Date(i,6,1),s=a.getTimezoneOffset(),p=u.getTimezoneOffset(),m=Math.max(s,p);j[r>>2]=m*60,d[e>>2]=+(s!=p);var R=M=>{var S=M>=0?"-":"+",H=Math.abs(M),sr=String(Math.floor(H/60)).padStart(2,"0"),or=String(H%60).padStart(2,"0");return`UTC${S}${sr}${or}`},Q=R(s),D=R(p);p<s?(Br(Q,t,17),Br(D,o,17)):(Br(Q,o,17),Br(D,t,17))},Mt=()=>performance.now(),ve=()=>Date.now(),Et=1,mt=r=>r>=0&&r<=3;function bt(r,e,t,o){var i=Rr(e,t);if(!mt(r))return 28;var a;if(r===0)a=ve();else if(Et)a=Mt();else return 52;var u=Math.round(a*1e3*1e3);return U=[u>>>0,(E=u,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[o>>2]=U[0],d[o+4>>2]=U[1],0}var re=[],Gt=(r,e)=>{re.length=0;for(var t;t=b[r++];){var o=t!=105;o&=t!=112,e+=o&&e%8?4:0,re.push(t==112?j[e>>2]:t==105?d[e>>2]:nr[e>>3]),e+=o?8:4}return re},Ot=(r,e,t)=>{var o=Gt(e,t);return Wt[r](...o)},Ft=(r,e,t)=>Ot(r,e,t),jt=()=>2147483648,Dt=r=>{var e=tr.buffer,t=(r-e.byteLength+65535)/65536|0;try{return tr.grow(t),K(),1}catch{}},Ct=r=>{var e=b.length;r>>>=0;var t=jt();if(r>t)return!1;for(var o=1;o<=4;o*=2){var i=e*(1+.2/o);i=Math.min(i,r+100663296);var a=Math.min(t,$r(Math.max(r,i),65536)),u=Dt(a);if(u)return!0}return!1},ee={},Bt=()=>v||"./this.program",Xr=()=>{if(!Xr.strings){var r=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:Bt()};for(var t in ee)ee[t]===void 0?delete e[t]:e[t]=ee[t];var o=[];for(var t in e)o.push(`${t}=${e[t]}`);Xr.strings=o}return Xr.strings},St=(r,e)=>{var t=0,o=0;for(var i of Xr()){var a=e+t;j[r+o>>2]=a,t+=Br(i,a,1/0)+1,o+=4}return 0},zt=(r,e)=>{var t=Xr();j[r>>2]=t.length;var o=0;for(var i of t)o+=Hr(i)+1;return j[e>>2]=o,0},Rt=()=>!0,Xt=r=>{F=r,Rt()||(I=!0),_(r,new xr(r))},Lt=(r,e)=>{F=r,Xt(r)},Kt=Lt;function Pt(r){try{var e=Y.getStreamFromFD(r);return n.close(e),0}catch(t){if(typeof n>"u"||t.name!=="ErrnoError")throw t;return t.errno}}var Qt=(r,e,t,o)=>{for(var i=0,a=0;a<t;a++){var u=j[e>>2],s=j[e+4>>2];e+=8;var p=n.read(r,B,u,s,o);if(p<0)return-1;if(i+=p,p<s)break;typeof o<"u"&&(o+=p)}return i};function kt(r,e,t,o){try{var i=Y.getStreamFromFD(r),a=Qt(i,e,t);return j[o>>2]=a,0}catch(u){if(typeof n>"u"||u.name!=="ErrnoError")throw u;return u.errno}}function Yt(r,e,t,o,i){var a=Rr(e,t);try{if(isNaN(a))return 61;var u=Y.getStreamFromFD(r);return n.llseek(u,a,o),U=[u.position>>>0,(E=u.position,+Math.abs(E)>=1?E>0?+Math.floor(E/4294967296)>>>0:~~+Math.ceil((E-+(~~E>>>0))/4294967296)>>>0:0)],d[i>>2]=U[0],d[i+4>>2]=U[1],u.getdents&&a===0&&o===0&&(u.getdents=null),0}catch(s){if(typeof n>"u"||s.name!=="ErrnoError")throw s;return s.errno}}var Ut=(r,e,t,o)=>{for(var i=0,a=0;a<t;a++){var u=j[e>>2],s=j[e+4>>2];e+=8;var p=n.write(r,B,u,s,o);if(p<0)return-1;if(i+=p,p<s)break;typeof o<"u"&&(o+=p)}return i};function Vt(r,e,t,o){try{var i=Y.getStreamFromFD(r),a=Ut(i,e,t);return j[o>>2]=a,0}catch(u){if(typeof n>"u"||u.name!=="ErrnoError")throw u;return u.errno}}var Jt=[];n.createPreloadedFile=rt,n.staticInit(),G.doesNotExistError=new n.ErrnoError(44),G.doesNotExistError.stack="<generic error, no stack>",l.wasmBinary&&(V=l.wasmBinary),l.UTF8ToString=ur;var Wt={173304:(r,e)=>{var t=ur(r),o=ur(e);n.createPath("/",P.dirname(t)),n.writeFile(P.join("/",t),o)}},Tt,qt,Zt,Nt,pe,de,ye,_e,we,ge,Me,Ee,me,be,Ge,Oe,Fe,je,De,Ce,Be,Se,ze,Re,Xe,xt,It,Ht,$t,At,rn,en;function tn(r){l._webidl_free=Tt=r.C,l._free=qt=r.D,l._webidl_malloc=Zt=r.E,l._malloc=Nt=r.F,l._emscripten_bind_VoidPtr___destroy___0=pe=r.G,l._emscripten_bind_Graphviz_Graphviz_2=de=r.H,l._emscripten_bind_Graphviz_version_0=ye=r.I,l._emscripten_bind_Graphviz_lastError_0=_e=r.J,l._emscripten_bind_Graphviz_createFile_2=we=r.K,l._emscripten_bind_Graphviz_layout_3=ge=r.L,l._emscripten_bind_Graphviz_acyclic_3=Me=r.M,l._emscripten_bind_Graphviz_tred_3=Ee=r.N,l._emscripten_bind_Graphviz_unflatten_4=me=r.O,l._emscripten_bind_Graphviz_get_layout_result_0=be=r.P,l._emscripten_bind_Graphviz_set_layout_result_1=Ge=r.Q,l._emscripten_bind_Graphviz_get_acyclic_outFile_0=Oe=r.R,l._emscripten_bind_Graphviz_set_acyclic_outFile_1=Fe=r.S,l._emscripten_bind_Graphviz_get_acyclic_num_rev_0=je=r.T,l._emscripten_bind_Graphviz_set_acyclic_num_rev_1=De=r.U,l._emscripten_bind_Graphviz_get_tred_out_0=Ce=r.V,l._emscripten_bind_Graphviz_set_tred_out_1=Be=r.W,l._emscripten_bind_Graphviz_get_tred_err_0=Se=r.X,l._emscripten_bind_Graphviz_set_t