1import{d as to,g as no}from"./vendor-B_8mDTpQ.js";var je={exports:{}};const oo={},ao=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"})),Wr=to(ao);(function($e,lo){var xe=(()=>{var Hr;var sr=typeof document<"u"?(Hr=document.currentScript)==null?void 0:Hr.src:void 0;return typeof __filename<"u"&&(sr=sr||__filename),function(Oe={}){var Vr,d=Oe,qr,lr,Ne=new Promise((r,e)=>{qr=r,lr=e}),Ue=typeof window=="object",ur=typeof importScripts=="function",er=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer",Gr=Object.assign({},d),br="./this.program",Xr=(r,e)=>{throw e},j="";function Ie(r){return d.locateFile?d.locateFile(r,j):j+r}var fr,tr;if(er){var Fr=Wr,Yr=Wr;j=__dirname+"/",tr=r=>{r=mr(r)?new URL(r):Yr.normalize(r);var e=Fr.readFileSync(r);return e},fr=(r,e=!0)=>(r=mr(r)?new URL(r):Yr.normalize(r),new Promise((t,n)=>{Fr.readFile(r,e?void 0:"utf8",(a,i)=>{a?n(a):t(e?i.buffer:i)})})),!d.thisProgram&&process.argv.length>1&&(br=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),Xr=(r,e)=>{throw process.exitCode=r,e}}else(Ue||ur)&&(ur?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),sr&&(j=sr),j.startsWith("blob:")?j="":j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1),ur&&(tr=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),fr=r=>mr(r)?new Promise((e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){e(n.response);return}t(n.status)},n.onerror=t,n.send(null)}):fetch(r,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url))));var Sr=d.print||console.log.bind(console),U=d.printErr||console.error.bind(console);Object.assign(d,Gr),Gr=null,d.arguments&&d.arguments,d.thisProgram&&(br=d.thisProgram);var dr=d.wasmBinary,cr,Ar=!1;function ze(r,e){r||or(e)}var R,C,W,vr,p,k,Kr,Jr;function Zr(){var r=cr.buffer;d.HEAP8=R=new Int8Array(r),d.HEAP16=W=new Int16Array(r),d.HEAPU8=C=new Uint8Array(r),d.HEAPU16=vr=new Uint16Array(r),d.HEAP32=p=new Int32Array(r),d.HEAPU32=k=new Uint32Array(r),d.HEAPF32=Kr=new Float32Array(r),d.HEAPF64=Jr=new Float64Array(r)}var Qr=[],re=[],ee=[],te=!1;function Le(){var r=d.preRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(He)),Pr(Qr)}function Be(){te=!0,!d.noFSInit&&!o.initialized&&o.init(),o.ignorePermissions=!1,Pr(re)}function We(){var r=d.postRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(qe)),Pr(ee)}function He(r){Qr.unshift(r)}function Ve(r){re.unshift(r)}function qe(r){ee.unshift(r)}var V=0,nr=null;function uo(r){return r}function Tr(r){var e;V++,(e=d.monitorRunDependencies)==null||e.call(d,V)}function hr(r){var t;if(V--,(t=d.monitorRunDependencies)==null||t.call(d,V),V==0&&nr){var e=nr;nr=null,e()}}function or(r){var t;(t=d.onAbort)==null||t.call(d,r),r="Aborted("+r+")",U(r),Ar=!0,r+=". Build with -sASSERTIONS for more info.",te&&Ce();var e=new WebAssembly.RuntimeError(r);throw lr(e),e}var Ge="data:application/octet-stream;base64,",ne=r=>r.startsWith(Ge),mr=r=>r.startsWith("file://");function Xe(){var r="occt-import-js.wasm";return ne(r)?r:Ie(r)}var Dr;function oe(r){if(r==Dr&&dr)return new Uint8Array(dr);if(tr)return tr(r);throw"both async and sync fetching of the wasm failed"}function Ye(r){return dr?Promise.resolve().then(()=>oe(r)):fr(r).then(e=>new Uint8Array(e),()=>oe(r))}function ae(r,e,t){return Ye(r).then(n=>WebAssembly.instantiate(n,e)).then(t,n=>{U(`failed to asynchronously prepare wasm: ${n}`),or(n)})}function Ke(r,e,t,n){return!r&&typeof WebAssembly.instantiateStreaming=="function"&&!ne(e)&&!mr(e)&&!er&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var i=WebAssembly.instantiateStreaming(a,t);return i.then(n,function(s){return U(`wasm streaming compile failed: ${s}`),U("falling back to ArrayBuffer instantiation"),ae(e,t,n)})}):ae(e,t,n)}function Je(){return{a:eo}}function Ze(){var r=Je();function e(n,a){return T=n.exports,cr=T._,Zr(),we=T.ba,Ve(T.$),hr(),T}Tr();function t(n){e(n.instance)}if(d.instantiateWasm)try{return d.instantiateWasm(r,e)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),lr(n)}return Dr??(Dr=Xe()),Ke(dr,Dr,r,t).catch(lr),{}}var g,S;function Qe(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var Pr=r=>
vendor: 2,693 bytes, line 1
1{r.forEach(e=>e(d))},rt=d.noExitRuntime||!0,b={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(r).slice(1)},normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var a=r[n];a==="."?r.splice(n,1):a===".."?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=b.isAbs(r),t=r.substr(-1)==="/";return r=b.normalizeArray(r.split("/").filter(n=>!!n),!e).join("/"),!r&&!e&&(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=b.splitPath(r),t=e[0],n=e[1];return!t&&!n?".":(n&&(n=n.substr(0,n.length-1)),t+n)},basename:r=>{if(r==="/")return"/";r=b.normalize(r),r=r.replace(/\/$/,"");var e=r.lastIndexOf("/");return e===-1?r:r.substr(e+1)},join:(...r)=>b.normalize(r.join("/")),join2:(r,e)=>b.normalize(r+"/"+e)},et=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(er)try{var r=Wr,e=r.randomFillSync;if(e)return n=>r.randomFillSync(n);var t=r.randomBytes;return n=>(n.set(t(n.byteLength)),n)}catch{}or("initRandomDevice")},ie=r=>(ie=et())(r),I={resolve:(...r)=>{for(var e="",t=!1,n=r.length-1;n>=-1&&!t;n--){var a=n>=0?r[n]:o.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";e=a+"/"+e,t=b.isAbs(a)}return e=b.normalizeArray(e.split("/").filter(i=>!!i),!t).join("/"),(t?"/":"")+e||"."},relative:(r,e)=>{r=I.resolve(r).substr(1),e=I.resolve(e).substr(1);function t(f){for(var c=0;c<f.length&&f[c]==="";c++);for(var v=f.length-1;v>=0&&f[v]==="";v--);return c>v?[]:f.slice(c,v-c+1)}for(var n=t(r.split("/")),a=t(e.split("/")),i=Math.min(n.length,a.length),s=i,l=0;l<i;l++)if(n[l]!==a[l]){s=l;break}for(var u=[],l=s;l<n.length;l++)u.push("..");return u=u.concat(a.slice(s)),u.join("/")}},se=typeof TextDecoder<"u"?new TextDecoder:void 0,Y=(r,e=0,t=NaN)=>{for(var n=e+t,a=e;r[a]&&!(a>=n);)++a;if(a-e>16&&r.buffer&&se)return se.decode(r.subarray(e,a));for(var i="";e<a;){var s=r[e++];if(!(s&128)){i+=String.fromCharCode(s);continue}var l=r[e++]&63;if((s&224)==192){i+=String.fromCharCode((s&31)<<6|l);continue}var u=r[e++]&63;if((s&240)==224?s=(s&15)<<12|l<<6|u:s=(s&7)<<18|l<<12|u<<6|r[e++]&63,s<65536)i+=String.fromCharCode(s);else{var f=s-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i},Cr=[],pr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Rr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,i=t+n-1,s=0;s<r.length;++s){var l=r.charCodeAt(s);if(l>=55296&&l<=57343){var u=r.charCodeAt(++s);l=65536+((l&1023)<<10)|u&1023}if(l<=127){if(t>=i)break;e[t++]=l}
vendor: 5,549 bytes, lines 1-2
1else if(l<=2047){if(t+1>=i)break;e[t++]=192|l>>6,e[t++]=128|l&63}else if(l<=65535){if(t+2>=i)break;e[t++]=224|l>>12,e[t++]=128|l>>6&63,e[t++]=128|l&63}else{if(t+3>=i)break;e[t++]=240|l>>18,e[t++]=128|l>>12&63,e[t++]=128|l>>6&63,e[t++]=128|l&63}}return e[t]=0,t-a};function le(r,e,t){var n=pr(r)+1,a=new Array(n),i=Rr(r,a,0,a.length);return a.length=i,a}var tt=()=>{if(!Cr.length){var r=null;if(er){var e=256,t=Buffer.alloc(e),n=0,a=process.stdin.fd;try{n=Fr.readSync(a,t,0,e)}catch(i){if(i.toString().includes("EOF"))n=0;else throw i}n>0&&(r=t.slice(0,n).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(r=window.prompt("Input: "),r!==null&&(r+=` 2`));if(!r)return null;Cr=le(r)}return Cr.shift()},q={ttys:[],init(){},shutdown(){},register(r,e){q.ttys[r]={input:[],output:[],ops:e},o.registerDevice(r,q.stream_ops)},stream_ops:{open(r){var e=q.ttys[r.node.rdev];if(!e)throw new o.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,a){if(!r.tty||!r.tty.ops.get_char)throw new o.ErrnoError(60);for(var i=0,s=0;s<n;s++){var l;try{l=r.tty.ops.get_char(r.tty)}catch{throw new o.ErrnoError(29)}if(l===void 0&&i===0)throw new o.ErrnoError(6);if(l==null)break;i++,e[t+s]=l}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,n,a){if(!r.tty||!r.tty.ops.put_char)throw new o.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch{throw new o.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char(r){return tt()},put_char(r,e){e===null||e===10?(Sr(Y(r.output)),r.output=[]):e!=0&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(Sr(Y(r.output)),r.output=[])},ioctl_tcgets(r){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(r,e,t){return 0},ioctl_tiocgwinsz(r){return[24,80]}},default_tty1_ops:{put_char(r,e){e===null||e===10?(U(Y(r.output)),r.output=[]):e!=0&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(U(Y(r.output)),r.output=[])}}},nt=(r,e)=>{C.fill(0,r,r+e)},ue=(r,e)=>Math.ceil(r/e)*e,fe=r=>{r=ue(r,65536);var e=Pe(65536,r);return e&&nt(e,r),e},w={ops_table:null,mount(r){return w.createNode(null,"/",16895,0)},createNode(r,e,t,n){if(o.isBlkdev(t)||o.isFIFO(t))throw new o.ErrnoError(63);w.ops_table||(w.ops_table={dir:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr,lookup:w.node_ops.lookup,mknod:w.node_ops.mknod,rename:w.node_ops.rename,unlink:w.node_ops.unlink,rmdir:w.node_ops.rmdir,readdir:w.node_ops.readdir,symlink:w.node_ops.symlink},stream:{llseek:w.stream_ops.llseek}},file:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr},stream:{llseek:w.stream_ops.llseek,read:w.stream_ops.read,write:w.stream_ops.write,allocate:w.stream_ops.allocate,mmap:w.stream_ops.mmap,msync:w.stream_ops.msync}},link:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr,readlink:w.node_ops.readlink},stream:{}},chrdev:{node:{getattr:w.node_ops.getattr,setattr:w.node_ops.setattr},stream:o.chrdev_stream_ops}});var a=o.createNode(r,e,t,n);return o.isDir(a.mode)?(a.node_ops=w.ops_table.dir.node,a.stream_ops=w.ops_table.dir.stream,a.contents={}):o.isFile(a.mode)?(a.node_ops=w.ops_table.file.node,a.stream_ops=w.ops_table.file.stream,a.usedBytes=0,a.contents=null):o.isLink(a.mode)?(a.node_ops=w.ops_table.link.node,a.stream_ops=w.ops_table.link.stream):o.isChrdev(a.mode)&&(a.node_ops=w.ops_table.chrdev.node,a.stream_ops=w.ops_table.chrdev.stream),a.timestamp=Date.now(),r&&(r.contents[e]=a,r.timestamp=a.timestamp),a},getFileDataAsTypedArray(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1024*1024;e=Math.max(e,t*(t<n?2:1.125)>>>0),t!=0&&(e=Math.max(e,256));var a=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(a.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(e==0)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=o.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,o.isDir(r.mode)?e.size=4096:o.isFile(r.mode)?e.size=r.usedBytes:o.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){e.mode!==void 0&&(r.mode=e.mode),e.timestamp!==void 0&&(r.timestamp=e.timestamp),e.size!==void 0&&w.resizeFileStorage(r,e.size)},lookup(r,e){throw o.genericErrors[44]},mknod(r,e,t,n){return w.createNode(r,e,t,n)},rename(r,e,t){if(o.isDir(r.mode)){var n;try{n=o.lookupNode(e,t)}catch{}if(n)for(var a in n.contents)throw new o.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=o.lookupNode(r,e);for(var n in t.contents)throw new o.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t of Object.keys(r.contents))e.push(t);return e},symlink(r,e,t){var n=w.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!o.isLink(r.mode))throw new o.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,a){var i=r.node.contents;if(a>
vendor: 1,239 bytes, line 2
2=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-a,n);if(s>8&&i.subarray)e.set(i.subarray(a,a+s),t);else for(var l=0;l<s;l++)e[t+l]=i[a+l];return s},write(r,e,t,n,a,i){if(e.buffer===R.buffer&&(i=!1),!n)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=e.subarray(t,t+n),s.usedBytes=n,n;if(s.usedBytes===0&&a===0)return s.contents=e.slice(t,t+n),s.usedBytes=n,n;if(a+n<=s.usedBytes)return s.contents.set(e.subarray(t,t+n),a),n}if(w.expandFileStorage(s,a+n),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(t,t+n),a);else for(var l=0;l<n;l++)s.contents[a+l]=e[t+l];return s.usedBytes=Math.max(s.usedBytes,a+n),n},llseek(r,e,t){var n=e;if(t===1?n+=r.position:t===2&&o.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new o.ErrnoError(28);return n},allocate(r,e,t){w.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,t,n,a){if(!o.isFile(r.node.mode))throw new o.ErrnoError(43);var i,s,l=r.node.contents;if(!(a&2)&&l&&l.buffer===R.buffer)s=!1,i=l.byteOffset;else{if(s=!0,i=fe(e),!i)throw new o.ErrnoError(48);l&&((t>0||t+e<l.length)&&(l.subarray?l=l.subarray(t,t+e):l=Array.prototype.slice.call(l,t,t+e)),R.set(l,i
2))}return{ptr:i,allocated:s}},msync(r,e,t,n,a){return w.stream_ops.write(r,e,0,n,t,!1),0}}},ot=(r,e,t,n)=>{var a=`al ${r}`;fr(r).then(i=>{e(new Uint8Array(i)),a&&hr()},i=>{if(t)t();else throw`Loading data file "${r}" failed.`}),a&&Tr()},at=(r,e,t,n,a,i)=>{o.createDataFile(r,e,t,n,a,i)},it=d.preloadPlugins||[],st=(r,e,t,n)=>{typeof Browser<"u"&&Browser.init();var a=!1;return it.forEach(i=>{a||i.canHandle(e)&&(i.handle(r,e,t,n),a=!0)}),a},lt=(r,e,t,n,a,i,s,l,u,f)=>{var c=e?I.resolve(b.join2(r,e)):r;function v(m){function h(_){f==null||f(),l||at(r,e,_,n,a,u),i==null||i(),hr()}st(m,c,h,()=>{s==null||s(),hr()})||h(m)}Tr(),typeof t=="string"?ot(t,v,s):v(t)},ut=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},t=e[r];if(typeof t>"u")throw new Error(`Unknown file open mode: ${r}`);return t},Mr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},o={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(r){this.name="ErrnoError",this.errno=r}},genericErrors:{},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(r){this.node=r}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=o.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return o.isDir(this.mode)}get isDevice(){return o.isChrdev(this.mode)}},lookupPath(r,e={}){if(r=I.resolve(r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(e=Object.assign(t,e),e.recurse_count>8)throw new o.ErrnoError(32);for(var n=r.split("/").filter(v=>!!v),a=o.root,i="/",s=0;s<n.length;s++){var l=s===n.length-1;if(l&&e.parent)break;if(a=o.lookupNode(a,n[s]),i=b.join2(i,n[s]),o.isMountpoint(a)&&(!l||l&&e.follow_mount)&&(a=a.mounted.root),!l||e.follow)for(var u=0;o.isLink(a.mode);){var f=o.readlink(i);i=I.resolve(b.dirname(i),f);var c=o.lookupPath(i,{recurse_count:e.recurse_count+1});if(a=c.node,u++>40)throw new o.ErrnoError(32)}}return{path:i,node:a}},getPath(r){for(var e;;){if(o.isRoot(r)){var t=r.mount.mountpoint;return e?t[t.length-1]!=="/"?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%o.nameTable.length},hashAddNode(r){var e=o.hashName(r.parent.id,r.name);r.name_next=o.nameTable[e],o.nameTable[e]=r},hashRemoveNode(r){var e=o.hashName(r.parent.id,r.name);if(o.nameTable[e]===r)o.nameTable[e]=r.name_next;else for(var t=o.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=o.mayLookup(r);if(t)throw new o.ErrnoError(t);for(var n=o.hashName(r.id,e),a=o.nameTable[n];a;a=a.name_next){var i=a.name;if(a.parent.id===r.id&&i===e)return a}return o.lookup(r,e)},createNode(r,e,t,n){var a=new o.FSNode(r,e,t,n);return o.hashAddNode(a),a},destroyNode(r){o.hashRemoveNode(r)},isRoot(r){return r===r.parent},isMountpoint(r){return!!r.mounted},isFile(r){return(r&61440)===32768},isDir(r){return(r&61440)===16384},isLink(r){return(r&61440)===40960},isChrdev(r){return(r&61440)===8192},isBlkdev(r){return(r&61440)===24576},isFIFO(r){return(r&61440)===4096},isSocket(r){return(r&49152)===49152},flagsToPermissionString(r){var e=["r","w","rw"][r&3];return r&512&&(e+="w"),e},nodePermissions(r,e){return o.ignorePermissions?0:e.includes("r")&&!(r.mode&292)||e.includes("w")&&!(r.mode&146)||e.includes("x")&&!(r.mode&73)?2:0},mayLookup(r){if(!o.isDir(r.mode))return 54;var e=o.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{var t=o.lookupNode(r,e);return 20}catch{}return o.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=o.lookupNode(r,e)}catch(i){return i.errno}var a=o.nodePermissions(r,"wx");if(a)return a;
vendor: 15,015 bytes, line 2
2if(t){if(!o.isDir(n.mode))return 54;if(o.isRoot(n)||o.getPath(n)===o.cwd())return 10}else if(o.isDir(n.mode))return 31;return 0},mayOpen(r,e){return r?o.isLink(r.mode)?32:o.isDir(r.mode)&&(o.flagsToPermissionString(e)!=="r"||e&512)?31:o.nodePermissions(r,o.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=o.MAX_OPEN_FDS;r++)if(!o.streams[r])return r;throw new o.ErrnoError(33)},getStreamChecked(r){var e=o.getStream(r);if(!e)throw new o.ErrnoError(8);return e},getStream:r=>o.streams[r],createStream(r,e=-1){return r=Object.assign(new o.FSStream,r),e==-1&&(e=o.nextfd()),r.fd=e,o.streams[e]=r,r},closeStream(r){o.streams[r]=null},dupStream(r,e=-1){var n,a;var t=o.createStream(r,e);return(a=(n=t.stream_ops)==null?void 0:n.dup)==null||a.call(n,t),t},chrdev_stream_ops:{open(r){var t,n;var e=o.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,(n=(t=r.stream_ops).open)==null||n.call(t,r)},llseek(){throw new o.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,e)=>r<<8|e,registerDevice(r,e){o.devices[r]={stream_ops:e}},getDevice:r=>o.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts)}return e},syncfs(r,e){typeof r=="function"&&(e=r,r=!1),o.syncFSRequests++,o.syncFSRequests>1&&U(`warning: ${o.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=o.getMounts(o.root.mount),n=0;function a(s){return o.syncFSRequests--,e(s)}function i(s){if(s)return i.errored?void 0:(i.errored=!0,a(s));++n>=t.length&&a(null)}t.forEach(s=>{if(!s.type.syncfs)return i(null);s.type.syncfs(s,r,i)})},mount(r,e,t){var n=t==="/",a=!t,i;if(n&&o.root)throw new o.ErrnoError(10);if(!n&&!a){var s=o.lookupPath(t,{follow_mount:!1});if(t=s.path,i=s.node,o.isMountpoint(i))throw new o.ErrnoError(10);if(!o.isDir(i.mode))throw new o.ErrnoError(54)}var l={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(l);return u.mount=l,l.root=u,n?o.root=u:i&&(i.mounted=l,i.mount&&i.mount.mounts.push(l)),u},unmount(r){var e=o.lookupPath(r,{follow_mount:!1});if(!o.isMountpoint(e.node))throw new o.ErrnoError(28);var t=e.node,n=t.mounted,a=o.getMounts(n);Object.keys(o.nameTable).forEach(s=>{for(var l=o.nameTable[s];l;){var u=l.name_next;a.includes(l.mount)&&o.destroyNode(l),l=u}}),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup(r,e){return r.node_ops.lookup(r,e)},mknod(r,e,t){var n=o.lookupPath(r,{parent:!0}),a=n.node,i=b.basename(r);if(!i||i==="."||i==="..")throw new o.ErrnoError(28);var s=o.mayCreate(a,i);if(s)throw new o.ErrnoError(s);if(!a.node_ops.mknod)throw new o.ErrnoError(63);return a.node_ops.mknod(a,i,e,t)},create(r,e){return e=e!==void 0?e:438,e&=4095,e|=32768,o.mknod(r,e,0)},mkdir(r,e){return e=e!==void 0?e:511,e&=1023,e|=16384,o.mknod(r,e,0)},mkdirTree(r,e){for(var t=r.split("/"),n="",a=0;a<t.length;++a)if(t[a]){n+="/"+t[a];try{o.mkdir(n,e)}catch(i){if(i.errno!=20)throw i}}},mkdev(r,e,t){return typeof t>"u"&&(t=e,e=438),e|=8192,o.mknod(r,e,t)},symlink(r,e){if(!I.resolve(r))throw new o.ErrnoError(44);var t=o.lookupPath(e,{parent:!0}),n=t.node;if(!n)throw new o.ErrnoError(44);var a=b.basename(e),i=o.mayCreate(n,a);if(i)throw new o.ErrnoError(i);if(!n.node_ops.symlink)throw new o.ErrnoError(63);return n.node_ops.symlink(n,a,r)},rename(r,e){var t=b.dirname(r),n=b.dirname(e),a=b.basename(r),i=b.basename(e),s,l,u;if(s=o.lookupPath(r,{parent:!0}),l=s.node,s=o.lookupPath(e,{parent:!0}),u=s.node,!l||!u)throw new o.ErrnoError(44);if(l.mount!==u.mount)throw new o.ErrnoError(75);var f=o.lookupNode(l,a),c=I.relative(r,n);if(c.charAt(0)!==".")throw new o.ErrnoError(28);if(c=I.relative(e,t),c.charAt(0)!==".")throw new o.ErrnoError(55);var v;try{v=o.lookupNode(u,i)}catch{}if(f!==v){var m=o.isDir(f.mode),h=o.mayDelete(l,a,m);if(h)throw new o.ErrnoError(h);if(h=v?o.mayDelete(u,i,m):o.mayCreate(u,i),h)throw new o.ErrnoError(h);if(!l.node_ops.rename)throw new o.ErrnoError(63);if(o.isMountpoint(f)||v&&o.isMountpoint(v))throw new o.ErrnoError(10);if(u!==l&&(h=o.nodePermissions(l,"w"),h))throw new o.ErrnoError(h);o.hashRemoveNode(f);try{l.node_ops.rename(f,u,i),f.parent=u}catch(_){throw _}finally{o.hashAddNode(f)}}},rmdir(r){var e=o.lookupPath(r,{parent:!0}),t=e.node,n=b.basename(r),a=o.lookupNode(t,n),i=o.mayDelete(t,n,!0);if(i)throw new o.ErrnoError(i);if(!t.node_ops.rmdir)throw new o.ErrnoError(63);if(o.isMountpoint(a))throw new o.ErrnoError(10);t.node_ops.rmdir(t,n),o.destroyNode(a)},readdir(r){var e=o.lookupPath(r,{follow:!0}),t=e.node;if(!t.node_ops.readdir)throw new o.ErrnoError(54);return t.node_ops.readdir(t)},unlink(r){var e=o.lookupPath(r,{parent:!0}),t=e.node;if(!t)throw new o.ErrnoError(44);var n=b.basename(r),a=o.lookupNode(t,n),i=o.mayDelete(t,n,!1);if(i)throw new o.ErrnoError(i);if(!t.node_ops.unlink)throw new o.ErrnoError(63);if(o.isMountpoint(a))throw new o.ErrnoError(10);t.node_ops.unlink(t,n),o.destroyNode(a)},readlink(r){var e=o.lookupPath(r),t=e.node;if(!t)throw new o.ErrnoError(44);if(!t.node_ops.readlink)throw new o.ErrnoError(28);return I.resolve(o.getPath(t.parent),t.node_ops.readlink(t))},stat(r,e){var t=o.lookupPath(r,{follow:!e}),n=t.node;if(!n)throw new o.ErrnoError(44);if(!n.node_ops.getattr)throw new o.ErrnoError(63);return n.node_ops.getattr(n)},lstat(r){return o.stat(r,!0)},chmod(r,e,t){var n;if(typeof r=="string"){var a=o.lookupPath(r,{follow:!t});n=a.node}else n=r;if(!n.node_ops.setattr)throw new o.ErrnoError(63);n.node_ops.setattr(n,{mode:e&4095|n.mode&-4096,timestamp:Date.now()})},lchmod(r,e){o.chmod(r,e,!0)},fchmod(r,e){var t=o.getStreamChecked(r);o.chmod(t.node,e)},chown(r,e,t,n){var a;if(typeof r=="string"){var i=o.lookupPath(r,{follow:!n});a=i.node}else a=r;if(!a.node_ops.setattr)throw new o.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(r,e,t){o.chown(r,e,t,!0)},fchown(r,e,t){var n=o.getStreamChecked(r);o.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new o.ErrnoError(28);var t;if(typeof r=="string"){var n=o.lookupPath(r,{follow:!0});t=n.node}else t=r;if(!t.node_ops.setattr)throw new o.ErrnoError(63);if(o.isDir(t.mode))throw new o.ErrnoError(31);if(!o.isFile(t.mode))throw new o.ErrnoError(28);var a=o.nodePermissions(t,"w");if(a)throw new o.ErrnoError(a);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=o.getStreamChecked(r);if(!(t.flags&2097155))throw new o.ErrnoError(28);o.truncate(t.node,e)},utime(r,e,t){var n=o.lookupPath(r,{follow:!0}),a=n.node;a.node_ops.setattr(a,{timestamp:Math.max(e,t)})},open(r,e,t){if(r==="")throw new o.ErrnoError(44);e=typeof e=="string"?ut(e):e,e&64?(t=typeof t>"u"?438:t,t=t&4095|32768):t=0;var n;if(typeof r=="object")n=r;else{r=b.normalize(r);try{var a=o.lookupPath(r,{follow:!(e&131072)});n=a.node}catch{}}var i=!1;if(e&64)if(n){if(e&128)throw new o.ErrnoError(20)}else n=o.mknod(r,t,0),i=!0;if(!n)throw new o.ErrnoError(44);if(o.isChrdev(n.mode)&&(e&=-513),e&65536&&!o.isDir(n.mode))throw new o.ErrnoError(54);if(!i){var s=o.mayOpen(n,e);if(s)throw new o.ErrnoError(s)}e&512&&!i&&o.truncate(n,0),e&=-131713;var l=o.createStream({node:n,path:o.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),d.logReadFiles&&!(e&1)&&(r in o.readFiles||(o.readFiles[r]=1)),l},close(r){if(o.isClosed(r))throw new o.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{o.closeStream(r.fd)}r.fd=null},isClosed(r){return r.fd===null},llseek(r,e,t){if(o.isClosed(r))throw new o.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new o.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new o.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,a){if(n<0||a<0)throw new o.ErrnoError(28);if(o.isClosed(r))throw new o.ErrnoError(8);if((r.flags&2097155)===1)throw new o.ErrnoError(8);if(o.isDir(r.node.mode))throw new o.ErrnoError(31);if(!r.stream_ops.read)throw new o.ErrnoError(28);var i=typeof a<"u";if(!i)a=r.position;else if(!r.seekable)throw new o.ErrnoError(70);var s=r.stream_ops.read(r,e,t,n,a);return i||(r.position+=s),s},write(r,e,t,n,a,i){if(n<0||a<0)throw new o.ErrnoError(28);if(o.isClosed(r))throw new o.ErrnoError(8);if(!(r.flags&2097155))throw new o.ErrnoError(8);if(o.isDir(r.node.mode))throw new o.ErrnoError(31);if(!r.stream_ops.write)throw new o.ErrnoError(28);r.seekable&&r.flags&1024&&o.llseek(r,0,2);var s=typeof a<"u";if(!s)a=r.position;else if(!r.seekable)throw new o.ErrnoError(70);var l=r.stream_ops.write(r,e,t,n,a,i);return s||(r.position+=l),l},allocate(r,e,t){if(o.isClosed(r))throw new o.ErrnoError(8);if(e<0||t<=0)throw new o.ErrnoError(28);if(!(r.flags&2097155))throw new o.ErrnoError(8);if(!o.isFile(r.node.mode)&&!o.isDir(r.node.mode))throw new o.ErrnoError(43);if(!r.stream_ops.allocate)throw new o.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,a){if(n&2&&!(a&2)&&(r.flags&2097155)!==2)throw new o.ErrnoError(2);if((r.flags&2097155)===1)throw new o.ErrnoError(2);if(!r.stream_ops.mmap)throw new o.ErrnoError(43);if(!e)throw new o.ErrnoError(28);return r.stream_ops.mmap(r,e,t,n,a)},msync(r,e,t,n,a){return r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,a):0},ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new o.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary",e.encoding!=="utf8"&&e.encoding!=="binary")throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=o.open(r,e.flags),a=o.stat(r),i=a.size,s=new Uint8Array(i);return o.read(n,s,0,i,0),e.encoding==="utf8"?t=Y(s):e.encoding==="binary"&&(t=s),o.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=o.open(r,t.flags,t.mode);if(typeof e=="string"){var a=new Uint8Array(pr(e)+1),i=Rr(e,a,0,a.length);o.write(n,a,0,i,void 0,t.canOwn)}else if(ArrayBuffer.isView(e))o.write(n,e,0,e.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");o.close(n)},cwd:()=>o.currentPath,chdir(r){var e=o.lookupPath(r,{follow:!0});if(e.node===null)throw new o.ErrnoError(44);if(!o.isDir(e.node.mode))throw new o.ErrnoError(54);var t=o.nodePermissions(e.node,"x");if(t)throw new o.ErrnoError(t);o.currentPath=e.path},createDefaultDirectories(){o.mkdir("/tmp"),o.mkdir("/home"),o.mkdir("/home/web_user")},createDefaultDevices(){o.mkdir("/dev"),o.registerDevice(o.makedev(1,3),{read:()=>0,write:(n,a,i,s,l)=>s}),o.mkdev("/dev/null",o.makedev(1,3)),q.register(o.makedev(5,0),q.default_tty_ops),q.register(o.makedev(6,0),q.default_tty1_ops),o.mkdev("/dev/tty",o.makedev(5,0)),o.mkdev("/dev/tty1",o.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(e===0&&(e=ie(r).byteLength),r[--e]);o.createDevice("/dev","random",t),o.createDevice("/dev","urandom",t),o.mkdir("/dev/shm"),o.mkdir("/dev/shm/tmp")},createSpecialDirectories(){o.mkdir("/proc");var r=o.mkdir("/proc/self");o.mkdir("/proc/self/fd"),o.mount({mount(){var e=o.createNode(r,"fd",16895,73);return e.node_ops={lookup(t,n){var a=+n,i=o.getStreamChecked(a),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return s.parent=s,s}},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?o.createDevice("/dev","stdin",r):o.symlink("/dev/tty","/dev/stdin"),e?o.createDevice("/dev","stdout",null,e):o.symlink("/dev/tty","/dev/stdout"),t?o.createDevice("/dev","stderr",null,t):o.symlink("/dev/tty1","/dev/stderr"),o.open("/dev/stdin",0),o.open("/dev/stdout",1),o.open("/dev/stderr",1)},staticInit(){[44].forEach(r=>{o.genericErrors[r]=new o.ErrnoError(r),o.genericErrors[r].stack="<generic error, no stack>"}),o.nameTable=new Array(4096),o.mount(w,{},"/"),o.createDefaultDirectories(),o.createDefaultDevices(),o.createSpecialDirectories(),o.filesystems={MEMFS:w}},init(r,e,t){o.initialized=!0,r??(r=d.stdin),e??(e=d.stdout),t??(t=d.stderr),o.createStandardStreams(r,e,t)},quit(){o.initialized=!1;for(var r=0;r<o.streams.length;r++){var e=o.streams[r];e&&o.close(e)}},findObject(r,e){var t=o.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{var t=o.lookupPath(r,{follow:!e});r=t.path}catch{}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=o.lookupPath(r,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=b.basename(r),t=o.lookupPath(r,{follow:!e}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot=t.path==="/"}catch(a){n.error=a.errno}return n},createPath(r,e,t,n){r=typeof r=="string"?r:o.getPath(r);for(var a=e.split("/").reverse();a.length;){var i=a.pop();if(i){var s=b.join2(r,i);try{o.mkdir(s)}catch{}r=s}}return s},createFile(r,e,t,n,a){var i=b.join2(typeof r=="string"?r:o.getPath(r),e),s=Mr(n,a);return o.create(i,s)},createDataFile(r,e,t,n,a,i){var s=e;r&&(r=typeof r=="string"?r:o.getPath(r),s=e?b.join2(r,e):r);var l=Mr(n,a),u=o.create(s,l);if(t){if(typeof t=="string"){for(var f=new Array(t.length),c=0,v=t.length;c<v;++c)f[c]=t.charCodeAt(c);t=f}o.chmod(u,l|146);var m=o.open(u,577);o.write(m,t,0,t.length,0,i),o.close(m),o.chmod(u,l)}},createDevice(r,e,t,n){var l;var a=b.join2(typeof r=="string"?r:o.getPath(r),e),i=Mr(!!t,!!n);(l=o.createDevice).major??(l.major=64);var s=o.makedev(o.createDevice.major++,0);return o.registerDevice(s,{open(u){u.seekable=!1},close(u){var f;(f=n==null?void 0:n.buffer)!=null&&f.length&&n(10)},read(u,f,c,v,m){for(var h=0,_=0;_<v;_++){var y;try{y=t()}catch{throw new o.ErrnoError(29)}if(y===void 0&&h===0)throw new o.ErrnoError(6);if(y==null)break;h++,f[c+_]=y}return h&&(u.node.timestamp=Date.now()),h},write(u,f,c,v,m){for(var h=0;h<v;h++)try{n(f[c+h])}catch{throw new o.ErrnoError(29)}return v&&(u.node.timestamp=Date.now()),h}}),o.mkdev(a,i,s)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{r.contents=tr(r.url),r.usedBytes=r.contents.length}catch{throw new o.ErrnoError(29)}},createLazyFile(r,e,t,n,a){class i{constructor(){this.lengthKnown=!1,this.chunks=[]}get(h){if(!(h>this.length-1||h<0)){var _=h%this.chunkSize,y=h/this.chunkSize|0;return this.getter(y)[_]}}setDataGetter(h){this.getter=h}cacheLength(){var h=new XMLHttpRequest;if(h.open("HEAD",t,!1),h.send(null),!(h.status>=200&&h.status<300||h.status===304))throw new Error("Couldn't load "+t+". Status: "+h.status);var _=Number(h.getResponseHeader("Content-length")),y,D=(y=h.getResponseHeader("Accept-Ranges"))&&y==="bytes",F=(y=h.getResponseHeader("Content-Encoding"))&&y==="gzip",x=1024*1024;D||(x=_);var O=(N,rr)=>{if(N>rr)throw new Error("invalid range ("+N+", "+rr+") or no bytes requested!");if(rr>_-1)throw new Error("only "+_+" bytes available! programmer error!");var P=new XMLHttpRequest;if(P.open("GET",t,!1),_!==x&&P.setRequestHeader("Range","bytes="+N+"-"+rr),P.responseType="arraybuffer",P.overrideMimeType&&P.overrideMimeType("text/plain;
2 charset=x-user-defined"),P.send(null),!(P.status>=200&&P.status<300||P.status===304))throw new Error("Couldn't load "+t+". Status: "+P.status);return P.response!==void 0?new Uint8Array(P.response||[]):le(P.responseText||"")},ir=this;ir.setDataGetter(N=>{var rr=N*x,P=(N+1)*x-1;if(P=Math.min(P,_-1),typeof ir.chunks[N]>"u"&&(ir.chunks[N]=O(rr,P)),typeof ir.chunks[N]>"u")throw new Error("doXHR failed!");return ir.chunks[N]}),(F||!_)&&(x=_=1,_=this.getter(0).length,x=_,Sr("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=_,this._chunkSize=x,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!ur)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new i,l={isDevice:!1,contents:s}}else var l={isDevice:!1,url:t};var u=o.createFile(r,e,l,n,a);l.contents?u.contents=l.contents:l.url&&(u.contents=null,u.url=l.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var f={},c=Object.keys(u.stream_ops);c.forEach(m=>{var h=u.stream_ops[m];f[m]=(..._)=>(o.forceLoadFile(u),h(..._))});function v(m,h,_,y,D){var F=m.node.contents;if(D>=F.length)return 0;var x=Math.min(F.length-D,y);if(F.slice)for(var O=0;O<x;O++)h[_+O]=F[D+O];else for(var O=0;O<x;O++)h[_+O]=F.get(D+O);return x}return f.read=(m,h,_,y,D)=>(o.forceLoadFile(u),v(m,h,_,y,D)),f.mmap=(m,h,_,y,D)=>{o.forceLoadFile(u);var F=fe(h);if(!F)throw new o.ErrnoError(48);return v(m,R,F,h,_),{ptr:F,allocated:!0}},u.stream_ops=f,u}},jr=(r,e)=>r?Y(C,r,e):"",E={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(b.isAbs(e))return e;var n;if(r===-100)n=o.cwd();else{var a=E.getStreamFromFD(r);n=a.path}if(e.length==0){if(!t)throw new o.ErrnoError(44);return n}return b.join2(n,e)},doStat(r,e,t){var n=r(e);p[t>>2]=n.dev,p[t+4>>2]=n.mode,k[t+8>>2]=n.nlink,p[t+12>>2]=n.uid,p[t+16>>2]=n.gid,p[t+20>>2]=n.rdev,S=[n.size>>>0,(g=n.size,+Math.abs(g)>=1?g>0?+Math.floor(g/4294967296)>>>0:~~+Math.ceil((g-+(~~g>>>0))/4294967296)>>>0:0)],p[t+24>>2]=S[0],p[t+28>>2]=S[1],p[t+32>>2]=4096,p[t+36>>2]=n.blocks;var a=n.atime.getTime(),i=n.mtime.getTime(),s=n.ctime.getTime();return S=[Math.floor(a/1e3)>>>0,(g=Math.floor(a/1e3),+Math.abs(g)>=1?g>0?+Math.floor(g/4294967296)>>>0:~~+Math.ceil((g-+(~~g>>>0))/4294967296)>>>0:0)],p[t+40>>2]=S[0],p[t+44>>2]=S[1],k[t+48>>2]=a%1e3*1e3*1e3,S=[Math.floor(i/1e3)>>>0,(g=Math.floor(i/1e3),+Math.abs(g)>=1?g>0?+Math.floor(g/4294967296)>>>0:~~+Math.ceil((g-+(~~g>>>0))/4294967296)>>>0:0)],p[t+56>>2]=S[0],p[t+60>>2]=S[1],k[t+64>>2]=i%1e3*1e3*1e3,S=[Math.floor(s/1e3)>>>0,(g=Math.floor(s/1e3),+Math.abs(g)>=1?g>0?+Math.floor(g/4294967296)>>>0:~~+Math.ceil((g-+(~~g>>>0))/4294967296)>>>0:0)],p[t+72>>2]=S[0],p[t+76>>2]=S[1],k[t+80>>2]=s%1e3*1e3*1e3,S=[n.ino>>>0,(g=n.ino,+Math.abs(g)>=1?g>0?+Math.floor(g/4294967296)>>>0:~~+Math.ceil((g-+(~~g>>>0))/4294967296)>>>0:0)],p[t+88>>2]=S[0],p[t+92>>2]=S[1],0},doMsync(r,e,t,n,a){if(!o.isFile(e.node.mode))throw new o.ErrnoError(43);if(n&2)return 0;var i=C.slice(r,r+t);o.msync(e,i,a,t,n)},getStreamFromFD(r){var e=o.getStreamChecked(r);return e},varargs:void 0,getStr(r){var e=jr(r);return e}};function ft(r,e){try{return r=E.getStr(r),o.chmod(r,e),0}catch(t){if(typeof o>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}function dt(r,e,t,n){try{if(e=E.getStr(e),e=E.calculateAt(r,e),t&-8)return-28;var a=o.lookupPath(e,{follow:!0}),i=a.node;if(!i)return-44;var s="";return t&4&&(s+="r"),t&2&&(s+="w"),t&1&&(s+="x"),s&&o.nodePermissions(i,s)?-2:0}catch(l){if(typeof o>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}function _r(){var r=p[+E.varargs>>2];return E.varargs+=4,r}var K=_r;function ct(r,e,t){E.varargs=t;try{var n=E.getStreamFromFD(r);switch(e){case 0:{var a=_r();if(a<0)return-28;for(;o.streams[a];)a++;var i;return i=o.dupStream(n,a),i.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var a=_r();return n.flags|=a,0}case 12:{var a=K(),s=0;return W[a+s>>1]=2,0}case 13:case 14:return 0}return-28}catch(l){if(typeof o>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}function vt(r,e){try{var t=E.getStreamFromFD(r);return E.doStat(o.stat,t.path,e)}catch(n){if(typeof o>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}function ht(r,e,t){E.varargs=t;try{var n=E.getStreamFromFD(r);switch(e){case 21509:return n.tty?0:-59;case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),i=K();p[i>>2]=a.c_iflag||0,p[i+4>>2]=a.c_oflag||0,p[i+8>>2]=a.c_cflag||0,p[i+12>>
22]=a.c_lflag||0;for(var s=0;s<32;s++)R[i+s+17]=a.c_cc[s]||0;return 0}return 0}case 21510:case 21511:case 21512:return n.tty?0:-59;case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){for(var i=K(),l=p[i>>2],u=p[i+4>>2],f=p[i+8>>2],c=p[i+12>>2],v=[],s=0;s<32;s++)v.push(R[i+s+17]);return n.tty.ops.ioctl_tcsets(n.tty,e,{c_iflag:l,c_oflag:u,c_cflag:f,c_lflag:c,c_cc:v})}return 0}case 21519:{if(!n.tty)return-59;var i=K();return p[i>>2]=0,0}case 21520:return n.tty?-28:-59;case 21531:{var i=K();return o.ioctl(n,e,i)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var m=n.tty.ops.ioctl_tiocgwinsz(n.tty),i=K();W[i>>1]=m[0],W[i+2>>1]=m[1]}return 0}case 21524:return n.tty?0:-59;case 21515:return n.tty?0:-59;default:return-28}}catch(h){if(typeof o>"u"||h.name!=="ErrnoError")throw h;return-h.errno}}function mt(r,e){try{return r=E.getStr(r),E.doStat(o.lstat,r,e)}catch(t){if(typeof o>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}function pt(r,e,t,n){try{e=E.getStr(e);var a=n&256,i=n&4096;return n=n&-6401,e=E.calculateAt(r,e,i),E.doStat(a?o.lstat:o.stat,e,t)}catch(s){if(typeof o>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}function _t(r,e,t,n){E.varargs=n;try{e=E.getStr(e),e=E.calculateAt(r,e);var a=n?_r():0;return o.open(e,t,a).fd}catch(i){if(typeof o>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function wt(r){try{return r=E.getStr(r),o.rmdir(r),0}catch(e){if(typeof o>"u"||e.name!=="ErrnoError")throw e;return-e.errno}}function gt(r,e){try{return r=E.getStr(r),E.doStat(o.stat,r,e)}catch(t){if(typeof o>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}function yt(r,e,t){try{return e=E.getStr(e),e=E.calculateAt(r,e),t===0?o.unlink(e):t===512?o.rmdir(e):or("Invalid flags passed to unlinkat"),0}catch(n){if(typeof o>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}var Et=()=>{or("")},kt=(r,e,t,n,a)=>{},bt=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);de=r},de,$=r=>{for(var e="",t=r;C[t];)e+=de[C[t++]];return e},J={},G={},wr={},ce,M=r=>{throw new ce(r)},ve,he=r=>{throw new ve(r)},Ft=(r,e,t)=>{r.forEach(l=>wr[l]=e);function n(l){var u=t(l);u.length!==r.length&&he("Mismatched type converter count");for(var f=0;f<r.length;++f)z(r[f],u[f])}var a=new Array(e.length),i=[],s=0;e.forEach((l,u)=>{G.hasOwnProperty(l)?a[u]=G[l]:(i.push(l),J.hasOwnProperty(l)||(J[l]=[]),J[l].push(()=>{a[u]=G[l],++s,s===i.length&&n(a)}))}),i.length===0&&n(a)};function St(r,e,t={}){var n=e.name;if(r||M(`type "${n}" must have a positive integer typeid pointer`),G.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;M(`Cannot register type '${n}' twice`)}if(G[r]=e,delete wr[r],J.hasOwnProperty(r)){var a=J[r];delete J[r],a.forEach(i=>i())}}function z(r,e,t={}){return St(r,e,t)}var X=8,At=(r,e,t,n)=>{e=$(e),z(r,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,i){return i?t:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(C[a])},destructorFunction:null})},$r=[],L=[],xr=r=>{r>9&&--L[r+1]===0&&(L[r]=void 0,$r.push(r))},Tt=()=>L.length/2-5-$r.length,Dt=()=>{L.push(0,1,void 0,1,null,1,!0,1,!1,1),d.count_emval_handles=Tt},A={toValue:r=>(r||M("Cannot use deleted val. handle = "+r),L[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=$r.pop()||L.length;return L[e]=r,L[e+1]=1,e}}}};function Or(r){return this.fromWireType(k[r>>2])}var Pt={name:"emscripten::val",fromWireType:r=>{var e=A.toValue(r);return xr(r),e},toWireType:(r,e)=>A.toHandle(e),argPackAdvance:X,readValueFromPointer:Or,destructorFunction:null},Ct=r=>z(r,Pt),Rt=(r,e)=>{switch(e){case 4:return function(t){return this.fromWireType(Kr[t>>2])};case 8:return function(t){return this.fromWireType(Jr[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},Mt=(r,e,t)=>{e=$(e),z(r,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:Rt(e,t),destructorFunction:null})},gr=(r,e)=>Object.defineProperty(e,"name",{value:r}),me=r=>{for(;r.length;){var e=r.pop(),t=r.pop();t(e)}};function pe(r){for(var e=1;e<r.length;++e)if(r[e]!==null&&r[e].destructorFunction===void 0)return!0;return!1}function _e(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=gr(r.name||"unknownFunctionName",function(){});t.prototype=r.prototype;var n=new t,a=r.apply(n,e);return a instanceof Object?a:n}function jt(r,e,t,n){var a=pe(r),i=r.length-2,s=[],l=["fn"];e&&l.push("thisWired");for(var u=0;u<i;++u)s.push(`arg${u}`),l.push(`arg${u}Wired`);s=s.join(","),l=l.join(",");var f=`return function (${s}) { 3`;a&&(f+=`var destructors = []; 4`);var c=a?"destructors":"null",v=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];e&&(f+=`var thisWired = classParam['toWireType'](${c}, this); 5`);for(var u=0;u<i;++u)f+=`var arg${u}Wired = argType${u}['toWireType'](${c}, arg${u}); 6`,v.push(`argType${u}`);if(f+=(t||n?"var rv = ":"")+`invoker(${l}); 7`,a)f+=`runDestructors(destructors); 8`;else for(var u=e?1:2;u<r.length;++u){var m=u===1?"thisWired":"arg"+(u-2)+"Wired";r[u].destructorFunction!==null&&(f+=`${m}_dtor(${m}); 9`,v.push(`${m}_dtor`))}return t&&(f+=`var ret = retType['fromWireType'](rv); 10return ret; 11`),f+=`} 12`,[v,f]}function $t(r,e,t,n,a,i){var s=e.length;s<2&&M("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var l=e[1]!==null&&t!==null,u=pe(e),f=e[0].name!=="void",c=[r,M,n,a,me,e[0],e[1]],v=0;v<s-2;++v)c.push(e[v+2]);if(!u)for(var v=l?1:2;v<e.length;++v)e[v].destructorFunction!==null&&c.push(e[v].destructorFunction);let[m,h]=jt(e,l,f,i);m.push(h);var _=_e(Function,m)(...c);return gr(r,_)}var xt=(r,e,t)=>{if(r[e].overloadTable===void 0){var n=r[e];r[e]=function(...a){return r[e].overloadTable.hasOwnProperty(a.length)||M(`Function '${t}
12' called with an invalid number of arguments (${a.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[a.length].apply(this,a)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ot=(r,e,t)=>{d.hasOwnProperty(r)?((t===void 0||d[r].overloadTable!==void 0&&d[r].overloadTable[t]!==void 0)&&M(`Cannot register public name '${r}' twice`),xt(d,r,r),d.hasOwnProperty(t)&&M(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[r].overloadTable[t]=e):(d[r]=e,t!==void 0&&(d[r].numArguments=t))},Nt=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(k[e+n*4>>2]);return t},Ut=(r,e,t)=>{d.hasOwnProperty(r)||he("Replacing nonexistent public symbol"),d[r].overloadTable!==void 0&&t!==void 0?d[r].overloadTable[t]=e:(d[r]=e,d[r].argCount=t)},It=(r,e,t)=>{r=r.replace(/p/g,"i");var n=d["dynCall_"+r];return n(e,...t)},yr=[],we,ge=r=>{var e=yr[r];return e||(r>=yr.length&&(yr.length=r+1),yr[r]=e=we.get(r)),e},zt=(r,e,t=[])=>{if(r.includes("j"))return It(r,e,t);var n=ge(e)(...t);return n},Lt=(r,e)=>(...t)=>zt(r,e,t),Bt=(r,e)=>{r=$(r);function t(){return r.includes("j")?Lt(r,e):ge(e)}var n=t();return typeof n!="function"&&M(`unknown function pointer with signature ${r}: ${e}`),n},Wt=(r,e)=>{var t=gr(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` 13`+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},ye,Ee=r=>{var e=Te(r),t=$(e);return B(e),t},Ht=(r,e)=>{var t=[],n={};function a(i){if(!n[i]&&!G[i]){if(wr[i]){wr[i].forEach(a);return}t.push(i),n[i]=!0}}throw e.forEach(a),new ye(`${r}: `+t.map(Ee).join([", "]))},Vt=r=>{r=r.trim();const e=r.indexOf("(");return e!==-1?r.substr(0,e):r},qt=(r,e,t,n,a,i,s,l)=>{var u=Nt(e,t);r=$(r),r=Vt(r),a=Bt(n,a),Ot(r,function(){Ht(`Cannot call ${r} due to unbound types`,u)},e-1),Ft([],u,f=>{var c=[f[0],null].concat(f.slice(1));return Ut(r,$t(r,c,null,a,i,s),e-1),[]})},Gt=(r,e,t)=>{switch(e){case 1:return t?n=>R[n]:n=>C[n];case 2:return t?n=>W[n>>1]:n=>vr[n>>1];case 4:return t?n=>p[n>>2]:n=>k[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Xt=(r,e,t,n,a)=>{e=$(e);var i=c=>c;if(n===0){var s=32-8*t;i=c=>c<<s>>>s}var l=e.includes("unsigned"),u=(c,v)=>{},f;l?f=function(c,v){return u(v,this.name),v>>>0}:f=function(c,v){return u(v,this.name),v},z(r,{name:e,fromWireType:i,toWireType:f,argPackAdvance:X,readValueFromPointer:Gt(e,t,n!==0),destructorFunction:null})},Yt=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function i(s){var l=k[s>>2],u=k[s+4>>2];return new a(R.buffer,u,l)}t=$(t),z(r,{name:t,fromWireType:i,argPackAdvance:X,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Z=(r,e,t)=>Rr(r,C,e,t),Kt=(r,e)=>{e=$(e);var t=e==="std::string";z(r,{name:e,fromWireType(n){var a=k[n>>2],i=n+4,s;if(t)for(var l=i,u=0;u<=a;++u){var f=i+u;if(u==a||C[f]==0){var c=f-l,v=jr(l,c);s===void 0?s=v:(s+="\0",s+=v),l=f+1}}else{for(var m=new Array(a),u=0;u<a;++u)m[u]=String.fromCharCode(C[i+u]);s=m.join("")}return B(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var i,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||M("Cannot pass non-string to std::string"),t&&s?i=pr(a):i=a.length;var l=Br(4+i+1),u=l+4;if(k[l>>2]=i,t&&s)Z(a,u,i+1);else if(s)for(var f=0;f<i;++f){var c=a.charCodeAt(f);c>255&&(B(u),M("String has UTF-16 code units that do not fit in 8 bits")),C[u+f]=c}else for(var f=0;f<i;++f)C[u+f]=a[f];return n!==null&&n.push(B,l),l},argPackAdvance:X,readValueFromPointer:Or,destructorFunction(n){B(n)}})},ke=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Jt=(r,e)=>{for(var t=r,n=t>>1,a=n+e/2;!(n>=a)&&vr[n];)++n;if(t=n<<1,t-r>32&&ke)return ke.decode(C.subarray(r,t));for(var i="",s=0;!(s>=e/2);++s){var l=W[r+s*2>>1];if(l==0)break;i+=String.fromCharCode(l)}return i},Zt=(r,e,t)=>{if(t??(t=2147483647),t<2)return 0;t-=2;for(var n=e,a=t<r.length*2?t/2:r.length,i=0;i<a;++i){var s=r.charCodeAt(i);W[e>>1]=s,e+=2}return W[e>>1]=0,e-n},Qt=r=>r.length*2,rn=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var a=p[r+t*4>>2];if(a==0)break;if(++t,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|i&1023)}else n+=String.fromCharCode(a)}return n},en=(r,e,t)=>{if(t??(t=2147483647),t<4)return 0;for(var n=e,a=n+t-4,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343){var l=r.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(p[e>>2]=s,e+=4,e+4>a)break}return p[e>>2]=0,e-n},tn=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},nn=(r,e,t)=>{t=$(t);var n,a,i,s;e===2?(n=Jt,a=Zt,s=Qt,i=l=>vr[l>>1]):e===4&&(n=rn,a=en,s=tn,i=l=>k[l>>2]),z(r,{name:t,fromWireType:l=>{for(var u=k[l>>2],f,c=l+4,v=0;v<=u;++v){var m=l+4+v*e;if(v==u||i(m)==0){var h=m-c,_=n(c,h);f===void 0?f=_:(f+="\0",f+=_),c=m+e}}return B(l),f},toWireType:(l,u)=>{typeof u!="string"&&M(`Cannot pass non-string to C++ string type ${t}`);
13var f=s(u),c=Br(4+f+e);return k[c>>2]=f/e,a(u,c+4,f+e),l!==null&&l.push(B,c),c},argPackAdvance:X,readValueFromPointer:Or,destructorFunction(l){B(l)}})},on=(r,e)=>{e=$(e),z(r,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})},an=1,sn=()=>an,be=r=>{for(var e=r.split("."),t=0;t<4;t++){var n=Number(e[t]);if(isNaN(n))return null;e[t]=n}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0},Er=r=>parseInt(r),ln=r=>{var e,t,n,a,i=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,s=[];if(!i.test(r))return null;if(r==="::")return[0,0,0,0,0,0,0,0];for(r.startsWith("::")?r=r.replace("::","Z:"):r=r.replace("::",":Z:"),r.indexOf(".")>0?(r=r.replace(new RegExp("[.]","g"),":"),e=r.split(":"),e[e.length-4]=Er(e[e.length-4])+Er(e[e.length-3])*256,e[e.length-3]=Er(e[e.length-2])+Er(e[e.length-1])*256,e=e.slice(0,e.length-2)):e=r.split(":"),n=0,a=0,t=0;t<e.length;t++)if(typeof e[t]=="string")if(e[t]==="Z"){for(a=0;a<8-e.length+1;a++)s[t+a]=0;n=a-1}else s[t+n]=De(parseInt(e[t],16));else s[t+n]=e[t];return[s[1]<<16|s[0],s[3]<<16|s[2],s[5]<<16|s[4],s[7]<<16|s[6]]},H={address_map:{id:1,addrs:{},names:{}},lookup_name(r){var e=be(r);if(e!==null||(e=ln(r),e!==null))return r;var t;if(H.address_map.addrs[r])t=H.address_map.addrs[r];else{var n=H.address_map.id++;ze(n<65535,"exceeded max address mappings of 65535"),t="172.29."+(n&255)+"."+(n&65280),H.address_map.names[t]=r,H.address_map.addrs[r]=t}return t},lookup_addr(r){return H.address_map.names[r]?H.address_map.names[r]:null}},un=r=>{var e=jr(r);return be(H.lookup_name(e))},fn=(r,e,t)=>C.copyWithin(r,e,e+t),Nr=(r,e)=>{var t=G[r];return t===void 0&&M(`${e} has unknown type ${Ee(r)}`),t},Fe=(r,e,t)=>{var n=[],a=r.toWireType(n,t);return n.length&&(k[e>>2]=A.toHandle(n)),a},dn=(r,e,t)=>(r=A.toValue(r),e=Nr(e,"emval::as"),Fe(e,t,r)),cn={},Ur=r=>{var e=cn[r];return e===void 0?$(r):e},Ir=[],vn=(r,e,t,n,a)=>(r=Ir[r],e=A.toValue(e),t=Ur(t),r(e,e[t],n,a)),Se=()=>typeof globalThis=="object"?globalThis:function(){return Function}()("return this")(),hn=r=>r===0?A.toHandle(Se()):(r=Ur(r),A.toHandle(Se()[r])),mn=r=>{var e=Ir.length;return Ir.push(r),e},pn=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=Nr(k[e+n*4>>2],"parameter "+n);return t},_n=(r,e,t)=>{var n=pn(r,e),a=n.shift();r--;var i=`return function (obj, func, destructorsRef, args) { 14`,s=0,l=[];t===0&&l.push("obj");for(var u=["retType"],f=[a],c=0;c<r;++c)l.push("arg"+c),u.push("argType"+c),f.push(n[c]),i+=` var arg${c} = argType${c}.readValueFromPointer(args${s?"+"+s:""}); 15`,s+=n[c].argPackAdvance;var v=t===1?"new func":"func.call";i+=` var rv = ${v}(${l.join(", ")}); 16`,a.isVoid||(u.push("emval_returnValue"),f.push(Fe),i+=` return emval_returnValue(retType, destructorsRef, rv); 17`),i+=`}; 18`,u.push(i);var m=_e(Function,u)(...f),h=`methodCaller<(${n.map(_=>_.name).join(", ")}) => ${a.name}>`;return mn(gr(h,m))},wn=(r,e)=>(r=A.toValue(r),e=A.toValue(e),A.toHandle(r[e])),gn=r=>{r>9&&(L[r+1]+=1)},yn=()=>A.toHandle([]),En=r=>A.toHandle(Ur(r)),kn=()=>A.toHandle({}),bn=r=>{var e=A.toValue(r);me(e),xr(r)},Fn=(r,e,t)=>{r=A.toValue(r),e=A.toValue(e),t=A.toValue(t),r[e]=t},Sn=(r,e)=>{r=Nr(r,"_emval_take_value");var t=r.readValueFromPointer(e);return A.toHandle(t)},An=r=>r%4===0&&(r%100!==0||r%400===0),Tn=[0,31,60,91,121,152,182,213,244,274,305,335],Dn=[0,31,59,90,120,151,181,212,243,273,304,334],Pn=r=>{var e=An(r.getFullYear()),t=e?Tn:Dn,n=t[r.getMonth()]+r.getDate()-1;return n},zr=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+e*4294967296:NaN;function Cn(r,e,t){var n=zr(r,e),a=new Date(n*1e3);p[t>>2]=a.getSeconds(),p[t+4>>2]=a.getMinutes(),p[t+8>>2]=a.getHours(),p[t+12>>2]=a.getDate(),p[t+16>>2]=a.getMonth(),p[t+20>>2]=a.getFullYear()-1900,p[t+24>>2]=a.getDay();var i=Pn(a)|0;p[t+28>>2]=i,p[t+36>>2]=-(a.getTimezoneOffset()*60);var s=new Date(a.getFullYear(),0,1),l=new Date(a.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),f=(l!=u&&a.getTimezoneOffset()==Math.min(u,l))|0;p[t+32>>2]=f}function Rn(r,e,t,n,a,i,s){var l=zr(i,s);try{var u=E.getStreamFromFD(a);t&2&&E.doMsync(r,u,e,n,l)}catch(f){if(typeof o>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}var Mn=(r,e,t,n)=>{var a=new Date().getFullYear(),i=new Date(a,0,1),s=new Date(a,6,1),l=i.getTimezoneOffset(),u=s.getTimezoneOffset(),f=Math.max(l,u);k[r>>2]=f*60,p[e>>2]=+(l!=u);var c=h=>{var _=h>=0?"-":"+",y=Math.abs(h),D=String(Math.floor(y/60)).padStart(2,"0"),F=String(y%60).padStart(2,"0");return`UTC${_}${D}${F}`},v=c(l),m=c(u);u<l?(Z(v,t,17),Z(m,n,17)):(Z(v,n,17),Z(m,t,17))},jn=()=>Date.now();function $n(){return new Error().stack.toString()}var Q=r=>{Q.shown||(Q.shown={}),Q.shown[r]||(Q.shown[r]=1,er&&(r="warning: "+r),U(r))};function xn(r){var e=$n(),t=e.lastIndexOf("_emscripten_log"),n=e.lastIndexOf("_emscripten_get_callstack"),a=e.indexOf(` 19`,Math.max(t,n))+1;e=e.slice(a),r&8&&typeof emscripten_source_map>"u"&&(Q('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),r^=8,r|=16);var i=e.split(` 20`);e="";var s=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),l=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),u=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var f in i){var c=i[f],v="",m="",h=0,_=0,y=u.exec(c);
20if(y&&y.length==5)v=y[1],m=y[2],h=y[3],_=y[4];else if(y=s.exec(c)||l.exec(c),y&&y.length>=4)v=y[1],m=y[2],h=y[3],_=y[4]|0;else{e+=c+` 21`;continue}var D=!1;if(r&8){var F=emscripten_source_map.originalPositionFor({line:h,column:_});D=F==null?void 0:F.source,D&&(r&64&&(F.source=F.source.substring(F.source.replace(/\\/g,"/").lastIndexOf("/")+1)),e+=` at ${v} (${F.source}:${F.line}:${F.column}) 22`)}(r&16||!D)&&(r&64&&(m=m.substring(m.replace(/\\/g,"/").lastIndexOf("/")+1)),e+=(D?` = ${v}`:` at ${v}`)+` (${m}:${h}:${_}) 23`)}return e=e.replace(/\s+$/,""),e}function On(r,e,t){var n=xn(r);if(!e||t<=0)return pr(n)+1;var a=Z(n,e,t);return a+1}var Ae=()=>2147483648,Nn=()=>Ae(),Un=r=>{var e=cr.buffer,t=(r-e.byteLength+65535)/65536|0;try{return cr.grow(t),Zr(),1}catch{}},In=r=>{var e=C.length;r>>>=0;var t=Ae();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var i=Math.min(t,ue(Math.max(r,a),65536)),s=Un(i);if(s)return!0}return!1},Lr={},zn=()=>br||"./this.program",ar=()=>{if(!ar.strings){var r=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:zn()};for(var t in Lr)Lr[t]===void 0?delete e[t]:e[t]=Lr[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);ar.strings=n}return ar.strings},Ln=(r,e)=>{for(var t=0;t<r.length;++t)R[e++]=r.charCodeAt(t);R[e]=0},Bn=(r,e)=>{var t=0;return ar().forEach((n,a)=>{var i=e+t;k[r+a*4>>2]=i,Ln(n,i),t+=n.length+1}),0},Wn=(r,e)=>{var t=ar();k[r>>2]=t.length;var n=0;return t.forEach(a=>n+=a.length+1),k[e>>2]=n,0},Hn=0,Vn=()=>rt||Hn>0,qn=r=>{var e;Vn()||((e=d.onExit)==null||e.call(d,r),Ar=!0),Xr(r,new Qe(r))},Gn=(r,e)=>{qn(r)},Xn=Gn;function Yn(r){try{var e=E.getStreamFromFD(r);return o.close(e),0}catch(t){if(typeof o>"u"||t.name!=="ErrnoError")throw t;return t.errno}}var Kn=(r,e,t,n)=>{for(var a=0,i=0;i<t;i++){var s=k[e>>2],l=k[e+4>>2];e+=8;var u=o.read(r,R,s,l,n);if(u<0)return-1;if(a+=u,u<l)break}return a};function Jn(r,e,t,n){try{var a=E.getStreamFromFD(r),i=Kn(a,e,t);return k[n>>2]=i,0}catch(s){if(typeof o>"u"||s.name!=="ErrnoError")throw s;return s.errno}}function Zn(r,e,t,n,a){var i=zr(e,t);try{if(isNaN(i))return 61;var s=E.getStreamFromFD(r);return o.llseek(s,i,n),S=[s.position>>>0,(g=s.position,+Math.abs(g)>=1?g>0?+Math.floor(g/4294967296)>>>0:~~+Math.ceil((g-+(~~g>>>0))/4294967296)>>>0:0)],p[a>>2]=S[0],p[a+4>>2]=S[1],s.getdents&&i===0&&n===0&&(s.getdents=null),0}catch(l){if(typeof o>"u"||l.name!=="ErrnoError")throw l;return l.errno}}var Qn=(r,e,t,n)=>{for(var a=0,i=0;i<t;i++){var s=k[e>>2],l=k[e+4>>2];e+=8;var u=o.write(r,R,s,l,n);if(u<0)return-1;if(a+=u,u<l)break}return a};function ro(r,e,t,n){try{var a=E.getStreamFromFD(r),i=Qn(a,e,t);return k[n>>2]=i,0}catch(s){if(typeof o>"u"||s.name!=="ErrnoError")throw s;return s.errno}}o.createPreloadedFile=lt,o.staticInit(),bt(),ce=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},ve=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Dt(),ye=d.UnboundTypeError=Wt(Error,"UnboundTypeError");var eo={M:ft,N:dt,h:ct,I:vt,Q:ht,F:mt,G:pt,j:_t,B:wt,H:gt,C:yt,A:Et,w:kt,V:At,U:Ct,n:Mt,f:qt,b:Xt,a:Yt,m:Kt,i:nn,W:on,J:sn,x:un,L:fn,e:dn,q:vn,T:xr,u:hn,p:_n,k:wn,Y:gn,X:yn,r:En,Z:kn,o:bn,c:Fn,d:Sn,t:Cn,s:Rn,O:Mn,K:jn,R:On,z:Nn,y:In,D:Bn,E:Wn,S:Xn,g:Yn,P:Jn,v:Zn,l:ro},T=Ze(),Te=r=>(Te=T.aa)(r),Br=r=>(Br=T.ca)(r),B=r=>(B=T.da)(r),De=r=>(De=T.ea)(r),Pe=(r,e)=>(Pe=T.fa)(r,e),Ce=()=>(Ce=T.ga)();d.dynCall_viijii=(r,e,t,n,a,i,s)=>(d.dynCall_viijii=T.ha)(r,e,t,n,a,i,s),d.dynCall_viiiiji=(r,e,t,n,a,i,s,l)=>(d.dynCall_viiiiji=T.ia)(r,e,t,n,a,i,s,l),d.dynCall_jiji=(r,e,t,n,a)=>(d.dynCall_jiji=T.ja)(r,e,t,n,a),d.dynCall_iiiiij=(r,e,t,n,a,i,s)=>(d.dynCall_iiiiij=T.ka)(r,e,t,n,a,i,s),d.dynCall_iiiiijj=(r,e,t,n,a,i,s,l,u)=>(d.dynCall_iiiiijj=T.la)(r,e,t,n,a,i,s,l,u),d.dynCall_iiiiiijj=(r,e,t,n,a,i,s,l,u,f)=>(d.dynCall_iiiiiijj=T.ma)(r,e,t,n,a,i,s,l,u,f);var kr,Re;nr=function r(){kr||Me(),kr||(nr=r)};function Me(){if(V>0||!Re&&(Re=1,Le(),V>0))return;function r(){var e;kr||(kr=1,d.calledRun=1,!Ar&&(Be(),qr(d),(e=d.onRuntimeInitialized)==null||e.call(d),We()))}d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1),r()},1)):r()}if(d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();return Me(),Vr=Ne,Vr}})();$e.exports=xe})(je);var io=je.exports;const so=no(io),ho=Object.freeze(Object.defineProperty({__proto__:null,default:so},Symbol.toStringTag,{value:"Module"}));
23export{ho as o};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.