@hpcc-js/wasm 1.2.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +4 -3
- package/dist/graphvizlib.wasm +0 -0
- package/dist/index.es6.js +22 -9
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +22 -9
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.node.es6.js +22 -9
- package/dist/index.node.es6.js.map +1 -1
- package/dist/index.node.js +22 -9
- package/dist/index.node.js.map +1 -1
- package/dist/test.js +39 -10
- package/dist/test.js.map +1 -1
- package/dist/test.node.js +39 -10
- package/dist/test.node.js.map +1 -1
- package/package.json +1 -1
- package/types/expat.d.ts +1 -1
- package/types/expat.d.ts.map +1 -1
- package/types/graphviz.d.ts +2 -1
- package/types/graphviz.d.ts.map +1 -1
- package/types/util.d.ts +1 -1
- package/types/util.d.ts.map +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/wasm"]={})}(this,(function(t){"use strict";function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r=e((function(t,e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(t,r){e=t,n=r}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u="./this.program",c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),r&&(c=r),c=0!==c.indexOf("blob:")?c.substr(0,c.lastIndexOf("/")+1):"",s=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText};var f,l,d=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(f=o.wasmBinary),o.noExitRuntime&&o.noExitRuntime,"object"!=typeof WebAssembly&&N("no native wasm support detected");var m=!1;function h(t,e){t||N("Assertion failed: "+e)}var _,v,w,y,g,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.subarray&&E)return E.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function k(t,e){return t?b(w,t,e):""}function D(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function S(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function F(t){_=t,o.HEAP8=v=new Int8Array(t),o.HEAP16=new Int16Array(t),o.HEAP32=y=new Int32Array(t),o.HEAPU8=w=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAPU32=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=g=new Float64Array(t)}o.INITIAL_MEMORY;var P,M=[],x=[],A=[],R=[],C=0,O=null;function j(t){C++,o.monitorRunDependencies&&o.monitorRunDependencies(C)}function T(t){if(C--,o.monitorRunDependencies&&o.monitorRunDependencies(C),0==C&&O){var e=O;O=null,e()}}function N(t){o.onAbort&&o.onAbort(t),p(t+=""),m=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function B(t){return e=t,r="data:application/octet-stream;base64,",String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r);var e,r}o.preloadedImages={},o.preloadedAudios={};var z,I,L,H="expatlib.wasm";function U(t){try{if(t==H&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}catch(t){N(t)}}B(H)||(z=H,H=o.locateFile?o.locateFile(z,c):c+z);var W={1284:function(t){var e=o.getCache(o.CExpatJS)[t];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},1504:function(t){var e=o.getCache(o.CExpatJS)[t];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},1716:function(t){var e=o.getCache(o.CExpatJS)[t];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function Y(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?P.get(r)():P.get(r)(e.arg):r(void 0===e.arg?null:e.arg)}else e(o)}}var q={splitPath:function(t){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1)},normalizeArray:function(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:function(t){var e="/"===t.charAt(0),r="/"===t.substr(-1);return(t=q.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=q.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(t){if("/"===t)return"/";var e=(t=(t=q.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},extname:function(t){return q.splitPath(t)[3]},join:function(){var t=Array.prototype.slice.call(arguments,0);return q.normalize(t.join("/"))},join2:function(t,e){return q.normalize(t+"/"+e)}},J={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:K.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e="/"===n.charAt(0)}return(e?"/":"")+(t=q.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||"."},relative:function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=J.resolve(t).substr(1),e=J.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},V={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){V.ttys[t]={input:[],output:[],ops:e},K.registerDevice(t,V.stream_ops)},stream_ops:{open:function(t){var e=V.ttys[t.node.rdev];if(!e)throw new K.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new K.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new K.ErrnoError(29)}if(void 0===s&&0===i)throw new K.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new K.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new K.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;t.input=it(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(d(b(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(d(b(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(p(b(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(p(b(t.output,0)),t.output=[])}}};function X(t){for(var e=function(t,e){return e||(e=16),Math.ceil(t/e)*e}(t,16384),r=Ft(e);t<e;)v[r+t++]=0;return r}var G={ops_table:null,mount:function(t){return G.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(K.isBlkdev(r)||K.isFIFO(r))throw new K.ErrnoError(63);G.ops_table||(G.ops_table={dir:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr,lookup:G.node_ops.lookup,mknod:G.node_ops.mknod,rename:G.node_ops.rename,unlink:G.node_ops.unlink,rmdir:G.node_ops.rmdir,readdir:G.node_ops.readdir,symlink:G.node_ops.symlink},stream:{llseek:G.stream_ops.llseek}},file:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr},stream:{llseek:G.stream_ops.llseek,read:G.stream_ops.read,write:G.stream_ops.write,allocate:G.stream_ops.allocate,mmap:G.stream_ops.mmap,msync:G.stream_ops.msync}},link:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr,readlink:G.node_ops.readlink},stream:{}},chrdev:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr},stream:K.chrdev_stream_ops}});var o=K.createNode(t,e,r,n);return K.isDir(o.mode)?(o.node_ops=G.ops_table.dir.node,o.stream_ops=G.ops_table.dir.stream,o.contents={}):K.isFile(o.mode)?(o.node_ops=G.ops_table.file.node,o.stream_ops=G.ops_table.file.stream,o.usedBytes=0,o.contents=null):K.isLink(o.mode)?(o.node_ops=G.ops_table.link.node,o.stream_ops=G.ops_table.link.stream):K.isChrdev(o.mode)&&(o.node_ops=G.ops_table.chrdev.node,o.stream_ops=G.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o),o},getFileDataAsRegularArray:function(t){if(t.contents&&t.contents.subarray){for(var e=[],r=0;r<t.usedBytes;++r)e.push(t.contents[r]);return e}return t.contents},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e){if(0==e)return t.contents=null,void(t.usedBytes=0);if(!t.contents||t.contents.subarray){var r=t.contents;return t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),void(t.usedBytes=e)}if(t.contents||(t.contents=[]),t.contents.length>e)t.contents.length=e;else for(;t.contents.length<e;)t.contents.push(0);t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=K.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,K.isDir(t.mode)?e.size=4096:K.isFile(t.mode)?e.size=t.usedBytes:K.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&G.resizeFileStorage(t,e.size)},lookup:function(t,e){throw K.genericErrors[44]},mknod:function(t,e,r,n){return G.createNode(t,e,r,n)},rename:function(t,e,r){if(K.isDir(t.mode)){var n;try{n=K.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new K.ErrnoError(55)}delete t.parent.contents[t.name],t.name=r,e.contents[r]=t,t.parent=e},unlink:function(t,e){delete t.contents[e]},rmdir:function(t,e){var r=K.lookupNode(t,e);for(var n in r.contents)throw new K.ErrnoError(55);delete t.contents[e]},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=G.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!K.isLink(t.mode))throw new K.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===v.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(G.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&K.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new K.ErrnoError(28);return n},allocate:function(t,e,r){G.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o,i){if(h(0===e),!K.isFile(t.node.mode))throw new K.ErrnoError(43);var a,s,u=t.node.contents;if(2&i||u.buffer!==_){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=X(r)))throw new K.ErrnoError(48);v.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(t,e,r,n,o){if(!K.isFile(t.node.mode))throw new K.ErrnoError(43);return 2&o||G.stream_ops.write(t,e,0,n,r,!1),0}}},K={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,lookupPath:function(t,e){if(e=e||{},!(t=J.resolve(K.cwd(),t)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===e[n]&&(e[n]=r[n]);if(e.recurse_count>8)throw new K.ErrnoError(32);for(var o=q.normalizeArray(t.split("/").filter((function(t){return!!t})),!1),i=K.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=K.lookupNode(i,o[s]),a=q.join2(a,o[s]),K.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;K.isLink(i.mode);){var f=K.readlink(a);if(a=J.resolve(q.dirname(a),f),i=K.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new K.ErrnoError(32)}}return{path:a,node:i}},getPath:function(t){for(var e;;){if(K.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%K.nameTable.length},hashAddNode:function(t){var e=K.hashName(t.parent.id,t.name);t.name_next=K.nameTable[e],K.nameTable[e]=t},hashRemoveNode:function(t){var e=K.hashName(t.parent.id,t.name);if(K.nameTable[e]===t)K.nameTable[e]=t.name_next;else for(var r=K.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:function(t,e){var r=K.mayLookup(t);if(r)throw new K.ErrnoError(r,t);for(var n=K.hashName(t.id,e),o=K.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return K.lookup(t,e)},createNode:function(t,e,r,n){var o=new K.FSNode(t,e,r,n);return K.hashAddNode(o),o},destroyNode:function(t){K.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return 32768==(61440&t)},isDir:function(t){return 16384==(61440&t)},isLink:function(t){return 40960==(61440&t)},isChrdev:function(t){return 8192==(61440&t)},isBlkdev:function(t){return 24576==(61440&t)},isFIFO:function(t){return 4096==(61440&t)},isSocket:function(t){return 49152==(49152&t)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(t){var e=K.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:function(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:function(t,e){return K.ignorePermissions||(-1===e.indexOf("r")||292&t.mode)&&(-1===e.indexOf("w")||146&t.mode)&&(-1===e.indexOf("x")||73&t.mode)?0:2},mayLookup:function(t){var e=K.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,e){try{return K.lookupNode(t,e),20}catch(t){}return K.nodePermissions(t,"wx")},mayDelete:function(t,e,r){var n;try{n=K.lookupNode(t,e)}catch(t){return t.errno}var o=K.nodePermissions(t,"wx");if(o)return o;if(r){if(!K.isDir(n.mode))return 54;if(K.isRoot(n)||K.getPath(n)===K.cwd())return 10}else if(K.isDir(n.mode))return 31;return 0},mayOpen:function(t,e){return t?K.isLink(t.mode)?32:K.isDir(t.mode)&&("r"!==K.flagsToPermissionString(e)||512&e)?31:K.nodePermissions(t,K.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(t,e){t=t||0,e=e||K.MAX_OPEN_FDS;for(var r=t;r<=e;r++)if(!K.streams[r])return r;throw new K.ErrnoError(33)},getStream:function(t){return K.streams[t]},createStream:function(t,e,r){K.FSStream||(K.FSStream=function(){},K.FSStream.prototype={object:{get:function(){return this.node},set:function(t){this.node=t}},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 K.FSStream;for(var o in t)n[o]=t[o];t=n;var i=K.nextfd(e,r);return t.fd=i,K.streams[i]=t,t},closeStream:function(t){K.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=K.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new K.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return 255&t},makedev:function(t,e){return t<<8|e},registerDevice:function(t,e){K.devices[t]={stream_ops:e}},getDevice:function(t){return K.devices[t]},getMounts:function(t){for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:function(t,e){"function"==typeof t&&(e=t,t=!1),K.syncFSRequests++,K.syncFSRequests>1&&p("warning: "+K.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=K.getMounts(K.root.mount),n=0;function o(t){return K.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:function(t,e,r){var n,o="/"===r,i=!r;if(o&&K.root)throw new K.ErrnoError(10);if(!o&&!i){var a=K.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,K.isMountpoint(n))throw new K.ErrnoError(10);if(!K.isDir(n.mode))throw new K.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?K.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(t){var e=K.lookupPath(t,{follow_mount:!1});if(!K.isMountpoint(e.node))throw new K.ErrnoError(28);var r=e.node,n=r.mounted,o=K.getMounts(n);Object.keys(K.nameTable).forEach((function(t){for(var e=K.nameTable[t];e;){var r=e.name_next;-1!==o.indexOf(e.mount)&&K.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(t,e){return t.node_ops.lookup(t,e)},mknod:function(t,e,r){var n=K.lookupPath(t,{parent:!0}).node,o=q.basename(t);if(!o||"."===o||".."===o)throw new K.ErrnoError(28);var i=K.mayCreate(n,o);if(i)throw new K.ErrnoError(i);if(!n.node_ops.mknod)throw new K.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:function(t,e){return e=void 0!==e?e:438,e&=4095,e|=32768,K.mknod(t,e,0)},mkdir:function(t,e){return e=void 0!==e?e:511,e&=1023,e|=16384,K.mknod(t,e,0)},mkdirTree:function(t,e){for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{K.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:function(t,e,r){return void 0===r&&(r=e,e=438),e|=8192,K.mknod(t,e,r)},symlink:function(t,e){if(!J.resolve(t))throw new K.ErrnoError(44);var r=K.lookupPath(e,{parent:!0}).node;if(!r)throw new K.ErrnoError(44);var n=q.basename(e),o=K.mayCreate(r,n);if(o)throw new K.ErrnoError(o);if(!r.node_ops.symlink)throw new K.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:function(t,e){var r,n,o=q.dirname(t),i=q.dirname(e),a=q.basename(t),s=q.basename(e);if(r=K.lookupPath(t,{parent:!0}).node,n=K.lookupPath(e,{parent:!0}).node,!r||!n)throw new K.ErrnoError(44);if(r.mount!==n.mount)throw new K.ErrnoError(75);var u,c=K.lookupNode(r,a),f=J.relative(t,i);if("."!==f.charAt(0))throw new K.ErrnoError(28);if("."!==(f=J.relative(e,o)).charAt(0))throw new K.ErrnoError(55);try{u=K.lookupNode(n,s)}catch(t){}if(c!==u){var l=K.isDir(c.mode),d=K.mayDelete(r,a,l);if(d)throw new K.ErrnoError(d);if(d=u?K.mayDelete(n,s,l):K.mayCreate(n,s))throw new K.ErrnoError(d);if(!r.node_ops.rename)throw new K.ErrnoError(63);if(K.isMountpoint(c)||u&&K.isMountpoint(u))throw new K.ErrnoError(10);if(n!==r&&(d=K.nodePermissions(r,"w")))throw new K.ErrnoError(d);try{K.trackingDelegate.willMovePath&&K.trackingDelegate.willMovePath(t,e)}catch(r){p("FS.trackingDelegate['willMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}K.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{K.hashAddNode(c)}try{K.trackingDelegate.onMovePath&&K.trackingDelegate.onMovePath(t,e)}catch(r){p("FS.trackingDelegate['onMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}}},rmdir:function(t){var e=K.lookupPath(t,{parent:!0}).node,r=q.basename(t),n=K.lookupNode(e,r),o=K.mayDelete(e,r,!0);if(o)throw new K.ErrnoError(o);if(!e.node_ops.rmdir)throw new K.ErrnoError(63);if(K.isMountpoint(n))throw new K.ErrnoError(10);try{K.trackingDelegate.willDeletePath&&K.trackingDelegate.willDeletePath(t)}catch(e){p("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,r),K.destroyNode(n);try{K.trackingDelegate.onDeletePath&&K.trackingDelegate.onDeletePath(t)}catch(e){p("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readdir:function(t){var e=K.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new K.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(t){var e=K.lookupPath(t,{parent:!0}).node,r=q.basename(t),n=K.lookupNode(e,r),o=K.mayDelete(e,r,!1);if(o)throw new K.ErrnoError(o);if(!e.node_ops.unlink)throw new K.ErrnoError(63);if(K.isMountpoint(n))throw new K.ErrnoError(10);try{K.trackingDelegate.willDeletePath&&K.trackingDelegate.willDeletePath(t)}catch(e){p("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.unlink(e,r),K.destroyNode(n);try{K.trackingDelegate.onDeletePath&&K.trackingDelegate.onDeletePath(t)}catch(e){p("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readlink:function(t){var e=K.lookupPath(t).node;if(!e)throw new K.ErrnoError(44);if(!e.node_ops.readlink)throw new K.ErrnoError(28);return J.resolve(K.getPath(e.parent),e.node_ops.readlink(e))},stat:function(t,e){var r=K.lookupPath(t,{follow:!e}).node;if(!r)throw new K.ErrnoError(44);if(!r.node_ops.getattr)throw new K.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return K.stat(t,!0)},chmod:function(t,e,r){var n;if(!(n="string"==typeof t?K.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new K.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(t,e){K.chmod(t,e,!0)},fchmod:function(t,e){var r=K.getStream(t);if(!r)throw new K.ErrnoError(8);K.chmod(r.node,e)},chown:function(t,e,r,n){var o;if(!(o="string"==typeof t?K.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new K.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(t,e,r){K.chown(t,e,r,!0)},fchown:function(t,e,r){var n=K.getStream(t);if(!n)throw new K.ErrnoError(8);K.chown(n.node,e,r)},truncate:function(t,e){if(e<0)throw new K.ErrnoError(28);var r;if(!(r="string"==typeof t?K.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new K.ErrnoError(63);if(K.isDir(r.mode))throw new K.ErrnoError(31);if(!K.isFile(r.mode))throw new K.ErrnoError(28);var n=K.nodePermissions(r,"w");if(n)throw new K.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:function(t,e){var r=K.getStream(t);if(!r)throw new K.ErrnoError(8);if(0==(2097155&r.flags))throw new K.ErrnoError(28);K.truncate(r.node,e)},utime:function(t,e,r){var n=K.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:function(t,e,r,n,i){if(""===t)throw new K.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?K.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)a=t;else{t=q.normalize(t);try{a=K.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var s=!1;if(64&e)if(a){if(128&e)throw new K.ErrnoError(20)}else a=K.mknod(t,r,0),s=!0;if(!a)throw new K.ErrnoError(44);if(K.isChrdev(a.mode)&&(e&=-513),65536&e&&!K.isDir(a.mode))throw new K.ErrnoError(54);if(!s){var u=K.mayOpen(a,e);if(u)throw new K.ErrnoError(u)}512&e&&K.truncate(a,0),e&=-131713;var c=K.createStream({node:a,path:K.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(K.readFiles||(K.readFiles={}),t in K.readFiles||(K.readFiles[t]=1,p("FS.trackingDelegate error on read file: "+t)));try{if(K.trackingDelegate.onOpenFile){var f=0;1!=(2097155&e)&&(f|=K.tracking.openFlags.READ),0!=(2097155&e)&&(f|=K.tracking.openFlags.WRITE),K.trackingDelegate.onOpenFile(t,f)}}catch(e){p("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return c},close:function(t){if(K.isClosed(t))throw new K.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{K.closeStream(t.fd)}t.fd=null},isClosed:function(t){return null===t.fd},llseek:function(t,e,r){if(K.isClosed(t))throw new K.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new K.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new K.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:function(t,e,r,n,o){if(n<0||o<0)throw new K.ErrnoError(28);if(K.isClosed(t))throw new K.ErrnoError(8);if(1==(2097155&t.flags))throw new K.ErrnoError(8);if(K.isDir(t.node.mode))throw new K.ErrnoError(31);if(!t.stream_ops.read)throw new K.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new K.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:function(t,e,r,n,o,i){if(n<0||o<0)throw new K.ErrnoError(28);if(K.isClosed(t))throw new K.ErrnoError(8);if(0==(2097155&t.flags))throw new K.ErrnoError(8);if(K.isDir(t.node.mode))throw new K.ErrnoError(31);if(!t.stream_ops.write)throw new K.ErrnoError(28);t.seekable&&1024&t.flags&&K.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new K.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);a||(t.position+=s);try{t.path&&K.trackingDelegate.onWriteToFile&&K.trackingDelegate.onWriteToFile(t.path)}catch(e){p("FS.trackingDelegate['onWriteToFile']('"+t.path+"') threw an exception: "+e.message)}return s},allocate:function(t,e,r){if(K.isClosed(t))throw new K.ErrnoError(8);if(e<0||r<=0)throw new K.ErrnoError(28);if(0==(2097155&t.flags))throw new K.ErrnoError(8);if(!K.isFile(t.node.mode)&&!K.isDir(t.node.mode))throw new K.ErrnoError(43);if(!t.stream_ops.allocate)throw new K.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:function(t,e,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&t.flags))throw new K.ErrnoError(2);if(1==(2097155&t.flags))throw new K.ErrnoError(2);if(!t.stream_ops.mmap)throw new K.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o,i)},msync:function(t,e,r,n,o){return t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0},munmap:function(t){return 0},ioctl:function(t,e,r){if(!t.stream_ops.ioctl)throw new K.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:function(t,e){if((e=e||{}).flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=K.open(t,e.flags),o=K.stat(t).size,i=new Uint8Array(o);return K.read(n,i,0,o,0),"utf8"===e.encoding?r=b(i,0):"binary"===e.encoding&&(r=i),K.close(n),r},writeFile:function(t,e,r){(r=r||{}).flags=r.flags||577;var n=K.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(S(e)+1),i=D(e,o,0,o.length);K.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");K.write(n,e,0,e.byteLength,void 0,r.canOwn)}K.close(n)},cwd:function(){return K.currentPath},chdir:function(t){var e=K.lookupPath(t,{follow:!0});if(null===e.node)throw new K.ErrnoError(44);if(!K.isDir(e.node.mode))throw new K.ErrnoError(54);var r=K.nodePermissions(e.node,"x");if(r)throw new K.ErrnoError(r);K.currentPath=e.path},createDefaultDirectories:function(){K.mkdir("/tmp"),K.mkdir("/home"),K.mkdir("/home/web_user")},createDefaultDevices:function(){K.mkdir("/dev"),K.registerDevice(K.makedev(1,3),{read:function(){return 0},write:function(t,e,r,n,o){return n}}),K.mkdev("/dev/null",K.makedev(1,3)),V.register(K.makedev(5,0),V.default_tty_ops),V.register(K.makedev(6,0),V.default_tty1_ops),K.mkdev("/dev/tty",K.makedev(5,0)),K.mkdev("/dev/tty1",K.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}return function(){N("randomDevice")}}();K.createDevice("/dev","random",t),K.createDevice("/dev","urandom",t),K.mkdir("/dev/shm"),K.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){K.mkdir("/proc"),K.mkdir("/proc/self"),K.mkdir("/proc/self/fd"),K.mount({mount:function(){var t=K.createNode("/proc/self","fd",16895,73);return t.node_ops={lookup:function(t,e){var r=+e,n=K.getStream(r);if(!n)throw new K.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?K.createDevice("/dev","stdin",o.stdin):K.symlink("/dev/tty","/dev/stdin"),o.stdout?K.createDevice("/dev","stdout",null,o.stdout):K.symlink("/dev/tty","/dev/stdout"),o.stderr?K.createDevice("/dev","stderr",null,o.stderr):K.symlink("/dev/tty1","/dev/stderr"),K.open("/dev/stdin",0),K.open("/dev/stdout",1),K.open("/dev/stderr",1)},ensureErrnoError:function(){K.ErrnoError||(K.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},K.ErrnoError.prototype=new Error,K.ErrnoError.prototype.constructor=K.ErrnoError,[44].forEach((function(t){K.genericErrors[t]=new K.ErrnoError(t),K.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:function(){K.ensureErrnoError(),K.nameTable=new Array(4096),K.mount(G,{},"/"),K.createDefaultDirectories(),K.createDefaultDevices(),K.createSpecialDirectories(),K.filesystems={MEMFS:G}},init:function(t,e,r){K.init.initialized=!0,K.ensureErrnoError(),o.stdin=t||o.stdin,o.stdout=e||o.stdout,o.stderr=r||o.stderr,K.createStandardStreams()},quit:function(){K.init.initialized=!1;var t=o._fflush;t&&t(0);for(var e=0;e<K.streams.length;e++){var r=K.streams[e];r&&K.close(r)}},getMode:function(t,e){var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:function(t,e){var r=K.analyzePath(t,e);return r.exists?r.object:null},analyzePath:function(t,e){try{t=(n=K.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=K.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=q.basename(t),n=K.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:function(t,e,r,n){t="string"==typeof t?t:K.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=q.join2(t,i);try{K.mkdir(a)}catch(t){}t=a}}return a},createFile:function(t,e,r,n,o){var i=q.join2("string"==typeof t?t:K.getPath(t),e),a=K.getMode(n,o);return K.create(i,a)},createDataFile:function(t,e,r,n,o,i){var a=e?q.join2("string"==typeof t?t:K.getPath(t),e):t,s=K.getMode(n,o),u=K.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}K.chmod(u,146|s);var d=K.open(u,577);K.write(d,r,0,r.length,0,i),K.close(d),K.chmod(u,s)}return u},createDevice:function(t,e,r,n){var o=q.join2("string"==typeof t?t:K.getPath(t),e),i=K.getMode(!!r,!!n);K.createDevice.major||(K.createDevice.major=64);var a=K.makedev(K.createDevice.major++,0);return K.registerDevice(a,{open:function(t){t.seekable=!1},close:function(t){n&&n.buffer&&n.buffer.length&&n(10)},read:function(t,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new K.ErrnoError(29)}if(void 0===u&&0===a)throw new K.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:function(t,e,r,o,i){for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new K.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),K.mkdev(o,i,a)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=it(s(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new K.ErrnoError(29)}},createLazyFile:function(t,e,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(t){var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=function(t,e){if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),"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 "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):it(o.responseText||"",!0)}(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,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 a={isDevice:!1,url:r},s=K.createFile(t,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(t){var e=s.stream_ops[t];u[t]=function(){return K.forceLoadFile(s),e.apply(null,arguments)}})),u.read=function(t,e,r,n,o){K.forceLoadFile(s);var i=t.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[r+u]=i[o+u];else for(u=0;u<a;u++)e[r+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(t,e,r,n,i,a,s,u,c,f){Browser.init();var l=e?J.resolve(q.join2(t,e)):t;function d(r){function d(r){f&&f(),u||K.createDataFile(t,e,r,n,i,c),a&&a(),T()}var p=!1;o.preloadPlugins.forEach((function(t){p||t.canHandle(l)&&(t.handle(r,l,d,(function(){s&&s(),T()})),p=!0)})),p||d(r)}j(),"string"==typeof r?Browser.asyncLoad(r,(function(t){d(t)}),s):d(r)},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(t,e,r){e=e||function(){},r=r||function(){};var n=K.indexedDB();try{var o=n.open(K.DB_NAME(),K.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=function(){d("creating db"),o.result.createObjectStore(K.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([K.DB_STORE_NAME],"readwrite"),i=n.objectStore(K.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((function(t){var e=i.put(K.analyzePath(t).object.contents,t);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(t,e,r){e=e||function(){},r=r||function(){};var n=K.indexedDB();try{var o=n.open(K.DB_NAME(),K.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([K.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(K.DB_STORE_NAME),s=0,u=0,c=t.length;function f(){0==u?e():r()}t.forEach((function(t){var e=a.get(t);e.onsuccess=function(){K.analyzePath(t).exists&&K.unlink(t),K.createDataFile(q.dirname(t),q.basename(t),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){u++,s+u==c&&f()}})),i.onerror=r},o.onerror=r}},$={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(t,e){if("/"!==e[0]){var r;if(-100===t)r=K.cwd();else{var n=K.getStream(t);if(!n)throw new K.ErrnoError(8);r=n.path}e=q.join2(r,e)}return e},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&q.normalize(e)!==q.normalize(K.getPath(t.node)))return-54;throw t}return y[r>>2]=n.dev,y[r+4>>2]=0,y[r+8>>2]=n.ino,y[r+12>>2]=n.mode,y[r+16>>2]=n.nlink,y[r+20>>2]=n.uid,y[r+24>>2]=n.gid,y[r+28>>2]=n.rdev,y[r+32>>2]=0,L=[n.size>>>0,(I=n.size,+Math.abs(I)>=1?I>0?(0|Math.min(+Math.floor(I/4294967296),4294967295))>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],y[r+40>>2]=L[0],y[r+44>>2]=L[1],y[r+48>>2]=4096,y[r+52>>2]=n.blocks,y[r+56>>2]=n.atime.getTime()/1e3|0,y[r+60>>2]=0,y[r+64>>2]=n.mtime.getTime()/1e3|0,y[r+68>>2]=0,y[r+72>>2]=n.ctime.getTime()/1e3|0,y[r+76>>2]=0,L=[n.ino>>>0,(I=n.ino,+Math.abs(I)>=1?I>0?(0|Math.min(+Math.floor(I/4294967296),4294967295))>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],y[r+80>>2]=L[0],y[r+84>>2]=L[1],0},doMsync:function(t,e,r,n,o){var i=w.slice(t,t+r);K.msync(e,i,o,r,n)},doMkdir:function(t,e){return"/"===(t=q.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),K.mkdir(t,e,0),0},doMknod:function(t,e,r){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return K.mknod(t,e,r),0},doReadlink:function(t,e,r){if(r<=0)return-28;var n=K.readlink(t),o=Math.min(r,S(n)),i=v[e+o];return D(n,w,e,r+1),v[e+o]=i,o},doAccess:function(t,e){if(-8&e)return-28;var r;if(!(r=K.lookupPath(t,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&K.nodePermissions(r,n)?-2:0},doDup:function(t,e,r){var n=K.getStream(r);return n&&K.close(n),K.open(t,e,0,r,r).fd},doReadv:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=K.read(t,v,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=K.write(t,v,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return $.varargs+=4,y[$.varargs-4>>2]},getStr:function(t){return k(t)},getStreamFromFD:function(t){var e=K.getStream(t);if(!e)throw new K.ErrnoError(8);return e},get64:function(t,e){return t}};function Z(t){try{return l.grow(t-_.byteLength+65535>>>16),F(l.buffer),1}catch(t){}}var Q={};function tt(){if(!tt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in Q)t[e]=Q[e];var r=[];for(var e in t)r.push(e+"="+t[e]);tt.strings=r}return tt.strings}var et=[],rt=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=K.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},nt=365,ot=146;function it(t,e,r){var n=r>0?r:S(t)+1,o=new Array(n),i=D(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(rt.prototype,{read:{get:function(){return(this.mode&nt)===nt},set:function(t){t?this.mode|=nt:this.mode&=-366}},write:{get:function(){return(this.mode&ot)===ot},set:function(t){t?this.mode|=ot:this.mode&=-147}},isFolder:{get:function(){return K.isDir(this.mode)}},isDevice:{get:function(){return K.isChrdev(this.mode)}}}),K.FSNode=rt,K.staticInit(),x.push({func:function(){ut()}});var at,st={i:function(){return 42},b:function(){N()},a:function(t,e,r){var n=function(t,e){var r;for(et.length=0,e>>=2;r=w[t++];){var n=r<105;n&&1&e&&e++,et.push(n?g[e++>>1]:y[e]),++e}return et}(e,r);return W[t].apply(null,n)},d:function(t,e,r){w.copyWithin(t,e,e+r)},e:function(t){t>>>=0;var e=w.length,r=2147483648;if(t>r)return!1;for(var n,o,i=1;i<=4;i*=2){var a=e*(1+.2/i);if(a=Math.min(a,t+100663296),Z(Math.min(r,((n=Math.max(16777216,t,a))%(o=65536)>0&&(n+=o-n%o),n))))return!0}return!1},f:function(t,e){try{var r=0;return tt().forEach((function(n,o){var i=e+r;y[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)v[e++>>0]=t.charCodeAt(n);r||(v[e>>0]=0)}(n,i),r+=n.length+1})),0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||N(t),t.errno}},g:function(t,e){try{var r=tt();y[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),y[e>>2]=n,0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||N(t),t.errno}},h:function(t){try{var e=$.getStreamFromFD(t);return K.close(e),0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||N(t),t.errno}},j:function(t,e,r,n,o){try{var i=$.getStreamFromFD(t),a=4294967296*r+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(K.llseek(i,a,n),L=[i.position>>>0,(I=i.position,+Math.abs(I)>=1?I>0?(0|Math.min(+Math.floor(I/4294967296),4294967295))>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],y[o>>2]=L[0],y[o+4>>2]=L[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(t){return void 0!==K&&t instanceof K.ErrnoError||N(t),t.errno}},c:function(t,e,r,n){try{var o=$.getStreamFromFD(t),i=$.doWritev(o,e,r);return y[n>>2]=i,0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||N(t),t.errno}},k:function(t){var e=Date.now();return y[t>>2]=e/1e3|0,y[t+4>>2]=e%1e3*1e3|0,0}},ut=(function(){var t={a:st};function e(t,e){var r=t.exports;o.asm=r,F((l=o.asm.l).buffer),P=o.asm.m,T()}function r(t){e(t.instance)}function i(e){return(f||"function"!=typeof fetch?Promise.resolve().then((function(){return U(H)})):fetch(H,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+H+"'";return t.arrayBuffer()})).catch((function(){return U(H)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(t){p("failed to asynchronously prepare wasm: "+t),N(t)}))}if(j(),o.instantiateWasm)try{return o.instantiateWasm(t,e)}catch(t){return p("Module.instantiateWasm callback failed with error: "+t),!1}(f||"function"!=typeof WebAssembly.instantiateStreaming||B(H)||"function"!=typeof fetch?i(r):fetch(H,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return p("wasm streaming compile failed: "+t),p("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(ut=o.___wasm_call_ctors=o.asm.n).apply(null,arguments)}),ct=(o.___em_js__array_bounds_check_error=function(){return(o.___em_js__array_bounds_check_error=o.asm.o).apply(null,arguments)},o._emscripten_bind_CExpat_CExpat_0=function(){return(ct=o._emscripten_bind_CExpat_CExpat_0=o.asm.p).apply(null,arguments)}),ft=o._emscripten_bind_CExpat_create_0=function(){return(ft=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},lt=o._emscripten_bind_CExpat_destroy_0=function(){return(lt=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},dt=o._emscripten_bind_CExpat_parse_1=function(){return(dt=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},pt=o._emscripten_bind_CExpat_tag_0=function(){return(pt=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},mt=o._emscripten_bind_CExpat_attrs_0=function(){return(mt=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},ht=o._emscripten_bind_CExpat_content_0=function(){return(ht=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},_t=o._emscripten_bind_CExpat_startElement_0=function(){return(_t=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},vt=o._emscripten_bind_CExpat_endElement_0=function(){return(vt=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},wt=o._emscripten_bind_CExpat_characterData_0=function(){return(wt=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},yt=o._emscripten_bind_CExpat___destroy___0=function(){return(yt=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},gt=o._emscripten_bind_VoidPtr___destroy___0=function(){return(gt=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},Et=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Et=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},bt=o._emscripten_bind_CExpatJS_startElement_0=function(){return(bt=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},kt=o._emscripten_bind_CExpatJS_endElement_0=function(){return(kt=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},Dt=o._emscripten_bind_CExpatJS_characterData_0=function(){return(Dt=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},St=o._emscripten_bind_CExpatJS___destroy___0=function(){return(St=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)},Ft=o._malloc=function(){return(Ft=o._malloc=o.asm.G).apply(null,arguments)};function Pt(t){function r(){at||(at=!0,o.calledRun=!0,m||(o.noFSInit||K.init.initialized||K.init(),V.init(),Y(x),K.ignorePermissions=!1,Y(A),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),R.unshift(t);var t;Y(R)}()))}C>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),M.unshift(t);var t;Y(M)}(),C>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r()))}if(o._free=function(){return(o._free=o.asm.H).apply(null,arguments)},O=function t(){at||Pt(),at||(O=t)},o.run=Pt,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Mt(){}function xt(t){return(t||Mt).__cache__}function At(t,e){var r=xt(e),n=r[t];return n||((n=Object.create((e||Mt).prototype)).ptr=t,r[t]=n)}Pt(),Mt.prototype=Object.create(Mt.prototype),Mt.prototype.constructor=Mt,Mt.prototype.__class__=Mt,Mt.__cache__={},o.WrapperObject=Mt,o.getCache=xt,o.wrapPointer=At,o.castObject=function(t,e){return At(t.ptr,e)},o.NULL=At(0),o.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete xt(t.__class__)[t.ptr]},o.compare=function(t,e){return t.ptr===e.ptr},o.getPointer=function(t){return t.ptr},o.getClass=function(t){return t.__class__};var Rt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Rt.needed){for(var t=0;t<Rt.temps.length;t++)o._free(Rt.temps[t]);Rt.temps.length=0,o._free(Rt.buffer),Rt.buffer=0,Rt.size+=Rt.needed,Rt.needed=0}Rt.buffer||(Rt.size+=128,Rt.buffer=o._malloc(Rt.size),h(Rt.buffer)),Rt.pos=0},alloc:function(t,e){h(Rt.buffer);var r,n=e.BYTES_PER_ELEMENT,i=t.length*n;return i=i+7&-8,Rt.pos+i>=Rt.size?(h(i>0),Rt.needed+=i,r=o._malloc(i),Rt.temps.push(r)):(r=Rt.buffer+Rt.pos,Rt.pos+=i),r},copy:function(t,e,r){switch(r>>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;n<t.length;n++)e[r+n]=t[n]}};function Ct(){this.ptr=ct(),xt(Ct)[this.ptr]=this}function Ot(){throw"cannot construct a VoidPtr, no constructor in IDL"}function jt(){this.ptr=Et(),xt(jt)[this.ptr]=this}return Ct.prototype=Object.create(Mt.prototype),Ct.prototype.constructor=Ct,Ct.prototype.__class__=Ct,Ct.__cache__={},o.CExpat=Ct,Ct.prototype.create=Ct.prototype.create=function(){var t=this.ptr;return!!ft(t)},Ct.prototype.destroy=Ct.prototype.destroy=function(){var t=this.ptr;lt(t)},Ct.prototype.parse=Ct.prototype.parse=function(t){var e=this.ptr;return Rt.prepare(),t=t&&"object"==typeof t?t.ptr:function(t){if("string"==typeof t){var e=it(t),r=Rt.alloc(e,v);return Rt.copy(e,v,r),r}return t}(t),!!dt(e,t)},Ct.prototype.tag=Ct.prototype.tag=function(){var t=this.ptr;return k(pt(t))},Ct.prototype.attrs=Ct.prototype.attrs=function(){var t=this.ptr;return k(mt(t))},Ct.prototype.content=Ct.prototype.content=function(){var t=this.ptr;return k(ht(t))},Ct.prototype.startElement=Ct.prototype.startElement=function(){var t=this.ptr;_t(t)},Ct.prototype.endElement=Ct.prototype.endElement=function(){var t=this.ptr;vt(t)},Ct.prototype.characterData=Ct.prototype.characterData=function(){var t=this.ptr;wt(t)},Ct.prototype.__destroy__=Ct.prototype.__destroy__=function(){var t=this.ptr;yt(t)},Ot.prototype=Object.create(Mt.prototype),Ot.prototype.constructor=Ot,Ot.prototype.__class__=Ot,Ot.__cache__={},o.VoidPtr=Ot,Ot.prototype.__destroy__=Ot.prototype.__destroy__=function(){var t=this.ptr;gt(t)},jt.prototype=Object.create(Ct.prototype),jt.prototype.constructor=jt,jt.prototype.__class__=jt,jt.__cache__={},o.CExpatJS=jt,jt.prototype.startElement=jt.prototype.startElement=function(){var t=this.ptr;bt(t)},jt.prototype.endElement=jt.prototype.endElement=function(){var t=this.ptr;kt(t)},jt.prototype.characterData=jt.prototype.characterData=function(){var t=this.ptr;Dt(t)},jt.prototype.__destroy__=jt.prototype.__destroy__=function(){var t=this.ptr;St(t)},t.ready});t.exports=n})),n=Object.freeze(Object.assign(Object.create(null),r,{default:r})),o=new Function("return this;")().__hpcc_wasmFolder||void 0;function i(t){if(void 0===t)return o;var e=o;return o=t,e}function a(t,e){var r=t.default||t;return r.__hpcc_promise||(r.__hpcc_promise=new Promise((function(t){r({locateFile:function(t,r){return function(t,e){for(;t.charAt(t.length-1)===e;)t=t.substring(0,t.length-1);return t}(e||i()||r||".","/")+"/"+function(t,e){for(;t.charAt(0)===e;)t=t.substring(1);return t}(t,"/")}}).then((function(e){delete e.then,t(e)}))}))),r.__hpcc_promise}var s=function(){function t(t,e){this.tag=t,this.attrs=e,this._content=""}return Object.defineProperty(t.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),t.prototype.appendContent=function(t){this._content+=t},t}(),u=function(){function t(){this._stack=[]}return t.prototype.parse=function(t){return c(t,this)},t.prototype.top=function(){return this._stack[this._stack.length-1]},t.prototype.startElement=function(t,e){var r=new s(t,e);return this._stack.push(r),r},t.prototype.endElement=function(t){return this._stack.pop()},t.prototype.characterData=function(t){this.top().appendContent(t)},t}();function c(t,e,r){return a(n,r).then((function(r){var n=new r.CExpatJS;n.startElement=function(){e.startElement(this.tag(),function(t){var e={},r=t,n=""+String.fromCharCode(1),o=""+n+n;return r.split(o).filter((function(t){return!!t})).forEach((function(t){var r=t.split(n);e[r[0]]=r[1]})),e}(this.attrs()))},n.endElement=function(){e.endElement(this.tag())},n.characterData=function(){e.characterData(this.content())},n.create();var o=n.parse(t);return n.destroy(),r.destroy(n),o}))}var f=e((function(t,e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(t,r){e=t,n=r}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u="./this.program",c=function(t,e){throw e},f="";"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",s=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText};var l=o.print||console.log.bind(console),d=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit);var p,m,h,_=0;o.wasmBinary&&(p=o.wasmBinary),o.noExitRuntime&&(m=o.noExitRuntime),"object"!=typeof WebAssembly&&L("no native wasm support detected");var v=!1;function w(t,e){t||L("Assertion failed: "+e)}var y,g,E,b,k,D,S="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.subarray&&S)return S.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function P(t,e){return t?F(E,t,e):""}function M(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function x(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function A(t){y=t,o.HEAP8=g=new Int8Array(t),o.HEAP16=b=new Int16Array(t),o.HEAP32=k=new Int32Array(t),o.HEAPU8=E=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAPU32=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=D=new Float64Array(t)}o.INITIAL_MEMORY;var R,C=[],O=[],j=[],T=[],N=0,B=null;function z(t){N++,o.monitorRunDependencies&&o.monitorRunDependencies(N)}function I(t){if(N--,o.monitorRunDependencies&&o.monitorRunDependencies(N),0==N&&B){var e=B;B=null,e()}}function L(t){o.onAbort&&o.onAbort(t),d(t+=""),v=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function H(t){return e=t,r="data:application/octet-stream;base64,",String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r);var e,r}o.preloadedImages={},o.preloadedAudios={};var U,W,Y,q="graphvizlib.wasm";function J(t){try{if(t==q&&p)return new Uint8Array(p);throw"both async and sync fetching of the wasm failed"}catch(t){L(t)}}H(q)||(U=q,q=o.locateFile?o.locateFile(U,f):f+U);var V,X={1186:function(t,e){var r=P(t),n=P(e);ct.createPath("/",ot.dirname(r)),ct.writeFile(ot.join("/",r),n)}};function G(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?R.get(r)():R.get(r)(e.arg):r(void 0===e.arg?null:e.arg)}else e(o)}}function K(t){return k[Bt()>>2]=t,t}V=function(){return performance.now()};var $=0,Z=4,Q=8,tt=12,et=13,rt=16;function nt(t){this.excPtr=t,this.ptr=t-rt,this.set_type=function(t){k[this.ptr+Q>>2]=t},this.get_type=function(){return k[this.ptr+Q>>2]},this.set_destructor=function(t){k[this.ptr+$>>2]=t},this.get_destructor=function(){return k[this.ptr+$>>2]},this.set_refcount=function(t){k[this.ptr+Z>>2]=t},this.set_caught=function(t){t=t?1:0,g[this.ptr+tt>>0]=t},this.get_caught=function(){return 0!=g[this.ptr+tt>>0]},this.set_rethrown=function(t){t=t?1:0,g[this.ptr+et>>0]=t},this.get_rethrown=function(){return 0!=g[this.ptr+et>>0]},this.init=function(t,e){this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=k[this.ptr+Z>>2];k[this.ptr+Z>>2]=t+1},this.release_ref=function(){var t=k[this.ptr+Z>>2];return k[this.ptr+Z>>2]=t-1,1===t}}var ot={splitPath:function(t){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1)},normalizeArray:function(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:function(t){var e="/"===t.charAt(0),r="/"===t.substr(-1);return(t=ot.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=ot.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(t){if("/"===t)return"/";var e=(t=(t=ot.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},extname:function(t){return ot.splitPath(t)[3]},join:function(){var t=Array.prototype.slice.call(arguments,0);return ot.normalize(t.join("/"))},join2:function(t,e){return ot.normalize(t+"/"+e)}},it={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:ct.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e="/"===n.charAt(0)}return(e?"/":"")+(t=ot.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||"."},relative:function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=it.resolve(t).substr(1),e=it.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},at={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){at.ttys[t]={input:[],output:[],ops:e},ct.registerDevice(t,at.stream_ops)},stream_ops:{open:function(t){var e=at.ttys[t.node.rdev];if(!e)throw new ct.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new ct.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new ct.ErrnoError(29)}if(void 0===s&&0===i)throw new ct.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new ct.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new ct.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;t.input=Dt(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(l(F(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(l(F(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(d(F(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(d(F(t.output,0)),t.output=[])}}};function st(t){for(var e=function(t,e){return e||(e=16),Math.ceil(t/e)*e}(t,16384),r=Tt(e);t<e;)g[r+t++]=0;return r}var ut={ops_table:null,mount:function(t){return ut.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(ct.isBlkdev(r)||ct.isFIFO(r))throw new ct.ErrnoError(63);ut.ops_table||(ut.ops_table={dir:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,lookup:ut.node_ops.lookup,mknod:ut.node_ops.mknod,rename:ut.node_ops.rename,unlink:ut.node_ops.unlink,rmdir:ut.node_ops.rmdir,readdir:ut.node_ops.readdir,symlink:ut.node_ops.symlink},stream:{llseek:ut.stream_ops.llseek}},file:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:{llseek:ut.stream_ops.llseek,read:ut.stream_ops.read,write:ut.stream_ops.write,allocate:ut.stream_ops.allocate,mmap:ut.stream_ops.mmap,msync:ut.stream_ops.msync}},link:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,readlink:ut.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:ct.chrdev_stream_ops}});var o=ct.createNode(t,e,r,n);return ct.isDir(o.mode)?(o.node_ops=ut.ops_table.dir.node,o.stream_ops=ut.ops_table.dir.stream,o.contents={}):ct.isFile(o.mode)?(o.node_ops=ut.ops_table.file.node,o.stream_ops=ut.ops_table.file.stream,o.usedBytes=0,o.contents=null):ct.isLink(o.mode)?(o.node_ops=ut.ops_table.link.node,o.stream_ops=ut.ops_table.link.stream):ct.isChrdev(o.mode)&&(o.node_ops=ut.ops_table.chrdev.node,o.stream_ops=ut.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o),o},getFileDataAsRegularArray:function(t){if(t.contents&&t.contents.subarray){for(var e=[],r=0;r<t.usedBytes;++r)e.push(t.contents[r]);return e}return t.contents},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e){if(0==e)return t.contents=null,void(t.usedBytes=0);if(!t.contents||t.contents.subarray){var r=t.contents;return t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),void(t.usedBytes=e)}if(t.contents||(t.contents=[]),t.contents.length>e)t.contents.length=e;else for(;t.contents.length<e;)t.contents.push(0);t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=ct.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,ct.isDir(t.mode)?e.size=4096:ct.isFile(t.mode)?e.size=t.usedBytes:ct.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ut.resizeFileStorage(t,e.size)},lookup:function(t,e){throw ct.genericErrors[44]},mknod:function(t,e,r,n){return ut.createNode(t,e,r,n)},rename:function(t,e,r){if(ct.isDir(t.mode)){var n;try{n=ct.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new ct.ErrnoError(55)}delete t.parent.contents[t.name],t.name=r,e.contents[r]=t,t.parent=e},unlink:function(t,e){delete t.contents[e]},rmdir:function(t,e){var r=ct.lookupNode(t,e);for(var n in r.contents)throw new ct.ErrnoError(55);delete t.contents[e]},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=ut.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!ct.isLink(t.mode))throw new ct.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===g.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(ut.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&ct.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new ct.ErrnoError(28);return n},allocate:function(t,e,r){ut.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o,i){if(w(0===e),!ct.isFile(t.node.mode))throw new ct.ErrnoError(43);var a,s,u=t.node.contents;if(2&i||u.buffer!==y){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=st(r)))throw new ct.ErrnoError(48);g.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(t,e,r,n,o){if(!ct.isFile(t.node.mode))throw new ct.ErrnoError(43);return 2&o||ut.stream_ops.write(t,e,0,n,r,!1),0}}},ct={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,lookupPath:function(t,e){if(e=e||{},!(t=it.resolve(ct.cwd(),t)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===e[n]&&(e[n]=r[n]);if(e.recurse_count>8)throw new ct.ErrnoError(32);for(var o=ot.normalizeArray(t.split("/").filter((function(t){return!!t})),!1),i=ct.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=ct.lookupNode(i,o[s]),a=ot.join2(a,o[s]),ct.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;ct.isLink(i.mode);){var f=ct.readlink(a);if(a=it.resolve(ot.dirname(a),f),i=ct.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new ct.ErrnoError(32)}}return{path:a,node:i}},getPath:function(t){for(var e;;){if(ct.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%ct.nameTable.length},hashAddNode:function(t){var e=ct.hashName(t.parent.id,t.name);t.name_next=ct.nameTable[e],ct.nameTable[e]=t},hashRemoveNode:function(t){var e=ct.hashName(t.parent.id,t.name);if(ct.nameTable[e]===t)ct.nameTable[e]=t.name_next;else for(var r=ct.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:function(t,e){var r=ct.mayLookup(t);if(r)throw new ct.ErrnoError(r,t);for(var n=ct.hashName(t.id,e),o=ct.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return ct.lookup(t,e)},createNode:function(t,e,r,n){var o=new ct.FSNode(t,e,r,n);return ct.hashAddNode(o),o},destroyNode:function(t){ct.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return 32768==(61440&t)},isDir:function(t){return 16384==(61440&t)},isLink:function(t){return 40960==(61440&t)},isChrdev:function(t){return 8192==(61440&t)},isBlkdev:function(t){return 24576==(61440&t)},isFIFO:function(t){return 4096==(61440&t)},isSocket:function(t){return 49152==(49152&t)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(t){var e=ct.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:function(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:function(t,e){return ct.ignorePermissions||(-1===e.indexOf("r")||292&t.mode)&&(-1===e.indexOf("w")||146&t.mode)&&(-1===e.indexOf("x")||73&t.mode)?0:2},mayLookup:function(t){var e=ct.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,e){try{return ct.lookupNode(t,e),20}catch(t){}return ct.nodePermissions(t,"wx")},mayDelete:function(t,e,r){var n;try{n=ct.lookupNode(t,e)}catch(t){return t.errno}var o=ct.nodePermissions(t,"wx");if(o)return o;if(r){if(!ct.isDir(n.mode))return 54;if(ct.isRoot(n)||ct.getPath(n)===ct.cwd())return 10}else if(ct.isDir(n.mode))return 31;return 0},mayOpen:function(t,e){return t?ct.isLink(t.mode)?32:ct.isDir(t.mode)&&("r"!==ct.flagsToPermissionString(e)||512&e)?31:ct.nodePermissions(t,ct.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(t,e){t=t||0,e=e||ct.MAX_OPEN_FDS;for(var r=t;r<=e;r++)if(!ct.streams[r])return r;throw new ct.ErrnoError(33)},getStream:function(t){return ct.streams[t]},createStream:function(t,e,r){ct.FSStream||(ct.FSStream=function(){},ct.FSStream.prototype={object:{get:function(){return this.node},set:function(t){this.node=t}},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 ct.FSStream;for(var o in t)n[o]=t[o];t=n;var i=ct.nextfd(e,r);return t.fd=i,ct.streams[i]=t,t},closeStream:function(t){ct.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=ct.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new ct.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return 255&t},makedev:function(t,e){return t<<8|e},registerDevice:function(t,e){ct.devices[t]={stream_ops:e}},getDevice:function(t){return ct.devices[t]},getMounts:function(t){for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:function(t,e){"function"==typeof t&&(e=t,t=!1),ct.syncFSRequests++,ct.syncFSRequests>1&&d("warning: "+ct.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=ct.getMounts(ct.root.mount),n=0;function o(t){return ct.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:function(t,e,r){var n,o="/"===r,i=!r;if(o&&ct.root)throw new ct.ErrnoError(10);if(!o&&!i){var a=ct.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,ct.isMountpoint(n))throw new ct.ErrnoError(10);if(!ct.isDir(n.mode))throw new ct.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?ct.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(t){var e=ct.lookupPath(t,{follow_mount:!1});if(!ct.isMountpoint(e.node))throw new ct.ErrnoError(28);var r=e.node,n=r.mounted,o=ct.getMounts(n);Object.keys(ct.nameTable).forEach((function(t){for(var e=ct.nameTable[t];e;){var r=e.name_next;-1!==o.indexOf(e.mount)&&ct.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(t,e){return t.node_ops.lookup(t,e)},mknod:function(t,e,r){var n=ct.lookupPath(t,{parent:!0}).node,o=ot.basename(t);if(!o||"."===o||".."===o)throw new ct.ErrnoError(28);var i=ct.mayCreate(n,o);if(i)throw new ct.ErrnoError(i);if(!n.node_ops.mknod)throw new ct.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:function(t,e){return e=void 0!==e?e:438,e&=4095,e|=32768,ct.mknod(t,e,0)},mkdir:function(t,e){return e=void 0!==e?e:511,e&=1023,e|=16384,ct.mknod(t,e,0)},mkdirTree:function(t,e){for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{ct.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:function(t,e,r){return void 0===r&&(r=e,e=438),e|=8192,ct.mknod(t,e,r)},symlink:function(t,e){if(!it.resolve(t))throw new ct.ErrnoError(44);var r=ct.lookupPath(e,{parent:!0}).node;if(!r)throw new ct.ErrnoError(44);var n=ot.basename(e),o=ct.mayCreate(r,n);if(o)throw new ct.ErrnoError(o);if(!r.node_ops.symlink)throw new ct.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:function(t,e){var r,n,o=ot.dirname(t),i=ot.dirname(e),a=ot.basename(t),s=ot.basename(e);if(r=ct.lookupPath(t,{parent:!0}).node,n=ct.lookupPath(e,{parent:!0}).node,!r||!n)throw new ct.ErrnoError(44);if(r.mount!==n.mount)throw new ct.ErrnoError(75);var u,c=ct.lookupNode(r,a),f=it.relative(t,i);if("."!==f.charAt(0))throw new ct.ErrnoError(28);if("."!==(f=it.relative(e,o)).charAt(0))throw new ct.ErrnoError(55);try{u=ct.lookupNode(n,s)}catch(t){}if(c!==u){var l=ct.isDir(c.mode),p=ct.mayDelete(r,a,l);if(p)throw new ct.ErrnoError(p);if(p=u?ct.mayDelete(n,s,l):ct.mayCreate(n,s))throw new ct.ErrnoError(p);if(!r.node_ops.rename)throw new ct.ErrnoError(63);if(ct.isMountpoint(c)||u&&ct.isMountpoint(u))throw new ct.ErrnoError(10);if(n!==r&&(p=ct.nodePermissions(r,"w")))throw new ct.ErrnoError(p);try{ct.trackingDelegate.willMovePath&&ct.trackingDelegate.willMovePath(t,e)}catch(r){d("FS.trackingDelegate['willMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}ct.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{ct.hashAddNode(c)}try{ct.trackingDelegate.onMovePath&&ct.trackingDelegate.onMovePath(t,e)}catch(r){d("FS.trackingDelegate['onMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}}},rmdir:function(t){var e=ct.lookupPath(t,{parent:!0}).node,r=ot.basename(t),n=ct.lookupNode(e,r),o=ct.mayDelete(e,r,!0);if(o)throw new ct.ErrnoError(o);if(!e.node_ops.rmdir)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);try{ct.trackingDelegate.willDeletePath&&ct.trackingDelegate.willDeletePath(t)}catch(e){d("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,r),ct.destroyNode(n);try{ct.trackingDelegate.onDeletePath&&ct.trackingDelegate.onDeletePath(t)}catch(e){d("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readdir:function(t){var e=ct.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new ct.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(t){var e=ct.lookupPath(t,{parent:!0}).node,r=ot.basename(t),n=ct.lookupNode(e,r),o=ct.mayDelete(e,r,!1);if(o)throw new ct.ErrnoError(o);if(!e.node_ops.unlink)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);try{ct.trackingDelegate.willDeletePath&&ct.trackingDelegate.willDeletePath(t)}catch(e){d("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.unlink(e,r),ct.destroyNode(n);try{ct.trackingDelegate.onDeletePath&&ct.trackingDelegate.onDeletePath(t)}catch(e){d("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readlink:function(t){var e=ct.lookupPath(t).node;if(!e)throw new ct.ErrnoError(44);if(!e.node_ops.readlink)throw new ct.ErrnoError(28);return it.resolve(ct.getPath(e.parent),e.node_ops.readlink(e))},stat:function(t,e){var r=ct.lookupPath(t,{follow:!e}).node;if(!r)throw new ct.ErrnoError(44);if(!r.node_ops.getattr)throw new ct.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return ct.stat(t,!0)},chmod:function(t,e,r){var n;if(!(n="string"==typeof t?ct.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new ct.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(t,e){ct.chmod(t,e,!0)},fchmod:function(t,e){var r=ct.getStream(t);if(!r)throw new ct.ErrnoError(8);ct.chmod(r.node,e)},chown:function(t,e,r,n){var o;if(!(o="string"==typeof t?ct.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new ct.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(t,e,r){ct.chown(t,e,r,!0)},fchown:function(t,e,r){var n=ct.getStream(t);if(!n)throw new ct.ErrnoError(8);ct.chown(n.node,e,r)},truncate:function(t,e){if(e<0)throw new ct.ErrnoError(28);var r;if(!(r="string"==typeof t?ct.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new ct.ErrnoError(63);if(ct.isDir(r.mode))throw new ct.ErrnoError(31);if(!ct.isFile(r.mode))throw new ct.ErrnoError(28);var n=ct.nodePermissions(r,"w");if(n)throw new ct.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:function(t,e){var r=ct.getStream(t);if(!r)throw new ct.ErrnoError(8);if(0==(2097155&r.flags))throw new ct.ErrnoError(28);ct.truncate(r.node,e)},utime:function(t,e,r){var n=ct.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:function(t,e,r,n,i){if(""===t)throw new ct.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?ct.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)a=t;else{t=ot.normalize(t);try{a=ct.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var s=!1;if(64&e)if(a){if(128&e)throw new ct.ErrnoError(20)}else a=ct.mknod(t,r,0),s=!0;if(!a)throw new ct.ErrnoError(44);if(ct.isChrdev(a.mode)&&(e&=-513),65536&e&&!ct.isDir(a.mode))throw new ct.ErrnoError(54);if(!s){var u=ct.mayOpen(a,e);if(u)throw new ct.ErrnoError(u)}512&e&&ct.truncate(a,0),e&=-131713;var c=ct.createStream({node:a,path:ct.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(ct.readFiles||(ct.readFiles={}),t in ct.readFiles||(ct.readFiles[t]=1,d("FS.trackingDelegate error on read file: "+t)));try{if(ct.trackingDelegate.onOpenFile){var f=0;1!=(2097155&e)&&(f|=ct.tracking.openFlags.READ),0!=(2097155&e)&&(f|=ct.tracking.openFlags.WRITE),ct.trackingDelegate.onOpenFile(t,f)}}catch(e){d("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return c},close:function(t){if(ct.isClosed(t))throw new ct.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{ct.closeStream(t.fd)}t.fd=null},isClosed:function(t){return null===t.fd},llseek:function(t,e,r){if(ct.isClosed(t))throw new ct.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new ct.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new ct.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:function(t,e,r,n,o){if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(t))throw new ct.ErrnoError(8);if(1==(2097155&t.flags))throw new ct.ErrnoError(8);if(ct.isDir(t.node.mode))throw new ct.ErrnoError(31);if(!t.stream_ops.read)throw new ct.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new ct.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:function(t,e,r,n,o,i){if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(t))throw new ct.ErrnoError(8);if(0==(2097155&t.flags))throw new ct.ErrnoError(8);if(ct.isDir(t.node.mode))throw new ct.ErrnoError(31);if(!t.stream_ops.write)throw new ct.ErrnoError(28);t.seekable&&1024&t.flags&&ct.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new ct.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);a||(t.position+=s);try{t.path&&ct.trackingDelegate.onWriteToFile&&ct.trackingDelegate.onWriteToFile(t.path)}catch(e){d("FS.trackingDelegate['onWriteToFile']('"+t.path+"') threw an exception: "+e.message)}return s},allocate:function(t,e,r){if(ct.isClosed(t))throw new ct.ErrnoError(8);if(e<0||r<=0)throw new ct.ErrnoError(28);if(0==(2097155&t.flags))throw new ct.ErrnoError(8);if(!ct.isFile(t.node.mode)&&!ct.isDir(t.node.mode))throw new ct.ErrnoError(43);if(!t.stream_ops.allocate)throw new ct.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:function(t,e,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&t.flags))throw new ct.ErrnoError(2);if(1==(2097155&t.flags))throw new ct.ErrnoError(2);if(!t.stream_ops.mmap)throw new ct.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o,i)},msync:function(t,e,r,n,o){return t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0},munmap:function(t){return 0},ioctl:function(t,e,r){if(!t.stream_ops.ioctl)throw new ct.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:function(t,e){if((e=e||{}).flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=ct.open(t,e.flags),o=ct.stat(t).size,i=new Uint8Array(o);return ct.read(n,i,0,o,0),"utf8"===e.encoding?r=F(i,0):"binary"===e.encoding&&(r=i),ct.close(n),r},writeFile:function(t,e,r){(r=r||{}).flags=r.flags||577;var n=ct.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(x(e)+1),i=M(e,o,0,o.length);ct.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ct.write(n,e,0,e.byteLength,void 0,r.canOwn)}ct.close(n)},cwd:function(){return ct.currentPath},chdir:function(t){var e=ct.lookupPath(t,{follow:!0});if(null===e.node)throw new ct.ErrnoError(44);if(!ct.isDir(e.node.mode))throw new ct.ErrnoError(54);var r=ct.nodePermissions(e.node,"x");if(r)throw new ct.ErrnoError(r);ct.currentPath=e.path},createDefaultDirectories:function(){ct.mkdir("/tmp"),ct.mkdir("/home"),ct.mkdir("/home/web_user")},createDefaultDevices:function(){ct.mkdir("/dev"),ct.registerDevice(ct.makedev(1,3),{read:function(){return 0},write:function(t,e,r,n,o){return n}}),ct.mkdev("/dev/null",ct.makedev(1,3)),at.register(ct.makedev(5,0),at.default_tty_ops),at.register(ct.makedev(6,0),at.default_tty1_ops),ct.mkdev("/dev/tty",ct.makedev(5,0)),ct.mkdev("/dev/tty1",ct.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}return function(){L("randomDevice")}}();ct.createDevice("/dev","random",t),ct.createDevice("/dev","urandom",t),ct.mkdir("/dev/shm"),ct.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){ct.mkdir("/proc"),ct.mkdir("/proc/self"),ct.mkdir("/proc/self/fd"),ct.mount({mount:function(){var t=ct.createNode("/proc/self","fd",16895,73);return t.node_ops={lookup:function(t,e){var r=+e,n=ct.getStream(r);if(!n)throw new ct.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?ct.createDevice("/dev","stdin",o.stdin):ct.symlink("/dev/tty","/dev/stdin"),o.stdout?ct.createDevice("/dev","stdout",null,o.stdout):ct.symlink("/dev/tty","/dev/stdout"),o.stderr?ct.createDevice("/dev","stderr",null,o.stderr):ct.symlink("/dev/tty1","/dev/stderr"),ct.open("/dev/stdin",0),ct.open("/dev/stdout",1),ct.open("/dev/stderr",1)},ensureErrnoError:function(){ct.ErrnoError||(ct.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},ct.ErrnoError.prototype=new Error,ct.ErrnoError.prototype.constructor=ct.ErrnoError,[44].forEach((function(t){ct.genericErrors[t]=new ct.ErrnoError(t),ct.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:function(){ct.ensureErrnoError(),ct.nameTable=new Array(4096),ct.mount(ut,{},"/"),ct.createDefaultDirectories(),ct.createDefaultDevices(),ct.createSpecialDirectories(),ct.filesystems={MEMFS:ut}},init:function(t,e,r){ct.init.initialized=!0,ct.ensureErrnoError(),o.stdin=t||o.stdin,o.stdout=e||o.stdout,o.stderr=r||o.stderr,ct.createStandardStreams()},quit:function(){ct.init.initialized=!1;var t=o._fflush;t&&t(0);for(var e=0;e<ct.streams.length;e++){var r=ct.streams[e];r&&ct.close(r)}},getMode:function(t,e){var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:function(t,e){var r=ct.analyzePath(t,e);return r.exists?r.object:null},analyzePath:function(t,e){try{t=(n=ct.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ct.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ot.basename(t),n=ct.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:function(t,e,r,n){t="string"==typeof t?t:ct.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ot.join2(t,i);try{ct.mkdir(a)}catch(t){}t=a}}return a},createFile:function(t,e,r,n,o){var i=ot.join2("string"==typeof t?t:ct.getPath(t),e),a=ct.getMode(n,o);return ct.create(i,a)},createDataFile:function(t,e,r,n,o,i){var a=e?ot.join2("string"==typeof t?t:ct.getPath(t),e):t,s=ct.getMode(n,o),u=ct.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}ct.chmod(u,146|s);var d=ct.open(u,577);ct.write(d,r,0,r.length,0,i),ct.close(d),ct.chmod(u,s)}return u},createDevice:function(t,e,r,n){var o=ot.join2("string"==typeof t?t:ct.getPath(t),e),i=ct.getMode(!!r,!!n);ct.createDevice.major||(ct.createDevice.major=64);var a=ct.makedev(ct.createDevice.major++,0);return ct.registerDevice(a,{open:function(t){t.seekable=!1},close:function(t){n&&n.buffer&&n.buffer.length&&n(10)},read:function(t,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new ct.ErrnoError(29)}if(void 0===u&&0===a)throw new ct.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:function(t,e,r,o,i){for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new ct.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),ct.mkdev(o,i,a)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=Dt(s(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new ct.ErrnoError(29)}},createLazyFile:function(t,e,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(t){var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=function(t,e){if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),"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 "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Dt(o.responseText||"",!0)}(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,l("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,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 a={isDevice:!1,url:r},s=ct.createFile(t,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(t){var e=s.stream_ops[t];u[t]=function(){return ct.forceLoadFile(s),e.apply(null,arguments)}})),u.read=function(t,e,r,n,o){ct.forceLoadFile(s);var i=t.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[r+u]=i[o+u];else for(u=0;u<a;u++)e[r+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(t,e,r,n,i,a,s,u,c,f){Browser.init();var l=e?it.resolve(ot.join2(t,e)):t;function d(r){function d(r){f&&f(),u||ct.createDataFile(t,e,r,n,i,c),a&&a(),I()}var p=!1;o.preloadPlugins.forEach((function(t){p||t.canHandle(l)&&(t.handle(r,l,d,(function(){s&&s(),I()})),p=!0)})),p||d(r)}z(),"string"==typeof r?Browser.asyncLoad(r,(function(t){d(t)}),s):d(r)},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(t,e,r){e=e||function(){},r=r||function(){};var n=ct.indexedDB();try{var o=n.open(ct.DB_NAME(),ct.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=function(){l("creating db"),o.result.createObjectStore(ct.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([ct.DB_STORE_NAME],"readwrite"),i=n.objectStore(ct.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((function(t){var e=i.put(ct.analyzePath(t).object.contents,t);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(t,e,r){e=e||function(){},r=r||function(){};var n=ct.indexedDB();try{var o=n.open(ct.DB_NAME(),ct.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([ct.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(ct.DB_STORE_NAME),s=0,u=0,c=t.length;function f(){0==u?e():r()}t.forEach((function(t){var e=a.get(t);e.onsuccess=function(){ct.analyzePath(t).exists&&ct.unlink(t),ct.createDataFile(ot.dirname(t),ot.basename(t),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){u++,s+u==c&&f()}})),i.onerror=r},o.onerror=r}},ft={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(t,e){if("/"!==e[0]){var r;if(-100===t)r=ct.cwd();else{var n=ct.getStream(t);if(!n)throw new ct.ErrnoError(8);r=n.path}e=ot.join2(r,e)}return e},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&ot.normalize(e)!==ot.normalize(ct.getPath(t.node)))return-54;throw t}return k[r>>2]=n.dev,k[r+4>>2]=0,k[r+8>>2]=n.ino,k[r+12>>2]=n.mode,k[r+16>>2]=n.nlink,k[r+20>>2]=n.uid,k[r+24>>2]=n.gid,k[r+28>>2]=n.rdev,k[r+32>>2]=0,Y=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+40>>2]=Y[0],k[r+44>>2]=Y[1],k[r+48>>2]=4096,k[r+52>>2]=n.blocks,k[r+56>>2]=n.atime.getTime()/1e3|0,k[r+60>>2]=0,k[r+64>>2]=n.mtime.getTime()/1e3|0,k[r+68>>2]=0,k[r+72>>2]=n.ctime.getTime()/1e3|0,k[r+76>>2]=0,Y=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+80>>2]=Y[0],k[r+84>>2]=Y[1],0},doMsync:function(t,e,r,n,o){var i=E.slice(t,t+r);ct.msync(e,i,o,r,n)},doMkdir:function(t,e){return"/"===(t=ot.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),ct.mkdir(t,e,0),0},doMknod:function(t,e,r){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return ct.mknod(t,e,r),0},doReadlink:function(t,e,r){if(r<=0)return-28;var n=ct.readlink(t),o=Math.min(r,x(n)),i=g[e+o];return M(n,E,e,r+1),g[e+o]=i,o},doAccess:function(t,e){if(-8&e)return-28;var r;if(!(r=ct.lookupPath(t,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&ct.nodePermissions(r,n)?-2:0},doDup:function(t,e,r){var n=ct.getStream(r);return n&&ct.close(n),ct.open(t,e,0,r,r).fd},doReadv:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=ct.read(t,g,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=ct.write(t,g,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return ft.varargs+=4,k[ft.varargs-4>>2]},getStr:function(t){return P(t)},getStreamFromFD:function(t){var e=ct.getStream(t);if(!e)throw new ct.ErrnoError(8);return e},get64:function(t,e){return t}};function lt(t){try{return h.grow(t-y.byteLength+65535>>>16),A(h.buffer),1}catch(t){}}var dt={};function pt(){if(!pt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in dt)t[e]=dt[e];var r=[];for(var e in t)r.push(e+"="+t[e]);pt.strings=r}return pt.strings}function mt(t){return t%4==0&&(t%100!=0||t%400==0)}function ht(t,e){for(var r=0,n=0;n<=e;r+=t[n++]);return r}var _t=[31,29,31,30,31,30,31,31,30,31,30,31],vt=[31,28,31,30,31,30,31,31,30,31,30,31];function wt(t,e){for(var r=new Date(t.getTime());e>0;){var n=mt(r.getFullYear()),o=r.getMonth(),i=(n?_t:vt)[o];if(!(e>i-r.getDate()))return r.setDate(r.getDate()+e),r;e-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function yt(t,e,r,n){var o=k[n+40>>2],i={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:o?P(o):""},a=P(r),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)a=a.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(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function d(t,e){return l(t,e,"0")}function p(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function m(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function h(t){var e=wt(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=m(r),i=m(n);return p(o,e)<=0?p(i,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var _={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return f[t.tm_mon].substring(0,3)},"%B":function(t){return f[t.tm_mon]},"%C":function(t){return d((t.tm_year+1900)/100|0,2)},"%d":function(t){return d(t.tm_mday,2)},"%e":function(t){return l(t.tm_mday,2," ")},"%g":function(t){return h(t).toString().substring(2)},"%G":function(t){return h(t)},"%H":function(t){return d(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),d(e,2)},"%j":function(t){return d(t.tm_mday+ht(mt(t.tm_year+1900)?_t:vt,t.tm_mon-1),3)},"%m":function(t){return d(t.tm_mon+1,2)},"%M":function(t){return d(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return d(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=new Date(t.tm_year+1900,0,1),r=0===e.getDay()?e:wt(e,7-e.getDay()),n=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(p(r,n)<0){var o=ht(mt(n.getFullYear())?_t:vt,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,e)?"01":"00"},"%V":function(t){var e,r=new Date(t.tm_year+1900,0,4),n=new Date(t.tm_year+1901,0,4),o=m(r),i=m(n),a=wt(new Date(t.tm_year+1900,0,1),t.tm_yday);return p(a,o)<0?"53":p(i,a)<=0?"01":(e=o.getFullYear()<t.tm_year+1900?t.tm_yday+32-o.getDate():t.tm_yday+1-o.getDate(),d(Math.ceil(e/7),2))},"%w":function(t){return t.tm_wday},"%W":function(t){var e=new Date(t.tm_year,0,1),r=1===e.getDay()?e:wt(e,0===e.getDay()?1:7-e.getDay()+1),n=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(p(r,n)<0){var o=ht(mt(n.getFullYear())?_t:vt,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,e)?"01":"00"},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,r=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(r?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var u in _)a.indexOf(u)>=0&&(a=a.replace(new RegExp(u,"g"),_[u](i)));var v=Dt(a,!1);return v.length>e?0:(function(t,e){g.set(t,e)}(v,t),v.length-1)}var gt=[],Et=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=ct.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},bt=365,kt=146;function Dt(t,e,r){var n=r>0?r:x(t)+1,o=new Array(n),i=M(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(Et.prototype,{read:{get:function(){return(this.mode&bt)===bt},set:function(t){t?this.mode|=bt:this.mode&=-366}},write:{get:function(){return(this.mode&kt)===kt},set:function(t){t?this.mode|=kt:this.mode&=-147}},isFolder:{get:function(){return ct.isDir(this.mode)}},isDevice:{get:function(){return ct.isChrdev(this.mode)}}}),ct.FSNode=Et,ct.staticInit(),O.push({func:function(){Pt()}});var St,Ft={G:function(t,e){return function(t,e){var r;if(0===t)r=Date.now();else{if(1!==t&&4!==t)return K(28),-1;r=V()}return k[e>>2]=r/1e3|0,k[e+4>>2]=r%1e3*1e3*1e3|0,0}(t,e)},i:function(t){return Tt(t+rt)+rt},h:function(t,e,r){throw new nt(t).init(e,r),t},L:function(t,e){try{return t=ft.getStr(t),ft.doAccess(t,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},u:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);switch(e){case 0:return(o=ft.get())<0?-28:ct.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=ft.get();return n.flags|=o,0;case 12:return o=ft.get(),b[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return K(28),-1;default:return-28}}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},N:function(t,e){try{var r=ft.getStreamFromFD(t);return ft.doStat(ct.stat,r.path,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},n:function(){return 42},I:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);switch(e){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=ft.get();return k[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ft.get(),ct.ioctl(n,e,o);case 21523:case 21524:return n.tty?0:-59;default:L("bad ioctl syscall "+e)}}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},J:function(t,e,r,n,o,i){try{return function(t,e,r,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&t%16384!=0)return-28;if(0!=(32&n)){if(!(a=Ut(16384,e)))return-48;zt(a,0,e),s=!0}else{var u=ct.getStream(o);if(!u)return-8;var c=ct.mmap(u,t,e,i,r,n);a=c.ptr,s=c.allocated}return ft.mappings[a]={malloc:a,len:e,allocated:s,fd:o,prot:r,flags:n,offset:i},a}(t,e,r,n,o,i)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},K:function(t,e){try{return function(t,e){if(-1==(0|t)||0===e)return-28;var r=ft.mappings[t];if(!r)return 0;if(e===r.len){var n=ct.getStream(r.fd);2&r.prot&&ft.doMsync(t,n,e,r.flags,r.offset),ct.munmap(n),ft.mappings[t]=null,r.allocated&&Nt(r.malloc)}return 0}(t,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},v:function(t,e,r){ft.varargs=r;try{var n=ft.getStr(t),o=r?ft.get():0;return ct.open(n,e,o).fd}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},M:function(t,e){try{return t=ft.getStr(t),ft.doStat(ct.stat,t,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},F:function(t){try{return t=ft.getStr(t),ct.unlink(t),0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},s:function(){L()},S:function(t,e,r){var n=function(t,e){var r;for(gt.length=0,e>>=2;r=E[t++];){var n=r<105;n&&1&e&&e++,gt.push(n?D[e++>>1]:k[e]),++e}return gt}(e,r);return X[t].apply(null,n)},c:function(t,e){return function(t,e){throw Ht(t,e||1),"longjmp"}(t,e)},z:function(t,e,r){E.copyWithin(t,e,e+r)},A:function(t){t>>>=0;var e=E.length,r=2147483648;if(t>r)return!1;for(var n,o,i=1;i<=4;i*=2){var a=e*(1+.2/i);if(a=Math.min(a,t+100663296),lt(Math.min(r,((n=Math.max(16777216,t,a))%(o=65536)>0&&(n+=o-n%o),n))))return!0}return!1},D:function(t,e){try{var r=0;return pt().forEach((function(n,o){var i=e+r;k[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)g[e++>>0]=t.charCodeAt(n);r||(g[e>>0]=0)}(n,i),r+=n.length+1})),0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},E:function(t,e){try{var r=pt();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},e:function(t){!function(t,e){e&&m&&0===t||(m||(o.onExit&&o.onExit(t),v=!0),c(t,new Wt(t)))}(t)},m:function(t){try{var e=ft.getStreamFromFD(t);return ct.close(e),0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},C:function(t,e){try{var r=ft.getStreamFromFD(t),n=r.tty?2:ct.isDir(r.mode)?3:ct.isLink(r.mode)?7:4;return g[e>>0]=n,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},H:function(t,e,r,n){try{var o=ft.getStreamFromFD(t),i=ft.doReadv(o,e,r);return k[n>>2]=i,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},y:function(t,e,r,n,o){try{var i=ft.getStreamFromFD(t),a=4294967296*r+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(ct.llseek(i,a,n),Y=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[o>>2]=Y[0],k[o+4>>2]=Y[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},t:function(t,e,r,n){try{var o=ft.getStreamFromFD(t),i=ft.doWritev(o,e,r);return k[n>>2]=i,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},a:function(){return 0|_},Q:function(t){var e=Date.now();return k[t>>2]=e/1e3|0,k[t+4>>2]=e%1e3*1e3|0,0},R:function(t){var e=It();try{return R.get(t)()}catch(t){if(Lt(e),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},O:function(t,e){var r=It();try{return R.get(t)(e)}catch(t){if(Lt(r),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},r:function(t){var e=It();try{return R.get(t)()}catch(t){if(Lt(e),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},j:function(t,e){var r=It();try{return R.get(t)(e)}catch(t){if(Lt(r),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},d:function(t,e,r){var n=It();try{return R.get(t)(e,r)}catch(t){if(Lt(n),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},f:function(t,e,r,n){var o=It();try{return R.get(t)(e,r,n)}catch(t){if(Lt(o),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},P:function(t,e,r,n,o,i,a){var s=It();try{return R.get(t)(e,r,n,o,i,a)}catch(t){if(Lt(s),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},l:function(t){var e=It();try{R.get(t)()}catch(t){if(Lt(e),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},g:function(t,e){var r=It();try{R.get(t)(e)}catch(t){if(Lt(r),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},k:function(t,e,r){var n=It();try{R.get(t)(e,r)}catch(t){if(Lt(n),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},o:function(t,e,r,n){var o=It();try{R.get(t)(e,r,n)}catch(t){if(Lt(o),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},q:function(t,e,r,n,o){var i=It();try{R.get(t)(e,r,n,o)}catch(t){if(Lt(i),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},p:function(t,e,r,n,o,i){var a=It();try{R.get(t)(e,r,n,o,i)}catch(t){if(Lt(a),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},b:function(t){_=0|t},B:function(t,e,r,n){return yt(t,e,r,n)},w:function(t){var e=Date.now()/1e3|0;return t&&(k[t>>2]=e),e},x:function(t){return 0!==t&&zt(t,0,16),0}},Pt=(function(){var t={a:Ft};function e(t,e){var r=t.exports;o.asm=r,A((h=o.asm.T).buffer),R=o.asm.U,I()}function r(t){e(t.instance)}function i(e){return(p||"function"!=typeof fetch?Promise.resolve().then((function(){return J(q)})):fetch(q,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+q+"'";return t.arrayBuffer()})).catch((function(){return J(q)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(t){d("failed to asynchronously prepare wasm: "+t),L(t)}))}if(z(),o.instantiateWasm)try{return o.instantiateWasm(t,e)}catch(t){return d("Module.instantiateWasm callback failed with error: "+t),!1}(p||"function"!=typeof WebAssembly.instantiateStreaming||H(q)||"function"!=typeof fetch?i(r):fetch(q,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(Pt=o.___wasm_call_ctors=o.asm.V).apply(null,arguments)}),Mt=(o.___em_js__array_bounds_check_error=function(){return(o.___em_js__array_bounds_check_error=o.asm.W).apply(null,arguments)},o._emscripten_bind_VoidPtr___destroy___0=function(){return(Mt=o._emscripten_bind_VoidPtr___destroy___0=o.asm.X).apply(null,arguments)}),xt=o._emscripten_bind_Main_layout_3=function(){return(xt=o._emscripten_bind_Main_layout_3=o.asm.Y).apply(null,arguments)},At=o._emscripten_bind_Main_lastError_0=function(){return(At=o._emscripten_bind_Main_lastError_0=o.asm.Z).apply(null,arguments)},Rt=o._emscripten_bind_Main_createFile_2=function(){return(Rt=o._emscripten_bind_Main_createFile_2=o.asm._).apply(null,arguments)},Ct=o._emscripten_bind_Main_setYInvert_1=function(){return(Ct=o._emscripten_bind_Main_setYInvert_1=o.asm.$).apply(null,arguments)},Ot=o._emscripten_bind_Main_setNop_1=function(){return(Ot=o._emscripten_bind_Main_setNop_1=o.asm.aa).apply(null,arguments)},jt=o._emscripten_bind_Main___destroy___0=function(){return(jt=o._emscripten_bind_Main___destroy___0=o.asm.ba).apply(null,arguments)},Tt=o._malloc=function(){return(Tt=o._malloc=o.asm.ca).apply(null,arguments)},Nt=o._free=function(){return(Nt=o._free=o.asm.da).apply(null,arguments)},Bt=o.___errno_location=function(){return(Bt=o.___errno_location=o.asm.ea).apply(null,arguments)},zt=o._memset=function(){return(zt=o._memset=o.asm.fa).apply(null,arguments)},It=o.stackSave=function(){return(It=o.stackSave=o.asm.ga).apply(null,arguments)},Lt=o.stackRestore=function(){return(Lt=o.stackRestore=o.asm.ha).apply(null,arguments)},Ht=o._setThrew=function(){return(Ht=o._setThrew=o.asm.ia).apply(null,arguments)},Ut=o._memalign=function(){return(Ut=o._memalign=o.asm.ja).apply(null,arguments)};function Wt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Yt(t){function r(){St||(St=!0,o.calledRun=!0,v||(o.noFSInit||ct.init.initialized||ct.init(),at.init(),G(O),ct.ignorePermissions=!1,G(j),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),T.unshift(t);var t;G(T)}()))}N>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),C.unshift(t);var t;G(C)}(),N>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r()))}if(B=function t(){St||Yt(),St||(B=t)},o.run=Yt,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function qt(){}function Jt(t){return(t||qt).__cache__}function Vt(t,e){var r=Jt(e),n=r[t];return n||((n=Object.create((e||qt).prototype)).ptr=t,r[t]=n)}m=!0,Yt(),qt.prototype=Object.create(qt.prototype),qt.prototype.constructor=qt,qt.prototype.__class__=qt,qt.__cache__={},o.WrapperObject=qt,o.getCache=Jt,o.wrapPointer=Vt,o.castObject=function(t,e){return Vt(t.ptr,e)},o.NULL=Vt(0),o.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Jt(t.__class__)[t.ptr]},o.compare=function(t,e){return t.ptr===e.ptr},o.getPointer=function(t){return t.ptr},o.getClass=function(t){return t.__class__};var Xt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Xt.needed){for(var t=0;t<Xt.temps.length;t++)o._free(Xt.temps[t]);Xt.temps.length=0,o._free(Xt.buffer),Xt.buffer=0,Xt.size+=Xt.needed,Xt.needed=0}Xt.buffer||(Xt.size+=128,Xt.buffer=o._malloc(Xt.size),w(Xt.buffer)),Xt.pos=0},alloc:function(t,e){w(Xt.buffer);var r,n=e.BYTES_PER_ELEMENT,i=t.length*n;return i=i+7&-8,Xt.pos+i>=Xt.size?(w(i>0),Xt.needed+=i,r=o._malloc(i),Xt.temps.push(r)):(r=Xt.buffer+Xt.pos,Xt.pos+=i),r},copy:function(t,e,r){switch(r>>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;n<t.length;n++)e[r+n]=t[n]}};function Gt(t){if("string"==typeof t){var e=Dt(t),r=Xt.alloc(e,g);return Xt.copy(e,g,r),r}return t}function Kt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function $t(){throw"cannot construct a Main, no constructor in IDL"}return Kt.prototype=Object.create(qt.prototype),Kt.prototype.constructor=Kt,Kt.prototype.__class__=Kt,Kt.__cache__={},o.VoidPtr=Kt,Kt.prototype.__destroy__=Kt.prototype.__destroy__=function(){var t=this.ptr;Mt(t)},$t.prototype=Object.create(qt.prototype),$t.prototype.constructor=$t,$t.prototype.__class__=$t,$t.__cache__={},o.Main=$t,$t.prototype.layout=$t.prototype.layout=function(t,e,r){var n=this.ptr;return Xt.prepare(),t=t&&"object"==typeof t?t.ptr:Gt(t),e=e&&"object"==typeof e?e.ptr:Gt(e),r=r&&"object"==typeof r?r.ptr:Gt(r),P(xt(n,t,e,r))},$t.prototype.lastError=$t.prototype.lastError=function(){var t=this.ptr;return P(At(t))},$t.prototype.createFile=$t.prototype.createFile=function(t,e){var r=this.ptr;Xt.prepare(),t=t&&"object"==typeof t?t.ptr:Gt(t),e=e&&"object"==typeof e?e.ptr:Gt(e),Rt(r,t,e)},$t.prototype.setYInvert=$t.prototype.setYInvert=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ct(e,t)},$t.prototype.setNop=$t.prototype.setNop=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ot(e,t)},$t.prototype.__destroy__=$t.prototype.__destroy__=function(){var t=this.ptr;jt(t)},t.ready});t.exports=n})),l=Object.freeze(Object.assign(Object.create(null),f,{default:f})),d=function(){return(d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n};function m(t){return{path:t.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="'+t.width+'" height="'+t.height+'"></svg>'}}function h(t,e){var r,n=d({images:[],files:[]},e);p(n.files,(r=n.images,r.map(m))).forEach((function(e){return t.Main.prototype.createFile(e.path,e.data)}))}var _={layout:function(t,e,r,n){return void 0===e&&(e="svg"),void 0===r&&(r="dot"),t?a(l,null==n?void 0:n.wasmFolder).then((function(o){h(o,n),o.Main.prototype.setYInvert((null==n?void 0:n.yInvert)?1:0),o.Main.prototype.setNop((null==n?void 0:n.nop)?null==n?void 0:n.nop:0);var i=o.Main.prototype.layout(t,e,r);if(!i)throw new Error(o.Main.prototype.lastError());return i})):Promise.resolve("")},circo:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"circo",r)},dot:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"dot",r)},fdp:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"fdp",r)},sfdp:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"sfdp",r)},neato:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"neato",r)},osage:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"osage",r)},patchwork:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"patchwork",r)},twopi:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"twopi",r)}},v=function(){function t(t){this._wasm=t}return t.prototype.layout=function(t,e,r,n){if(void 0===e&&(e="svg"),void 0===r&&(r="dot"),!t)return"";h(this._wasm,n),this._wasm.Main.prototype.setYInvert((null==n?void 0:n.yInvert)?1:0),this._wasm.Main.prototype.setNop((null==n?void 0:n.nop)?null==n?void 0:n.nop:0);var o=this._wasm.Main.prototype.layout(t,e,r);if(!o)throw new Error(this._wasm.Main.prototype.lastError());return o},t.prototype.circo=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"circo",r)},t.prototype.dot=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"dot",r)},t.prototype.fdp=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"fdp",r)},t.prototype.sfdp=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"sfdp",r)},t.prototype.neato=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"neato",r)},t.prototype.osage=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"osage",r)},t.prototype.patchwork=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"patchwork",r)},t.prototype.twopi=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"twopi",r)},t}();t.GraphvizSync=v,t.StackParser=u,t.graphviz=_,t.graphvizSync=function(t){return a(l,t).then((function(t){return new v(t)}))},t.parse=c,t.wasmFolder=i,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/wasm"]={})}(this,(function(t){"use strict";function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r=e((function(t,e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(t,r){e=t,n=r}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u="./this.program",c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),r&&(c=r),c=0!==c.indexOf("blob:")?c.substr(0,c.lastIndexOf("/")+1):"",s=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText};var f,l,d=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(f=o.wasmBinary),o.noExitRuntime&&o.noExitRuntime,"object"!=typeof WebAssembly&&B("no native wasm support detected");var m=!1;function h(t,e){t||B("Assertion failed: "+e)}var _,v,w,y,g,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.subarray&&E)return E.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function k(t,e){return t?b(w,t,e):""}function D(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function S(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function F(t){_=t,o.HEAP8=v=new Int8Array(t),o.HEAP16=new Int16Array(t),o.HEAP32=y=new Int32Array(t),o.HEAPU8=w=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAPU32=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=g=new Float64Array(t)}o.INITIAL_MEMORY;var P,M=[],x=[],A=[],R=[],C=0,O=null;function j(t){C++,o.monitorRunDependencies&&o.monitorRunDependencies(C)}function T(t){if(C--,o.monitorRunDependencies&&o.monitorRunDependencies(C),0==C&&O){var e=O;O=null,e()}}function B(t){o.onAbort&&o.onAbort(t),p(t+=""),m=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function N(t){return e=t,r="data:application/octet-stream;base64,",String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r);var e,r}o.preloadedImages={},o.preloadedAudios={};var z,I,L,H="expatlib.wasm";function U(t){try{if(t==H&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}catch(t){B(t)}}N(H)||(z=H,H=o.locateFile?o.locateFile(z,c):c+z);var W={1284:function(t){var e=o.getCache(o.CExpatJS)[t];if(!e.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";e.startElement()},1504:function(t){var e=o.getCache(o.CExpatJS)[t];if(!e.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";e.endElement()},1716:function(t){var e=o.getCache(o.CExpatJS)[t];if(!e.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";e.characterData()}};function Y(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?P.get(r)():P.get(r)(e.arg):r(void 0===e.arg?null:e.arg)}else e(o)}}var q={splitPath:function(t){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1)},normalizeArray:function(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:function(t){var e="/"===t.charAt(0),r="/"===t.substr(-1);return(t=q.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=q.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(t){if("/"===t)return"/";var e=(t=(t=q.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},extname:function(t){return q.splitPath(t)[3]},join:function(){var t=Array.prototype.slice.call(arguments,0);return q.normalize(t.join("/"))},join2:function(t,e){return q.normalize(t+"/"+e)}},J={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:K.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e="/"===n.charAt(0)}return(e?"/":"")+(t=q.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||"."},relative:function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=J.resolve(t).substr(1),e=J.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},V={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){V.ttys[t]={input:[],output:[],ops:e},K.registerDevice(t,V.stream_ops)},stream_ops:{open:function(t){var e=V.ttys[t.node.rdev];if(!e)throw new K.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new K.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new K.ErrnoError(29)}if(void 0===s&&0===i)throw new K.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new K.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new K.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;t.input=it(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(d(b(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(d(b(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(p(b(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(p(b(t.output,0)),t.output=[])}}};function X(t){for(var e=function(t,e){return e||(e=16),Math.ceil(t/e)*e}(t,16384),r=Ft(e);t<e;)v[r+t++]=0;return r}var G={ops_table:null,mount:function(t){return G.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(K.isBlkdev(r)||K.isFIFO(r))throw new K.ErrnoError(63);G.ops_table||(G.ops_table={dir:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr,lookup:G.node_ops.lookup,mknod:G.node_ops.mknod,rename:G.node_ops.rename,unlink:G.node_ops.unlink,rmdir:G.node_ops.rmdir,readdir:G.node_ops.readdir,symlink:G.node_ops.symlink},stream:{llseek:G.stream_ops.llseek}},file:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr},stream:{llseek:G.stream_ops.llseek,read:G.stream_ops.read,write:G.stream_ops.write,allocate:G.stream_ops.allocate,mmap:G.stream_ops.mmap,msync:G.stream_ops.msync}},link:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr,readlink:G.node_ops.readlink},stream:{}},chrdev:{node:{getattr:G.node_ops.getattr,setattr:G.node_ops.setattr},stream:K.chrdev_stream_ops}});var o=K.createNode(t,e,r,n);return K.isDir(o.mode)?(o.node_ops=G.ops_table.dir.node,o.stream_ops=G.ops_table.dir.stream,o.contents={}):K.isFile(o.mode)?(o.node_ops=G.ops_table.file.node,o.stream_ops=G.ops_table.file.stream,o.usedBytes=0,o.contents=null):K.isLink(o.mode)?(o.node_ops=G.ops_table.link.node,o.stream_ops=G.ops_table.link.stream):K.isChrdev(o.mode)&&(o.node_ops=G.ops_table.chrdev.node,o.stream_ops=G.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o),o},getFileDataAsRegularArray:function(t){if(t.contents&&t.contents.subarray){for(var e=[],r=0;r<t.usedBytes;++r)e.push(t.contents[r]);return e}return t.contents},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e){if(0==e)return t.contents=null,void(t.usedBytes=0);if(!t.contents||t.contents.subarray){var r=t.contents;return t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),void(t.usedBytes=e)}if(t.contents||(t.contents=[]),t.contents.length>e)t.contents.length=e;else for(;t.contents.length<e;)t.contents.push(0);t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=K.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,K.isDir(t.mode)?e.size=4096:K.isFile(t.mode)?e.size=t.usedBytes:K.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&G.resizeFileStorage(t,e.size)},lookup:function(t,e){throw K.genericErrors[44]},mknod:function(t,e,r,n){return G.createNode(t,e,r,n)},rename:function(t,e,r){if(K.isDir(t.mode)){var n;try{n=K.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new K.ErrnoError(55)}delete t.parent.contents[t.name],t.name=r,e.contents[r]=t,t.parent=e},unlink:function(t,e){delete t.contents[e]},rmdir:function(t,e){var r=K.lookupNode(t,e);for(var n in r.contents)throw new K.ErrnoError(55);delete t.contents[e]},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=G.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!K.isLink(t.mode))throw new K.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===v.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(G.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&K.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new K.ErrnoError(28);return n},allocate:function(t,e,r){G.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o,i){if(h(0===e),!K.isFile(t.node.mode))throw new K.ErrnoError(43);var a,s,u=t.node.contents;if(2&i||u.buffer!==_){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=X(r)))throw new K.ErrnoError(48);v.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(t,e,r,n,o){if(!K.isFile(t.node.mode))throw new K.ErrnoError(43);return 2&o||G.stream_ops.write(t,e,0,n,r,!1),0}}},K={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,lookupPath:function(t,e){if(e=e||{},!(t=J.resolve(K.cwd(),t)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===e[n]&&(e[n]=r[n]);if(e.recurse_count>8)throw new K.ErrnoError(32);for(var o=q.normalizeArray(t.split("/").filter((function(t){return!!t})),!1),i=K.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=K.lookupNode(i,o[s]),a=q.join2(a,o[s]),K.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;K.isLink(i.mode);){var f=K.readlink(a);if(a=J.resolve(q.dirname(a),f),i=K.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new K.ErrnoError(32)}}return{path:a,node:i}},getPath:function(t){for(var e;;){if(K.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%K.nameTable.length},hashAddNode:function(t){var e=K.hashName(t.parent.id,t.name);t.name_next=K.nameTable[e],K.nameTable[e]=t},hashRemoveNode:function(t){var e=K.hashName(t.parent.id,t.name);if(K.nameTable[e]===t)K.nameTable[e]=t.name_next;else for(var r=K.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:function(t,e){var r=K.mayLookup(t);if(r)throw new K.ErrnoError(r,t);for(var n=K.hashName(t.id,e),o=K.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return K.lookup(t,e)},createNode:function(t,e,r,n){var o=new K.FSNode(t,e,r,n);return K.hashAddNode(o),o},destroyNode:function(t){K.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return 32768==(61440&t)},isDir:function(t){return 16384==(61440&t)},isLink:function(t){return 40960==(61440&t)},isChrdev:function(t){return 8192==(61440&t)},isBlkdev:function(t){return 24576==(61440&t)},isFIFO:function(t){return 4096==(61440&t)},isSocket:function(t){return 49152==(49152&t)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(t){var e=K.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:function(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:function(t,e){return K.ignorePermissions||(-1===e.indexOf("r")||292&t.mode)&&(-1===e.indexOf("w")||146&t.mode)&&(-1===e.indexOf("x")||73&t.mode)?0:2},mayLookup:function(t){var e=K.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,e){try{return K.lookupNode(t,e),20}catch(t){}return K.nodePermissions(t,"wx")},mayDelete:function(t,e,r){var n;try{n=K.lookupNode(t,e)}catch(t){return t.errno}var o=K.nodePermissions(t,"wx");if(o)return o;if(r){if(!K.isDir(n.mode))return 54;if(K.isRoot(n)||K.getPath(n)===K.cwd())return 10}else if(K.isDir(n.mode))return 31;return 0},mayOpen:function(t,e){return t?K.isLink(t.mode)?32:K.isDir(t.mode)&&("r"!==K.flagsToPermissionString(e)||512&e)?31:K.nodePermissions(t,K.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(t,e){t=t||0,e=e||K.MAX_OPEN_FDS;for(var r=t;r<=e;r++)if(!K.streams[r])return r;throw new K.ErrnoError(33)},getStream:function(t){return K.streams[t]},createStream:function(t,e,r){K.FSStream||(K.FSStream=function(){},K.FSStream.prototype={object:{get:function(){return this.node},set:function(t){this.node=t}},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 K.FSStream;for(var o in t)n[o]=t[o];t=n;var i=K.nextfd(e,r);return t.fd=i,K.streams[i]=t,t},closeStream:function(t){K.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=K.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new K.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return 255&t},makedev:function(t,e){return t<<8|e},registerDevice:function(t,e){K.devices[t]={stream_ops:e}},getDevice:function(t){return K.devices[t]},getMounts:function(t){for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:function(t,e){"function"==typeof t&&(e=t,t=!1),K.syncFSRequests++,K.syncFSRequests>1&&p("warning: "+K.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=K.getMounts(K.root.mount),n=0;function o(t){return K.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:function(t,e,r){var n,o="/"===r,i=!r;if(o&&K.root)throw new K.ErrnoError(10);if(!o&&!i){var a=K.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,K.isMountpoint(n))throw new K.ErrnoError(10);if(!K.isDir(n.mode))throw new K.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?K.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(t){var e=K.lookupPath(t,{follow_mount:!1});if(!K.isMountpoint(e.node))throw new K.ErrnoError(28);var r=e.node,n=r.mounted,o=K.getMounts(n);Object.keys(K.nameTable).forEach((function(t){for(var e=K.nameTable[t];e;){var r=e.name_next;-1!==o.indexOf(e.mount)&&K.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(t,e){return t.node_ops.lookup(t,e)},mknod:function(t,e,r){var n=K.lookupPath(t,{parent:!0}).node,o=q.basename(t);if(!o||"."===o||".."===o)throw new K.ErrnoError(28);var i=K.mayCreate(n,o);if(i)throw new K.ErrnoError(i);if(!n.node_ops.mknod)throw new K.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:function(t,e){return e=void 0!==e?e:438,e&=4095,e|=32768,K.mknod(t,e,0)},mkdir:function(t,e){return e=void 0!==e?e:511,e&=1023,e|=16384,K.mknod(t,e,0)},mkdirTree:function(t,e){for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{K.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:function(t,e,r){return void 0===r&&(r=e,e=438),e|=8192,K.mknod(t,e,r)},symlink:function(t,e){if(!J.resolve(t))throw new K.ErrnoError(44);var r=K.lookupPath(e,{parent:!0}).node;if(!r)throw new K.ErrnoError(44);var n=q.basename(e),o=K.mayCreate(r,n);if(o)throw new K.ErrnoError(o);if(!r.node_ops.symlink)throw new K.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:function(t,e){var r,n,o=q.dirname(t),i=q.dirname(e),a=q.basename(t),s=q.basename(e);if(r=K.lookupPath(t,{parent:!0}).node,n=K.lookupPath(e,{parent:!0}).node,!r||!n)throw new K.ErrnoError(44);if(r.mount!==n.mount)throw new K.ErrnoError(75);var u,c=K.lookupNode(r,a),f=J.relative(t,i);if("."!==f.charAt(0))throw new K.ErrnoError(28);if("."!==(f=J.relative(e,o)).charAt(0))throw new K.ErrnoError(55);try{u=K.lookupNode(n,s)}catch(t){}if(c!==u){var l=K.isDir(c.mode),d=K.mayDelete(r,a,l);if(d)throw new K.ErrnoError(d);if(d=u?K.mayDelete(n,s,l):K.mayCreate(n,s))throw new K.ErrnoError(d);if(!r.node_ops.rename)throw new K.ErrnoError(63);if(K.isMountpoint(c)||u&&K.isMountpoint(u))throw new K.ErrnoError(10);if(n!==r&&(d=K.nodePermissions(r,"w")))throw new K.ErrnoError(d);try{K.trackingDelegate.willMovePath&&K.trackingDelegate.willMovePath(t,e)}catch(r){p("FS.trackingDelegate['willMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}K.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{K.hashAddNode(c)}try{K.trackingDelegate.onMovePath&&K.trackingDelegate.onMovePath(t,e)}catch(r){p("FS.trackingDelegate['onMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}}},rmdir:function(t){var e=K.lookupPath(t,{parent:!0}).node,r=q.basename(t),n=K.lookupNode(e,r),o=K.mayDelete(e,r,!0);if(o)throw new K.ErrnoError(o);if(!e.node_ops.rmdir)throw new K.ErrnoError(63);if(K.isMountpoint(n))throw new K.ErrnoError(10);try{K.trackingDelegate.willDeletePath&&K.trackingDelegate.willDeletePath(t)}catch(e){p("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,r),K.destroyNode(n);try{K.trackingDelegate.onDeletePath&&K.trackingDelegate.onDeletePath(t)}catch(e){p("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readdir:function(t){var e=K.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new K.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(t){var e=K.lookupPath(t,{parent:!0}).node,r=q.basename(t),n=K.lookupNode(e,r),o=K.mayDelete(e,r,!1);if(o)throw new K.ErrnoError(o);if(!e.node_ops.unlink)throw new K.ErrnoError(63);if(K.isMountpoint(n))throw new K.ErrnoError(10);try{K.trackingDelegate.willDeletePath&&K.trackingDelegate.willDeletePath(t)}catch(e){p("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.unlink(e,r),K.destroyNode(n);try{K.trackingDelegate.onDeletePath&&K.trackingDelegate.onDeletePath(t)}catch(e){p("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readlink:function(t){var e=K.lookupPath(t).node;if(!e)throw new K.ErrnoError(44);if(!e.node_ops.readlink)throw new K.ErrnoError(28);return J.resolve(K.getPath(e.parent),e.node_ops.readlink(e))},stat:function(t,e){var r=K.lookupPath(t,{follow:!e}).node;if(!r)throw new K.ErrnoError(44);if(!r.node_ops.getattr)throw new K.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return K.stat(t,!0)},chmod:function(t,e,r){var n;if(!(n="string"==typeof t?K.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new K.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(t,e){K.chmod(t,e,!0)},fchmod:function(t,e){var r=K.getStream(t);if(!r)throw new K.ErrnoError(8);K.chmod(r.node,e)},chown:function(t,e,r,n){var o;if(!(o="string"==typeof t?K.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new K.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(t,e,r){K.chown(t,e,r,!0)},fchown:function(t,e,r){var n=K.getStream(t);if(!n)throw new K.ErrnoError(8);K.chown(n.node,e,r)},truncate:function(t,e){if(e<0)throw new K.ErrnoError(28);var r;if(!(r="string"==typeof t?K.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new K.ErrnoError(63);if(K.isDir(r.mode))throw new K.ErrnoError(31);if(!K.isFile(r.mode))throw new K.ErrnoError(28);var n=K.nodePermissions(r,"w");if(n)throw new K.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:function(t,e){var r=K.getStream(t);if(!r)throw new K.ErrnoError(8);if(0==(2097155&r.flags))throw new K.ErrnoError(28);K.truncate(r.node,e)},utime:function(t,e,r){var n=K.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:function(t,e,r,n,i){if(""===t)throw new K.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?K.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)a=t;else{t=q.normalize(t);try{a=K.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var s=!1;if(64&e)if(a){if(128&e)throw new K.ErrnoError(20)}else a=K.mknod(t,r,0),s=!0;if(!a)throw new K.ErrnoError(44);if(K.isChrdev(a.mode)&&(e&=-513),65536&e&&!K.isDir(a.mode))throw new K.ErrnoError(54);if(!s){var u=K.mayOpen(a,e);if(u)throw new K.ErrnoError(u)}512&e&&K.truncate(a,0),e&=-131713;var c=K.createStream({node:a,path:K.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(K.readFiles||(K.readFiles={}),t in K.readFiles||(K.readFiles[t]=1,p("FS.trackingDelegate error on read file: "+t)));try{if(K.trackingDelegate.onOpenFile){var f=0;1!=(2097155&e)&&(f|=K.tracking.openFlags.READ),0!=(2097155&e)&&(f|=K.tracking.openFlags.WRITE),K.trackingDelegate.onOpenFile(t,f)}}catch(e){p("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return c},close:function(t){if(K.isClosed(t))throw new K.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{K.closeStream(t.fd)}t.fd=null},isClosed:function(t){return null===t.fd},llseek:function(t,e,r){if(K.isClosed(t))throw new K.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new K.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new K.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:function(t,e,r,n,o){if(n<0||o<0)throw new K.ErrnoError(28);if(K.isClosed(t))throw new K.ErrnoError(8);if(1==(2097155&t.flags))throw new K.ErrnoError(8);if(K.isDir(t.node.mode))throw new K.ErrnoError(31);if(!t.stream_ops.read)throw new K.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new K.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:function(t,e,r,n,o,i){if(n<0||o<0)throw new K.ErrnoError(28);if(K.isClosed(t))throw new K.ErrnoError(8);if(0==(2097155&t.flags))throw new K.ErrnoError(8);if(K.isDir(t.node.mode))throw new K.ErrnoError(31);if(!t.stream_ops.write)throw new K.ErrnoError(28);t.seekable&&1024&t.flags&&K.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new K.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);a||(t.position+=s);try{t.path&&K.trackingDelegate.onWriteToFile&&K.trackingDelegate.onWriteToFile(t.path)}catch(e){p("FS.trackingDelegate['onWriteToFile']('"+t.path+"') threw an exception: "+e.message)}return s},allocate:function(t,e,r){if(K.isClosed(t))throw new K.ErrnoError(8);if(e<0||r<=0)throw new K.ErrnoError(28);if(0==(2097155&t.flags))throw new K.ErrnoError(8);if(!K.isFile(t.node.mode)&&!K.isDir(t.node.mode))throw new K.ErrnoError(43);if(!t.stream_ops.allocate)throw new K.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:function(t,e,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&t.flags))throw new K.ErrnoError(2);if(1==(2097155&t.flags))throw new K.ErrnoError(2);if(!t.stream_ops.mmap)throw new K.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o,i)},msync:function(t,e,r,n,o){return t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0},munmap:function(t){return 0},ioctl:function(t,e,r){if(!t.stream_ops.ioctl)throw new K.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:function(t,e){if((e=e||{}).flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=K.open(t,e.flags),o=K.stat(t).size,i=new Uint8Array(o);return K.read(n,i,0,o,0),"utf8"===e.encoding?r=b(i,0):"binary"===e.encoding&&(r=i),K.close(n),r},writeFile:function(t,e,r){(r=r||{}).flags=r.flags||577;var n=K.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(S(e)+1),i=D(e,o,0,o.length);K.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");K.write(n,e,0,e.byteLength,void 0,r.canOwn)}K.close(n)},cwd:function(){return K.currentPath},chdir:function(t){var e=K.lookupPath(t,{follow:!0});if(null===e.node)throw new K.ErrnoError(44);if(!K.isDir(e.node.mode))throw new K.ErrnoError(54);var r=K.nodePermissions(e.node,"x");if(r)throw new K.ErrnoError(r);K.currentPath=e.path},createDefaultDirectories:function(){K.mkdir("/tmp"),K.mkdir("/home"),K.mkdir("/home/web_user")},createDefaultDevices:function(){K.mkdir("/dev"),K.registerDevice(K.makedev(1,3),{read:function(){return 0},write:function(t,e,r,n,o){return n}}),K.mkdev("/dev/null",K.makedev(1,3)),V.register(K.makedev(5,0),V.default_tty_ops),V.register(K.makedev(6,0),V.default_tty1_ops),K.mkdev("/dev/tty",K.makedev(5,0)),K.mkdev("/dev/tty1",K.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}return function(){B("randomDevice")}}();K.createDevice("/dev","random",t),K.createDevice("/dev","urandom",t),K.mkdir("/dev/shm"),K.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){K.mkdir("/proc"),K.mkdir("/proc/self"),K.mkdir("/proc/self/fd"),K.mount({mount:function(){var t=K.createNode("/proc/self","fd",16895,73);return t.node_ops={lookup:function(t,e){var r=+e,n=K.getStream(r);if(!n)throw new K.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?K.createDevice("/dev","stdin",o.stdin):K.symlink("/dev/tty","/dev/stdin"),o.stdout?K.createDevice("/dev","stdout",null,o.stdout):K.symlink("/dev/tty","/dev/stdout"),o.stderr?K.createDevice("/dev","stderr",null,o.stderr):K.symlink("/dev/tty1","/dev/stderr"),K.open("/dev/stdin",0),K.open("/dev/stdout",1),K.open("/dev/stderr",1)},ensureErrnoError:function(){K.ErrnoError||(K.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},K.ErrnoError.prototype=new Error,K.ErrnoError.prototype.constructor=K.ErrnoError,[44].forEach((function(t){K.genericErrors[t]=new K.ErrnoError(t),K.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:function(){K.ensureErrnoError(),K.nameTable=new Array(4096),K.mount(G,{},"/"),K.createDefaultDirectories(),K.createDefaultDevices(),K.createSpecialDirectories(),K.filesystems={MEMFS:G}},init:function(t,e,r){K.init.initialized=!0,K.ensureErrnoError(),o.stdin=t||o.stdin,o.stdout=e||o.stdout,o.stderr=r||o.stderr,K.createStandardStreams()},quit:function(){K.init.initialized=!1;var t=o._fflush;t&&t(0);for(var e=0;e<K.streams.length;e++){var r=K.streams[e];r&&K.close(r)}},getMode:function(t,e){var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:function(t,e){var r=K.analyzePath(t,e);return r.exists?r.object:null},analyzePath:function(t,e){try{t=(n=K.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=K.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=q.basename(t),n=K.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:function(t,e,r,n){t="string"==typeof t?t:K.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=q.join2(t,i);try{K.mkdir(a)}catch(t){}t=a}}return a},createFile:function(t,e,r,n,o){var i=q.join2("string"==typeof t?t:K.getPath(t),e),a=K.getMode(n,o);return K.create(i,a)},createDataFile:function(t,e,r,n,o,i){var a=e?q.join2("string"==typeof t?t:K.getPath(t),e):t,s=K.getMode(n,o),u=K.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}K.chmod(u,146|s);var d=K.open(u,577);K.write(d,r,0,r.length,0,i),K.close(d),K.chmod(u,s)}return u},createDevice:function(t,e,r,n){var o=q.join2("string"==typeof t?t:K.getPath(t),e),i=K.getMode(!!r,!!n);K.createDevice.major||(K.createDevice.major=64);var a=K.makedev(K.createDevice.major++,0);return K.registerDevice(a,{open:function(t){t.seekable=!1},close:function(t){n&&n.buffer&&n.buffer.length&&n(10)},read:function(t,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new K.ErrnoError(29)}if(void 0===u&&0===a)throw new K.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:function(t,e,r,o,i){for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new K.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),K.mkdev(o,i,a)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=it(s(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new K.ErrnoError(29)}},createLazyFile:function(t,e,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(t){var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=function(t,e){if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),"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 "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):it(o.responseText||"",!0)}(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,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 a={isDevice:!1,url:r},s=K.createFile(t,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(t){var e=s.stream_ops[t];u[t]=function(){return K.forceLoadFile(s),e.apply(null,arguments)}})),u.read=function(t,e,r,n,o){K.forceLoadFile(s);var i=t.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[r+u]=i[o+u];else for(u=0;u<a;u++)e[r+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(t,e,r,n,i,a,s,u,c,f){Browser.init();var l=e?J.resolve(q.join2(t,e)):t;function d(r){function d(r){f&&f(),u||K.createDataFile(t,e,r,n,i,c),a&&a(),T()}var p=!1;o.preloadPlugins.forEach((function(t){p||t.canHandle(l)&&(t.handle(r,l,d,(function(){s&&s(),T()})),p=!0)})),p||d(r)}j(),"string"==typeof r?Browser.asyncLoad(r,(function(t){d(t)}),s):d(r)},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(t,e,r){e=e||function(){},r=r||function(){};var n=K.indexedDB();try{var o=n.open(K.DB_NAME(),K.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=function(){d("creating db"),o.result.createObjectStore(K.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([K.DB_STORE_NAME],"readwrite"),i=n.objectStore(K.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((function(t){var e=i.put(K.analyzePath(t).object.contents,t);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(t,e,r){e=e||function(){},r=r||function(){};var n=K.indexedDB();try{var o=n.open(K.DB_NAME(),K.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([K.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(K.DB_STORE_NAME),s=0,u=0,c=t.length;function f(){0==u?e():r()}t.forEach((function(t){var e=a.get(t);e.onsuccess=function(){K.analyzePath(t).exists&&K.unlink(t),K.createDataFile(q.dirname(t),q.basename(t),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){u++,s+u==c&&f()}})),i.onerror=r},o.onerror=r}},$={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(t,e){if("/"!==e[0]){var r;if(-100===t)r=K.cwd();else{var n=K.getStream(t);if(!n)throw new K.ErrnoError(8);r=n.path}e=q.join2(r,e)}return e},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&q.normalize(e)!==q.normalize(K.getPath(t.node)))return-54;throw t}return y[r>>2]=n.dev,y[r+4>>2]=0,y[r+8>>2]=n.ino,y[r+12>>2]=n.mode,y[r+16>>2]=n.nlink,y[r+20>>2]=n.uid,y[r+24>>2]=n.gid,y[r+28>>2]=n.rdev,y[r+32>>2]=0,L=[n.size>>>0,(I=n.size,+Math.abs(I)>=1?I>0?(0|Math.min(+Math.floor(I/4294967296),4294967295))>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],y[r+40>>2]=L[0],y[r+44>>2]=L[1],y[r+48>>2]=4096,y[r+52>>2]=n.blocks,y[r+56>>2]=n.atime.getTime()/1e3|0,y[r+60>>2]=0,y[r+64>>2]=n.mtime.getTime()/1e3|0,y[r+68>>2]=0,y[r+72>>2]=n.ctime.getTime()/1e3|0,y[r+76>>2]=0,L=[n.ino>>>0,(I=n.ino,+Math.abs(I)>=1?I>0?(0|Math.min(+Math.floor(I/4294967296),4294967295))>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],y[r+80>>2]=L[0],y[r+84>>2]=L[1],0},doMsync:function(t,e,r,n,o){var i=w.slice(t,t+r);K.msync(e,i,o,r,n)},doMkdir:function(t,e){return"/"===(t=q.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),K.mkdir(t,e,0),0},doMknod:function(t,e,r){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return K.mknod(t,e,r),0},doReadlink:function(t,e,r){if(r<=0)return-28;var n=K.readlink(t),o=Math.min(r,S(n)),i=v[e+o];return D(n,w,e,r+1),v[e+o]=i,o},doAccess:function(t,e){if(-8&e)return-28;var r;if(!(r=K.lookupPath(t,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&K.nodePermissions(r,n)?-2:0},doDup:function(t,e,r){var n=K.getStream(r);return n&&K.close(n),K.open(t,e,0,r,r).fd},doReadv:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=K.read(t,v,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=K.write(t,v,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return $.varargs+=4,y[$.varargs-4>>2]},getStr:function(t){return k(t)},getStreamFromFD:function(t){var e=K.getStream(t);if(!e)throw new K.ErrnoError(8);return e},get64:function(t,e){return t}};function Z(t){try{return l.grow(t-_.byteLength+65535>>>16),F(l.buffer),1}catch(t){}}var Q={};function tt(){if(!tt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in Q)t[e]=Q[e];var r=[];for(var e in t)r.push(e+"="+t[e]);tt.strings=r}return tt.strings}var et=[],rt=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=K.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},nt=365,ot=146;function it(t,e,r){var n=r>0?r:S(t)+1,o=new Array(n),i=D(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(rt.prototype,{read:{get:function(){return(this.mode&nt)===nt},set:function(t){t?this.mode|=nt:this.mode&=-366}},write:{get:function(){return(this.mode&ot)===ot},set:function(t){t?this.mode|=ot:this.mode&=-147}},isFolder:{get:function(){return K.isDir(this.mode)}},isDevice:{get:function(){return K.isChrdev(this.mode)}}}),K.FSNode=rt,K.staticInit(),x.push({func:function(){ut()}});var at,st={i:function(){return 42},b:function(){B()},a:function(t,e,r){var n=function(t,e){var r;for(et.length=0,e>>=2;r=w[t++];){var n=r<105;n&&1&e&&e++,et.push(n?g[e++>>1]:y[e]),++e}return et}(e,r);return W[t].apply(null,n)},d:function(t,e,r){w.copyWithin(t,e,e+r)},e:function(t){t>>>=0;var e=w.length,r=2147483648;if(t>r)return!1;for(var n,o,i=1;i<=4;i*=2){var a=e*(1+.2/i);if(a=Math.min(a,t+100663296),Z(Math.min(r,((n=Math.max(16777216,t,a))%(o=65536)>0&&(n+=o-n%o),n))))return!0}return!1},f:function(t,e){try{var r=0;return tt().forEach((function(n,o){var i=e+r;y[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)v[e++>>0]=t.charCodeAt(n);r||(v[e>>0]=0)}(n,i),r+=n.length+1})),0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||B(t),t.errno}},g:function(t,e){try{var r=tt();y[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),y[e>>2]=n,0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||B(t),t.errno}},h:function(t){try{var e=$.getStreamFromFD(t);return K.close(e),0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||B(t),t.errno}},j:function(t,e,r,n,o){try{var i=$.getStreamFromFD(t),a=4294967296*r+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(K.llseek(i,a,n),L=[i.position>>>0,(I=i.position,+Math.abs(I)>=1?I>0?(0|Math.min(+Math.floor(I/4294967296),4294967295))>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)],y[o>>2]=L[0],y[o+4>>2]=L[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(t){return void 0!==K&&t instanceof K.ErrnoError||B(t),t.errno}},c:function(t,e,r,n){try{var o=$.getStreamFromFD(t),i=$.doWritev(o,e,r);return y[n>>2]=i,0}catch(t){return void 0!==K&&t instanceof K.ErrnoError||B(t),t.errno}},k:function(t){var e=Date.now();return y[t>>2]=e/1e3|0,y[t+4>>2]=e%1e3*1e3|0,0}},ut=(function(){var t={a:st};function e(t,e){var r=t.exports;o.asm=r,F((l=o.asm.l).buffer),P=o.asm.m,T()}function r(t){e(t.instance)}function i(e){return(f||"function"!=typeof fetch?Promise.resolve().then((function(){return U(H)})):fetch(H,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+H+"'";return t.arrayBuffer()})).catch((function(){return U(H)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(t){p("failed to asynchronously prepare wasm: "+t),B(t)}))}if(j(),o.instantiateWasm)try{return o.instantiateWasm(t,e)}catch(t){return p("Module.instantiateWasm callback failed with error: "+t),!1}(f||"function"!=typeof WebAssembly.instantiateStreaming||N(H)||"function"!=typeof fetch?i(r):fetch(H,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return p("wasm streaming compile failed: "+t),p("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(ut=o.___wasm_call_ctors=o.asm.n).apply(null,arguments)}),ct=(o.___em_js__array_bounds_check_error=function(){return(o.___em_js__array_bounds_check_error=o.asm.o).apply(null,arguments)},o._emscripten_bind_CExpat_CExpat_0=function(){return(ct=o._emscripten_bind_CExpat_CExpat_0=o.asm.p).apply(null,arguments)}),ft=o._emscripten_bind_CExpat_create_0=function(){return(ft=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},lt=o._emscripten_bind_CExpat_destroy_0=function(){return(lt=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},dt=o._emscripten_bind_CExpat_parse_1=function(){return(dt=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},pt=o._emscripten_bind_CExpat_tag_0=function(){return(pt=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},mt=o._emscripten_bind_CExpat_attrs_0=function(){return(mt=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},ht=o._emscripten_bind_CExpat_content_0=function(){return(ht=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},_t=o._emscripten_bind_CExpat_startElement_0=function(){return(_t=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},vt=o._emscripten_bind_CExpat_endElement_0=function(){return(vt=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},wt=o._emscripten_bind_CExpat_characterData_0=function(){return(wt=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},yt=o._emscripten_bind_CExpat___destroy___0=function(){return(yt=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},gt=o._emscripten_bind_VoidPtr___destroy___0=function(){return(gt=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},Et=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Et=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},bt=o._emscripten_bind_CExpatJS_startElement_0=function(){return(bt=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},kt=o._emscripten_bind_CExpatJS_endElement_0=function(){return(kt=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},Dt=o._emscripten_bind_CExpatJS_characterData_0=function(){return(Dt=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},St=o._emscripten_bind_CExpatJS___destroy___0=function(){return(St=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)},Ft=o._malloc=function(){return(Ft=o._malloc=o.asm.G).apply(null,arguments)};function Pt(t){function r(){at||(at=!0,o.calledRun=!0,m||(o.noFSInit||K.init.initialized||K.init(),V.init(),Y(x),K.ignorePermissions=!1,Y(A),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),R.unshift(t);var t;Y(R)}()))}C>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),M.unshift(t);var t;Y(M)}(),C>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r()))}if(o._free=function(){return(o._free=o.asm.H).apply(null,arguments)},O=function t(){at||Pt(),at||(O=t)},o.run=Pt,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Mt(){}function xt(t){return(t||Mt).__cache__}function At(t,e){var r=xt(e),n=r[t];return n||((n=Object.create((e||Mt).prototype)).ptr=t,r[t]=n)}Pt(),Mt.prototype=Object.create(Mt.prototype),Mt.prototype.constructor=Mt,Mt.prototype.__class__=Mt,Mt.__cache__={},o.WrapperObject=Mt,o.getCache=xt,o.wrapPointer=At,o.castObject=function(t,e){return At(t.ptr,e)},o.NULL=At(0),o.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete xt(t.__class__)[t.ptr]},o.compare=function(t,e){return t.ptr===e.ptr},o.getPointer=function(t){return t.ptr},o.getClass=function(t){return t.__class__};var Rt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Rt.needed){for(var t=0;t<Rt.temps.length;t++)o._free(Rt.temps[t]);Rt.temps.length=0,o._free(Rt.buffer),Rt.buffer=0,Rt.size+=Rt.needed,Rt.needed=0}Rt.buffer||(Rt.size+=128,Rt.buffer=o._malloc(Rt.size),h(Rt.buffer)),Rt.pos=0},alloc:function(t,e){h(Rt.buffer);var r,n=e.BYTES_PER_ELEMENT,i=t.length*n;return i=i+7&-8,Rt.pos+i>=Rt.size?(h(i>0),Rt.needed+=i,r=o._malloc(i),Rt.temps.push(r)):(r=Rt.buffer+Rt.pos,Rt.pos+=i),r},copy:function(t,e,r){switch(r>>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;n<t.length;n++)e[r+n]=t[n]}};function Ct(){this.ptr=ct(),xt(Ct)[this.ptr]=this}function Ot(){throw"cannot construct a VoidPtr, no constructor in IDL"}function jt(){this.ptr=Et(),xt(jt)[this.ptr]=this}return Ct.prototype=Object.create(Mt.prototype),Ct.prototype.constructor=Ct,Ct.prototype.__class__=Ct,Ct.__cache__={},o.CExpat=Ct,Ct.prototype.create=Ct.prototype.create=function(){var t=this.ptr;return!!ft(t)},Ct.prototype.destroy=Ct.prototype.destroy=function(){var t=this.ptr;lt(t)},Ct.prototype.parse=Ct.prototype.parse=function(t){var e=this.ptr;return Rt.prepare(),t=t&&"object"==typeof t?t.ptr:function(t){if("string"==typeof t){var e=it(t),r=Rt.alloc(e,v);return Rt.copy(e,v,r),r}return t}(t),!!dt(e,t)},Ct.prototype.tag=Ct.prototype.tag=function(){var t=this.ptr;return k(pt(t))},Ct.prototype.attrs=Ct.prototype.attrs=function(){var t=this.ptr;return k(mt(t))},Ct.prototype.content=Ct.prototype.content=function(){var t=this.ptr;return k(ht(t))},Ct.prototype.startElement=Ct.prototype.startElement=function(){var t=this.ptr;_t(t)},Ct.prototype.endElement=Ct.prototype.endElement=function(){var t=this.ptr;vt(t)},Ct.prototype.characterData=Ct.prototype.characterData=function(){var t=this.ptr;wt(t)},Ct.prototype.__destroy__=Ct.prototype.__destroy__=function(){var t=this.ptr;yt(t)},Ot.prototype=Object.create(Mt.prototype),Ot.prototype.constructor=Ot,Ot.prototype.__class__=Ot,Ot.__cache__={},o.VoidPtr=Ot,Ot.prototype.__destroy__=Ot.prototype.__destroy__=function(){var t=this.ptr;gt(t)},jt.prototype=Object.create(Ct.prototype),jt.prototype.constructor=jt,jt.prototype.__class__=jt,jt.__cache__={},o.CExpatJS=jt,jt.prototype.startElement=jt.prototype.startElement=function(){var t=this.ptr;bt(t)},jt.prototype.endElement=jt.prototype.endElement=function(){var t=this.ptr;kt(t)},jt.prototype.characterData=jt.prototype.characterData=function(){var t=this.ptr;Dt(t)},jt.prototype.__destroy__=jt.prototype.__destroy__=function(){var t=this.ptr;St(t)},t.ready});t.exports=n})),n=Object.freeze(Object.assign(Object.create(null),r,{default:r}));var o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}().__hpcc_wasmFolder||void 0;function i(t){if(!arguments.length)return o;var e=o;return o=t,e}function a(t,e,r){var n=t.default||t;return n.__hpcc_promise||(n.__hpcc_promise=new Promise((function(t){n({wasmBinary:r,locateFile:function(t,r){return function(t,e){for(;t.charAt(t.length-1)===e;)t=t.substring(0,t.length-1);return t}(e||i()||r||".","/")+"/"+function(t,e){for(;t.charAt(0)===e;)t=t.substring(1);return t}(t,"/")}}).then((function(e){delete e.then,t(e)}))}))),n.__hpcc_promise}var s=function(){function t(t,e){this.tag=t,this.attrs=e,this._content=""}return Object.defineProperty(t.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),t.prototype.appendContent=function(t){this._content+=t},t}(),u=function(){function t(){this._stack=[]}return t.prototype.parse=function(t){return c(t,this)},t.prototype.top=function(){return this._stack[this._stack.length-1]},t.prototype.startElement=function(t,e){var r=new s(t,e);return this._stack.push(r),r},t.prototype.endElement=function(t){return this._stack.pop()},t.prototype.characterData=function(t){this.top().appendContent(t)},t}();function c(t,e,r,o){return a(n,r,o).then((function(r){var n=new r.CExpatJS;n.startElement=function(){e.startElement(this.tag(),function(t){var e={},r=t,n=""+String.fromCharCode(1),o=""+n+n;return r.split(o).filter((function(t){return!!t})).forEach((function(t){var r=t.split(n);e[r[0]]=r[1]})),e}(this.attrs()))},n.endElement=function(){e.endElement(this.tag())},n.characterData=function(){e.characterData(this.content())},n.create();var o=n.parse(t);return n.destroy(),r.destroy(n),o}))}var f=e((function(t,e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(t,r){e=t,n=r}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u="./this.program",c=function(t,e){throw e},f="";"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",s=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText};var l=o.print||console.log.bind(console),d=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit);var p,m,h,_=0;o.wasmBinary&&(p=o.wasmBinary),o.noExitRuntime&&(m=o.noExitRuntime),"object"!=typeof WebAssembly&&L("no native wasm support detected");var v=!1;function w(t,e){t||L("Assertion failed: "+e)}var y,g,E,b,k,D,S="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.subarray&&S)return S.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function P(t,e){return t?F(E,t,e):""}function M(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}function x(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function A(t){y=t,o.HEAP8=g=new Int8Array(t),o.HEAP16=b=new Int16Array(t),o.HEAP32=k=new Int32Array(t),o.HEAPU8=E=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAPU32=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=D=new Float64Array(t)}o.INITIAL_MEMORY;var R,C=[],O=[],j=[],T=[],B=0,N=null;function z(t){B++,o.monitorRunDependencies&&o.monitorRunDependencies(B)}function I(t){if(B--,o.monitorRunDependencies&&o.monitorRunDependencies(B),0==B&&N){var e=N;N=null,e()}}function L(t){o.onAbort&&o.onAbort(t),d(t+=""),v=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function H(t){return e=t,r="data:application/octet-stream;base64,",String.prototype.startsWith?e.startsWith(r):0===e.indexOf(r);var e,r}o.preloadedImages={},o.preloadedAudios={};var U,W,Y,q="graphvizlib.wasm";function J(t){try{if(t==q&&p)return new Uint8Array(p);throw"both async and sync fetching of the wasm failed"}catch(t){L(t)}}H(q)||(U=q,q=o.locateFile?o.locateFile(U,f):f+U);var V,X={1186:function(t,e){var r=P(t),n=P(e);ct.createPath("/",ot.dirname(r)),ct.writeFile(ot.join("/",r),n)}};function G(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?R.get(r)():R.get(r)(e.arg):r(void 0===e.arg?null:e.arg)}else e(o)}}function K(t){return k[Nt()>>2]=t,t}V=function(){return performance.now()};var $=0,Z=4,Q=8,tt=12,et=13,rt=16;function nt(t){this.excPtr=t,this.ptr=t-rt,this.set_type=function(t){k[this.ptr+Q>>2]=t},this.get_type=function(){return k[this.ptr+Q>>2]},this.set_destructor=function(t){k[this.ptr+$>>2]=t},this.get_destructor=function(){return k[this.ptr+$>>2]},this.set_refcount=function(t){k[this.ptr+Z>>2]=t},this.set_caught=function(t){t=t?1:0,g[this.ptr+tt>>0]=t},this.get_caught=function(){return 0!=g[this.ptr+tt>>0]},this.set_rethrown=function(t){t=t?1:0,g[this.ptr+et>>0]=t},this.get_rethrown=function(){return 0!=g[this.ptr+et>>0]},this.init=function(t,e){this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=k[this.ptr+Z>>2];k[this.ptr+Z>>2]=t+1},this.release_ref=function(){var t=k[this.ptr+Z>>2];return k[this.ptr+Z>>2]=t-1,1===t}}var ot={splitPath:function(t){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1)},normalizeArray:function(t,e){for(var r=0,n=t.length-1;n>=0;n--){var o=t[n];"."===o?t.splice(n,1):".."===o?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:function(t){var e="/"===t.charAt(0),r="/"===t.substr(-1);return(t=ot.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=ot.splitPath(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(t){if("/"===t)return"/";var e=(t=(t=ot.normalize(t)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?t:t.substr(e+1)},extname:function(t){return ot.splitPath(t)[3]},join:function(){var t=Array.prototype.slice.call(arguments,0);return ot.normalize(t.join("/"))},join2:function(t,e){return ot.normalize(t+"/"+e)}},it={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var n=r>=0?arguments[r]:ct.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,e="/"===n.charAt(0)}return(e?"/":"")+(t=ot.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||"."},relative:function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=it.resolve(t).substr(1),e=it.resolve(e).substr(1);for(var n=r(t.split("/")),o=r(e.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},at={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){at.ttys[t]={input:[],output:[],ops:e},ct.registerDevice(t,at.stream_ops)},stream_ops:{open:function(t){var e=at.ttys[t.node.rdev];if(!e)throw new ct.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.get_char)throw new ct.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new ct.ErrnoError(29)}if(void 0===s&&0===i)throw new ct.ErrnoError(6);if(null==s)break;i++,e[r+a]=s}return i&&(t.node.timestamp=Date.now()),i},write:function(t,e,r,n,o){if(!t.tty||!t.tty.ops.put_char)throw new ct.ErrnoError(60);try{for(var i=0;i<n;i++)t.tty.ops.put_char(t.tty,e[r+i])}catch(t){throw new ct.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(t){if(!t.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;t.input=Dt(e,!0)}return t.input.shift()},put_char:function(t,e){null===e||10===e?(l(F(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(l(F(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(d(F(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(d(F(t.output,0)),t.output=[])}}};function st(t){for(var e=function(t,e){return e||(e=16),Math.ceil(t/e)*e}(t,16384),r=Tt(e);t<e;)g[r+t++]=0;return r}var ut={ops_table:null,mount:function(t){return ut.createNode(null,"/",16895,0)},createNode:function(t,e,r,n){if(ct.isBlkdev(r)||ct.isFIFO(r))throw new ct.ErrnoError(63);ut.ops_table||(ut.ops_table={dir:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,lookup:ut.node_ops.lookup,mknod:ut.node_ops.mknod,rename:ut.node_ops.rename,unlink:ut.node_ops.unlink,rmdir:ut.node_ops.rmdir,readdir:ut.node_ops.readdir,symlink:ut.node_ops.symlink},stream:{llseek:ut.stream_ops.llseek}},file:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:{llseek:ut.stream_ops.llseek,read:ut.stream_ops.read,write:ut.stream_ops.write,allocate:ut.stream_ops.allocate,mmap:ut.stream_ops.mmap,msync:ut.stream_ops.msync}},link:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,readlink:ut.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:ct.chrdev_stream_ops}});var o=ct.createNode(t,e,r,n);return ct.isDir(o.mode)?(o.node_ops=ut.ops_table.dir.node,o.stream_ops=ut.ops_table.dir.stream,o.contents={}):ct.isFile(o.mode)?(o.node_ops=ut.ops_table.file.node,o.stream_ops=ut.ops_table.file.stream,o.usedBytes=0,o.contents=null):ct.isLink(o.mode)?(o.node_ops=ut.ops_table.link.node,o.stream_ops=ut.ops_table.link.stream):ct.isChrdev(o.mode)&&(o.node_ops=ut.ops_table.chrdev.node,o.stream_ops=ut.ops_table.chrdev.stream),o.timestamp=Date.now(),t&&(t.contents[e]=o),o},getFileDataAsRegularArray:function(t){if(t.contents&&t.contents.subarray){for(var e=[],r=0;r<t.usedBytes;++r)e.push(t.contents[r]);return e}return t.contents},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){e=Math.max(e,r*(r<1048576?2:1.125)>>>0),0!=r&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e){if(0==e)return t.contents=null,void(t.usedBytes=0);if(!t.contents||t.contents.subarray){var r=t.contents;return t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),void(t.usedBytes=e)}if(t.contents||(t.contents=[]),t.contents.length>e)t.contents.length=e;else for(;t.contents.length<e;)t.contents.push(0);t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=ct.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,ct.isDir(t.mode)?e.size=4096:ct.isFile(t.mode)?e.size=t.usedBytes:ct.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&ut.resizeFileStorage(t,e.size)},lookup:function(t,e){throw ct.genericErrors[44]},mknod:function(t,e,r,n){return ut.createNode(t,e,r,n)},rename:function(t,e,r){if(ct.isDir(t.mode)){var n;try{n=ct.lookupNode(e,r)}catch(t){}if(n)for(var o in n.contents)throw new ct.ErrnoError(55)}delete t.parent.contents[t.name],t.name=r,e.contents[r]=t,t.parent=e},unlink:function(t,e){delete t.contents[e]},rmdir:function(t,e){var r=ct.lookupNode(t,e);for(var n in r.contents)throw new ct.ErrnoError(55);delete t.contents[e]},readdir:function(t){var e=[".",".."];for(var r in t.contents)t.contents.hasOwnProperty(r)&&e.push(r);return e},symlink:function(t,e,r){var n=ut.createNode(t,e,41471,0);return n.link=r,n},readlink:function(t){if(!ct.isLink(t.mode))throw new ct.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,n,o){var i=t.node.contents;if(o>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)e[r+s]=i[o+s];return a},write:function(t,e,r,n,o,i){if(e.buffer===g.buffer&&(i=!1),!n)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(r,r+n),o),n}if(ut.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(t,e,r){var n=e;if(1===r?n+=t.position:2===r&&ct.isFile(t.node.mode)&&(n+=t.node.usedBytes),n<0)throw new ct.ErrnoError(28);return n},allocate:function(t,e,r){ut.expandFileStorage(t.node,e+r),t.node.usedBytes=Math.max(t.node.usedBytes,e+r)},mmap:function(t,e,r,n,o,i){if(w(0===e),!ct.isFile(t.node.mode))throw new ct.ErrnoError(43);var a,s,u=t.node.contents;if(2&i||u.buffer!==y){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=st(r)))throw new ct.ErrnoError(48);g.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(t,e,r,n,o){if(!ct.isFile(t.node.mode))throw new ct.ErrnoError(43);return 2&o||ut.stream_ops.write(t,e,0,n,r,!1),0}}},ct={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,lookupPath:function(t,e){if(e=e||{},!(t=it.resolve(ct.cwd(),t)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===e[n]&&(e[n]=r[n]);if(e.recurse_count>8)throw new ct.ErrnoError(32);for(var o=ot.normalizeArray(t.split("/").filter((function(t){return!!t})),!1),i=ct.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=ct.lookupNode(i,o[s]),a=ot.join2(a,o[s]),ct.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;ct.isLink(i.mode);){var f=ct.readlink(a);if(a=it.resolve(ot.dirname(a),f),i=ct.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new ct.ErrnoError(32)}}return{path:a,node:i}},getPath:function(t){for(var e;;){if(ct.isRoot(t)){var r=t.mount.mountpoint;return e?"/"!==r[r.length-1]?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%ct.nameTable.length},hashAddNode:function(t){var e=ct.hashName(t.parent.id,t.name);t.name_next=ct.nameTable[e],ct.nameTable[e]=t},hashRemoveNode:function(t){var e=ct.hashName(t.parent.id,t.name);if(ct.nameTable[e]===t)ct.nameTable[e]=t.name_next;else for(var r=ct.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:function(t,e){var r=ct.mayLookup(t);if(r)throw new ct.ErrnoError(r,t);for(var n=ct.hashName(t.id,e),o=ct.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===t.id&&i===e)return o}return ct.lookup(t,e)},createNode:function(t,e,r,n){var o=new ct.FSNode(t,e,r,n);return ct.hashAddNode(o),o},destroyNode:function(t){ct.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return 32768==(61440&t)},isDir:function(t){return 16384==(61440&t)},isLink:function(t){return 40960==(61440&t)},isChrdev:function(t){return 8192==(61440&t)},isBlkdev:function(t){return 24576==(61440&t)},isFIFO:function(t){return 4096==(61440&t)},isSocket:function(t){return 49152==(49152&t)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(t){var e=ct.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:function(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:function(t,e){return ct.ignorePermissions||(-1===e.indexOf("r")||292&t.mode)&&(-1===e.indexOf("w")||146&t.mode)&&(-1===e.indexOf("x")||73&t.mode)?0:2},mayLookup:function(t){var e=ct.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,e){try{return ct.lookupNode(t,e),20}catch(t){}return ct.nodePermissions(t,"wx")},mayDelete:function(t,e,r){var n;try{n=ct.lookupNode(t,e)}catch(t){return t.errno}var o=ct.nodePermissions(t,"wx");if(o)return o;if(r){if(!ct.isDir(n.mode))return 54;if(ct.isRoot(n)||ct.getPath(n)===ct.cwd())return 10}else if(ct.isDir(n.mode))return 31;return 0},mayOpen:function(t,e){return t?ct.isLink(t.mode)?32:ct.isDir(t.mode)&&("r"!==ct.flagsToPermissionString(e)||512&e)?31:ct.nodePermissions(t,ct.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(t,e){t=t||0,e=e||ct.MAX_OPEN_FDS;for(var r=t;r<=e;r++)if(!ct.streams[r])return r;throw new ct.ErrnoError(33)},getStream:function(t){return ct.streams[t]},createStream:function(t,e,r){ct.FSStream||(ct.FSStream=function(){},ct.FSStream.prototype={object:{get:function(){return this.node},set:function(t){this.node=t}},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 ct.FSStream;for(var o in t)n[o]=t[o];t=n;var i=ct.nextfd(e,r);return t.fd=i,ct.streams[i]=t,t},closeStream:function(t){ct.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=ct.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new ct.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return 255&t},makedev:function(t,e){return t<<8|e},registerDevice:function(t,e){ct.devices[t]={stream_ops:e}},getDevice:function(t){return ct.devices[t]},getMounts:function(t){for(var e=[],r=[t];r.length;){var n=r.pop();e.push(n),r.push.apply(r,n.mounts)}return e},syncfs:function(t,e){"function"==typeof t&&(e=t,t=!1),ct.syncFSRequests++,ct.syncFSRequests>1&&d("warning: "+ct.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=ct.getMounts(ct.root.mount),n=0;function o(t){return ct.syncFSRequests--,e(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,o(t));++n>=r.length&&o(null)}r.forEach((function(e){if(!e.type.syncfs)return i(null);e.type.syncfs(e,t,i)}))},mount:function(t,e,r){var n,o="/"===r,i=!r;if(o&&ct.root)throw new ct.ErrnoError(10);if(!o&&!i){var a=ct.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,ct.isMountpoint(n))throw new ct.ErrnoError(10);if(!ct.isDir(n.mode))throw new ct.ErrnoError(54)}var s={type:t,opts:e,mountpoint:r,mounts:[]},u=t.mount(s);return u.mount=s,s.root=u,o?ct.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(t){var e=ct.lookupPath(t,{follow_mount:!1});if(!ct.isMountpoint(e.node))throw new ct.ErrnoError(28);var r=e.node,n=r.mounted,o=ct.getMounts(n);Object.keys(ct.nameTable).forEach((function(t){for(var e=ct.nameTable[t];e;){var r=e.name_next;-1!==o.indexOf(e.mount)&&ct.destroyNode(e),e=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(t,e){return t.node_ops.lookup(t,e)},mknod:function(t,e,r){var n=ct.lookupPath(t,{parent:!0}).node,o=ot.basename(t);if(!o||"."===o||".."===o)throw new ct.ErrnoError(28);var i=ct.mayCreate(n,o);if(i)throw new ct.ErrnoError(i);if(!n.node_ops.mknod)throw new ct.ErrnoError(63);return n.node_ops.mknod(n,o,e,r)},create:function(t,e){return e=void 0!==e?e:438,e&=4095,e|=32768,ct.mknod(t,e,0)},mkdir:function(t,e){return e=void 0!==e?e:511,e&=1023,e|=16384,ct.mknod(t,e,0)},mkdirTree:function(t,e){for(var r=t.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{ct.mkdir(n,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:function(t,e,r){return void 0===r&&(r=e,e=438),e|=8192,ct.mknod(t,e,r)},symlink:function(t,e){if(!it.resolve(t))throw new ct.ErrnoError(44);var r=ct.lookupPath(e,{parent:!0}).node;if(!r)throw new ct.ErrnoError(44);var n=ot.basename(e),o=ct.mayCreate(r,n);if(o)throw new ct.ErrnoError(o);if(!r.node_ops.symlink)throw new ct.ErrnoError(63);return r.node_ops.symlink(r,n,t)},rename:function(t,e){var r,n,o=ot.dirname(t),i=ot.dirname(e),a=ot.basename(t),s=ot.basename(e);if(r=ct.lookupPath(t,{parent:!0}).node,n=ct.lookupPath(e,{parent:!0}).node,!r||!n)throw new ct.ErrnoError(44);if(r.mount!==n.mount)throw new ct.ErrnoError(75);var u,c=ct.lookupNode(r,a),f=it.relative(t,i);if("."!==f.charAt(0))throw new ct.ErrnoError(28);if("."!==(f=it.relative(e,o)).charAt(0))throw new ct.ErrnoError(55);try{u=ct.lookupNode(n,s)}catch(t){}if(c!==u){var l=ct.isDir(c.mode),p=ct.mayDelete(r,a,l);if(p)throw new ct.ErrnoError(p);if(p=u?ct.mayDelete(n,s,l):ct.mayCreate(n,s))throw new ct.ErrnoError(p);if(!r.node_ops.rename)throw new ct.ErrnoError(63);if(ct.isMountpoint(c)||u&&ct.isMountpoint(u))throw new ct.ErrnoError(10);if(n!==r&&(p=ct.nodePermissions(r,"w")))throw new ct.ErrnoError(p);try{ct.trackingDelegate.willMovePath&&ct.trackingDelegate.willMovePath(t,e)}catch(r){d("FS.trackingDelegate['willMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}ct.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(t){throw t}finally{ct.hashAddNode(c)}try{ct.trackingDelegate.onMovePath&&ct.trackingDelegate.onMovePath(t,e)}catch(r){d("FS.trackingDelegate['onMovePath']('"+t+"', '"+e+"') threw an exception: "+r.message)}}},rmdir:function(t){var e=ct.lookupPath(t,{parent:!0}).node,r=ot.basename(t),n=ct.lookupNode(e,r),o=ct.mayDelete(e,r,!0);if(o)throw new ct.ErrnoError(o);if(!e.node_ops.rmdir)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);try{ct.trackingDelegate.willDeletePath&&ct.trackingDelegate.willDeletePath(t)}catch(e){d("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,r),ct.destroyNode(n);try{ct.trackingDelegate.onDeletePath&&ct.trackingDelegate.onDeletePath(t)}catch(e){d("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readdir:function(t){var e=ct.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new ct.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(t){var e=ct.lookupPath(t,{parent:!0}).node,r=ot.basename(t),n=ct.lookupNode(e,r),o=ct.mayDelete(e,r,!1);if(o)throw new ct.ErrnoError(o);if(!e.node_ops.unlink)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);try{ct.trackingDelegate.willDeletePath&&ct.trackingDelegate.willDeletePath(t)}catch(e){d("FS.trackingDelegate['willDeletePath']('"+t+"') threw an exception: "+e.message)}e.node_ops.unlink(e,r),ct.destroyNode(n);try{ct.trackingDelegate.onDeletePath&&ct.trackingDelegate.onDeletePath(t)}catch(e){d("FS.trackingDelegate['onDeletePath']('"+t+"') threw an exception: "+e.message)}},readlink:function(t){var e=ct.lookupPath(t).node;if(!e)throw new ct.ErrnoError(44);if(!e.node_ops.readlink)throw new ct.ErrnoError(28);return it.resolve(ct.getPath(e.parent),e.node_ops.readlink(e))},stat:function(t,e){var r=ct.lookupPath(t,{follow:!e}).node;if(!r)throw new ct.ErrnoError(44);if(!r.node_ops.getattr)throw new ct.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return ct.stat(t,!0)},chmod:function(t,e,r){var n;if(!(n="string"==typeof t?ct.lookupPath(t,{follow:!r}).node:t).node_ops.setattr)throw new ct.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:function(t,e){ct.chmod(t,e,!0)},fchmod:function(t,e){var r=ct.getStream(t);if(!r)throw new ct.ErrnoError(8);ct.chmod(r.node,e)},chown:function(t,e,r,n){var o;if(!(o="string"==typeof t?ct.lookupPath(t,{follow:!n}).node:t).node_ops.setattr)throw new ct.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(t,e,r){ct.chown(t,e,r,!0)},fchown:function(t,e,r){var n=ct.getStream(t);if(!n)throw new ct.ErrnoError(8);ct.chown(n.node,e,r)},truncate:function(t,e){if(e<0)throw new ct.ErrnoError(28);var r;if(!(r="string"==typeof t?ct.lookupPath(t,{follow:!0}).node:t).node_ops.setattr)throw new ct.ErrnoError(63);if(ct.isDir(r.mode))throw new ct.ErrnoError(31);if(!ct.isFile(r.mode))throw new ct.ErrnoError(28);var n=ct.nodePermissions(r,"w");if(n)throw new ct.ErrnoError(n);r.node_ops.setattr(r,{size:e,timestamp:Date.now()})},ftruncate:function(t,e){var r=ct.getStream(t);if(!r)throw new ct.ErrnoError(8);if(0==(2097155&r.flags))throw new ct.ErrnoError(28);ct.truncate(r.node,e)},utime:function(t,e,r){var n=ct.lookupPath(t,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,r)})},open:function(t,e,r,n,i){if(""===t)throw new ct.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(e="string"==typeof e?ct.modeStringToFlags(e):e)?4095&r|32768:0,"object"==typeof t)a=t;else{t=ot.normalize(t);try{a=ct.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var s=!1;if(64&e)if(a){if(128&e)throw new ct.ErrnoError(20)}else a=ct.mknod(t,r,0),s=!0;if(!a)throw new ct.ErrnoError(44);if(ct.isChrdev(a.mode)&&(e&=-513),65536&e&&!ct.isDir(a.mode))throw new ct.ErrnoError(54);if(!s){var u=ct.mayOpen(a,e);if(u)throw new ct.ErrnoError(u)}512&e&&ct.truncate(a,0),e&=-131713;var c=ct.createStream({node:a,path:ct.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(ct.readFiles||(ct.readFiles={}),t in ct.readFiles||(ct.readFiles[t]=1,d("FS.trackingDelegate error on read file: "+t)));try{if(ct.trackingDelegate.onOpenFile){var f=0;1!=(2097155&e)&&(f|=ct.tracking.openFlags.READ),0!=(2097155&e)&&(f|=ct.tracking.openFlags.WRITE),ct.trackingDelegate.onOpenFile(t,f)}}catch(e){d("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return c},close:function(t){if(ct.isClosed(t))throw new ct.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{ct.closeStream(t.fd)}t.fd=null},isClosed:function(t){return null===t.fd},llseek:function(t,e,r){if(ct.isClosed(t))throw new ct.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new ct.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new ct.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,r),t.ungotten=[],t.position},read:function(t,e,r,n,o){if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(t))throw new ct.ErrnoError(8);if(1==(2097155&t.flags))throw new ct.ErrnoError(8);if(ct.isDir(t.node.mode))throw new ct.ErrnoError(31);if(!t.stream_ops.read)throw new ct.ErrnoError(28);var i=void 0!==o;if(i){if(!t.seekable)throw new ct.ErrnoError(70)}else o=t.position;var a=t.stream_ops.read(t,e,r,n,o);return i||(t.position+=a),a},write:function(t,e,r,n,o,i){if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(t))throw new ct.ErrnoError(8);if(0==(2097155&t.flags))throw new ct.ErrnoError(8);if(ct.isDir(t.node.mode))throw new ct.ErrnoError(31);if(!t.stream_ops.write)throw new ct.ErrnoError(28);t.seekable&&1024&t.flags&&ct.llseek(t,0,2);var a=void 0!==o;if(a){if(!t.seekable)throw new ct.ErrnoError(70)}else o=t.position;var s=t.stream_ops.write(t,e,r,n,o,i);a||(t.position+=s);try{t.path&&ct.trackingDelegate.onWriteToFile&&ct.trackingDelegate.onWriteToFile(t.path)}catch(e){d("FS.trackingDelegate['onWriteToFile']('"+t.path+"') threw an exception: "+e.message)}return s},allocate:function(t,e,r){if(ct.isClosed(t))throw new ct.ErrnoError(8);if(e<0||r<=0)throw new ct.ErrnoError(28);if(0==(2097155&t.flags))throw new ct.ErrnoError(8);if(!ct.isFile(t.node.mode)&&!ct.isDir(t.node.mode))throw new ct.ErrnoError(43);if(!t.stream_ops.allocate)throw new ct.ErrnoError(138);t.stream_ops.allocate(t,e,r)},mmap:function(t,e,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&t.flags))throw new ct.ErrnoError(2);if(1==(2097155&t.flags))throw new ct.ErrnoError(2);if(!t.stream_ops.mmap)throw new ct.ErrnoError(43);return t.stream_ops.mmap(t,e,r,n,o,i)},msync:function(t,e,r,n,o){return t&&t.stream_ops.msync?t.stream_ops.msync(t,e,r,n,o):0},munmap:function(t){return 0},ioctl:function(t,e,r){if(!t.stream_ops.ioctl)throw new ct.ErrnoError(59);return t.stream_ops.ioctl(t,e,r)},readFile:function(t,e){if((e=e||{}).flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var r,n=ct.open(t,e.flags),o=ct.stat(t).size,i=new Uint8Array(o);return ct.read(n,i,0,o,0),"utf8"===e.encoding?r=F(i,0):"binary"===e.encoding&&(r=i),ct.close(n),r},writeFile:function(t,e,r){(r=r||{}).flags=r.flags||577;var n=ct.open(t,r.flags,r.mode);if("string"==typeof e){var o=new Uint8Array(x(e)+1),i=M(e,o,0,o.length);ct.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ct.write(n,e,0,e.byteLength,void 0,r.canOwn)}ct.close(n)},cwd:function(){return ct.currentPath},chdir:function(t){var e=ct.lookupPath(t,{follow:!0});if(null===e.node)throw new ct.ErrnoError(44);if(!ct.isDir(e.node.mode))throw new ct.ErrnoError(54);var r=ct.nodePermissions(e.node,"x");if(r)throw new ct.ErrnoError(r);ct.currentPath=e.path},createDefaultDirectories:function(){ct.mkdir("/tmp"),ct.mkdir("/home"),ct.mkdir("/home/web_user")},createDefaultDevices:function(){ct.mkdir("/dev"),ct.registerDevice(ct.makedev(1,3),{read:function(){return 0},write:function(t,e,r,n,o){return n}}),ct.mkdev("/dev/null",ct.makedev(1,3)),at.register(ct.makedev(5,0),at.default_tty_ops),at.register(ct.makedev(6,0),at.default_tty1_ops),ct.mkdev("/dev/tty",ct.makedev(5,0)),ct.mkdev("/dev/tty1",ct.makedev(6,0));var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}return function(){L("randomDevice")}}();ct.createDevice("/dev","random",t),ct.createDevice("/dev","urandom",t),ct.mkdir("/dev/shm"),ct.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){ct.mkdir("/proc"),ct.mkdir("/proc/self"),ct.mkdir("/proc/self/fd"),ct.mount({mount:function(){var t=ct.createNode("/proc/self","fd",16895,73);return t.node_ops={lookup:function(t,e){var r=+e,n=ct.getStream(r);if(!n)throw new ct.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?ct.createDevice("/dev","stdin",o.stdin):ct.symlink("/dev/tty","/dev/stdin"),o.stdout?ct.createDevice("/dev","stdout",null,o.stdout):ct.symlink("/dev/tty","/dev/stdout"),o.stderr?ct.createDevice("/dev","stderr",null,o.stderr):ct.symlink("/dev/tty1","/dev/stderr"),ct.open("/dev/stdin",0),ct.open("/dev/stdout",1),ct.open("/dev/stderr",1)},ensureErrnoError:function(){ct.ErrnoError||(ct.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){this.errno=t},this.setErrno(t),this.message="FS error"},ct.ErrnoError.prototype=new Error,ct.ErrnoError.prototype.constructor=ct.ErrnoError,[44].forEach((function(t){ct.genericErrors[t]=new ct.ErrnoError(t),ct.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:function(){ct.ensureErrnoError(),ct.nameTable=new Array(4096),ct.mount(ut,{},"/"),ct.createDefaultDirectories(),ct.createDefaultDevices(),ct.createSpecialDirectories(),ct.filesystems={MEMFS:ut}},init:function(t,e,r){ct.init.initialized=!0,ct.ensureErrnoError(),o.stdin=t||o.stdin,o.stdout=e||o.stdout,o.stderr=r||o.stderr,ct.createStandardStreams()},quit:function(){ct.init.initialized=!1;var t=o._fflush;t&&t(0);for(var e=0;e<ct.streams.length;e++){var r=ct.streams[e];r&&ct.close(r)}},getMode:function(t,e){var r=0;return t&&(r|=365),e&&(r|=146),r},findObject:function(t,e){var r=ct.analyzePath(t,e);return r.exists?r.object:null},analyzePath:function(t,e){try{t=(n=ct.lookupPath(t,{follow:!e})).path}catch(t){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ct.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ot.basename(t),n=ct.lookupPath(t,{follow:!e}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(t){r.error=t.errno}return r},createPath:function(t,e,r,n){t="string"==typeof t?t:ct.getPath(t);for(var o=e.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ot.join2(t,i);try{ct.mkdir(a)}catch(t){}t=a}}return a},createFile:function(t,e,r,n,o){var i=ot.join2("string"==typeof t?t:ct.getPath(t),e),a=ct.getMode(n,o);return ct.create(i,a)},createDataFile:function(t,e,r,n,o,i){var a=e?ot.join2("string"==typeof t?t:ct.getPath(t),e):t,s=ct.getMode(n,o),u=ct.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}ct.chmod(u,146|s);var d=ct.open(u,577);ct.write(d,r,0,r.length,0,i),ct.close(d),ct.chmod(u,s)}return u},createDevice:function(t,e,r,n){var o=ot.join2("string"==typeof t?t:ct.getPath(t),e),i=ct.getMode(!!r,!!n);ct.createDevice.major||(ct.createDevice.major=64);var a=ct.makedev(ct.createDevice.major++,0);return ct.registerDevice(a,{open:function(t){t.seekable=!1},close:function(t){n&&n.buffer&&n.buffer.length&&n(10)},read:function(t,e,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(t){throw new ct.ErrnoError(29)}if(void 0===u&&0===a)throw new ct.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(t.node.timestamp=Date.now()),a},write:function(t,e,r,o,i){for(var a=0;a<o;a++)try{n(e[r+a])}catch(t){throw new ct.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),a}}),ct.mkdev(o,i,a)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=Dt(s(t.url),!0),t.usedBytes=t.contents.length}catch(t){throw new ct.ErrnoError(29)}},createLazyFile:function(t,e,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,r=t/this.chunkSize|0;return this.getter(r)[e]}},i.prototype.setDataGetter=function(t){this.getter=t},i.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",r,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+r+". Status: "+t.status);var e,n=Number(t.getResponseHeader("Content-length")),o=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,i=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(t){var e=t*a,o=(t+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[t]&&(s.chunks[t]=function(t,e){if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+t+"-"+e),"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 "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Dt(o.responseText||"",!0)}(e,o)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,l("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,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 a={isDevice:!1,url:r},s=ct.createFile(t,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((function(t){var e=s.stream_ops[t];u[t]=function(){return ct.forceLoadFile(s),e.apply(null,arguments)}})),u.read=function(t,e,r,n,o){ct.forceLoadFile(s);var i=t.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[r+u]=i[o+u];else for(u=0;u<a;u++)e[r+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:function(t,e,r,n,i,a,s,u,c,f){Browser.init();var l=e?it.resolve(ot.join2(t,e)):t;function d(r){function d(r){f&&f(),u||ct.createDataFile(t,e,r,n,i,c),a&&a(),I()}var p=!1;o.preloadPlugins.forEach((function(t){p||t.canHandle(l)&&(t.handle(r,l,d,(function(){s&&s(),I()})),p=!0)})),p||d(r)}z(),"string"==typeof r?Browser.asyncLoad(r,(function(t){d(t)}),s):d(r)},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(t,e,r){e=e||function(){},r=r||function(){};var n=ct.indexedDB();try{var o=n.open(ct.DB_NAME(),ct.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=function(){l("creating db"),o.result.createObjectStore(ct.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([ct.DB_STORE_NAME],"readwrite"),i=n.objectStore(ct.DB_STORE_NAME),a=0,s=0,u=t.length;function c(){0==s?e():r()}t.forEach((function(t){var e=i.put(ct.analyzePath(t).object.contents,t);e.onsuccess=function(){++a+s==u&&c()},e.onerror=function(){s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(t,e,r){e=e||function(){},r=r||function(){};var n=ct.indexedDB();try{var o=n.open(ct.DB_NAME(),ct.DB_VERSION)}catch(t){return r(t)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([ct.DB_STORE_NAME],"readonly")}catch(t){return void r(t)}var a=i.objectStore(ct.DB_STORE_NAME),s=0,u=0,c=t.length;function f(){0==u?e():r()}t.forEach((function(t){var e=a.get(t);e.onsuccess=function(){ct.analyzePath(t).exists&&ct.unlink(t),ct.createDataFile(ot.dirname(t),ot.basename(t),e.result,!0,!0,!0),++s+u==c&&f()},e.onerror=function(){u++,s+u==c&&f()}})),i.onerror=r},o.onerror=r}},ft={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(t,e){if("/"!==e[0]){var r;if(-100===t)r=ct.cwd();else{var n=ct.getStream(t);if(!n)throw new ct.ErrnoError(8);r=n.path}e=ot.join2(r,e)}return e},doStat:function(t,e,r){try{var n=t(e)}catch(t){if(t&&t.node&&ot.normalize(e)!==ot.normalize(ct.getPath(t.node)))return-54;throw t}return k[r>>2]=n.dev,k[r+4>>2]=0,k[r+8>>2]=n.ino,k[r+12>>2]=n.mode,k[r+16>>2]=n.nlink,k[r+20>>2]=n.uid,k[r+24>>2]=n.gid,k[r+28>>2]=n.rdev,k[r+32>>2]=0,Y=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+40>>2]=Y[0],k[r+44>>2]=Y[1],k[r+48>>2]=4096,k[r+52>>2]=n.blocks,k[r+56>>2]=n.atime.getTime()/1e3|0,k[r+60>>2]=0,k[r+64>>2]=n.mtime.getTime()/1e3|0,k[r+68>>2]=0,k[r+72>>2]=n.ctime.getTime()/1e3|0,k[r+76>>2]=0,Y=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[r+80>>2]=Y[0],k[r+84>>2]=Y[1],0},doMsync:function(t,e,r,n,o){var i=E.slice(t,t+r);ct.msync(e,i,o,r,n)},doMkdir:function(t,e){return"/"===(t=ot.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),ct.mkdir(t,e,0),0},doMknod:function(t,e,r){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return ct.mknod(t,e,r),0},doReadlink:function(t,e,r){if(r<=0)return-28;var n=ct.readlink(t),o=Math.min(r,x(n)),i=g[e+o];return M(n,E,e,r+1),g[e+o]=i,o},doAccess:function(t,e){if(-8&e)return-28;var r;if(!(r=ct.lookupPath(t,{follow:!0}).node))return-44;var n="";return 4&e&&(n+="r"),2&e&&(n+="w"),1&e&&(n+="x"),n&&ct.nodePermissions(r,n)?-2:0},doDup:function(t,e,r){var n=ct.getStream(r);return n&&ct.close(n),ct.open(t,e,0,r,r).fd},doReadv:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=ct.read(t,g,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=ct.write(t,g,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return ft.varargs+=4,k[ft.varargs-4>>2]},getStr:function(t){return P(t)},getStreamFromFD:function(t){var e=ct.getStream(t);if(!e)throw new ct.ErrnoError(8);return e},get64:function(t,e){return t}};function lt(t){try{return h.grow(t-y.byteLength+65535>>>16),A(h.buffer),1}catch(t){}}var dt={};function pt(){if(!pt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(var e in dt)t[e]=dt[e];var r=[];for(var e in t)r.push(e+"="+t[e]);pt.strings=r}return pt.strings}function mt(t){return t%4==0&&(t%100!=0||t%400==0)}function ht(t,e){for(var r=0,n=0;n<=e;r+=t[n++]);return r}var _t=[31,29,31,30,31,30,31,31,30,31,30,31],vt=[31,28,31,30,31,30,31,31,30,31,30,31];function wt(t,e){for(var r=new Date(t.getTime());e>0;){var n=mt(r.getFullYear()),o=r.getMonth(),i=(n?_t:vt)[o];if(!(e>i-r.getDate()))return r.setDate(r.getDate()+e),r;e-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function yt(t,e,r,n){var o=k[n+40>>2],i={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:o?P(o):""},a=P(r),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)a=a.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(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function d(t,e){return l(t,e,"0")}function p(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function m(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function h(t){var e=wt(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=m(r),i=m(n);return p(o,e)<=0?p(i,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var _={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return f[t.tm_mon].substring(0,3)},"%B":function(t){return f[t.tm_mon]},"%C":function(t){return d((t.tm_year+1900)/100|0,2)},"%d":function(t){return d(t.tm_mday,2)},"%e":function(t){return l(t.tm_mday,2," ")},"%g":function(t){return h(t).toString().substring(2)},"%G":function(t){return h(t)},"%H":function(t){return d(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),d(e,2)},"%j":function(t){return d(t.tm_mday+ht(mt(t.tm_year+1900)?_t:vt,t.tm_mon-1),3)},"%m":function(t){return d(t.tm_mon+1,2)},"%M":function(t){return d(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return d(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=new Date(t.tm_year+1900,0,1),r=0===e.getDay()?e:wt(e,7-e.getDay()),n=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(p(r,n)<0){var o=ht(mt(n.getFullYear())?_t:vt,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,e)?"01":"00"},"%V":function(t){var e,r=new Date(t.tm_year+1900,0,4),n=new Date(t.tm_year+1901,0,4),o=m(r),i=m(n),a=wt(new Date(t.tm_year+1900,0,1),t.tm_yday);return p(a,o)<0?"53":p(i,a)<=0?"01":(e=o.getFullYear()<t.tm_year+1900?t.tm_yday+32-o.getDate():t.tm_yday+1-o.getDate(),d(Math.ceil(e/7),2))},"%w":function(t){return t.tm_wday},"%W":function(t){var e=new Date(t.tm_year,0,1),r=1===e.getDay()?e:wt(e,0===e.getDay()?1:7-e.getDay()+1),n=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(p(r,n)<0){var o=ht(mt(n.getFullYear())?_t:vt,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,e)?"01":"00"},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,r=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(r?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var u in _)a.indexOf(u)>=0&&(a=a.replace(new RegExp(u,"g"),_[u](i)));var v=Dt(a,!1);return v.length>e?0:(function(t,e){g.set(t,e)}(v,t),v.length-1)}var gt=[],Et=function(t,e,r,n){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=ct.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},bt=365,kt=146;function Dt(t,e,r){var n=r>0?r:x(t)+1,o=new Array(n),i=M(t,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(Et.prototype,{read:{get:function(){return(this.mode&bt)===bt},set:function(t){t?this.mode|=bt:this.mode&=-366}},write:{get:function(){return(this.mode&kt)===kt},set:function(t){t?this.mode|=kt:this.mode&=-147}},isFolder:{get:function(){return ct.isDir(this.mode)}},isDevice:{get:function(){return ct.isChrdev(this.mode)}}}),ct.FSNode=Et,ct.staticInit(),O.push({func:function(){Pt()}});var St,Ft={F:function(t,e){return function(t,e){var r;if(0===t)r=Date.now();else{if(1!==t&&4!==t)return K(28),-1;r=V()}return k[e>>2]=r/1e3|0,k[e+4>>2]=r%1e3*1e3*1e3|0,0}(t,e)},h:function(t){return Tt(t+rt)+rt},g:function(t,e,r){throw new nt(t).init(e,r),t},K:function(t,e){try{return t=ft.getStr(t),ft.doAccess(t,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},s:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);switch(e){case 0:return(o=ft.get())<0?-28:ct.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=ft.get();return n.flags|=o,0;case 12:return o=ft.get(),b[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return K(28),-1;default:return-28}}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},M:function(t,e){try{var r=ft.getStreamFromFD(t);return ft.doStat(ct.stat,r.path,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},l:function(){return 42},H:function(t,e,r){ft.varargs=r;try{var n=ft.getStreamFromFD(t);switch(e){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=ft.get();return k[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=ft.get(),ct.ioctl(n,e,o);case 21523:case 21524:return n.tty?0:-59;default:L("bad ioctl syscall "+e)}}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},I:function(t,e,r,n,o,i){try{return function(t,e,r,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&t%16384!=0)return-28;if(0!=(32&n)){if(!(a=Ut(16384,e)))return-48;zt(a,0,e),s=!0}else{var u=ct.getStream(o);if(!u)return-8;var c=ct.mmap(u,t,e,i,r,n);a=c.ptr,s=c.allocated}return ft.mappings[a]={malloc:a,len:e,allocated:s,fd:o,prot:r,flags:n,offset:i},a}(t,e,r,n,o,i)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},J:function(t,e){try{return function(t,e){if(-1==(0|t)||0===e)return-28;var r=ft.mappings[t];if(!r)return 0;if(e===r.len){var n=ct.getStream(r.fd);2&r.prot&&ft.doMsync(t,n,e,r.flags,r.offset),ct.munmap(n),ft.mappings[t]=null,r.allocated&&Bt(r.malloc)}return 0}(t,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},t:function(t,e,r){ft.varargs=r;try{var n=ft.getStr(t),o=r?ft.get():0;return ct.open(n,e,o).fd}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},L:function(t,e){try{return t=ft.getStr(t),ft.doStat(ct.stat,t,e)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},E:function(t){try{return t=ft.getStr(t),ct.unlink(t),0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),-t.errno}},q:function(){L()},Q:function(t,e,r){var n=function(t,e){var r;for(gt.length=0,e>>=2;r=E[t++];){var n=r<105;n&&1&e&&e++,gt.push(n?D[e++>>1]:k[e]),++e}return gt}(e,r);return X[t].apply(null,n)},c:function(t,e){return function(t,e){throw Ht(t,e||1),"longjmp"}(t,e)},y:function(t,e,r){E.copyWithin(t,e,e+r)},z:function(t){t>>>=0;var e=E.length,r=2147483648;if(t>r)return!1;for(var n,o,i=1;i<=4;i*=2){var a=e*(1+.2/i);if(a=Math.min(a,t+100663296),lt(Math.min(r,((n=Math.max(16777216,t,a))%(o=65536)>0&&(n+=o-n%o),n))))return!0}return!1},C:function(t,e){try{var r=0;return pt().forEach((function(n,o){var i=e+r;k[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)g[e++>>0]=t.charCodeAt(n);r||(g[e>>0]=0)}(n,i),r+=n.length+1})),0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},D:function(t,e){try{var r=pt();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},e:function(t){!function(t,e){e&&m&&0===t||(m||(o.onExit&&o.onExit(t),v=!0),c(t,new Wt(t)))}(t)},k:function(t){try{var e=ft.getStreamFromFD(t);return ct.close(e),0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},B:function(t,e){try{var r=ft.getStreamFromFD(t),n=r.tty?2:ct.isDir(r.mode)?3:ct.isLink(r.mode)?7:4;return g[e>>0]=n,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},G:function(t,e,r,n){try{var o=ft.getStreamFromFD(t),i=ft.doReadv(o,e,r);return k[n>>2]=i,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},x:function(t,e,r,n,o){try{var i=ft.getStreamFromFD(t),a=4294967296*r+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(ct.llseek(i,a,n),Y=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?(0|Math.min(+Math.floor(W/4294967296),4294967295))>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],k[o>>2]=Y[0],k[o+4>>2]=Y[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},r:function(t,e,r,n){try{var o=ft.getStreamFromFD(t),i=ft.doWritev(o,e,r);return k[n>>2]=i,0}catch(t){return void 0!==ct&&t instanceof ct.ErrnoError||L(t),t.errno}},a:function(){return 0|_},P:function(t){var e=Date.now();return k[t>>2]=e/1e3|0,k[t+4>>2]=e%1e3*1e3|0,0},N:function(t,e){var r=It();try{return R.get(t)(e)}catch(t){if(Lt(r),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},w:function(t){var e=It();try{return R.get(t)()}catch(t){if(Lt(e),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},j:function(t,e){var r=It();try{return R.get(t)(e)}catch(t){if(Lt(r),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},d:function(t,e,r){var n=It();try{return R.get(t)(e,r)}catch(t){if(Lt(n),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},i:function(t,e,r,n){var o=It();try{return R.get(t)(e,r,n)}catch(t){if(Lt(o),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},O:function(t,e,r,n,o,i,a){var s=It();try{return R.get(t)(e,r,n,o,i,a)}catch(t){if(Lt(s),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},f:function(t,e){var r=It();try{R.get(t)(e)}catch(t){if(Lt(r),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},p:function(t,e,r){var n=It();try{R.get(t)(e,r)}catch(t){if(Lt(n),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},o:function(t,e,r,n){var o=It();try{R.get(t)(e,r,n)}catch(t){if(Lt(o),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},n:function(t,e,r,n,o){var i=It();try{R.get(t)(e,r,n,o)}catch(t){if(Lt(i),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},m:function(t,e,r,n,o,i){var a=It();try{R.get(t)(e,r,n,o,i)}catch(t){if(Lt(a),t!==t+0&&"longjmp"!==t)throw t;Ht(1,0)}},b:function(t){_=0|t},A:function(t,e,r,n){return yt(t,e,r,n)},v:function(t){var e=Date.now()/1e3|0;return t&&(k[t>>2]=e),e},u:function(t){return 0!==t&&zt(t,0,16),0}},Pt=(function(){var t={a:Ft};function e(t,e){var r=t.exports;o.asm=r,A((h=o.asm.R).buffer),R=o.asm.S,I()}function r(t){e(t.instance)}function i(e){return(p||"function"!=typeof fetch?Promise.resolve().then((function(){return J(q)})):fetch(q,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+q+"'";return t.arrayBuffer()})).catch((function(){return J(q)}))).then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(t){d("failed to asynchronously prepare wasm: "+t),L(t)}))}if(z(),o.instantiateWasm)try{return o.instantiateWasm(t,e)}catch(t){return d("Module.instantiateWasm callback failed with error: "+t),!1}(p||"function"!=typeof WebAssembly.instantiateStreaming||H(q)||"function"!=typeof fetch?i(r):fetch(q,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(Pt=o.___wasm_call_ctors=o.asm.T).apply(null,arguments)}),Mt=(o.___em_js__array_bounds_check_error=function(){return(o.___em_js__array_bounds_check_error=o.asm.U).apply(null,arguments)},o._emscripten_bind_VoidPtr___destroy___0=function(){return(Mt=o._emscripten_bind_VoidPtr___destroy___0=o.asm.V).apply(null,arguments)}),xt=o._emscripten_bind_Main_layout_3=function(){return(xt=o._emscripten_bind_Main_layout_3=o.asm.W).apply(null,arguments)},At=o._emscripten_bind_Main_lastError_0=function(){return(At=o._emscripten_bind_Main_lastError_0=o.asm.X).apply(null,arguments)},Rt=o._emscripten_bind_Main_createFile_2=function(){return(Rt=o._emscripten_bind_Main_createFile_2=o.asm.Y).apply(null,arguments)},Ct=o._emscripten_bind_Main_setYInvert_1=function(){return(Ct=o._emscripten_bind_Main_setYInvert_1=o.asm.Z).apply(null,arguments)},Ot=o._emscripten_bind_Main_setNop_1=function(){return(Ot=o._emscripten_bind_Main_setNop_1=o.asm._).apply(null,arguments)},jt=o._emscripten_bind_Main___destroy___0=function(){return(jt=o._emscripten_bind_Main___destroy___0=o.asm.$).apply(null,arguments)},Tt=o._malloc=function(){return(Tt=o._malloc=o.asm.aa).apply(null,arguments)},Bt=o._free=function(){return(Bt=o._free=o.asm.ba).apply(null,arguments)},Nt=o.___errno_location=function(){return(Nt=o.___errno_location=o.asm.ca).apply(null,arguments)},zt=o._memset=function(){return(zt=o._memset=o.asm.da).apply(null,arguments)},It=o.stackSave=function(){return(It=o.stackSave=o.asm.ea).apply(null,arguments)},Lt=o.stackRestore=function(){return(Lt=o.stackRestore=o.asm.fa).apply(null,arguments)},Ht=o._setThrew=function(){return(Ht=o._setThrew=o.asm.ga).apply(null,arguments)},Ut=o._memalign=function(){return(Ut=o._memalign=o.asm.ha).apply(null,arguments)};function Wt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Yt(t){function r(){St||(St=!0,o.calledRun=!0,v||(o.noFSInit||ct.init.initialized||ct.init(),at.init(),G(O),ct.ignorePermissions=!1,G(j),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),T.unshift(t);var t;G(T)}()))}B>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),C.unshift(t);var t;G(C)}(),B>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r()))}if(N=function t(){St||Yt(),St||(N=t)},o.run=Yt,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function qt(){}function Jt(t){return(t||qt).__cache__}function Vt(t,e){var r=Jt(e),n=r[t];return n||((n=Object.create((e||qt).prototype)).ptr=t,r[t]=n)}m=!0,Yt(),qt.prototype=Object.create(qt.prototype),qt.prototype.constructor=qt,qt.prototype.__class__=qt,qt.__cache__={},o.WrapperObject=qt,o.getCache=Jt,o.wrapPointer=Vt,o.castObject=function(t,e){return Vt(t.ptr,e)},o.NULL=Vt(0),o.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Jt(t.__class__)[t.ptr]},o.compare=function(t,e){return t.ptr===e.ptr},o.getPointer=function(t){return t.ptr},o.getClass=function(t){return t.__class__};var Xt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Xt.needed){for(var t=0;t<Xt.temps.length;t++)o._free(Xt.temps[t]);Xt.temps.length=0,o._free(Xt.buffer),Xt.buffer=0,Xt.size+=Xt.needed,Xt.needed=0}Xt.buffer||(Xt.size+=128,Xt.buffer=o._malloc(Xt.size),w(Xt.buffer)),Xt.pos=0},alloc:function(t,e){w(Xt.buffer);var r,n=e.BYTES_PER_ELEMENT,i=t.length*n;return i=i+7&-8,Xt.pos+i>=Xt.size?(w(i>0),Xt.needed+=i,r=o._malloc(i),Xt.temps.push(r)):(r=Xt.buffer+Xt.pos,Xt.pos+=i),r},copy:function(t,e,r){switch(r>>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;n<t.length;n++)e[r+n]=t[n]}};function Gt(t){if("string"==typeof t){var e=Dt(t),r=Xt.alloc(e,g);return Xt.copy(e,g,r),r}return t}function Kt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function $t(){throw"cannot construct a Main, no constructor in IDL"}return Kt.prototype=Object.create(qt.prototype),Kt.prototype.constructor=Kt,Kt.prototype.__class__=Kt,Kt.__cache__={},o.VoidPtr=Kt,Kt.prototype.__destroy__=Kt.prototype.__destroy__=function(){var t=this.ptr;Mt(t)},$t.prototype=Object.create(qt.prototype),$t.prototype.constructor=$t,$t.prototype.__class__=$t,$t.__cache__={},o.Main=$t,$t.prototype.layout=$t.prototype.layout=function(t,e,r){var n=this.ptr;return Xt.prepare(),t=t&&"object"==typeof t?t.ptr:Gt(t),e=e&&"object"==typeof e?e.ptr:Gt(e),r=r&&"object"==typeof r?r.ptr:Gt(r),P(xt(n,t,e,r))},$t.prototype.lastError=$t.prototype.lastError=function(){var t=this.ptr;return P(At(t))},$t.prototype.createFile=$t.prototype.createFile=function(t,e){var r=this.ptr;Xt.prepare(),t=t&&"object"==typeof t?t.ptr:Gt(t),e=e&&"object"==typeof e?e.ptr:Gt(e),Rt(r,t,e)},$t.prototype.setYInvert=$t.prototype.setYInvert=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ct(e,t)},$t.prototype.setNop=$t.prototype.setNop=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ot(e,t)},$t.prototype.__destroy__=$t.prototype.__destroy__=function(){var t=this.ptr;jt(t)},t.ready});t.exports=n})),l=Object.freeze(Object.assign(Object.create(null),f,{default:f})),d=function(){return(d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n};function m(t){return{path:t.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="'+t.width+'" height="'+t.height+'"></svg>'}}function h(t,e){var r,n=d({images:[],files:[]},e);p(n.files,(r=n.images,r.map(m))).forEach((function(e){return t.Main.prototype.createFile(e.path,e.data)}))}var _={layout:function(t,e,r,n){return void 0===e&&(e="svg"),void 0===r&&(r="dot"),t?a(l,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((function(o){h(o,n),o.Main.prototype.setYInvert((null==n?void 0:n.yInvert)?1:0),o.Main.prototype.setNop((null==n?void 0:n.nop)?null==n?void 0:n.nop:0);var i=o.Main.prototype.layout(t,e,r);if(!i)throw new Error(o.Main.prototype.lastError());return i})):Promise.resolve("")},circo:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"circo",r)},dot:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"dot",r)},fdp:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"fdp",r)},sfdp:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"sfdp",r)},neato:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"neato",r)},osage:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"osage",r)},patchwork:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"patchwork",r)},twopi:function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"twopi",r)}},v=function(){function t(t){this._wasm=t}return t.prototype.layout=function(t,e,r,n){if(void 0===e&&(e="svg"),void 0===r&&(r="dot"),!t)return"";h(this._wasm,n),this._wasm.Main.prototype.setYInvert((null==n?void 0:n.yInvert)?1:0),this._wasm.Main.prototype.setNop((null==n?void 0:n.nop)?null==n?void 0:n.nop:0);var o=this._wasm.Main.prototype.layout(t,e,r);if(!o)throw new Error(this._wasm.Main.prototype.lastError());return o},t.prototype.circo=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"circo",r)},t.prototype.dot=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"dot",r)},t.prototype.fdp=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"fdp",r)},t.prototype.sfdp=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"sfdp",r)},t.prototype.neato=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"neato",r)},t.prototype.osage=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"osage",r)},t.prototype.patchwork=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"patchwork",r)},t.prototype.twopi=function(t,e,r){return void 0===e&&(e="svg"),this.layout(t,e,"twopi",r)},t}();t.GraphvizSync=v,t.StackParser=u,t.graphviz=_,t.graphvizSync=function(t,e){return a(l,t,e).then((function(t){return new v(t)}))},t.parse=c,t.wasmFolder=i,Object.defineProperty(t,"__esModule",{value:!0})}));
|