UNPKG

116 kBJavaScriptView Raw
1!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r=r||self)["@hpcc-js/wasm"]={})}(this,(function(r){"use strict";function t(r,t){return r(t={exports:{}},t.exports),t.exports}var e=t((function(r,t){var e,n=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,n=void 0!==(r=r||{})?r:{};n.ready=new Promise((function(r,e){t=r}));var o,a={};for(o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);var i,s="./this.program",u="";document.currentScript&&(u=document.currentScript.src),e&&(u=e),u=0!==u.indexOf("blob:")?u.substr(0,u.lastIndexOf("/")+1):"",i=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText};var c,f,l=n.print||console.log.bind(console),d=n.printErr||console.warn.bind(console);for(o in a)a.hasOwnProperty(o)&&(n[o]=a[o]);a=null,n.arguments&&n.arguments,n.thisProgram&&(s=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(c=n.wasmBinary),n.noExitRuntime&&n.noExitRuntime,"object"!=typeof WebAssembly&&d("no native wasm support detected");var p=new WebAssembly.Table({initial:153,maximum:153,element:"anyfunc"}),m=!1;function h(r,t){r||H("Assertion failed: "+t)}var _,y,w,v,g,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&E)return E.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<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 b(r,t){return r?k(w,r,t):""}function D(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+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(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function S(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function F(r){_=r,n.HEAP8=y=new Int8Array(r),n.HEAP16=new Int16Array(r),n.HEAP32=v=new Int32Array(r),n.HEAPU8=w=new Uint8Array(r),n.HEAPU16=new Uint16Array(r),n.HEAPU32=new Uint32Array(r),n.HEAPF32=new Float32Array(r),n.HEAPF64=g=new Float64Array(r)}var P=n.INITIAL_MEMORY||16777216;function x(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?n.dynCall_v(e):n.dynCall_vi(e,t.arg):e(void 0===t.arg?null:t.arg)}else t(n)}}(f=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:P/65536,maximum:32768}))&&(_=f.buffer),P=_.byteLength,F(_),v[2100]=5251440;var M=[],A=[],C=[],R=[],j=Math.abs,O=Math.ceil,T=Math.floor,z=Math.min,B=0,N=null;function I(r){B++,n.monitorRunDependencies&&n.monitorRunDependencies(B)}function L(r){if(B--,n.monitorRunDependencies&&n.monitorRunDependencies(B),0==B&&N){var t=N;N=null,t()}}function H(r){throw n.onAbort&&n.onAbort(r),l(r+=""),d(r),m=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(r)}function U(r){return t=r,e="data:application/octet-stream;base64,",String.prototype.startsWith?t.startsWith(e):0===t.indexOf(e);var t,e}n.preloadedImages={},n.preloadedAudios={};var W,q,Y,J="expatlib.wasm";function V(){try{if(c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(r){H(r)}}U(J)||(W=J,J=n.locateFile?n.locateFile(W,u):u+W);var X={1284:function(r){var t=n.getCache(n.CExpatJS)[r];if(!t.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";t.startElement()},1504:function(r){var t=n.getCache(n.CExpatJS)[r];if(!t.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";t.endElement()},1716:function(r){var t=n.getCache(n.CExpatJS)[r];if(!t.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";t.characterData()}};function G(){var r=function(){var r=new Error;if(!r.stack){try{throw new Error}catch(t){r=t}if(!r.stack)return"(no stack trace available)"}return r.stack.toString()}();return n.extraStackTrace&&(r+="\n"+n.extraStackTrace()),r.replace(/\b_Z[\w\d_]+/g,(function(r){return r==r?r:r+" ["+r+"]"}))}A.push({func:function(){dr()}});var K={splitPath:function(r){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:function(r){var t="/"===r.charAt(0),e="/"===r.substr(-1);return(r=K.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=K.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:function(r){if("/"===r)return"/";var t=r.lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return K.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return K.normalize(r.join("/"))},join2:function(r,t){return K.normalize(r+"/"+t)}};function Z(r){return v[Cr()>>2]=r,r}var $={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:tr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t="/"===n.charAt(0)}return(t?"/":"")+(r=K.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||"."},relative:function(r,t){function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=$.resolve(r).substr(1),t=$.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.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("/")}},Q={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){Q.ttys[r]={input:[],output:[],ops:t},tr.registerDevice(r,Q.stream_ops)},stream_ops:{open:function(r){var t=Q.ttys[r.node.rdev];if(!t)throw new tr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new tr.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 tr.ErrnoError(29)}if(void 0===s&&0===a)throw new tr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new tr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;r.input=ur(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(l(k(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(l(k(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(d(k(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(d(k(r.output,0)),r.output=[])}}},rr={ops_table:null,mount:function(r){return rr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(tr.isBlkdev(e)||tr.isFIFO(e))throw new tr.ErrnoError(63);rr.ops_table||(rr.ops_table={dir:{node:{getattr:rr.node_ops.getattr,setattr:rr.node_ops.setattr,lookup:rr.node_ops.lookup,mknod:rr.node_ops.mknod,rename:rr.node_ops.rename,unlink:rr.node_ops.unlink,rmdir:rr.node_ops.rmdir,readdir:rr.node_ops.readdir,symlink:rr.node_ops.symlink},stream:{llseek:rr.stream_ops.llseek}},file:{node:{getattr:rr.node_ops.getattr,setattr:rr.node_ops.setattr},stream:{llseek:rr.stream_ops.llseek,read:rr.stream_ops.read,write:rr.stream_ops.write,allocate:rr.stream_ops.allocate,mmap:rr.stream_ops.mmap,msync:rr.stream_ops.msync}},link:{node:{getattr:rr.node_ops.getattr,setattr:rr.node_ops.setattr,readlink:rr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:rr.node_ops.getattr,setattr:rr.node_ops.setattr},stream:tr.chrdev_stream_ops}});var o=tr.createNode(r,t,e,n);return tr.isDir(o.mode)?(o.node_ops=rr.ops_table.dir.node,o.stream_ops=rr.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=rr.ops_table.file.node,o.stream_ops=rr.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=rr.ops_table.link.node,o.stream_ops=rr.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=rr.ops_table.chrdev.node,o.stream_ops=rr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o),o},getFileDataAsRegularArray:function(r){if(r.contents&&r.contents.subarray){for(var t=[],e=0;e<r.usedBytes;++e)t.push(r.contents[e]);return t}return r.contents},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,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t){if(0==t)return r.contents=null,void(r.usedBytes=0);if(!r.contents||r.contents.subarray){var e=r.contents;return r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),void(r.usedBytes=t)}if(r.contents||(r.contents=[]),r.contents.length>t)r.contents.length=t;else for(;r.contents.length<t;)r.contents.push(0);r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=tr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,tr.isDir(r.mode)?t.size=4096:tr.isFile(r.mode)?t.size=r.usedBytes:tr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&rr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw tr.genericErrors[44]},mknod:function(r,t,e,n){return rr.createNode(r,t,e,n)},rename:function(r,t,e){if(tr.isDir(r.mode)){var n;try{n=tr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new tr.ErrnoError(55)}delete r.parent.contents[r.name],r.name=e,t.contents[e]=r,r.parent=t},unlink:function(r,t){delete r.contents[t]},rmdir:function(r,t){var e=tr.lookupNode(r,t);for(var n in e.contents)throw new tr.ErrnoError(55);delete r.contents[t]},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=rr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!tr.isLink(r.mode))throw new tr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,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)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(t.buffer===y.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(rr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&tr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate:function(r,t,e){rr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o,a,i){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);var s,u,c=r.node.contents;if(2&i||c.buffer!==t.buffer){(o>0||o+n<c.length)&&(c=c.subarray?c.subarray(o,o+n):Array.prototype.slice.call(c,o,o+n)),u=!0;var f=t.buffer==y.buffer;if(!(s=Ar(n)))throw new tr.ErrnoError(48);(f?y:t).set(c,s)}else u=!1,s=c.byteOffset;return{ptr:s,allocated:u}},msync:function(r,t,e,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);return 2&o||rr.stream_ops.write(r,t,0,n,e,!1),0}}},tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(r){if(!(r instanceof tr.ErrnoError))throw r+" : "+G();return Z(r.errno)},lookupPath:function(r,t){if(t=t||{},!(r=$.resolve(tr.cwd(),r)))return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};for(var n in e)void 0===t[n]&&(t[n]=e[n]);if(t.recurse_count>8)throw new tr.ErrnoError(32);for(var o=K.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),a=tr.root,i="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&t.parent)break;if(a=tr.lookupNode(a,o[s]),i=K.join2(i,o[s]),tr.isMountpoint(a)&&(!u||u&&t.follow_mount)&&(a=a.mounted.root),!u||t.follow)for(var c=0;tr.isLink(a.mode);){var f=tr.readlink(i);if(i=$.resolve(K.dirname(i),f),a=tr.lookupPath(i,{recurse_count:t.recurse_count}).node,c++>40)throw new tr.ErrnoError(32)}}return{path:i,node:a}},getPath:function(r){for(var t;;){if(tr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:function(r,t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%tr.nameTable.length},hashAddNode:function(r){var t=tr.hashName(r.parent.id,r.name);r.name_next=tr.nameTable[t],tr.nameTable[t]=r},hashRemoveNode:function(r){var t=tr.hashName(r.parent.id,r.name);if(tr.nameTable[t]===r)tr.nameTable[t]=r.name_next;else for(var e=tr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:function(r,t){var e=tr.mayLookup(r);if(e)throw new tr.ErrnoError(e,r);for(var n=tr.hashName(r.id,t),o=tr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return tr.lookup(r,t)},createNode:function(r,t,e,n){var o=new tr.FSNode(r,t,e,n);return tr.hashAddNode(o),o},destroyNode:function(r){tr.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(r){var t=tr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:function(r){var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:function(r,t){return tr.ignorePermissions||(-1===t.indexOf("r")||292&r.mode)&&(-1===t.indexOf("w")||146&r.mode)&&(-1===t.indexOf("x")||73&r.mode)?0:2},mayLookup:function(r){var t=tr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{return tr.lookupNode(r,t),20}catch(r){}return tr.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=tr.lookupNode(r,t)}catch(r){return r.errno}var o=tr.nodePermissions(r,"wx");if(o)return o;if(e){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:function(r,t){return r?tr.isLink(r.mode)?32:tr.isDir(r.mode)&&("r"!==tr.flagsToPermissionString(t)||512&t)?31:tr.nodePermissions(r,tr.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||tr.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!tr.streams[e])return e;throw new tr.ErrnoError(33)},getStream:function(r){return tr.streams[r]},createStream:function(r,t,e){tr.FSStream||(tr.FSStream=function(){},tr.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}}});var n=new tr.FSStream;for(var o in r)n[o]=r[o];r=n;var a=tr.nextfd(t,e);return r.fd=a,tr.streams[a]=r,r},closeStream:function(r){tr.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=tr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new tr.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,t){return r<<8|t},registerDevice:function(r,t){tr.devices[r]={stream_ops:t}},getDevice:function(r){return tr.devices[r]},getMounts:function(r){for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:function(r,t){"function"==typeof r&&(t=r,r=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&d("warning: "+tr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=tr.getMounts(tr.root.mount),n=0;function o(r){return tr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)}))},mount:function(r,t,e){var n,o="/"===e,a=!e;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!a){var i=tr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?tr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var t=tr.lookupPath(r,{follow_mount:!1});if(!tr.isMountpoint(t.node))throw new tr.ErrnoError(28);var e=t.node,n=e.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach((function(r){for(var t=tr.nameTable[r];t;){var e=t.name_next;-1!==o.indexOf(t.mount)&&tr.destroyNode(t),t=e}})),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:function(r,t){return r.node_ops.lookup(r,t)},mknod:function(r,t,e){var n=tr.lookupPath(r,{parent:!0}).node,o=K.basename(r);if(!o||"."===o||".."===o)throw new tr.ErrnoError(28);var a=tr.mayCreate(n,o);if(a)throw new tr.ErrnoError(a);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:function(r,t){return t=void 0!==t?t:438,t&=4095,t|=32768,tr.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,tr.mknod(r,t,0)},mkdirTree:function(r,t){for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{tr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:function(r,t,e){return void 0===e&&(e=t,t=438),t|=8192,tr.mknod(r,t,e)},symlink:function(r,t){if(!$.resolve(r))throw new tr.ErrnoError(44);var e=tr.lookupPath(t,{parent:!0}).node;if(!e)throw new tr.ErrnoError(44);var n=K.basename(t),o=tr.mayCreate(e,n);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.symlink)throw new tr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:function(r,t){var e,n,o=K.dirname(r),a=K.dirname(t),i=K.basename(r),s=K.basename(t);try{e=tr.lookupPath(r,{parent:!0}).node,n=tr.lookupPath(t,{parent:!0}).node}catch(r){throw new tr.ErrnoError(10)}if(!e||!n)throw new tr.ErrnoError(44);if(e.mount!==n.mount)throw new tr.ErrnoError(75);var u,c=tr.lookupNode(e,i),f=$.relative(r,a);if("."!==f.charAt(0))throw new tr.ErrnoError(28);if("."!==(f=$.relative(t,o)).charAt(0))throw new tr.ErrnoError(55);try{u=tr.lookupNode(n,s)}catch(r){}if(c!==u){var l=tr.isDir(c.mode),p=tr.mayDelete(e,i,l);if(p)throw new tr.ErrnoError(p);if(p=u?tr.mayDelete(n,s,l):tr.mayCreate(n,s))throw new tr.ErrnoError(p);if(!e.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(c)||u&&tr.isMountpoint(u))throw new tr.ErrnoError(10);if(n!==e&&(p=tr.nodePermissions(e,"w")))throw new tr.ErrnoError(p);try{tr.trackingDelegate.willMovePath&&tr.trackingDelegate.willMovePath(r,t)}catch(e){d("FS.trackingDelegate['willMovePath']('"+r+"', '"+t+"') threw an exception: "+e.message)}tr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{tr.hashAddNode(c)}try{tr.trackingDelegate.onMovePath&&tr.trackingDelegate.onMovePath(r,t)}catch(e){d("FS.trackingDelegate['onMovePath']('"+r+"', '"+t+"') threw an exception: "+e.message)}}},rmdir:function(r){var t=tr.lookupPath(r,{parent:!0}).node,e=K.basename(r),n=tr.lookupNode(t,e),o=tr.mayDelete(t,e,!0);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);try{tr.trackingDelegate.willDeletePath&&tr.trackingDelegate.willDeletePath(r)}catch(t){d("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+t.message)}t.node_ops.rmdir(t,e),tr.destroyNode(n);try{tr.trackingDelegate.onDeletePath&&tr.trackingDelegate.onDeletePath(r)}catch(t){d("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+t.message)}},readdir:function(r){var t=tr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new tr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(r){var t=tr.lookupPath(r,{parent:!0}).node,e=K.basename(r),n=tr.lookupNode(t,e),o=tr.mayDelete(t,e,!1);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);try{tr.trackingDelegate.willDeletePath&&tr.trackingDelegate.willDeletePath(r)}catch(t){d("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+t.message)}t.node_ops.unlink(t,e),tr.destroyNode(n);try{tr.trackingDelegate.onDeletePath&&tr.trackingDelegate.onDeletePath(r)}catch(t){d("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+t.message)}},readlink:function(r){var t=tr.lookupPath(r).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.readlink)throw new tr.ErrnoError(28);return $.resolve(tr.getPath(t.parent),t.node_ops.readlink(t))},stat:function(r,t){var e=tr.lookupPath(r,{follow:!t}).node;if(!e)throw new tr.ErrnoError(44);if(!e.node_ops.getattr)throw new tr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:function(r){return tr.stat(r,!0)},chmod:function(r,t,e){var n;if(!(n="string"==typeof r?tr.lookupPath(r,{follow:!e}).node:r).node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,t){tr.chmod(r,t,!0)},fchmod:function(r,t){var e=tr.getStream(r);if(!e)throw new tr.ErrnoError(8);tr.chmod(e.node,t)},chown:function(r,t,e,n){var o;if(!(o="string"==typeof r?tr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,t,e){tr.chown(r,t,e,!0)},fchown:function(r,t,e){var n=tr.getStream(r);if(!n)throw new tr.ErrnoError(8);tr.chown(n.node,t,e)},truncate:function(r,t){if(t<0)throw new tr.ErrnoError(28);var e;if(!(e="string"==typeof r?tr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(e.mode))throw new tr.ErrnoError(31);if(!tr.isFile(e.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(e,"w");if(n)throw new tr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:function(r,t){var e=tr.getStream(r);if(!e)throw new tr.ErrnoError(8);if(0==(2097155&e.flags))throw new tr.ErrnoError(28);tr.truncate(e.node,t)},utime:function(r,t,e){var n=tr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:function(r,t,e,o,a){if(""===r)throw new tr.ErrnoError(44);var i;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?tr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)i=r;else{r=K.normalize(r);try{i=tr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var s=!1;if(64&t)if(i){if(128&t)throw new tr.ErrnoError(20)}else i=tr.mknod(r,e,0),s=!0;if(!i)throw new tr.ErrnoError(44);if(tr.isChrdev(i.mode)&&(t&=-513),65536&t&&!tr.isDir(i.mode))throw new tr.ErrnoError(54);if(!s){var u=tr.mayOpen(i,t);if(u)throw new tr.ErrnoError(u)}512&t&&tr.truncate(i,0),t&=-131713;var c=tr.createStream({node:i,path:tr.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1},o,a);c.stream_ops.open&&c.stream_ops.open(c),!n.logReadFiles||1&t||(tr.readFiles||(tr.readFiles={}),r in tr.readFiles||(tr.readFiles[r]=1,d("FS.trackingDelegate error on read file: "+r)));try{if(tr.trackingDelegate.onOpenFile){var f=0;1!=(2097155&t)&&(f|=tr.tracking.openFlags.READ),0!=(2097155&t)&&(f|=tr.tracking.openFlags.WRITE),tr.trackingDelegate.onOpenFile(r,f)}}catch(t){d("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+t.message)}return c},close:function(r){if(tr.isClosed(r))throw new tr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{tr.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,t,e){if(tr.isClosed(r))throw new tr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new tr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:function(r,t,e,n,o){if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(1==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.read)throw new tr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:function(r,t,e,n,o,a){if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.write)throw new tr.ErrnoError(28);r.seekable&&1024&r.flags&&tr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);i||(r.position+=s);try{r.path&&tr.trackingDelegate.onWriteToFile&&tr.trackingDelegate.onWriteToFile(r.path)}catch(t){d("FS.trackingDelegate['onWriteToFile']('"+r.path+"') threw an exception: "+t.message)}return s},allocate:function(r,t,e){if(tr.isClosed(r))throw new tr.ErrnoError(8);if(t<0||e<=0)throw new tr.ErrnoError(28);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(!tr.isFile(r.node.mode)&&!tr.isDir(r.node.mode))throw new tr.ErrnoError(43);if(!r.stream_ops.allocate)throw new tr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:function(r,t,e,n,o,a,i){if(0!=(2&a)&&0==(2&i)&&2!=(2097155&r.flags))throw new tr.ErrnoError(2);if(1==(2097155&r.flags))throw new tr.ErrnoError(2);if(!r.stream_ops.mmap)throw new tr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o,a,i)},msync:function(r,t,e,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0},munmap:function(r){return 0},ioctl:function(r,t,e){if(!r.stream_ops.ioctl)throw new tr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:function(r,t){if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=tr.open(r,t.flags),o=tr.stat(r).size,a=new Uint8Array(o);return tr.read(n,a,0,o,0),"utf8"===t.encoding?e=k(a,0):"binary"===t.encoding&&(e=a),tr.close(n),e},writeFile:function(r,t,e){(e=e||{}).flags=e.flags||"w";var n=tr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(S(t)+1),a=D(t,o,0,o.length);tr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");tr.write(n,t,0,t.byteLength,void 0,e.canOwn)}tr.close(n)},cwd:function(){return tr.currentPath},chdir:function(r){var t=tr.lookupPath(r,{follow:!0});if(null===t.node)throw new tr.ErrnoError(44);if(!tr.isDir(t.node.mode))throw new tr.ErrnoError(54);var e=tr.nodePermissions(t.node,"x");if(e)throw new tr.ErrnoError(e);tr.currentPath=t.path},createDefaultDirectories:function(){tr.mkdir("/tmp"),tr.mkdir("/home"),tr.mkdir("/home/web_user")},createDefaultDevices:function(){var r;if(tr.mkdir("/dev"),tr.registerDevice(tr.makedev(1,3),{read:function(){return 0},write:function(r,t,e,n,o){return n}}),tr.mkdev("/dev/null",tr.makedev(1,3)),Q.register(tr.makedev(5,0),Q.default_tty_ops),Q.register(tr.makedev(6,0),Q.default_tty1_ops),tr.mkdev("/dev/tty",tr.makedev(5,0)),tr.mkdev("/dev/tty1",tr.makedev(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);r=function(){return crypto.getRandomValues(t),t[0]}}r||(r=function(){H("random_device")}),tr.createDevice("/dev","random",r),tr.createDevice("/dev","urandom",r),tr.mkdir("/dev/shm"),tr.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){tr.mkdir("/proc"),tr.mkdir("/proc/self"),tr.mkdir("/proc/self/fd"),tr.mount({mount:function(){var r=tr.createNode("/proc/self","fd",16895,73);return r.node_ops={lookup:function(r,t){var e=+t,n=tr.getStream(e);if(!n)throw new tr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:function(){n.stdin?tr.createDevice("/dev","stdin",n.stdin):tr.symlink("/dev/tty","/dev/stdin"),n.stdout?tr.createDevice("/dev","stdout",null,n.stdout):tr.symlink("/dev/tty","/dev/stdout"),n.stderr?tr.createDevice("/dev","stderr",null,n.stderr):tr.symlink("/dev/tty1","/dev/stderr"),tr.open("/dev/stdin","r"),tr.open("/dev/stdout","w"),tr.open("/dev/stderr","w")},ensureErrnoError:function(){tr.ErrnoError||(tr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},tr.ErrnoError.prototype=new Error,tr.ErrnoError.prototype.constructor=tr.ErrnoError,[44].forEach((function(r){tr.genericErrors[r]=new tr.ErrnoError(r),tr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:function(){tr.ensureErrnoError(),tr.nameTable=new Array(4096),tr.mount(rr,{},"/"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:rr}},init:function(r,t,e){tr.init.initialized=!0,tr.ensureErrnoError(),n.stdin=r||n.stdin,n.stdout=t||n.stdout,n.stderr=e||n.stderr,tr.createStandardStreams()},quit:function(){tr.init.initialized=!1;var r=n._fflush;r&&r(0);for(var t=0;t<tr.streams.length;t++){var e=tr.streams[t];e&&tr.close(e)}},getMode:function(r,t){var e=0;return r&&(e|=365),t&&(e|=146),e},joinPath:function(r,t){var e=K.join.apply(null,r);return t&&"/"==e[0]&&(e=e.substr(1)),e},absolutePath:function(r,t){return $.resolve(t,r)},standardizePath:function(r){return K.normalize(r)},findObject:function(r,t){var e=tr.analyzePath(r,t);return e.exists?e.object:(Z(e.error),null)},analyzePath:function(r,t){try{r=(n=tr.lookupPath(r,{follow:!t})).path}catch(r){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=K.basename(r),n=tr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(r){e.error=r.errno}return e},createFolder:function(r,t,e,n){var o=K.join2("string"==typeof r?r:tr.getPath(r),t),a=tr.getMode(e,n);return tr.mkdir(o,a)},createPath:function(r,t,e,n){r="string"==typeof r?r:tr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=K.join2(r,a);try{tr.mkdir(i)}catch(r){}r=i}}return i},createFile:function(r,t,e,n,o){var a=K.join2("string"==typeof r?r:tr.getPath(r),t),i=tr.getMode(n,o);return tr.create(a,i)},createDataFile:function(r,t,e,n,o,a){var i=t?K.join2("string"==typeof r?r:tr.getPath(r),t):r,s=tr.getMode(n,o),u=tr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}tr.chmod(u,146|s);var d=tr.open(u,"w");tr.write(d,e,0,e.length,0,a),tr.close(d),tr.chmod(u,s)}return u},createDevice:function(r,t,e,n){var o=K.join2("string"==typeof r?r:tr.getPath(r),t),a=tr.getMode(!!e,!!n);tr.createDevice.major||(tr.createDevice.major=64);var i=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(i,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,t,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(r){throw new tr.ErrnoError(29)}if(void 0===u&&0===i)throw new tr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:function(r,t,e,o,a){for(var i=0;i<o;i++)try{n(t[e+i])}catch(r){throw new tr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),tr.mkdev(o,a,i)},createLink:function(r,t,e,n,o){var a=K.join2("string"==typeof r?r:tr.getPath(r),t);return tr.symlink(e,a)},forceLoadFile:function(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;var t=!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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=ur(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){t=!1}return t||Z(29),t},createLazyFile:function(r,t,e,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter((function(r){var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(r,t){if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),"undefined"!=typeof Uint8Array&&(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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ur(o.responseText||"",!0)}(t,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,l("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)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:e},s=tr.createFile(r,t,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(r){var t=s.stream_ops[r];u[r]=function(){if(!tr.forceLoadFile(s))throw new tr.ErrnoError(29);return t.apply(null,arguments)}})),u.read=function(r,t,e,n,o){if(!tr.forceLoadFile(s))throw new tr.ErrnoError(29);var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var u=0;u<i;u++)t[e+u]=a[o+u];else for(u=0;u<i;u++)t[e+u]=a.get(o+u);return i},s.stream_ops=u,s},createPreloadedFile:function(r,t,e,o,a,i,s,u,c,f){Browser.init();var l=t?$.resolve(K.join2(r,t)):r;function d(e){function d(e){f&&f(),u||tr.createDataFile(r,t,e,o,a,c),i&&i(),L()}var p=!1;n.preloadPlugins.forEach((function(r){p||r.canHandle(l)&&(r.handle(e,l,d,(function(){s&&s(),L()})),p=!0)})),p||d(e)}I(),"string"==typeof e?Browser.asyncLoad(e,(function(r){d(r)}),s):d(e)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,t,e){t=t||function(){},e=e||function(){};var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=function(){l("creating db"),o.result.createObjectStore(tr.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([tr.DB_STORE_NAME],"readwrite"),a=n.objectStore(tr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach((function(r){var t=a.put(tr.analyzePath(r).object.contents,r);t.onsuccess=function(){++i+s==u&&c()},t.onerror=function(){s++,i+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:function(r,t,e){t=t||function(){},e=e||function(){};var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=e,o.onsuccess=function(){var n=o.result;try{var a=n.transaction([tr.DB_STORE_NAME],"readonly")}catch(r){return void e(r)}var i=a.objectStore(tr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?t():e()}r.forEach((function(r){var t=i.get(r);t.onsuccess=function(){tr.analyzePath(r).exists&&tr.unlink(r),tr.createDataFile(K.dirname(r),K.basename(r),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=function(){u++,s+u==c&&f()}})),a.onerror=e},o.onerror=e}},er={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(r,t){if("/"!==t[0]){var e;if(-100===r)e=tr.cwd();else{var n=tr.getStream(r);if(!n)throw new tr.ErrnoError(8);e=n.path}t=K.join2(e,t)}return t},doStat:function(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&K.normalize(t)!==K.normalize(tr.getPath(r.node)))return-54;throw r}return v[e>>2]=n.dev,v[e+4>>2]=0,v[e+8>>2]=n.ino,v[e+12>>2]=n.mode,v[e+16>>2]=n.nlink,v[e+20>>2]=n.uid,v[e+24>>2]=n.gid,v[e+28>>2]=n.rdev,v[e+32>>2]=0,Y=[n.size>>>0,(q=n.size,+j(q)>=1?q>0?(0|z(+T(q/4294967296),4294967295))>>>0:~~+O((q-+(~~q>>>0))/4294967296)>>>0:0)],v[e+40>>2]=Y[0],v[e+44>>2]=Y[1],v[e+48>>2]=4096,v[e+52>>2]=n.blocks,v[e+56>>2]=n.atime.getTime()/1e3|0,v[e+60>>2]=0,v[e+64>>2]=n.mtime.getTime()/1e3|0,v[e+68>>2]=0,v[e+72>>2]=n.ctime.getTime()/1e3|0,v[e+76>>2]=0,Y=[n.ino>>>0,(q=n.ino,+j(q)>=1?q>0?(0|z(+T(q/4294967296),4294967295))>>>0:~~+O((q-+(~~q>>>0))/4294967296)>>>0:0)],v[e+80>>2]=Y[0],v[e+84>>2]=Y[1],0},doMsync:function(r,t,e,n,o){var a=w.slice(r,r+e);tr.msync(t,a,o,e,n)},doMkdir:function(r,t){return"/"===(r=K.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),tr.mkdir(r,t,0),0},doMknod:function(r,t,e){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return tr.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=tr.readlink(r),o=Math.min(e,S(n)),a=y[t+o];return D(n,w,t,e+1),y[t+o]=a,o},doAccess:function(r,t){if(-8&t)return-28;var e;if(!(e=tr.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&tr.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=tr.getStream(e);return n&&tr.close(n),tr.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=v[t+8*a>>2],s=v[t+(8*a+4)>>2],u=tr.read(r,y,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=v[t+8*a>>2],s=v[t+(8*a+4)>>2],u=tr.write(r,y,i,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return er.varargs+=4,v[er.varargs-4>>2]},getStr:function(r){return b(r)},getStreamFromFD:function(r){var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);return t},get64:function(r,t){return r}};function nr(r){try{return f.grow(r-_.byteLength+65535>>>16),F(f.buffer),1}catch(r){}}var or={};function ar(){if(!ar.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",_:s||"./this.program"};for(var t in or)r[t]=or[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ar.strings=e}return ar.strings}function ir(r,t){ir.array||(ir.array=[]);var e,n=ir.array;for(n.length=0;e=w[r++];)100===e||102===e?(t=t+7&-8,n.push(g[t>>3]),t+=8):(t=t+3&-4,n.push(v[t>>2]),t+=4);return n}var sr=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=tr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n};function ur(r,t,e){var n=e>0?e:S(r)+1,o=new Array(n),a=D(r,o,0,o.length);return t&&(o.length=a),o}Object.defineProperties(sr.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return tr.isDir(this.mode)}},isDevice:{get:function(){return tr.isChrdev(this.mode)}}}),tr.FSNode=sr,tr.staticInit();var cr={j:function(){return 42},b:function(){H()},a:function(r,t,e){var n=ir(t,e);return X[r].apply(null,n)},d:function(r,t,e){w.copyWithin(r,t,t+e)},e:function(r){r>>>=0;var t=w.length;if(r>2147483648)return!1;for(var e,n,o=1;o<=4;o*=2){var a=t*(1+.2/o);if(a=Math.min(a,r+100663296),nr(Math.min(2147483648,((e=Math.max(16777216,r,a))%(n=65536)>0&&(e+=n-e%n),e))))return!0}return!1},f:function(r,t){var e=0;return ar().forEach((function(n,o){var a=t+e;v[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)y[t++>>0]=r.charCodeAt(n);e||(y[t>>0]=0)}(n,a),e+=n.length+1})),0},g:function(r,t){var e=ar();v[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),v[t>>2]=n,0},h:function(r){try{var t=er.getStreamFromFD(r);return tr.close(t),0}catch(r){return void 0!==tr&&r instanceof tr.ErrnoError||H(r),r.errno}},i:function(r,t,e,n,o){try{var a=er.getStreamFromFD(r),i=4294967296*e+(t>>>0);return i<=-9007199254740992||i>=9007199254740992?-61:(tr.llseek(a,i,n),Y=[a.position>>>0,(q=a.position,+j(q)>=1?q>0?(0|z(+T(q/4294967296),4294967295))>>>0:~~+O((q-+(~~q>>>0))/4294967296)>>>0:0)],v[o>>2]=Y[0],v[o+4>>2]=Y[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0)}catch(r){return void 0!==tr&&r instanceof tr.ErrnoError||H(r),r.errno}},c:function(r,t,e,n){try{var o=er.getStreamFromFD(r),a=er.doWritev(o,t,e);return v[n>>2]=a,0}catch(r){return void 0!==tr&&r instanceof tr.ErrnoError||H(r),r.errno}},k:function(r){var t=Date.now();return v[r>>2]=t/1e3|0,v[r+4>>2]=t%1e3*1e3|0,0},memory:f,table:p},fr=function(){var r={a:cr};function t(r,t){var e=r.exports;n.asm=e,L()}function e(r){t(r.instance)}function o(t){return(c||"function"!=typeof fetch?new Promise((function(r,t){r(V())})):fetch(J,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+J+"'";return r.arrayBuffer()})).catch((function(){return V()}))).then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){d("failed to asynchronously prepare wasm: "+r),H(r)}))}if(I(),n.instantiateWasm)try{return n.instantiateWasm(r,t)}catch(r){return d("Module.instantiateWasm callback failed with error: "+r),!1}return function(){if(c||"function"!=typeof WebAssembly.instantiateStreaming||U(J)||"function"!=typeof fetch)return o(e);fetch(J,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){d("wasm streaming compile failed: "+r),d("falling back to ArrayBuffer instantiation"),o(e)}))}))}(),{}}();n.asm=fr;var lr,dr=n.___wasm_call_ctors=function(){return(dr=n.___wasm_call_ctors=n.asm.l).apply(null,arguments)},pr=(n.___em_js__array_bounds_check_error=function(){return(n.___em_js__array_bounds_check_error=n.asm.m).apply(null,arguments)},n._emscripten_bind_CExpat_CExpat_0=function(){return(pr=n._emscripten_bind_CExpat_CExpat_0=n.asm.n).apply(null,arguments)}),mr=n._emscripten_bind_CExpat_create_0=function(){return(mr=n._emscripten_bind_CExpat_create_0=n.asm.o).apply(null,arguments)},hr=n._emscripten_bind_CExpat_destroy_0=function(){return(hr=n._emscripten_bind_CExpat_destroy_0=n.asm.p).apply(null,arguments)},_r=n._emscripten_bind_CExpat_parse_1=function(){return(_r=n._emscripten_bind_CExpat_parse_1=n.asm.q).apply(null,arguments)},yr=n._emscripten_bind_CExpat_tag_0=function(){return(yr=n._emscripten_bind_CExpat_tag_0=n.asm.r).apply(null,arguments)},wr=n._emscripten_bind_CExpat_attrs_0=function(){return(wr=n._emscripten_bind_CExpat_attrs_0=n.asm.s).apply(null,arguments)},vr=n._emscripten_bind_CExpat_content_0=function(){return(vr=n._emscripten_bind_CExpat_content_0=n.asm.t).apply(null,arguments)},gr=n._emscripten_bind_CExpat_startElement_0=function(){return(gr=n._emscripten_bind_CExpat_startElement_0=n.asm.u).apply(null,arguments)},Er=n._emscripten_bind_CExpat_endElement_0=function(){return(Er=n._emscripten_bind_CExpat_endElement_0=n.asm.v).apply(null,arguments)},kr=n._emscripten_bind_CExpat_characterData_0=function(){return(kr=n._emscripten_bind_CExpat_characterData_0=n.asm.w).apply(null,arguments)},br=n._emscripten_bind_CExpat___destroy___0=function(){return(br=n._emscripten_bind_CExpat___destroy___0=n.asm.x).apply(null,arguments)},Dr=n._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Dr=n._emscripten_bind_CExpatJS_CExpatJS_0=n.asm.y).apply(null,arguments)},Sr=n._emscripten_bind_CExpatJS_startElement_0=function(){return(Sr=n._emscripten_bind_CExpatJS_startElement_0=n.asm.z).apply(null,arguments)},Fr=n._emscripten_bind_CExpatJS_endElement_0=function(){return(Fr=n._emscripten_bind_CExpatJS_endElement_0=n.asm.A).apply(null,arguments)},Pr=n._emscripten_bind_CExpatJS_characterData_0=function(){return(Pr=n._emscripten_bind_CExpatJS_characterData_0=n.asm.B).apply(null,arguments)},xr=n._emscripten_bind_CExpatJS___destroy___0=function(){return(xr=n._emscripten_bind_CExpatJS___destroy___0=n.asm.C).apply(null,arguments)},Mr=n._emscripten_bind_VoidPtr___destroy___0=function(){return(Mr=n._emscripten_bind_VoidPtr___destroy___0=n.asm.D).apply(null,arguments)},Ar=n._malloc=function(){return(Ar=n._malloc=n.asm.E).apply(null,arguments)},Cr=(n._free=function(){return(n._free=n.asm.F).apply(null,arguments)},n.___errno_location=function(){return(Cr=n.___errno_location=n.asm.G).apply(null,arguments)});function Rr(r){function e(){lr||(lr=!0,n.calledRun=!0,m||(n.noFSInit||tr.init.initialized||tr.init(),Q.init(),x(A),tr.ignorePermissions=!1,x(C),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)r=n.postRun.shift(),R.unshift(r);var r;x(R)}()))}B>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)r=n.preRun.shift(),M.unshift(r);var r;x(M)}(),B>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_vi=function(){return(n.dynCall_vi=n.asm.H).apply(null,arguments)},n.asm=fr,N=function r(){lr||Rr(),lr||(N=r)},n.run=Rr,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function jr(){}function Or(r){return(r||jr).__cache__}function Tr(r,t){var e=Or(t),n=e[r];return n||((n=Object.create((t||jr).prototype)).ptr=r,e[r]=n)}Rr(),jr.prototype=Object.create(jr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},n.WrapperObject=jr,n.getCache=Or,n.wrapPointer=Tr,n.castObject=function(r,t){return Tr(r.ptr,t)},n.NULL=Tr(0),n.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Or(r.__class__)[r.ptr]},n.compare=function(r,t){return r.ptr===t.ptr},n.getPointer=function(r){return r.ptr},n.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++)n._free(zr.temps[r]);zr.temps.length=0,n._free(zr.buffer),zr.buffer=0,zr.size+=zr.needed,zr.needed=0}zr.buffer||(zr.size+=128,zr.buffer=n._malloc(zr.size),h(zr.buffer)),zr.pos=0},alloc:function(r,t){h(zr.buffer);var e,o=t.BYTES_PER_ELEMENT,a=r.length*o;return a=a+7&-8,zr.pos+a>=zr.size?(h(a>0),zr.needed+=a,e=n._malloc(a),zr.temps.push(e)):(e=zr.buffer+zr.pos,zr.pos+=a),e},copy:function(r,t,e){switch(e>>>=0,t.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n<r.length;n++)t[e+n]=r[n]}};function Br(){this.ptr=pr(),Or(Br)[this.ptr]=this}function Nr(){this.ptr=Dr(),Or(Nr)[this.ptr]=this}function Ir(){throw"cannot construct a VoidPtr, no constructor in IDL"}return Br.prototype=Object.create(jr.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},n.CExpat=Br,Br.prototype.create=Br.prototype.create=function(){var r=this.ptr;return!!mr(r)},Br.prototype.destroy=Br.prototype.destroy=function(){var r=this.ptr;hr(r)},Br.prototype.parse=Br.prototype.parse=function(r){var t=this.ptr;return zr.prepare(),r=r&&"object"==typeof r?r.ptr:function(r){if("string"==typeof r){var t=ur(r),e=zr.alloc(t,y);return zr.copy(t,y,e),e}return r}(r),!!_r(t,r)},Br.prototype.tag=Br.prototype.tag=function(){var r=this.ptr;return b(yr(r))},Br.prototype.attrs=Br.prototype.attrs=function(){var r=this.ptr;return b(wr(r))},Br.prototype.content=Br.prototype.content=function(){var r=this.ptr;return b(vr(r))},Br.prototype.startElement=Br.prototype.startElement=function(){var r=this.ptr;gr(r)},Br.prototype.endElement=Br.prototype.endElement=function(){var r=this.ptr;Er(r)},Br.prototype.characterData=Br.prototype.characterData=function(){var r=this.ptr;kr(r)},Br.prototype.__destroy__=Br.prototype.__destroy__=function(){var r=this.ptr;br(r)},Nr.prototype=Object.create(Br.prototype),Nr.prototype.constructor=Nr,Nr.prototype.__class__=Nr,Nr.__cache__={},n.CExpatJS=Nr,Nr.prototype.startElement=Nr.prototype.startElement=function(){var r=this.ptr;Sr(r)},Nr.prototype.endElement=Nr.prototype.endElement=function(){var r=this.ptr;Fr(r)},Nr.prototype.characterData=Nr.prototype.characterData=function(){var r=this.ptr;Pr(r)},Nr.prototype.__destroy__=Nr.prototype.__destroy__=function(){var r=this.ptr;xr(r)},Ir.prototype=Object.create(jr.prototype),Ir.prototype.constructor=Ir,Ir.prototype.__class__=Ir,Ir.__cache__={},n.VoidPtr=Ir,Ir.prototype.__destroy__=Ir.prototype.__destroy__=function(){var r=this.ptr;Mr(r)},r.ready});r.exports=n})),n=Object.freeze({__proto__:null,default:e,__moduleExports:e}),o=new Function("return this;")().__hpcc_wasmFolder||void 0;function a(r){if(void 0===r)return o;var t=o;return o=r,t}function i(r,t){var e=r.default||r;return e.__hpcc_promise||(e.__hpcc_promise=new Promise((function(r){e({locateFile:function(r,e){return function(r,t){for(;r.charAt(r.length-1)===t;)r=r.substring(0,r.length-1);return r}(t||a()||e||".","/")+"/"+function(r,t){for(;r.charAt(0)===t;)r=r.substring(1);return r}(r,"/")}}).then((function(t){delete t.then,r(t)}))}))),e.__hpcc_promise}var s=function(){function r(r,t){this.tag=r,this.attrs=t,this._content=""}return Object.defineProperty(r.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),r.prototype.appendContent=function(r){this._content+=r},r}(),u=function(){function r(){this._stack=[]}return r.prototype.parse=function(r){return c(r,this)},r.prototype.top=function(){return this._stack[this._stack.length-1]},r.prototype.startElement=function(r,t){var e=new s(r,t);return this._stack.push(e),e},r.prototype.endElement=function(r){return this._stack.pop()},r.prototype.characterData=function(r){this.top().appendContent(r)},r}();function c(r,t,e){return i(n,e).then((function(e){var n=new e.CExpatJS;n.startElement=function(){t.startElement(this.tag(),function(r){var t={},e=r,n=""+String.fromCharCode(1),o=""+n+n;return e.split(o).filter((function(r){return!!r})).forEach((function(r){var e=r.split(n);t[e[0]]=e[1]})),t}(this.attrs()))},n.endElement=function(){t.endElement(this.tag())},n.characterData=function(){t.characterData(this.content())},n.create();var o=n.parse(r);return n.destroy(),e.destroy(n),o}))}var f=t((function(r,t){var e,n=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,n=void 0!==(r=r||{})?r:{};n.ready=new Promise((function(r,e){t=r}));var o,a={};for(o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);var i,s="./this.program",u=function(r,t){throw t},c="";document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=0!==c.indexOf("blob:")?c.substr(0,c.lastIndexOf("/")+1):"",i=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText};var f=n.print||console.log.bind(console),l=n.printErr||console.warn.bind(console);for(o in a)a.hasOwnProperty(o)&&(n[o]=a[o]);a=null,n.arguments&&n.arguments,n.thisProgram&&(s=n.thisProgram),n.quit&&(u=n.quit);var d,p,m,h=0,_=function(r){h=r};n.wasmBinary&&(d=n.wasmBinary),n.noExitRuntime&&(p=n.noExitRuntime),"object"!=typeof WebAssembly&&l("no native wasm support detected");var y=new WebAssembly.Table({initial:928,maximum:928,element:"anyfunc"}),w=!1;function v(r,t){r||J("Assertion failed: "+t)}var g,E,k,b,D,S,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function P(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&F)return F.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<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 x(r,t){return r?P(k,r,t):""}function M(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+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(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function A(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function C(r){g=r,n.HEAP8=E=new Int8Array(r),n.HEAP16=b=new Int16Array(r),n.HEAP32=D=new Int32Array(r),n.HEAPU8=k=new Uint8Array(r),n.HEAPU16=new Uint16Array(r),n.HEAPU32=new Uint32Array(r),n.HEAPF32=new Float32Array(r),n.HEAPF64=S=new Float64Array(r)}var R=n.INITIAL_MEMORY||16777216;function j(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?n.dynCall_v(e):n.dynCall_vi(e,t.arg):e(void 0===t.arg?null:t.arg)}else t(n)}}(m=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:R/65536,maximum:32768}))&&(g=m.buffer),R=g.byteLength,C(g),D[54684]=5461776;var O=[],T=[],z=[],B=[],N=Math.abs,I=Math.ceil,L=Math.floor,H=Math.min,U=0,W=null;function q(r){U++,n.monitorRunDependencies&&n.monitorRunDependencies(U)}function Y(r){if(U--,n.monitorRunDependencies&&n.monitorRunDependencies(U),0==U&&W){var t=W;W=null,t()}}function J(r){throw n.onAbort&&n.onAbort(r),f(r+=""),l(r),w=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(r)}function V(r){return t=r,e="data:application/octet-stream;base64,",String.prototype.startsWith?t.startsWith(e):0===t.indexOf(e);var t,e}n.preloadedImages={},n.preloadedAudios={};var X,G,K,Z="graphvizlib.wasm";function $(){try{if(d)return new Uint8Array(d);throw"both async and sync fetching of the wasm failed"}catch(r){J(r)}}V(Z)||(X=Z,Z=n.locateFile?n.locateFile(X,c):c+X);var Q,rr={1186:function(r,t){var e=x(r),n=x(t);sr.createPath("/",nr.dirname(e)),sr.writeFile(nr.join("/",e),n)}};function tr(){var r=function(){var r=new Error;if(!r.stack){try{throw new Error}catch(t){r=t}if(!r.stack)return"(no stack trace available)"}return r.stack.toString()}();return n.extraStackTrace&&(r+="\n"+n.extraStackTrace()),r.replace(/\b_Z[\w\d_]+/g,(function(r){return r==r?r:r+" ["+r+"]"}))}function er(r){return D[Or()>>2]=r,r}T.push({func:function(){Sr()}}),Q=function(){return performance.now()};var nr={splitPath:function(r){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:function(r){var t="/"===r.charAt(0),e="/"===r.substr(-1);return(r=nr.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=nr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:function(r){if("/"===r)return"/";var t=r.lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return nr.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return nr.normalize(r.join("/"))},join2:function(r,t){return nr.normalize(r+"/"+t)}},or={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:sr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t="/"===n.charAt(0)}return(t?"/":"")+(r=nr.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||"."},relative:function(r,t){function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=or.resolve(r).substr(1),t=or.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.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("/")}},ar={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){ar.ttys[r]={input:[],output:[],ops:t},sr.registerDevice(r,ar.stream_ops)},stream_ops:{open:function(r){var t=ar.ttys[r.node.rdev];if(!t)throw new sr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new sr.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 sr.ErrnoError(29)}if(void 0===s&&0===a)throw new sr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new sr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new sr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;r.input=Er(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(f(P(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(f(P(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(l(P(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(l(P(r.output,0)),r.output=[])}}},ir={ops_table:null,mount:function(r){return ir.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(sr.isBlkdev(e)||sr.isFIFO(e))throw new sr.ErrnoError(63);ir.ops_table||(ir.ops_table={dir:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,lookup:ir.node_ops.lookup,mknod:ir.node_ops.mknod,rename:ir.node_ops.rename,unlink:ir.node_ops.unlink,rmdir:ir.node_ops.rmdir,readdir:ir.node_ops.readdir,symlink:ir.node_ops.symlink},stream:{llseek:ir.stream_ops.llseek}},file:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:{llseek:ir.stream_ops.llseek,read:ir.stream_ops.read,write:ir.stream_ops.write,allocate:ir.stream_ops.allocate,mmap:ir.stream_ops.mmap,msync:ir.stream_ops.msync}},link:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,readlink:ir.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:sr.chrdev_stream_ops}});var o=sr.createNode(r,t,e,n);return sr.isDir(o.mode)?(o.node_ops=ir.ops_table.dir.node,o.stream_ops=ir.ops_table.dir.stream,o.contents={}):sr.isFile(o.mode)?(o.node_ops=ir.ops_table.file.node,o.stream_ops=ir.ops_table.file.stream,o.usedBytes=0,o.contents=null):sr.isLink(o.mode)?(o.node_ops=ir.ops_table.link.node,o.stream_ops=ir.ops_table.link.stream):sr.isChrdev(o.mode)&&(o.node_ops=ir.ops_table.chrdev.node,o.stream_ops=ir.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o),o},getFileDataAsRegularArray:function(r){if(r.contents&&r.contents.subarray){for(var t=[],e=0;e<r.usedBytes;++e)t.push(r.contents[e]);return t}return r.contents},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,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t){if(0==t)return r.contents=null,void(r.usedBytes=0);if(!r.contents||r.contents.subarray){var e=r.contents;return r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),void(r.usedBytes=t)}if(r.contents||(r.contents=[]),r.contents.length>t)r.contents.length=t;else for(;r.contents.length<t;)r.contents.push(0);r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=sr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,sr.isDir(r.mode)?t.size=4096:sr.isFile(r.mode)?t.size=r.usedBytes:sr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&ir.resizeFileStorage(r,t.size)},lookup:function(r,t){throw sr.genericErrors[44]},mknod:function(r,t,e,n){return ir.createNode(r,t,e,n)},rename:function(r,t,e){if(sr.isDir(r.mode)){var n;try{n=sr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new sr.ErrnoError(55)}delete r.parent.contents[r.name],r.name=e,t.contents[e]=r,r.parent=t},unlink:function(r,t){delete r.contents[t]},rmdir:function(r,t){var e=sr.lookupNode(r,t);for(var n in e.contents)throw new sr.ErrnoError(55);delete r.contents[t]},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=ir.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!sr.isLink(r.mode))throw new sr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,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)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(t.buffer===E.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(ir.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&sr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new sr.ErrnoError(28);return n},allocate:function(r,t,e){ir.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o,a,i){if(!sr.isFile(r.node.mode))throw new sr.ErrnoError(43);var s,u,c=r.node.contents;if(2&i||c.buffer!==t.buffer){(o>0||o+n<c.length)&&(c=c.subarray?c.subarray(o,o+n):Array.prototype.slice.call(c,o,o+n)),u=!0;var f=t.buffer==E.buffer;if(!(s=Cr(n)))throw new sr.ErrnoError(48);(f?E:t).set(c,s)}else u=!1,s=c.byteOffset;return{ptr:s,allocated:u}},msync:function(r,t,e,n,o){if(!sr.isFile(r.node.mode))throw new sr.ErrnoError(43);return 2&o||ir.stream_ops.write(r,t,0,n,e,!1),0}}},sr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(r){if(!(r instanceof sr.ErrnoError))throw r+" : "+tr();return er(r.errno)},lookupPath:function(r,t){if(t=t||{},!(r=or.resolve(sr.cwd(),r)))return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};for(var n in e)void 0===t[n]&&(t[n]=e[n]);if(t.recurse_count>8)throw new sr.ErrnoError(32);for(var o=nr.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),a=sr.root,i="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&t.parent)break;if(a=sr.lookupNode(a,o[s]),i=nr.join2(i,o[s]),sr.isMountpoint(a)&&(!u||u&&t.follow_mount)&&(a=a.mounted.root),!u||t.follow)for(var c=0;sr.isLink(a.mode);){var f=sr.readlink(i);if(i=or.resolve(nr.dirname(i),f),a=sr.lookupPath(i,{recurse_count:t.recurse_count}).node,c++>40)throw new sr.ErrnoError(32)}}return{path:i,node:a}},getPath:function(r){for(var t;;){if(sr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:function(r,t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%sr.nameTable.length},hashAddNode:function(r){var t=sr.hashName(r.parent.id,r.name);r.name_next=sr.nameTable[t],sr.nameTable[t]=r},hashRemoveNode:function(r){var t=sr.hashName(r.parent.id,r.name);if(sr.nameTable[t]===r)sr.nameTable[t]=r.name_next;else for(var e=sr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:function(r,t){var e=sr.mayLookup(r);if(e)throw new sr.ErrnoError(e,r);for(var n=sr.hashName(r.id,t),o=sr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return sr.lookup(r,t)},createNode:function(r,t,e,n){var o=new sr.FSNode(r,t,e,n);return sr.hashAddNode(o),o},destroyNode:function(r){sr.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(r){var t=sr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:function(r){var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:function(r,t){return sr.ignorePermissions||(-1===t.indexOf("r")||292&r.mode)&&(-1===t.indexOf("w")||146&r.mode)&&(-1===t.indexOf("x")||73&r.mode)?0:2},mayLookup:function(r){var t=sr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{return sr.lookupNode(r,t),20}catch(r){}return sr.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=sr.lookupNode(r,t)}catch(r){return r.errno}var o=sr.nodePermissions(r,"wx");if(o)return o;if(e){if(!sr.isDir(n.mode))return 54;if(sr.isRoot(n)||sr.getPath(n)===sr.cwd())return 10}else if(sr.isDir(n.mode))return 31;return 0},mayOpen:function(r,t){return r?sr.isLink(r.mode)?32:sr.isDir(r.mode)&&("r"!==sr.flagsToPermissionString(t)||512&t)?31:sr.nodePermissions(r,sr.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||sr.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!sr.streams[e])return e;throw new sr.ErrnoError(33)},getStream:function(r){return sr.streams[r]},createStream:function(r,t,e){sr.FSStream||(sr.FSStream=function(){},sr.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}}});var n=new sr.FSStream;for(var o in r)n[o]=r[o];r=n;var a=sr.nextfd(t,e);return r.fd=a,sr.streams[a]=r,r},closeStream:function(r){sr.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=sr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new sr.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,t){return r<<8|t},registerDevice:function(r,t){sr.devices[r]={stream_ops:t}},getDevice:function(r){return sr.devices[r]},getMounts:function(r){for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:function(r,t){"function"==typeof r&&(t=r,r=!1),sr.syncFSRequests++,sr.syncFSRequests>1&&l("warning: "+sr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=sr.getMounts(sr.root.mount),n=0;function o(r){return sr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)}))},mount:function(r,t,e){var n,o="/"===e,a=!e;if(o&&sr.root)throw new sr.ErrnoError(10);if(!o&&!a){var i=sr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,sr.isMountpoint(n))throw new sr.ErrnoError(10);if(!sr.isDir(n.mode))throw new sr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?sr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var t=sr.lookupPath(r,{follow_mount:!1});if(!sr.isMountpoint(t.node))throw new sr.ErrnoError(28);var e=t.node,n=e.mounted,o=sr.getMounts(n);Object.keys(sr.nameTable).forEach((function(r){for(var t=sr.nameTable[r];t;){var e=t.name_next;-1!==o.indexOf(t.mount)&&sr.destroyNode(t),t=e}})),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:function(r,t){return r.node_ops.lookup(r,t)},mknod:function(r,t,e){var n=sr.lookupPath(r,{parent:!0}).node,o=nr.basename(r);if(!o||"."===o||".."===o)throw new sr.ErrnoError(28);var a=sr.mayCreate(n,o);if(a)throw new sr.ErrnoError(a);if(!n.node_ops.mknod)throw new sr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:function(r,t){return t=void 0!==t?t:438,t&=4095,t|=32768,sr.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,sr.mknod(r,t,0)},mkdirTree:function(r,t){for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{sr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:function(r,t,e){return void 0===e&&(e=t,t=438),t|=8192,sr.mknod(r,t,e)},symlink:function(r,t){if(!or.resolve(r))throw new sr.ErrnoError(44);var e=sr.lookupPath(t,{parent:!0}).node;if(!e)throw new sr.ErrnoError(44);var n=nr.basename(t),o=sr.mayCreate(e,n);if(o)throw new sr.ErrnoError(o);if(!e.node_ops.symlink)throw new sr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:function(r,t){var e,n,o=nr.dirname(r),a=nr.dirname(t),i=nr.basename(r),s=nr.basename(t);try{e=sr.lookupPath(r,{parent:!0}).node,n=sr.lookupPath(t,{parent:!0}).node}catch(r){throw new sr.ErrnoError(10)}if(!e||!n)throw new sr.ErrnoError(44);if(e.mount!==n.mount)throw new sr.ErrnoError(75);var u,c=sr.lookupNode(e,i),f=or.relative(r,a);if("."!==f.charAt(0))throw new sr.ErrnoError(28);if("."!==(f=or.relative(t,o)).charAt(0))throw new sr.ErrnoError(55);try{u=sr.lookupNode(n,s)}catch(r){}if(c!==u){var d=sr.isDir(c.mode),p=sr.mayDelete(e,i,d);if(p)throw new sr.ErrnoError(p);if(p=u?sr.mayDelete(n,s,d):sr.mayCreate(n,s))throw new sr.ErrnoError(p);if(!e.node_ops.rename)throw new sr.ErrnoError(63);if(sr.isMountpoint(c)||u&&sr.isMountpoint(u))throw new sr.ErrnoError(10);if(n!==e&&(p=sr.nodePermissions(e,"w")))throw new sr.ErrnoError(p);try{sr.trackingDelegate.willMovePath&&sr.trackingDelegate.willMovePath(r,t)}catch(e){l("FS.trackingDelegate['willMovePath']('"+r+"', '"+t+"') threw an exception: "+e.message)}sr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{sr.hashAddNode(c)}try{sr.trackingDelegate.onMovePath&&sr.trackingDelegate.onMovePath(r,t)}catch(e){l("FS.trackingDelegate['onMovePath']('"+r+"', '"+t+"') threw an exception: "+e.message)}}},rmdir:function(r){var t=sr.lookupPath(r,{parent:!0}).node,e=nr.basename(r),n=sr.lookupNode(t,e),o=sr.mayDelete(t,e,!0);if(o)throw new sr.ErrnoError(o);if(!t.node_ops.rmdir)throw new sr.ErrnoError(63);if(sr.isMountpoint(n))throw new sr.ErrnoError(10);try{sr.trackingDelegate.willDeletePath&&sr.trackingDelegate.willDeletePath(r)}catch(t){l("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+t.message)}t.node_ops.rmdir(t,e),sr.destroyNode(n);try{sr.trackingDelegate.onDeletePath&&sr.trackingDelegate.onDeletePath(r)}catch(t){l("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+t.message)}},readdir:function(r){var t=sr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new sr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(r){var t=sr.lookupPath(r,{parent:!0}).node,e=nr.basename(r),n=sr.lookupNode(t,e),o=sr.mayDelete(t,e,!1);if(o)throw new sr.ErrnoError(o);if(!t.node_ops.unlink)throw new sr.ErrnoError(63);if(sr.isMountpoint(n))throw new sr.ErrnoError(10);try{sr.trackingDelegate.willDeletePath&&sr.trackingDelegate.willDeletePath(r)}catch(t){l("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+t.message)}t.node_ops.unlink(t,e),sr.destroyNode(n);try{sr.trackingDelegate.onDeletePath&&sr.trackingDelegate.onDeletePath(r)}catch(t){l("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+t.message)}},readlink:function(r){var t=sr.lookupPath(r).node;if(!t)throw new sr.ErrnoError(44);if(!t.node_ops.readlink)throw new sr.ErrnoError(28);return or.resolve(sr.getPath(t.parent),t.node_ops.readlink(t))},stat:function(r,t){var e=sr.lookupPath(r,{follow:!t}).node;if(!e)throw new sr.ErrnoError(44);if(!e.node_ops.getattr)throw new sr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:function(r){return sr.stat(r,!0)},chmod:function(r,t,e){var n;if(!(n="string"==typeof r?sr.lookupPath(r,{follow:!e}).node:r).node_ops.setattr)throw new sr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(r,t){sr.chmod(r,t,!0)},fchmod:function(r,t){var e=sr.getStream(r);if(!e)throw new sr.ErrnoError(8);sr.chmod(e.node,t)},chown:function(r,t,e,n){var o;if(!(o="string"==typeof r?sr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new sr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(r,t,e){sr.chown(r,t,e,!0)},fchown:function(r,t,e){var n=sr.getStream(r);if(!n)throw new sr.ErrnoError(8);sr.chown(n.node,t,e)},truncate:function(r,t){if(t<0)throw new sr.ErrnoError(28);var e;if(!(e="string"==typeof r?sr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new sr.ErrnoError(63);if(sr.isDir(e.mode))throw new sr.ErrnoError(31);if(!sr.isFile(e.mode))throw new sr.ErrnoError(28);var n=sr.nodePermissions(e,"w");if(n)throw new sr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:function(r,t){var e=sr.getStream(r);if(!e)throw new sr.ErrnoError(8);if(0==(2097155&e.flags))throw new sr.ErrnoError(28);sr.truncate(e.node,t)},utime:function(r,t,e){var n=sr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:function(r,t,e,o,a){if(""===r)throw new sr.ErrnoError(44);var i;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?sr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)i=r;else{r=nr.normalize(r);try{i=sr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var s=!1;if(64&t)if(i){if(128&t)throw new sr.ErrnoError(20)}else i=sr.mknod(r,e,0),s=!0;if(!i)throw new sr.ErrnoError(44);if(sr.isChrdev(i.mode)&&(t&=-513),65536&t&&!sr.isDir(i.mode))throw new sr.ErrnoError(54);if(!s){var u=sr.mayOpen(i,t);if(u)throw new sr.ErrnoError(u)}512&t&&sr.truncate(i,0),t&=-131713;var c=sr.createStream({node:i,path:sr.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1},o,a);c.stream_ops.open&&c.stream_ops.open(c),!n.logReadFiles||1&t||(sr.readFiles||(sr.readFiles={}),r in sr.readFiles||(sr.readFiles[r]=1,l("FS.trackingDelegate error on read file: "+r)));try{if(sr.trackingDelegate.onOpenFile){var f=0;1!=(2097155&t)&&(f|=sr.tracking.openFlags.READ),0!=(2097155&t)&&(f|=sr.tracking.openFlags.WRITE),sr.trackingDelegate.onOpenFile(r,f)}}catch(t){l("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+t.message)}return c},close:function(r){if(sr.isClosed(r))throw new sr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{sr.closeStream(r.fd)}r.fd=null},isClosed:function(r){return null===r.fd},llseek:function(r,t,e){if(sr.isClosed(r))throw new sr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new sr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new sr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:function(r,t,e,n,o){if(n<0||o<0)throw new sr.ErrnoError(28);if(sr.isClosed(r))throw new sr.ErrnoError(8);if(1==(2097155&r.flags))throw new sr.ErrnoError(8);if(sr.isDir(r.node.mode))throw new sr.ErrnoError(31);if(!r.stream_ops.read)throw new sr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new sr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:function(r,t,e,n,o,a){if(n<0||o<0)throw new sr.ErrnoError(28);if(sr.isClosed(r))throw new sr.ErrnoError(8);if(0==(2097155&r.flags))throw new sr.ErrnoError(8);if(sr.isDir(r.node.mode))throw new sr.ErrnoError(31);if(!r.stream_ops.write)throw new sr.ErrnoError(28);r.seekable&&1024&r.flags&&sr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new sr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);i||(r.position+=s);try{r.path&&sr.trackingDelegate.onWriteToFile&&sr.trackingDelegate.onWriteToFile(r.path)}catch(t){l("FS.trackingDelegate['onWriteToFile']('"+r.path+"') threw an exception: "+t.message)}return s},allocate:function(r,t,e){if(sr.isClosed(r))throw new sr.ErrnoError(8);if(t<0||e<=0)throw new sr.ErrnoError(28);if(0==(2097155&r.flags))throw new sr.ErrnoError(8);if(!sr.isFile(r.node.mode)&&!sr.isDir(r.node.mode))throw new sr.ErrnoError(43);if(!r.stream_ops.allocate)throw new sr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:function(r,t,e,n,o,a,i){if(0!=(2&a)&&0==(2&i)&&2!=(2097155&r.flags))throw new sr.ErrnoError(2);if(1==(2097155&r.flags))throw new sr.ErrnoError(2);if(!r.stream_ops.mmap)throw new sr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o,a,i)},msync:function(r,t,e,n,o){return r&&r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0},munmap:function(r){return 0},ioctl:function(r,t,e){if(!r.stream_ops.ioctl)throw new sr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:function(r,t){if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=sr.open(r,t.flags),o=sr.stat(r).size,a=new Uint8Array(o);return sr.read(n,a,0,o,0),"utf8"===t.encoding?e=P(a,0):"binary"===t.encoding&&(e=a),sr.close(n),e},writeFile:function(r,t,e){(e=e||{}).flags=e.flags||"w";var n=sr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(A(t)+1),a=M(t,o,0,o.length);sr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");sr.write(n,t,0,t.byteLength,void 0,e.canOwn)}sr.close(n)},cwd:function(){return sr.currentPath},chdir:function(r){var t=sr.lookupPath(r,{follow:!0});if(null===t.node)throw new sr.ErrnoError(44);if(!sr.isDir(t.node.mode))throw new sr.ErrnoError(54);var e=sr.nodePermissions(t.node,"x");if(e)throw new sr.ErrnoError(e);sr.currentPath=t.path},createDefaultDirectories:function(){sr.mkdir("/tmp"),sr.mkdir("/home"),sr.mkdir("/home/web_user")},createDefaultDevices:function(){var r;if(sr.mkdir("/dev"),sr.registerDevice(sr.makedev(1,3),{read:function(){return 0},write:function(r,t,e,n,o){return n}}),sr.mkdev("/dev/null",sr.makedev(1,3)),ar.register(sr.makedev(5,0),ar.default_tty_ops),ar.register(sr.makedev(6,0),ar.default_tty1_ops),sr.mkdev("/dev/tty",sr.makedev(5,0)),sr.mkdev("/dev/tty1",sr.makedev(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);r=function(){return crypto.getRandomValues(t),t[0]}}r||(r=function(){J("random_device")}),sr.createDevice("/dev","random",r),sr.createDevice("/dev","urandom",r),sr.mkdir("/dev/shm"),sr.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){sr.mkdir("/proc"),sr.mkdir("/proc/self"),sr.mkdir("/proc/self/fd"),sr.mount({mount:function(){var r=sr.createNode("/proc/self","fd",16895,73);return r.node_ops={lookup:function(r,t){var e=+t,n=sr.getStream(e);if(!n)throw new sr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:function(){n.stdin?sr.createDevice("/dev","stdin",n.stdin):sr.symlink("/dev/tty","/dev/stdin"),n.stdout?sr.createDevice("/dev","stdout",null,n.stdout):sr.symlink("/dev/tty","/dev/stdout"),n.stderr?sr.createDevice("/dev","stderr",null,n.stderr):sr.symlink("/dev/tty1","/dev/stderr"),sr.open("/dev/stdin","r"),sr.open("/dev/stdout","w"),sr.open("/dev/stderr","w")},ensureErrnoError:function(){sr.ErrnoError||(sr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},sr.ErrnoError.prototype=new Error,sr.ErrnoError.prototype.constructor=sr.ErrnoError,[44].forEach((function(r){sr.genericErrors[r]=new sr.ErrnoError(r),sr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:function(){sr.ensureErrnoError(),sr.nameTable=new Array(4096),sr.mount(ir,{},"/"),sr.createDefaultDirectories(),sr.createDefaultDevices(),sr.createSpecialDirectories(),sr.filesystems={MEMFS:ir}},init:function(r,t,e){sr.init.initialized=!0,sr.ensureErrnoError(),n.stdin=r||n.stdin,n.stdout=t||n.stdout,n.stderr=e||n.stderr,sr.createStandardStreams()},quit:function(){sr.init.initialized=!1;var r=n._fflush;r&&r(0);for(var t=0;t<sr.streams.length;t++){var e=sr.streams[t];e&&sr.close(e)}},getMode:function(r,t){var e=0;return r&&(e|=365),t&&(e|=146),e},joinPath:function(r,t){var e=nr.join.apply(null,r);return t&&"/"==e[0]&&(e=e.substr(1)),e},absolutePath:function(r,t){return or.resolve(t,r)},standardizePath:function(r){return nr.normalize(r)},findObject:function(r,t){var e=sr.analyzePath(r,t);return e.exists?e.object:(er(e.error),null)},analyzePath:function(r,t){try{r=(n=sr.lookupPath(r,{follow:!t})).path}catch(r){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=sr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=nr.basename(r),n=sr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(r){e.error=r.errno}return e},createFolder:function(r,t,e,n){var o=nr.join2("string"==typeof r?r:sr.getPath(r),t),a=sr.getMode(e,n);return sr.mkdir(o,a)},createPath:function(r,t,e,n){r="string"==typeof r?r:sr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=nr.join2(r,a);try{sr.mkdir(i)}catch(r){}r=i}}return i},createFile:function(r,t,e,n,o){var a=nr.join2("string"==typeof r?r:sr.getPath(r),t),i=sr.getMode(n,o);return sr.create(a,i)},createDataFile:function(r,t,e,n,o,a){var i=t?nr.join2("string"==typeof r?r:sr.getPath(r),t):r,s=sr.getMode(n,o),u=sr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}sr.chmod(u,146|s);var d=sr.open(u,"w");sr.write(d,e,0,e.length,0,a),sr.close(d),sr.chmod(u,s)}return u},createDevice:function(r,t,e,n){var o=nr.join2("string"==typeof r?r:sr.getPath(r),t),a=sr.getMode(!!e,!!n);sr.createDevice.major||(sr.createDevice.major=64);var i=sr.makedev(sr.createDevice.major++,0);return sr.registerDevice(i,{open:function(r){r.seekable=!1},close:function(r){n&&n.buffer&&n.buffer.length&&n(10)},read:function(r,t,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(r){throw new sr.ErrnoError(29)}if(void 0===u&&0===i)throw new sr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:function(r,t,e,o,a){for(var i=0;i<o;i++)try{n(t[e+i])}catch(r){throw new sr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),sr.mkdev(o,a,i)},createLink:function(r,t,e,n,o){var a=nr.join2("string"==typeof r?r:sr.getPath(r),t);return sr.symlink(e,a)},forceLoadFile:function(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;var t=!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(!i)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=Er(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){t=!1}return t||er(29),t},createLazyFile:function(r,t,e,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter((function(r){var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(r,t){if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),"undefined"!=typeof Uint8Array&&(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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Er(o.responseText||"",!0)}(t,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,f("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)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:e},s=sr.createFile(r,t,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(r){var t=s.stream_ops[r];u[r]=function(){if(!sr.forceLoadFile(s))throw new sr.ErrnoError(29);return t.apply(null,arguments)}})),u.read=function(r,t,e,n,o){if(!sr.forceLoadFile(s))throw new sr.ErrnoError(29);var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var u=0;u<i;u++)t[e+u]=a[o+u];else for(u=0;u<i;u++)t[e+u]=a.get(o+u);return i},s.stream_ops=u,s},createPreloadedFile:function(r,t,e,o,a,i,s,u,c,f){Browser.init();var l=t?or.resolve(nr.join2(r,t)):r;function d(e){function d(e){f&&f(),u||sr.createDataFile(r,t,e,o,a,c),i&&i(),Y()}var p=!1;n.preloadPlugins.forEach((function(r){p||r.canHandle(l)&&(r.handle(e,l,d,(function(){s&&s(),Y()})),p=!0)})),p||d(e)}q(),"string"==typeof e?Browser.asyncLoad(e,(function(r){d(r)}),s):d(e)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(r,t,e){t=t||function(){},e=e||function(){};var n=sr.indexedDB();try{var o=n.open(sr.DB_NAME(),sr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=function(){f("creating db"),o.result.createObjectStore(sr.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([sr.DB_STORE_NAME],"readwrite"),a=n.objectStore(sr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach((function(r){var t=a.put(sr.analyzePath(r).object.contents,r);t.onsuccess=function(){++i+s==u&&c()},t.onerror=function(){s++,i+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:function(r,t,e){t=t||function(){},e=e||function(){};var n=sr.indexedDB();try{var o=n.open(sr.DB_NAME(),sr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=e,o.onsuccess=function(){var n=o.result;try{var a=n.transaction([sr.DB_STORE_NAME],"readonly")}catch(r){return void e(r)}var i=a.objectStore(sr.DB_STORE_NAME),s=0,u=0,c=r.length;function f(){0==u?t():e()}r.forEach((function(r){var t=i.get(r);t.onsuccess=function(){sr.analyzePath(r).exists&&sr.unlink(r),sr.createDataFile(nr.dirname(r),nr.basename(r),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=function(){u++,s+u==c&&f()}})),a.onerror=e},o.onerror=e}},ur={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(r,t){if("/"!==t[0]){var e;if(-100===r)e=sr.cwd();else{var n=sr.getStream(r);if(!n)throw new sr.ErrnoError(8);e=n.path}t=nr.join2(e,t)}return t},doStat:function(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&nr.normalize(t)!==nr.normalize(sr.getPath(r.node)))return-54;throw r}return D[e>>2]=n.dev,D[e+4>>2]=0,D[e+8>>2]=n.ino,D[e+12>>2]=n.mode,D[e+16>>2]=n.nlink,D[e+20>>2]=n.uid,D[e+24>>2]=n.gid,D[e+28>>2]=n.rdev,D[e+32>>2]=0,K=[n.size>>>0,(G=n.size,+N(G)>=1?G>0?(0|H(+L(G/4294967296),4294967295))>>>0:~~+I((G-+(~~G>>>0))/4294967296)>>>0:0)],D[e+40>>2]=K[0],D[e+44>>2]=K[1],D[e+48>>2]=4096,D[e+52>>2]=n.blocks,D[e+56>>2]=n.atime.getTime()/1e3|0,D[e+60>>2]=0,D[e+64>>2]=n.mtime.getTime()/1e3|0,D[e+68>>2]=0,D[e+72>>2]=n.ctime.getTime()/1e3|0,D[e+76>>2]=0,K=[n.ino>>>0,(G=n.ino,+N(G)>=1?G>0?(0|H(+L(G/4294967296),4294967295))>>>0:~~+I((G-+(~~G>>>0))/4294967296)>>>0:0)],D[e+80>>2]=K[0],D[e+84>>2]=K[1],0},doMsync:function(r,t,e,n,o){var a=k.slice(r,r+e);sr.msync(t,a,o,e,n)},doMkdir:function(r,t){return"/"===(r=nr.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),sr.mkdir(r,t,0),0},doMknod:function(r,t,e){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return sr.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=sr.readlink(r),o=Math.min(e,A(n)),a=E[t+o];return M(n,k,t,e+1),E[t+o]=a,o},doAccess:function(r,t){if(-8&t)return-28;var e;if(!(e=sr.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&sr.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=sr.getStream(e);return n&&sr.close(n),sr.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=D[t+8*a>>2],s=D[t+(8*a+4)>>2],u=sr.read(r,E,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=D[t+8*a>>2],s=D[t+(8*a+4)>>2],u=sr.write(r,E,i,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return ur.varargs+=4,D[ur.varargs-4>>2]},getStr:function(r){return x(r)},getStreamFromFD:function(r){var t=sr.getStream(r);if(!t)throw new sr.ErrnoError(8);return t},get64:function(r,t){return r}},cr=0;function fr(r){try{return m.grow(r-g.byteLength+65535>>>16),C(m.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",_:s||"./this.program"};for(var t in lr)r[t]=lr[t];var e=[];for(var t in r)e.push(t+"="+r[t]);dr.strings=e}return dr.strings}function pr(r){return r%4==0&&(r%100!=0||r%400==0)}function mr(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}var hr=[31,29,31,30,31,30,31,31,30,31,30,31],_r=[31,28,31,30,31,30,31,31,30,31,30,31];function yr(r,t){for(var e=new Date(r.getTime());t>0;){var n=pr(e.getFullYear()),o=e.getMonth(),a=(n?hr:_r)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function wr(r,t,e,n){var o=D[n+40>>2],a={tm_sec:D[n>>2],tm_min:D[n+4>>2],tm_hour:D[n+8>>2],tm_mday:D[n+12>>2],tm_mon:D[n+16>>2],tm_year:D[n+20>>2],tm_wday:D[n+24>>2],tm_yday:D[n+28>>2],tm_isdst:D[n+32>>2],tm_gmtoff:D[n+36>>2],tm_zone:o?x(o):""},i=x(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return l(r,t,"0")}function p(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function h(r){var t=yr(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(e),a=m(n);return p(o,t)<=0?p(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var _={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return h(r).toString().substring(2)},"%G":function(r){return h(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+mr(pr(r.tm_year+1900)?hr:_r,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=new Date(r.tm_year+1900,0,1),e=0===t.getDay()?t:yr(t,7-t.getDay()),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(p(e,n)<0){var o=mr(pr(n.getFullYear())?hr:_r,n.getMonth()-1)-31,a=31-e.getDate()+o+n.getDate();return d(Math.ceil(a/7),2)}return 0===p(e,t)?"01":"00"},"%V":function(r){var t,e=new Date(r.tm_year+1900,0,4),n=new Date(r.tm_year+1901,0,4),o=m(e),a=m(n),i=yr(new Date(r.tm_year+1900,0,1),r.tm_yday);return p(i,o)<0?"53":p(a,i)<=0?"01":(t=o.getFullYear()<r.tm_year+1900?r.tm_yday+32-o.getDate():r.tm_yday+1-o.getDate(),d(Math.ceil(t/7),2))},"%w":function(r){return r.tm_wday},"%W":function(r){var t=new Date(r.tm_year,0,1),e=1===t.getDay()?t:yr(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(p(e,n)<0){var o=mr(pr(n.getFullYear())?hr:_r,n.getMonth()-1)-31,a=31-e.getDate()+o+n.getDate();return d(Math.ceil(a/7),2)}return 0===p(e,t)?"01":"00"},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in _)i.indexOf(u)>=0&&(i=i.replace(new RegExp(u,"g"),_[u](a)));var y=Er(i,!1);return y.length>t?0:(function(r,t){E.set(r,t)}(y,r),y.length-1)}function vr(r,t){vr.array||(vr.array=[]);var e,n=vr.array;for(n.length=0;e=k[r++];)100===e||102===e?(t=t+7&-8,n.push(S[t>>3]),t+=8):(t=t+3&-4,n.push(D[t>>2]),t+=4);return n}var gr=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=sr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n};function Er(r,t,e){var n=e>0?e:A(r)+1,o=new Array(n),a=M(r,o,0,o.length);return t&&(o.length=a),o}Object.defineProperties(gr.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return sr.isDir(this.mode)}},isDevice:{get:function(){return sr.isChrdev(this.mode)}}}),sr.FSNode=gr,sr.staticInit();var kr={L:function(r,t){return function(r,t){var e;if(0===r)e=Date.now();else{if(1!==r&&4!==r)return er(28),-1;e=Q()}return D[t>>2]=e/1e3|0,D[t+4>>2]=e%1e3*1e3*1e3|0,0}(r,t)},k:function(r){return Cr(r)},j:function(r,t,e){throw r},J:function(r,t){return er(63),-1},Q:function(r,t){try{return r=ur.getStr(r),ur.doAccess(r,t)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},x:function(r,t,e){ur.varargs=e;try{var n=ur.getStreamFromFD(r);switch(t){case 0:return(o=ur.get())<0?-28:sr.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=ur.get();return n.flags|=o,0;case 12:return o=ur.get(),b[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return er(28),-1;default:return-28}}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},S:function(r,t){try{var e=ur.getStreamFromFD(r);return ur.doStat(sr.stat,e.path,t)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},p:function(){return 42},N:function(r,t,e){ur.varargs=e;try{var n=ur.getStreamFromFD(r);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=ur.get();return D[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ur.get(),sr.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:J("bad ioctl syscall "+t)}}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},O:function(r,t,e,n,o,a){try{return function(r,t,e,n,o,a){var i;a<<=12;var s=!1;if(0!=(16&n)&&r%16384!=0)return-28;if(0!=(32&n)){if(!(i=Br(16384,t)))return-48;Tr(i,0,t),s=!0}else{var u=sr.getStream(o);if(!u)return-8;var c=sr.mmap(u,k,r,t,a,e,n);i=c.ptr,s=c.allocated}return ur.mappings[i]={malloc:i,len:t,allocated:s,fd:o,prot:e,flags:n,offset:a},i}(r,t,e,n,o,a)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},P:function(r,t){try{return function(r,t){if(-1==(0|r)||0===t)return-28;var e=ur.mappings[r];if(!e)return 0;if(t===e.len){var n=sr.getStream(e.fd);2&e.prot&&ur.doMsync(r,n,t,e.flags,e.offset),sr.munmap(n),ur.mappings[r]=null,e.allocated&&Rr(e.malloc)}return 0}(r,t)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},y:function(r,t,e){ur.varargs=e;try{var n=ur.getStr(r),o=ur.get();return sr.open(n,t,o).fd}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},R:function(r,t){try{return r=ur.getStr(r),ur.doStat(sr.stat,r,t)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},K:function(r){try{return r=ur.getStr(r),sr.unlink(r),0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},v:function(){J()},B:function(r,t,e){var n=vr(t,e);return rr[r].apply(null,n)},d:function(r,t){!function(r,t){throw zr(r,t||1),"longjmp"}(r,t)},D:function(r,t,e){k.copyWithin(r,t,t+e)},E:function(r){r>>>=0;var t=k.length;if(r>2147483648)return!1;for(var e,n,o=1;o<=4;o*=2){var a=t*(1+.2/o);if(a=Math.min(a,r+100663296),fr(Math.min(2147483648,((e=Math.max(16777216,r,a))%(n=65536)>0&&(e+=n-e%n),e))))return!0}return!1},H:function(r,t){var e=0;return dr().forEach((function(n,o){var a=t+e;D[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)E[t++>>0]=r.charCodeAt(n);e||(E[t>>0]=0)}(n,a),e+=n.length+1})),0},I:function(r,t){var e=dr();D[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),D[t>>2]=n,0},l:function(r){!function(r,t){t&&p&&0===r||(p||(w=!0,n.onExit&&n.onExit(r)),u(r,new rt(r)))}(r)},o:function(r){try{var t=ur.getStreamFromFD(r);return sr.close(t),0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},G:function(r,t){try{var e=ur.getStreamFromFD(r),n=e.tty?2:sr.isDir(e.mode)?3:sr.isLink(e.mode)?7:4;return E[t>>0]=n,0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},M:function(r,t,e,n){try{var o=ur.getStreamFromFD(r),a=ur.doReadv(o,t,e);return D[n>>2]=a,0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},C:function(r,t,e,n,o){try{var a=ur.getStreamFromFD(r),i=4294967296*e+(t>>>0);return i<=-9007199254740992||i>=9007199254740992?-61:(sr.llseek(a,i,n),K=[a.position>>>0,(G=a.position,+N(G)>=1?G>0?(0|H(+L(G/4294967296),4294967295))>>>0:~~+I((G-+(~~G>>>0))/4294967296)>>>0:0)],D[o>>2]=K[0],D[o+4>>2]=K[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},w:function(r,t,e,n){try{var o=ur.getStreamFromFD(r),a=ur.doWritev(o,t,e);return D[n>>2]=a,0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},a:function(){return 0|h},V:function(r){var t=Date.now();return D[r>>2]=t/1e3|0,D[r+4>>2]=t%1e3*1e3|0,0},W:function(r){var t=$r();try{return Kr(r)}catch(r){if(Qr(t),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},T:function(r,t){var e=$r();try{return Zr(r,t)}catch(r){if(Qr(e),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},u:function(r){var t=$r();try{return qr(r)}catch(r){if(Qr(t),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},f:function(r,t){var e=$r();try{return Yr(r,t)}catch(r){if(Qr(e),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},e:function(r,t,e){var n=$r();try{return Jr(r,t,e)}catch(r){if(Qr(n),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},g:function(r,t,e,n){var o=$r();try{return Vr(r,t,e,n)}catch(r){if(Qr(o),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},m:function(r,t,e,n,o){var a=$r();try{return Xr(r,t,e,n,o)}catch(r){if(Qr(a),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},U:function(r,t,e,n,o,a,i){var s=$r();try{return Gr(r,t,e,n,o,a,i)}catch(r){if(Qr(s),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},r:function(r){var t=$r();try{Nr(r)}catch(r){if(Qr(t),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},h:function(r,t){var e=$r();try{Ir(r,t)}catch(r){if(Qr(e),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},n:function(r,t,e){var n=$r();try{Lr(r,t,e)}catch(r){if(Qr(n),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},t:function(r,t,e,n){var o=$r();try{Hr(r,t,e,n)}catch(r){if(Qr(o),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},s:function(r,t,e,n,o){var a=$r();try{Ur(r,t,e,n,o)}catch(r){if(Qr(a),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},q:function(r,t,e,n,o,a){var i=$r();try{Wr(r,t,e,n,o,a)}catch(r){if(Qr(i),r!==r+0&&"longjmp"!==r)throw r;zr(1,0)}},memory:m,i:function r(t,e,n,o){e|=0,n|=0,o|=0;var a=0;for(cr=cr+1|0,D[(t|=0)>>2]=cr;(0|a)<(0|o);){if(0==(0|D[n+(a<<3)>>2]))return D[n+(a<<3)>>2]=cr,D[n+(4+(a<<3))>>2]=e,D[n+(8+(a<<3))>>2]=0,_(0|o),0|n;a=a+1|0}return n=0|r(0|t,0|e,0|(n=0|jr(0|n,8*(1+(o=2*o|0)|0)|0)),0|o),_(0|o),0|n},b:function(r){_(0|r)},F:function(r,t,e,n){return wr(r,t,e,n)},table:y,c:function(r,t,e){r|=0,t|=0,e|=0;for(var n=0,o=0;(0|n)<(0|e)&&0!=(0|(o=0|D[t+(n<<3)>>2]));){if((0|o)==(0|r))return 0|D[t+(4+(n<<3))>>2];n=n+1|0}return 0},z:function(r){var t=Date.now()/1e3|0;return r&&(D[r>>2]=t),t},A:function(r){return 0!==r&&Tr(r,0,16),0}},br=function(){var r={a:kr};function t(r,t){var e=r.exports;n.asm=e,Y()}function e(r){t(r.instance)}function o(t){return(d||"function"!=typeof fetch?new Promise((function(r,t){r($())})):fetch(Z,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+Z+"'";return r.arrayBuffer()})).catch((function(){return $()}))).then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){l("failed to asynchronously prepare wasm: "+r),J(r)}))}if(q(),n.instantiateWasm)try{return n.instantiateWasm(r,t)}catch(r){return l("Module.instantiateWasm callback failed with error: "+r),!1}return function(){if(d||"function"!=typeof WebAssembly.instantiateStreaming||V(Z)||"function"!=typeof fetch)return o(e);fetch(Z,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){l("wasm streaming compile failed: "+r),l("falling back to ArrayBuffer instantiation"),o(e)}))}))}(),{}}();n.asm=br;var Dr,Sr=n.___wasm_call_ctors=function(){return(Sr=n.___wasm_call_ctors=n.asm.X).apply(null,arguments)},Fr=(n.___em_js__array_bounds_check_error=function(){return(n.___em_js__array_bounds_check_error=n.asm.Y).apply(null,arguments)},n._emscripten_bind_VoidPtr___destroy___0=function(){return(Fr=n._emscripten_bind_VoidPtr___destroy___0=n.asm.Z).apply(null,arguments)}),Pr=n._emscripten_bind_Main_layout_3=function(){return(Pr=n._emscripten_bind_Main_layout_3=n.asm._).apply(null,arguments)},xr=n._emscripten_bind_Main_lastError_0=function(){return(xr=n._emscripten_bind_Main_lastError_0=n.asm.$).apply(null,arguments)},Mr=n._emscripten_bind_Main_createFile_2=function(){return(Mr=n._emscripten_bind_Main_createFile_2=n.asm.aa).apply(null,arguments)},Ar=n._emscripten_bind_Main___destroy___0=function(){return(Ar=n._emscripten_bind_Main___destroy___0=n.asm.ba).apply(null,arguments)},Cr=n._malloc=function(){return(Cr=n._malloc=n.asm.ca).apply(null,arguments)},Rr=n._free=function(){return(Rr=n._free=n.asm.da).apply(null,arguments)},jr=n._realloc=function(){return(jr=n._realloc=n.asm.ea).apply(null,arguments)},Or=n.___errno_location=function(){return(Or=n.___errno_location=n.asm.fa).apply(null,arguments)},Tr=n._memset=function(){return(Tr=n._memset=n.asm.ga).apply(null,arguments)},zr=n._setThrew=function(){return(zr=n._setThrew=n.asm.ha).apply(null,arguments)},Br=n._memalign=function(){return(Br=n._memalign=n.asm.ia).apply(null,arguments)},Nr=n.dynCall_v=function(){return(Nr=n.dynCall_v=n.asm.ja).apply(null,arguments)},Ir=n.dynCall_vi=function(){return(Ir=n.dynCall_vi=n.asm.ka).apply(null,arguments)},Lr=n.dynCall_vii=function(){return(Lr=n.dynCall_vii=n.asm.la).apply(null,arguments)},Hr=n.dynCall_viii=function(){return(Hr=n.dynCall_viii=n.asm.ma).apply(null,arguments)},Ur=n.dynCall_viiii=function(){return(Ur=n.dynCall_viiii=n.asm.na).apply(null,arguments)},Wr=n.dynCall_viiiii=function(){return(Wr=n.dynCall_viiiii=n.asm.oa).apply(null,arguments)},qr=n.dynCall_i=function(){return(qr=n.dynCall_i=n.asm.pa).apply(null,arguments)},Yr=n.dynCall_ii=function(){return(Yr=n.dynCall_ii=n.asm.qa).apply(null,arguments)},Jr=n.dynCall_iii=function(){return(Jr=n.dynCall_iii=n.asm.ra).apply(null,arguments)},Vr=n.dynCall_iiii=function(){return(Vr=n.dynCall_iiii=n.asm.sa).apply(null,arguments)},Xr=n.dynCall_iiiii=function(){return(Xr=n.dynCall_iiiii=n.asm.ta).apply(null,arguments)},Gr=n.dynCall_iiiiiii=function(){return(Gr=n.dynCall_iiiiiii=n.asm.ua).apply(null,arguments)},Kr=n.dynCall_d=function(){return(Kr=n.dynCall_d=n.asm.va).apply(null,arguments)},Zr=n.dynCall_di=function(){return(Zr=n.dynCall_di=n.asm.wa).apply(null,arguments)},$r=n.stackSave=function(){return($r=n.stackSave=n.asm.xa).apply(null,arguments)},Qr=n.stackRestore=function(){return(Qr=n.stackRestore=n.asm.ya).apply(null,arguments)};function rt(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function tt(r){function e(){Dr||(Dr=!0,n.calledRun=!0,w||(n.noFSInit||sr.init.initialized||sr.init(),ar.init(),j(T),sr.ignorePermissions=!1,j(z),t(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)r=n.postRun.shift(),B.unshift(r);var r;j(B)}()))}U>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)r=n.preRun.shift(),O.unshift(r);var r;j(O)}(),U>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.asm=br,W=function r(){Dr||tt(),Dr||(W=r)},n.run=tt,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function et(){}function nt(r){return(r||et).__cache__}function ot(r,t){var e=nt(t),n=e[r];return n||((n=Object.create((t||et).prototype)).ptr=r,e[r]=n)}p=!0,tt(),et.prototype=Object.create(et.prototype),et.prototype.constructor=et,et.prototype.__class__=et,et.__cache__={},n.WrapperObject=et,n.getCache=nt,n.wrapPointer=ot,n.castObject=function(r,t){return ot(r.ptr,t)},n.NULL=ot(0),n.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete nt(r.__class__)[r.ptr]},n.compare=function(r,t){return r.ptr===t.ptr},n.getPointer=function(r){return r.ptr},n.getClass=function(r){return r.__class__};var at={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(at.needed){for(var r=0;r<at.temps.length;r++)n._free(at.temps[r]);at.temps.length=0,n._free(at.buffer),at.buffer=0,at.size+=at.needed,at.needed=0}at.buffer||(at.size+=128,at.buffer=n._malloc(at.size),v(at.buffer)),at.pos=0},alloc:function(r,t){v(at.buffer);var e,o=t.BYTES_PER_ELEMENT,a=r.length*o;return a=a+7&-8,at.pos+a>=at.size?(v(a>0),at.needed+=a,e=n._malloc(a),at.temps.push(e)):(e=at.buffer+at.pos,at.pos+=a),e},copy:function(r,t,e){switch(e>>>=0,t.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n<r.length;n++)t[e+n]=r[n]}};function it(r){if("string"==typeof r){var t=Er(r),e=at.alloc(t,E);return at.copy(t,E,e),e}return r}function st(){throw"cannot construct a VoidPtr, no constructor in IDL"}function ut(){throw"cannot construct a Main, no constructor in IDL"}return st.prototype=Object.create(et.prototype),st.prototype.constructor=st,st.prototype.__class__=st,st.__cache__={},n.VoidPtr=st,st.prototype.__destroy__=st.prototype.__destroy__=function(){var r=this.ptr;Fr(r)},ut.prototype=Object.create(et.prototype),ut.prototype.constructor=ut,ut.prototype.__class__=ut,ut.__cache__={},n.Main=ut,ut.prototype.layout=ut.prototype.layout=function(r,t,e){var n=this.ptr;return at.prepare(),r=r&&"object"==typeof r?r.ptr:it(r),t=t&&"object"==typeof t?t.ptr:it(t),e=e&&"object"==typeof e?e.ptr:it(e),x(Pr(n,r,t,e))},ut.prototype.lastError=ut.prototype.lastError=function(){var r=this.ptr;return x(xr(r))},ut.prototype.createFile=ut.prototype.createFile=function(r,t){var e=this.ptr;at.prepare(),r=r&&"object"==typeof r?r.ptr:it(r),t=t&&"object"==typeof t?t.ptr:it(t),Mr(e,r,t)},ut.prototype.__destroy__=ut.prototype.__destroy__=function(){var r=this.ptr;Ar(r)},r.ready});r.exports=n})),l=Object.freeze({__proto__:null,default:f,__moduleExports:f}),d=function(){return(d=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r}).apply(this,arguments)},p=function(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;var n=Array(r),o=0;for(t=0;t<e;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)n[o]=a[i];return n};function m(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,t){var e,n=d({images:[],files:[]},t);p(n.files,(e=n.images,e.map(m))).forEach((function(t){return r.Main.prototype.createFile(t.path,t.data)}))}var _={layout:function(r,t,e,n){return void 0===t&&(t="svg"),void 0===e&&(e="dot"),r?i(l,null==n?void 0:n.wasmFolder).then((function(o){h(o,n);var a=o.Main.prototype.layout(r,t,e);if(!a)throw new Error(o.Main.prototype.lastError());return a})):Promise.resolve("")},circo:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"circo",e)},dot:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"dot",e)},fdp:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"fdp",e)},neato:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"neato",e)},osage:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"osage",e)},patchwork:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"patchwork",e)},twopi:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"twopi",e)}},y=function(){function r(r){this._wasm=r}return r.prototype.layout=function(r,t,e,n){if(void 0===t&&(t="svg"),void 0===e&&(e="dot"),!r)return"";h(this._wasm,n);var o=this._wasm.Main.prototype.layout(r,t,e);if(!o)throw new Error(this._wasm.Main.prototype.lastError());return o},r.prototype.circo=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"circo",e)},r.prototype.dot=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"dot",e)},r.prototype.fdp=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"fdp",e)},r.prototype.neato=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"neato",e)},r.prototype.osage=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"osage",e)},r.prototype.patchwork=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"patchwork",e)},r.prototype.twopi=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"twopi",e)},r}();r.StackParser=u,r.graphviz=_,r.graphvizSync=function(r){return i(l,r).then((function(r){return new y(r)}))},r.parse=c,r.wasmFolder=a,Object.defineProperty(r,"__esModule",{value:!0})}));
\No newline at end of file