diff --git a/demo-web/public/static/OutputBuffer.mjs b/demo-web/public/static/OutputBuffer.mjs deleted file mode 100644 index 15ef5479..00000000 --- a/demo-web/public/static/OutputBuffer.mjs +++ /dev/null @@ -1,57 +0,0 @@ -import { _Event } from "./_Event.mjs"; - -export class OutputBuffer -{ - constructor(target, eventType, maxLength) - { - Object.defineProperty(this, 'target', {value: target}); - Object.defineProperty(this, 'buffer', {value: []}); - Object.defineProperty(this, 'eventType', {value: eventType}); - Object.defineProperty(this, 'maxLength', {value: maxLength}); - Object.defineProperty(this, 'decoder', {value: new TextDecoder()}); - Object.defineProperty(this, 'queue', {value: new Set}); - } - - push(...items) - { - this.buffer.push(...items); - - const end = this.buffer.length - 1; - - if(this.maxLength === -1 && this.buffer[end] === 10) - { - this.flush(); - } - - if(this.maxLength >= 0 && this.buffer.length >= this.maxLength) - { - this.flush(); - } - } - - flush() - { - if(!this.buffer.length) - { - return; - } - - const detail = [this.decoder.decode(new Uint8Array(this.buffer))]; - const event = new _Event(this.eventType, {detail}); - - if(this.target['on' + this.eventType]) - { - if(this.target['on' + this.eventType](event) === false) - { - return; - } - } - - if(!this.target.dispatchEvent(event)) - { - return; - } - - this.buffer.splice(0); - } -} diff --git a/demo-web/public/static/PhpBase.mjs b/demo-web/public/static/PhpBase.mjs deleted file mode 100644 index d4239c31..00000000 --- a/demo-web/public/static/PhpBase.mjs +++ /dev/null @@ -1,402 +0,0 @@ -import { phpVersion } from './config.mjs'; -import { phpVersionFull } from './config.mjs'; -import { OutputBuffer } from './OutputBuffer.mjs'; -import { _Event } from './_Event.mjs'; -import { fsOps } from './fsOps.mjs'; -import { resolveDependencies } from './resolveDependencies.mjs'; - -const STR = 'string'; -const NUM = 'number'; - -export class PhpBase extends EventTarget -{ - constructor(PhpBinary, args = {}) - { - super(); - - this.queue = []; - - this.onerror = function () {}; - this.onoutput = function () {}; - this.onready = function () {}; - - Object.defineProperty(this, 'encoder', {value: new TextEncoder()}); - Object.defineProperty(this, 'buffers', {value: { - stdin: [], - stdout: new OutputBuffer(this, 'output', -1), - stderr: new OutputBuffer(this, 'error', -1), - } }); - - Object.freeze(this.buffers); - - this.autoTransaction = ('autoTransaction' in args) ? args.autoTransaction : true; - this.transactionStarted = false; - - this.shared = args.shared = ('shared' in args) ? args.shared : {}; - - this.phpArgs = args; - - const defaults = { - stdin: () => this.buffers.stdin.shift() ?? null, - stdout: byte => this.buffers.stdout.push(byte), - stderr: byte => this.buffers.stderr.push(byte), - - postRun: () => { - const event = new _Event('ready'); - this.onready(event); - this.dispatchEvent(event); - }, - }; - - const fixed = { onRefresh: new Set }; - const phpSettings = globalThis.phpSettings ?? {}; - const userLocateFile = args.locateFile || (() => undefined); - - const files = args.files || []; - - const {files: extraFiles, libs, urlLibs} = resolveDependencies(args.sharedLibs, this); - - args.locateFile = (path, directory) => { - let located = userLocateFile(path, directory); - if(located !== undefined) - { - return located; - } - if(urlLibs[path]) - { - return urlLibs[path]; - } - }; - - this.valueIndex = 0; - - this.binary = new PhpBinary(Object.assign({}, defaults, phpSettings, args, fixed)).then(async php => { - php.ccall( - 'pib_storage_init' - , NUM - , [] - , [] - ); - - if(!php.FS.analyzePath('/preload').exists) - { - php.FS.mkdir('/preload'); - } - - await Promise.all(files.concat(extraFiles).map( - fileDef => new Promise(accept => php.FS.createPreloadedFile( - fileDef.parent, - fileDef.name, - fileDef.url, - true, - false, - accept, - )) - )); - - const iniLines = libs.map(lib => { - if(typeof lib === 'string' || lib instanceof URL) - { - return `extension=${lib}`; - } - else if(typeof lib === 'object' && lib.ini) - { - return `extension=${String(lib.url).split('/').pop()}`; - } - }); - - args.ini && iniLines.push(args.ini.replace(/\n\s+/g, '\n')); - - php.FS.writeFile('/php.ini', iniLines.join("\n") + "\n", {encoding: 'utf8'}); - - await php.ccall( - 'pib_init' - , NUM - , [] - , [] - , {async: true} - ); - - return php; - }); - } - - inputString(byteString) - { - this.input(this.encoder.encode(byteString)); - } - - input(items) - { - this.buffers.stdin.push(...items); - } - - flush() - { - this.buffers.stdout.flush(); - this.buffers.stderr.flush(); - } - - tokenize(phpCode) - { - return this.binary.then(php => php.ccall( - 'pib_tokenize' - , STR - , [STR] - , [phpCode] - )); - } - - startTransaction() - { - return Promise.resolve(); - } - - commitTransaction() - { - return Promise.resolve(); - } - - async _enqueue(callback, params = []) - { - let accept, reject; - - const coordinator = new Promise((a,r) => [accept, reject] = [a, r]); - - const _accept = result => accept(result); - const _reject = reason => reject(reason); - - this.queue.push([callback, params, _accept, _reject]); - - if(!this.queue.length) - { - return; - } - - await this.autoTransaction ? this.startTransaction() : Promise.resolve(); - - while(this.queue.length) - { - const [callback, params, accept, reject] = this.queue.shift(); - await callback(...params).then(accept).catch(reject); - } - - await this.autoTransaction ? this.commitTransaction() : Promise.resolve(); - - return coordinator; - } - - run(phpCode) - { - return this._enqueue(phpCode => this._run(phpCode), [phpCode]); - } - - async _run(phpCode) - { - const call = (await this.binary).ccall( - 'pib_run' - , NUM - , [STR] - , [`?>${phpCode}`] - , {async: true} - ); - - return call.finally(() => this.flush()); - } - - exec(phpCode) - { - return this._enqueue(phpCode => this._exec(phpCode), [phpCode]); - } - - async _exec(phpCode) - { - const call = (await this.binary).ccall( - 'pib_exec' - , STR - , [STR] - , [phpCode] - , {async: true} - ); - - return call.finally(() => this.flush()); - } - - async x(fragments, ...values) - { - const names = []; - const phpModule = await this.binary; - - if(phpModule.hasVrzno) - { - for(const value of values) - { - const name = `___value__${this.valueIndex++}`; - this.shared[name] = value; - names.push(name); - } - - let code = ''; - - fragments = [...fragments]; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(names.length) - { - code += `(vrzno_shared('${names.shift()}'))`; - } - } - - code = `vrzno_zval( ${code} );`; - - return phpModule.zvalToJS(await this.exec(code)); - } - else - { - const encoded = values.map(value => JSON.stringify(value)); - - fragments = [...fragments]; - - let code = ''; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(encoded.length) - { - code += `(json_decode('${encoded.shift()}'))`; - } - } - - return this.exec(code); - } - } - - async r(fragments, ...values) - { - const names = []; - const phpModule = await this.binary; - - if(phpModule.hasVrzno) - { - for(const value of values) - { - const name = `___value__${this.valueIndex++}`; - this.shared[name] = value; - names.push(name); - } - - let code = ''; - - fragments = [...fragments]; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(names.length) - { - code += `(vrzno_shared('${names.shift()}'))`; - } - } - - return this.run(code); - } - else - { - const encoded = values.map(value => JSON.stringify(value)); - - fragments = [...fragments]; - - let code = ''; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(encoded.length) - { - code += `(json_decode('${encoded.shift()}'))`; - } - } - - return this.run(code); - } - } - - async refresh() - { - const php = await this.binary; - - for(const callback of php.onRefresh) - { - callback(); - } - - Object.keys(this.shared).forEach(key => delete this.shared[key]); - - return php.ccall( - 'pib_refresh' - , NUM - , [] - , [] - , {async: true} - ); - } - - analyzePath(path) - { - return this._enqueue(fsOps.analyzePath, [this.binary, path]); - } - - readdir(path) - { - return this._enqueue(fsOps.readdir, [this.binary, path]); - } - - readFile(path, options) - { - return this._enqueue(fsOps.readFile, [this.binary, path, options]); - } - - stat(path) - { - return this._enqueue(fsOps.stat, [this.binary, path]); - } - - mkdir(path) - { - return this._enqueue(fsOps.mkdir, [this.binary, path]); - } - - rmdir(path) - { - return this._enqueue(fsOps.rmdir, [this.binary, path]); - } - - rename(path, newPath) - { - return this._enqueue(fsOps.rename, [this.binary, path, newPath]); - } - - writeFile(path, data, options) - { - return this._enqueue(fsOps.writeFile, [this.binary, path, data, options]); - } - - unlink(path) - { - return this._enqueue(fsOps.unlink, [this.binary, path]); - } -} - -PhpBase.phpVersion = phpVersion; -PhpBase.phpVersionFull = phpVersionFull; diff --git a/demo-web/public/static/PhpWeb.mjs b/demo-web/public/static/PhpWeb.mjs deleted file mode 100644 index d5fd7aab..00000000 --- a/demo-web/public/static/PhpWeb.mjs +++ /dev/null @@ -1,70 +0,0 @@ -import { PhpBase } from './PhpBase.mjs'; -import PhpBinary from './php-web.mjs'; -import { commitTransaction, startTransaction } from './webTransactions.mjs'; - -export class PhpWeb extends PhpBase -{ - constructor(args = {}) - { - super(PhpBinary, args); - } - - startTransaction() - { - return startTransaction(this); - } - - commitTransaction() - { - return commitTransaction(this); - } - - async refresh() - { - super.refresh(); - const php = await this.binary; - await navigator.locks.request('php-wasm-fs-lock', () => { - return new Promise((accept, reject) => { - php.FS.syncfs(true, error => { - if(error) reject(error); - else accept(); - }); - }); - }); - } - - async _enqueue(callback, params = []) - { - await this.binary; - - let accept, reject; - - const coordinator = new Promise((a,r) => [accept, reject] = [a, r]); - - const _accept = result => accept(result); - const _reject = reason => reject(reason); - - this.queue.push([callback, params, _accept, _reject]); - - navigator.locks.request('php-wasm-fs-lock', async () => { - if(!this.queue.length) - { - return; - } - - await (this.autoTransaction ? this.startTransaction() : Promise.resolve()); - - do - { - const [callback, params, accept, reject] = this.queue.shift(); - const run = callback(...params); - run.then(accept).catch(reject); - await run; - } while(this.queue.length) - - await (this.autoTransaction ? this.commitTransaction() : Promise.resolve()); - }); - - return coordinator; - } -} diff --git a/demo-web/public/static/_Event.mjs b/demo-web/public/static/_Event.mjs deleted file mode 100644 index bb7eb61c..00000000 --- a/demo-web/public/static/_Event.mjs +++ /dev/null @@ -1,8 +0,0 @@ -export const _Event = globalThis.CustomEvent ?? class extends globalThis.Event -{ - constructor(name, options = {}) - { - super(name, options) - this.detail = options.detail; - } -}; diff --git a/demo-web/public/static/config.mjs b/demo-web/public/static/config.mjs deleted file mode 100644 index 56b941e4..00000000 --- a/demo-web/public/static/config.mjs +++ /dev/null @@ -1,3 +0,0 @@ - -export const phpVersion = "8.3"; -export const phpVersionFull = "8.3.7"; diff --git a/demo-web/public/static/fsOps.mjs b/demo-web/public/static/fsOps.mjs deleted file mode 100644 index 70d67bc6..00000000 --- a/demo-web/public/static/fsOps.mjs +++ /dev/null @@ -1,108 +0,0 @@ -export class fsOps -{ - static async analyzePath(binary, path) - { - const result = (await binary).FS.analyzePath(path); - - if(!result.object) - { - return { exists: false }; - } - - const object = { - exists: true - , id: result.object.id - , mode : result.object.mode - , mount: { - mountpoint: result.object.mount.mountpoint - , mounts: result.object.mount.mounts.map(m => m.mountpoint) - } - , isDevice: result.object.isDevice - , isFolder: result.object.isFolder - , read: result.object.read - , write: result.object.write - }; - - return {...result, object, parentObject: undefined}; - } - - static async readdir(binary, path) - { - return (await binary).FS.readdir(path); - } - - static async readFile(binary, path, options) - { - return (await binary).FS.readFile(path, options); - } - - static async stat(binary, path) - { - return (await binary).FS.stat(path); - } - - static async mkdir(binary, path) - { - const php = (await binary); - const _result = php.FS.mkdir(path); - - return { - id: _result.id - , mode : _result.mode - , mount: { - mountpoint: _result.mount.mountpoint - , mounts: _result.mount.mounts.map(m => m.mountpoint) - } - , isDevice: _result.isDevice - , isFolder: _result.isFolder - , read: _result.read - , write: _result.write - }; - } - - static async rmdir(binary, path) - { - return (await binary).FS.rmdir(path); - } - - static async rename(binary, path, newPath) - { - return (await binary).FS.rename(path, newPath); - } - - static async writeFile(binary, path, data, options) - { - const bin = (await binary); - - const about = bin.FS.analyzePath(path); - - let forced = false; - - if(about.object && about.object.mode) - { - if(!(about.object.mode & 0o200)) - { - await bin.FS.chmod(path, about.object.mode | 0o200); - } - } - - const result = bin.FS.writeFile(path, data, options); - - if(forced) - { - await bin.FS.chmod(path, about.object.mode); - } - - return result; - } - - static async unlink(binary, path) - { - return (await binary).FS.unlink(path); - } - - static async chmod(binary, mode) - { - return (await binary).FS.chmod(mode); - } -} diff --git a/demo-web/public/static/libxml2.so b/demo-web/public/static/libxml2.so deleted file mode 100755 index c7ed7129..00000000 Binary files a/demo-web/public/static/libxml2.so and /dev/null differ diff --git a/demo-web/public/static/php-tags.mjs b/demo-web/public/static/php-tags.mjs deleted file mode 100644 index 24cbacb3..00000000 --- a/demo-web/public/static/php-tags.mjs +++ /dev/null @@ -1,195 +0,0 @@ -import { PhpWeb } from './PhpWeb.mjs'; - -const runPhpScriptTag = async (element) => { - - const scope = { - stdin: null, - canvas: null, - stdout: null, - stderr: null, - ini: '', - libs: [], - files: [], - imports: {} - }; - - if(element.hasAttribute('data-ini')) - { - scope.ini = element.getAttribute('data-ini'); - } - - if(element.hasAttribute('data-stdin')) - { - scope.stdin = document.querySelector(element.getAttribute('data-stdin')); - } - - if(element.hasAttribute('data-stdout')) - { - scope.stdout = document.querySelector(element.getAttribute('data-stdout')); - } - - if(element.hasAttribute('data-stderr')) - { - scope.stderr = document.querySelector(element.getAttribute('data-stderr')); - } - - if(element.hasAttribute('data-libs')) - { - try - { - scope.libs = JSON.parse(element.getAttribute('data-libs')); - } - catch(error) - { - console.error(error); - } - } - - if(element.hasAttribute('data-files')) - { - try - { - scope.files = JSON.parse(element.getAttribute('data-files')); - } - catch(error) - { - console.error(error); - } - } - - if(element.hasAttribute('data-imports')) - { - try - { - scope.imports = JSON.parse(element.getAttribute('data-imports')); - } - catch(error) - { - console.error(error); - } - } - - if(element.hasAttribute('data-canvas')) - { - scope.canvas = document.querySelector(element.getAttribute('data-canvas')); - } - - let stdout = ''; - let stderr = ''; - let ran = false; - - let getCode = Promise.resolve(element.innerText); - - if(element.hasAttribute('src')) - { - getCode = fetch(element.getAttribute('src')).then(response => response.text()); - } - - let getInput = Promise.resolve(''); - - if(scope.stdin) - { - getInput = Promise.resolve(scope.stdin.innerText); - - if(scope.stdin.hasAttribute('src')) - { - getInput = fetch(scope.stdin.getAttribute('src')).then(response => response.text()); - } - } - - let getImports = Promise.resolve(); - - if(scope.imports) - { - getImports = Promise.all(Object.entries(scope.imports).map(async ([url, names]) => { - const pkg = await import(url); - if(typeof names === 'string') - { - return {[names]: pkg}; - } - else if(Array.isArray(names)) - { - return names.map(name => ({[name]: pkg[name]})); - } - })); - } - - const [code, input, imports] = await Promise.all([getCode, getInput, getImports]); - - const flatImports = Object.assign({}, ...(imports.flat())); - - const php = new PhpWeb({ - ...flatImports, - sharedLibs: scope.libs, - ini: scope.ini, - files: scope.files, - canvas: scope.canvas, - }); - - php.inputString(input); - - const outListener = event => { - - stdout += event.detail; - - if(ran && scope.stdout) - { - scope.stdout.innerHTML = stdout; - } - }; - - const errListener = event => { - - stderr += event.detail; - - if(ran && scope.stderr) - { - scope.stderr.innerHTML = stderr; - } - }; - - php.addEventListener('output', outListener); - php.addEventListener('error', errListener); - php.addEventListener('ready', () => { - php.run(code) - .then(exitCode => exitCode && console.warn('WARNING! PHP exited with code: ' + exitCode)) - .catch(error => console.error(error)) - .finally(() => { - ran = true; - php.flush(); - scope.stdout && (scope.stdout.innerHTML = stdout); - scope.stderr && (scope.stderr.innerHTML = stderr); - }); - }); -} - -const phpSelector = 'script[type="text/php"]'; - -const runPhpTags = (doc) => { - - const phpNodes = doc.querySelectorAll(phpSelector); - - for(const phpNode of phpNodes) - { - runPhpScriptTag(phpNode); - } - - const observer = new MutationObserver((mutations, observer) => { - for(const mutation of mutations) - { - for(const addedNode of mutation.addedNodes) - { - if(!addedNode.matches || !addedNode.matches(phpSelector)) - { - continue; - } - - runPhpScriptTag(addedNode); - } - } - }); - - observer.observe(document.body.parentElement, {childList: true, subtree: true}); -} - -runPhpTags(document); \ No newline at end of file diff --git a/demo-web/public/static/php-web.mjs b/demo-web/public/static/php-web.mjs deleted file mode 100644 index 9c1ccbc8..00000000 --- a/demo-web/public/static/php-web.mjs +++ /dev/null @@ -1,16 +0,0 @@ - -var PHP = (() => { - const importMeta = import.meta;var _scriptName = importMeta.url; - - return ( -function(moduleArg = {}) { - var moduleRtn; - -var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;Module.preRun=Module.preRun||[];if(typeof Module.preRun=="function")Module.preRun=[Module.preRun];Module.preRun.push(()=>Object.assign(ENV,Module.ENV||{}));Module.preRun=Module.preRun||[];if(typeof Module.preRun=="function")Module.preRun=[Module.preRun];Module.preRun.push(()=>ENV.ICU_DATA=ENV.ICU_DATA||"/preload");var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path,defaultPath=null){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)??defaultPath??scriptDirectory+path}return defaultPath??scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{readAsync=url=>fetch(url,{credentials:"same-origin"}).then(response=>{if(response.ok){return response.arrayBuffer()}return Promise.reject(new Error(response.status+" : "+response.url))})}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var dynamicLibraries=Module["dynamicLibraries"]||[];var wasmBinary=Module["wasmBinary"];function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){if(Module["locateFile"]){var f="php-web.mjs.wasm";if(!isDataURI(f)){return locateFile(f,new URL("php-web.mjs.wasm",import.meta.url).href)}return f}return new URL("php-web.mjs.wasm",import.meta.url).href}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw`failed to load wasm binary file at '${binaryFile}'`}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}return readAsync(binaryFile).then(response=>new Uint8Array(response),()=>getBinarySync(binaryFile))}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var info=getWasmImports();function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=relocateExports(wasmExports,1024);wasmExports=Asyncify.instrumentWasmExports(wasmExports);var metadata=getDylinkMetadata(module);if(metadata.neededDynlibs){dynamicLibraries=metadata.neededDynlibs.concat(dynamicLibraries)}mergeLibSymbols(wasmExports,"main");LDSO.init();loadDylibs();wasmExports=applySignatureConversions(wasmExports);addOnInit(wasmExports["__wasm_call_ctors"]);__RELOC_FUNCS__.push(wasmExports["__wasm_apply_data_relocs"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;var asyncifyStubs={};var ASM_CONSTS={1514511:()=>!!Module.PGlite,1514538:$0=>{const statement=Module.targets.get($0);Module.PdoParams.delete(statement)},1514620:$0=>{const results=Module.targets.get($0);if(results)return results.length;return 0},1514709:$0=>{const results=Module.targets.get($0);if(results.length)return Object.keys(results[0]).length;return 0},1514821:($0,$1)=>{const targetId=$0;const target=Module.targets.get(targetId);const current=$1;if(current>=target.length){return false}return true},1514971:($0,$1)=>{const results=Module.targets.get($0);if(results.length){const str=Object.keys(results[0])[$1];const len=lengthBytesUTF8(str)+1;const loc=_malloc(len);stringToUTF8(str,loc,len);return loc}return 0},1515194:($0,$1,$2,$3)=>{const results=Module.targets.get($0);const current=-1+$1;const colno=$2;const rv=$3;if(current>=results.length){return null}const result=results[current];const key=Object.keys(result)[$2];Module.jsToZval(result[key],rv)},1515447:($0,$1,$2)=>{const stmtTgtId=$0;const paramPtr=$1;const paramPos=$2;const statement=Module.targets.get(stmtTgtId);const paramVal=Module.zvalToJS(paramPtr);if(!Module.PdoParams.has(statement)){Module.PdoParams.set(statement,[])}const paramList=Module.PdoParams.get(statement);paramList[paramPos]=paramVal},1515769:($0,$1,$2)=>{console.log("GET ATTR",$0,$1,$2)},1515810:($0,$1,$2)=>{console.log("COL META",$0,$1,$2)},1515851:($0,$1,$2)=>{console.log("CLOSE",$0,$1,$2)},1515889:($0,$1,$2,$3)=>{const db=Module.zvalToJS($0);const query=UTF8ToString($1);const supports_placeholders=$2;const zv=$3;const prepared=(...params)=>db.query(query,params);prepared.query=query;Module.jsToZval(prepared,zv)},1516118:()=>1,1516132:($0,$1,$2)=>{console.log("SET ATTR",$0,$1,$2);return true},1516186:($0,$1,$2)=>{console.log("GET ATTR",$0,$1,$2);return 1},1516237:$0=>{console.log("SHUTDOWN",$0)},1516270:($0,$1)=>{console.log("GET GC",$0,$1)},1516305:$0=>{if(Module.persist){const persist=Array.isArray(Module.persist)?Module.persist:[Module.persist];const useNodeRawFS=$0;persist.forEach(p=>{const mountPath=p.mountPath||"/persist";const localPath=p.localPath||"./persist";FS.mkdir(mountPath);if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){FS.mount(IDBFS,{autoPersist:false},mountPath)}else if(ENVIRONMENT_IS_NODE){if(!useNodeRawFS){const fs=(globalThis.__non_webpack_require__||require)("fs");if(!fs.existsSync(localPath)){fs.mkdirSync(localPath,{recursive:true})}FS.mount(NODEFS,{root:localPath},mountPath)}}})}},1516929:($0,$1,$2)=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const rv=$2;if(!(property in target)){return Module.jsToZval(undefined,rv)}Module.jsToZval(target[property],rv)},1517130:($0,$1,$2,$3,$4)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const funcPtr=$2;const zvalPtr=$3;const paramCount=$4;target[property]=Module.callableToJs(funcPtr)})()},1517333:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const zvalPtr=$2;if(!Module.targets.has(target[property])){target[property]=Module.marshalObject(zvalPtr)}})()},1517540:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);delete target[property]})()},1517656:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=null})()},1517772:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=false})()},1517889:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=true})()},1518005:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=$2})()},1518119:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=$2})()},1518233:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const newValue=UTF8ToString($2);target[property]=newValue})()},1518388:($0,$1,$2)=>{let target=Module.targets.get($0);const property=$1;const rv=$2;if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}target=Module.bufferMaps.get(target)}if(!(property in target)){return Module.jsToZval(undefined,rv)}Module.jsToZval(target[property],rv)},1518745:($0,$1,$2,$3)=>{(()=>{const target=Module.targets.get($0);const property=$1;const funcPtr=$2;const zvalPtr=$3;target[property]=Module.callableToJs(funcPtr)})()},1518912:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;const zvalPtr=$2;if(!Module.targets.has(target[property])){target[property]=Module.marshalObject(zvalPtr)}})()},1519105:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;delete target[property]})()},1519207:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=null})()},1519309:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=false})()},1519412:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=true})()},1519514:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=$2})()},1519614:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=$2})()},1519714:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;const newValue=UTF8ToString($2);target[property]=newValue})()},1519855:($0,$1,$2)=>{console.log("HASD",$0);const target=Module.targets.get($0);const property=$1;const check_empty=$2;if(Array.isArray(target)){return typeof target[property]!=="undefined"}if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}const targetBytes=Module.bufferMaps.get(target);return targetBytes[property]!=="undefined"}if(!check_empty){return property in target}else{return!!target[property]}},1520359:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);delete target[property]})()},1520475:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;delete target[property]})()},1520577:$0=>{const target=Module.targets.get($0);let json;if(typeof target==="function"){json=JSON.stringify({})}else{try{json=JSON.stringify({...target})}catch{json=JSON.stringify({})}}const str=String(json);const len=1+lengthBytesUTF8(str);const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1520914:($0,$1)=>{const target=Module.targets.get($0);const property=UTF8ToString($1);return property in target},1521019:($0,$1,$2)=>{const target=Module.targets.get($0);const property_name=UTF8ToString($1);const rv=$2;return Module.jsToZval(target[property_name],rv)},1521168:($0,$1,$2,$3,$4,$5)=>{const target=Module.targets.get($0);const method_name=UTF8ToString($1);const argp=$2;const argc=$3;const size=$4;const rv=$5;const args=[];for(let i=0;i{const target=Module.targets.get($0);const argv=$1;const argc=$2;const size=$3;const rv=$4;const args=[];for(let i=0;i{const _class=Module._classes.get($0);const argv=$1;const argc=$2;const size=$3;const args=[];for(let i=0;i{const target=Module.targets.get($0);Module.tacked.delete(target);Module.targets.remove(target)},1522202:$0=>{const target=Module.targets.get($0);const str=String(target);const len=1+lengthBytesUTF8(str);const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1522378:()=>{const context={};Module.tacked.add(context);return Module.targets.add(context)},1522466:($0,$1)=>{const context=Module.targets.get($0);const method=UTF8ToString($1);context.method=method},1522572:($0,$1)=>{(()=>{const context=Module.targets.get($0);const headerLine=UTF8ToString($1);const colon=headerLine.indexOf(":");const key=headerLine.substr(0,colon).trim();const val=headerLine.substr(1+colon).trim();context.headers=context.headers??{};context.headers[key]=val;console.log(context.headers)})()},1522902:($0,$1)=>{(()=>{const context=Module.targets.get($0);const headerLines=UTF8ToString($1);headerLines.split("\n").forEach(headerLine=>{const context=Module.targets.get($0);const colon=headerLine.indexOf(":");const key=headerLine.substr(0,colon).trim();const val=headerLine.substr(1+colon).trim();context.headers=context.headers??{};context.headers[key]=val;console.log(context.headers)})})()},1523325:($0,$1,$2)=>{(()=>{const context=Module.targets.get($0);context.body=Module.HEAPU8.slice($1,$1+$2)})()},1523432:($0,$1)=>{const context=Module.targets.get($0);context.ignoreErrors=$1},1523507:$0=>{const{status}=Module.targets.get($0);return status},1523571:$0=>{const str=String(eval(UTF8ToString($0)));const len=lengthBytesUTF8(str)+1;const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1523724:($0,$1)=>{const funcName=UTF8ToString($0);const argJson=UTF8ToString($1);const func=globalThis[funcName];const args=JSON.parse(argJson||"[]")||[];const str=String(func(...args));const len=lengthBytesUTF8(str)+1;const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1524020:($0,$1)=>{const timeout=Number(UTF8ToString($0));const funcPtr=$1;setTimeout(()=>{Module.ccall("vrzno_exec_callback","number",["number","number","number","number"],[funcPtr,null,0,0]);Module.ccall("vrzno_del_callback","number",["number"],[funcPtr])},timeout)},1524304:($0,$1)=>{const name=UTF8ToString($0);const rv=$1;Module.jsToZval(Module[name],rv)},1524389:($0,$1)=>{const name=UTF8ToString($0);const rv=$1;Module.jsToZval(Module.shared[name],rv)},1524481:($0,$1)=>{const name=UTF8ToString($0);const rv=$1;Module.jsToZval(import(/* webpackIgnore: true */ name),rv)},1524566:()=>{const IS_UNDEF=0;const IS_NULL=1;const IS_FALSE=2;const IS_TRUE=3;const IS_LONG=4;const IS_DOUBLE=5;const IS_STRING=6;const IS_ARRAY=7;const IS_OBJECT=8;Module.hasVrzno=true;Module.tacked=new Set;const FinReg=globalThis.FinalizationRegistry||class{register(){}unregister(){}};const wRef=globalThis.WeakRef||class{constructor(val){this.val=val}deref(){return this.val}};Module.fRegistry=Module.fRegistry||new FinReg(zvalPtr=>{Module.ccall("vrzno_expose_dec_refcount","number",["number"],[zvalPtr])});Module.bufferMaps=new WeakMap;const getRegistry=weakerMap=>{const registry=new FinReg(key=>{if(weakerMap.registry!==registry){return}if(weakerMap.map.has(key)&&weakerMap.map.get(key).deref()){return}weakerMap.delete(key)});return registry};Module.WeakerMap=Module.WeakerMap||class WeakerMap{constructor(entries){this.map=new Map;this.registry=getRegistry(this);entries&&entries.forEach(([key,value])=>this.set(key,value))}get size(){return this.map.size}clear(){this.registry=getRegistry(this);this.map.clear()}delete(key){if(!this.has(key)){return}this.registry.unregister(this.get(key));this.map.delete(key)}[Symbol.iterator](){const mapIterator=this.map[Symbol.iterator]();return{next:()=>{do{const entry=mapIterator.next();if(entry.done){return{done:true}}const[key,ref]=entry.value;const value=ref.deref();if(!value){this.map.delete(key);continue}return{done:false,value:[key,value]}}while(true)}}}entries(){return{[Symbol.iterator]:()=>this[Symbol.iterator]()}}forEach(callback){for(const[k,v]of this){callback(v,k,this)}}get(key){if(!this.has(key)){return}const value=this.map.get(key).deref();if(!value){this.map.delete(key)}return value}has(key){if(!this.map.has(key)){return false}const result=this.map.get(key).deref();if(!result){this.map.delete(key)}return Boolean(result)}keys(){return[...this].map(v=>v[0])}set(key,value){if(typeof value!=="function"&&typeof value!=="object"){throw new Error("WeakerMap values must be objects.")}if(this.map.has(key)){this.registry.unregister(this.get(key))}this.registry.register(value,key,value);return this.map.set(key,new wRef(value))}values(){return[...this].map(v=>v[1])}};Module.marshalObject=(zv,type)=>{const nativeTarget=Module.ccall("vrzno_expose_target","number",["number"],[zv]);if(nativeTarget&&Module.targets.hasId(nativeTarget)){return Module.targets.get(nativeTarget)}const proxy=new Proxy({},{ownKeys:target=>{let keysLoc;if(type===IS_ARRAY){keysLoc=Module.ccall("vrzno_expose_array_keys","number",["number"],[zv])}else if(type===IS_OBJECT){keysLoc=Module.ccall("vrzno_expose_object_keys","number",["number"],[zv])}if(keysLoc){const keyJson=UTF8ToString(keysLoc);const keys=JSON.parse(keyJson);_free(keysLoc);keys.push(...Reflect.ownKeys(target));return keys}return[]},has:(target,prop)=>{switch(typeof prop){case"number":return!!Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,prop]);case"string":const len=lengthBytesUTF8(prop)+1;const namePtr=_malloc(len);stringToUTF8(prop,namePtr,len);const propPtr=Module.ccall("vrzno_expose_property_pointer","number",["number","number"],[zv,namePtr]);_free(namePtr);return propPtr;default:return false}},get:(target,prop)=>{let retPtr;if(prop===Symbol.iterator){let iterator;if(type===IS_ARRAY){const max=Module.ccall("vrzno_expose_array_length","number",["number"],[zv]);iterator=()=>{let current=-1;return{next(){const done=++current>=max;return{done,value:Module.zvalToJS(Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,current]))}}}}}else if(type===IS_OBJECT){const keysLoc=Module.ccall("vrzno_expose_object_keys","number",["number"],[zv]);const keyJson=UTF8ToString(keysLoc);const keys=JSON.parse(keyJson);_free(keysLoc);iterator=()=>{let current=-1;return{next(){const done=++current>=keys.length;return{done,value:[keys[current],Module.zvalToJS(Module.ccall("vrzno_expose_property_pointer","number",["number","string"],[zv,keys[current]]))]}}}}}Module.ccall("vrzno_expose_inc_refcount","number",["number"],[zv]);Module.fRegistry.register(iterator,zv,iterator);return iterator}if(prop===Symbol.toPrimitive){const method="__toString";const len=lengthBytesUTF8(method)+1;const loc=_malloc(len);stringToUTF8(method,loc,len);const methodPtr=Module.ccall("vrzno_expose_method_pointer","number",["number","number"],[zv,loc]);_free(loc);return()=>Module.callableToJs(methodPtr,zv)()}switch(typeof prop){case"number":retPtr=Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,prop]);break;case"string":prop=String(prop);const len=lengthBytesUTF8(prop)+1;const loc=_malloc(len);stringToUTF8(prop,loc,len);if(type===IS_OBJECT){const methodPtr=Module.ccall("vrzno_expose_method_pointer","number",["number","number"],[zv,loc]);if(methodPtr){return Module.callableToJs(methodPtr,zv)}retPtr=Module.ccall("vrzno_expose_property_pointer","number",["number","number"],[zv,loc])}else if(type===IS_ARRAY){retPtr=Module.ccall("vrzno_expose_key_pointer","number",["number","number"],[zv,loc])}_free(loc);break;default:return false}if(!retPtr){return}const proxy=Module.zvalToJS(retPtr);return proxy??Reflect.get(target,prop)},getOwnPropertyDescriptor:(target,prop)=>{let retPtr;switch(typeof prop){case"number":retPtr=Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,prop]);break;case"string":const len=lengthBytesUTF8(prop)+1;const namePtr=_malloc(len);stringToUTF8(prop,namePtr,len);if(type===IS_OBJECT){retPtr=Module.ccall("vrzno_expose_property_pointer","number",["number","number"],[zv,namePtr])}else if(type===IS_ARRAY){retPtr=Module.ccall("vrzno_expose_key_pointer","number",["number","number"],[zv,namePtr])}_free(namePtr);break;default:return false}const proxy=Module.zvalToJS(retPtr);return{configurable:true,enumerable:true,value:target[prop]}}});Module.ccall("vrzno_expose_inc_refcount","number",["number"],[zv]);return proxy};Module.callableToJs=Module.callableToJs||((funcPtr,objPtr=null)=>{if(Module.callables.has(funcPtr)){return Module.callables.get(funcPtr)}const wrapped=(...args)=>{let paramsPtr=null;if(args.length){paramsPtr=Module.ccall("vrzno_expose_create_params","number",["number"],[args.length]);for(let i=0;i{if(!zv){return}zv=Module.ccall("vrzno_expose_zval_deref","number",["number"],[zv]);const isNative=Module.ccall("vrzno_expose_target","number",["number"],[zv]);if(isNative){return Module.targets.get(isNative)}const callable=Module.ccall("vrzno_expose_callable","number",["number"],[zv]);let valPtr;if(callable){const wrapped=Module.callableToJs(callable);if(!Module.targets.has(wrapped)){Module.targets.add(wrapped);Module.ccall("vrzno_expose_inc_refcount","number",["number"],[zv]);Module.fRegistry.register(wrapped,zv,wrapped)}return wrapped}const type=Module.ccall("vrzno_expose_type","number",["number"],[zv]);switch(type){case IS_UNDEF:return undefined;break;case IS_NULL:return null;break;case IS_TRUE:return true;break;case IS_FALSE:return false;break;case IS_LONG:return Module.ccall("vrzno_expose_long","number",["number"],[zv]);break;case IS_DOUBLE:valPtr=Module.ccall("vrzno_expose_double","number",["number"],[zv]);if(!valPtr){return null}return getValue(valPtr,"double");break;case IS_STRING:valPtr=Module.ccall("vrzno_expose_string","number",["number"],[zv]);if(!valPtr){return null}return UTF8ToString(valPtr);break;case IS_ARRAY:case IS_OBJECT:return Module.marshalObject(zv,type);default:return null;break}});Module.jsToZval=Module.jsToZval||((value,rv)=>{if(typeof value==="undefined"){Module.ccall("vrzno_expose_create_undef","number",["number"],[rv])}else if(value===null){Module.ccall("vrzno_expose_create_null","number",["number"],[rv])}else if([true,false].includes(value)){Module.ccall("vrzno_expose_create_bool","number",["number","number"],[value,rv])}else if(value&&["function","object"].includes(typeof value)){const index=Module.targets.add(value);const isFunction=typeof value==="function"?index:0;const isConstructor=isFunction&&!!(value.prototype&&value.prototype.constructor);Module.ccall("vrzno_expose_create_object_for_target","number",["number","number","number","number"],[index,isFunction,isConstructor,rv]);Module.tacked.add(value);Module.ccall("vrzno_expose_inc_refcount","number",["number"],[rv]);Module.fRegistry.register(value,rv,value)}else if(typeof value==="number"){if(Number.isInteger(value)){Module.ccall("vrzno_expose_create_long","number",["number","number"],[value,rv])}else if(Number.isFinite(value)){Module.ccall("vrzno_expose_create_double","number",["number","number"],[value,rv])}}else if(typeof value==="string"){const len=lengthBytesUTF8(value)+1;const loc=_malloc(len);stringToUTF8(value,loc,len);Module.ccall("vrzno_expose_create_string","number",["number","number"],[loc,rv]);_free(loc)}});Module.UniqueIndex=Module.UniqueIndex||class UniqueIndex{constructor(){this.byObject=new WeakMap;this.byInteger=new Module.WeakerMap;this.id=0;Object.defineProperty(this,"add",{configurable:false,writable:false,value:callback=>{if(this.byObject.has(callback)){const id=this.byObject.get(callback);return id}const newid=++this.id;this.byObject.set(callback,newid);this.byInteger.set(newid,callback);return newid}});Object.defineProperty(this,"has",{configurable:false,writable:false,value:obj=>{if(this.byObject.has(obj)){return this.byObject.get(obj)}}});Object.defineProperty(this,"hasId",{configurable:false,writable:false,value:address=>{if(this.byInteger.has(address)){return this.byInteger.get(address)}}});Object.defineProperty(this,"get",{configurable:false,writable:false,value:address=>{if(this.byInteger.has(address)){return this.byInteger.get(address)}}});Object.defineProperty(this,"getId",{configurable:false,writable:false,value:obj=>{if(this.byObject.has(obj)){return this.byObject.get(obj)}}});Object.defineProperty(this,"remove",{configurable:false,writable:false,value:address=>{const obj=this.byInteger.get(address);if(obj){this.byObject.delete(obj);this.byInteger.delete(address)}}})}};Module.classes=Module.classes||new WeakMap;Module._classes=Module._classes||new Module.WeakerMap;Module.callables=Module.callables||new Module.WeakerMap;Module.targets=Module.targets||new Module.UniqueIndex;Module.targets.add(globalThis);Module.PdoParams=new WeakMap},1537013:$0=>{const target=Module.targets.get($0);return Module.classes.get(target)},1537091:($0,$1)=>{const target=Module.targets.get($0);Module.classes.set(target,$1);Module._classes.set($1,target)},1537199:($0,$1,$2,$3)=>{const target=Module.targets.get($0);const dest=$1;const fpos=$2;let count=$3;if(target.status>=400&&!target.context.ignoreErrors){return 0}if(fpos>=target.buffer.length){count=0}else if(fpos+count>target.buffer.length){count=target.buffer.length-fpos}if(count){Module.HEAPU8.set(target.buffer.slice(fpos,fpos+count),dest)}return count},1537591:$0=>{const parsed=Module.targets.get($0);Module.tacked.delete(parsed)},1537664:$0=>{const _class=Module._classes.get($0);if(_class){return Module.targets.getId(_class)}return Module.targets.add(globalThis)},1537799:($0,$1)=>{let target=Module.targets.get($0);const property=$1;if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}target=Module.bufferMaps.get(target)}if(Array.isArray(target)||ArrayBuffer.isView(target)){if(property>=0&&property{let target=Module.targets.get($0);const property=$1;const rv=$2;if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}target=Module.bufferMaps.get(target)}return Module.jsToZval(target[property],rv)},1538457:$0=>{const target=Module.targets.get($0);if(target){Module.tacked.delete(target);Module.fRegistry.unregister(target)}}};function __asyncjs__pdo_pglite_real_stmt_execute(targetId,error,rv){return Asyncify.handleAsync(async()=>{const statement=Module.targets.get(targetId);if(!Module.PdoParams.has(statement)){Module.PdoParams.set(statement,[])}const params=Module.PdoParams.get(statement);try{const result=await statement(...params);const rows=result.rows??[];const _fields=result.fields??[];const fields=new Map;_fields.forEach(field=>{fields.set(field.name,field)});const utf8decoder=new TextDecoder;const mapped=rows.map(row=>{const _row={};for(const[key,val]of Object.entries(row)){if(fields.has(key)&&fields.get(key).dataTypeID===17){_row[key]=val?utf8decoder.decode(val):null;continue}_row[key]=val}return _row});Module.jsToZval(mapped,rv);return 1}catch(exception){const message=String(exception.message);const len=lengthBytesUTF8(message)+1;const loc=_malloc(len);console.error(message,statement.query,exception);stringToUTF8(message,loc,len);setValue(error,loc,"*");return 0}})}__asyncjs__pdo_pglite_real_stmt_execute.sig="iiii";function __asyncjs__pdo_pglite_real_handle_begin(handle){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);await db.query("BEGIN")})}__asyncjs__pdo_pglite_real_handle_begin.sig="ii";function __asyncjs__pdo_pglite_real_handle_commit(handle){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);await db.query("COMMIT")})}__asyncjs__pdo_pglite_real_handle_commit.sig="ii";function __asyncjs__pdo_pglite_real_handle_rollback(handle){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);await db.query("ROLLBACK")})}__asyncjs__pdo_pglite_real_handle_rollback.sig="ii";function __asyncjs__pdo_pglite_real_last_insert_id(handle,namePtr){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);if(namePtr){const name=UTF8ToString(namePtr);console.log("LAST INSERT ID",$0,name);const result=await db.query("SELECT CURRVAL($1)",name);console.log(result)}else{console.log("LAST INSERT ID",$0);const result=await db.query("SELECT CURRVAL($1)",name);console.log(result)}return 0})}__asyncjs__pdo_pglite_real_last_insert_id.sig="iii";function __asyncjs__pdo_pglite_real_db_handle_factory(connectionStringPrt,dbZv){return Asyncify.handleAsync(async()=>{if(!Module.PGlite){throw new Error("The PGlite class must be provided as a constructor arg to PHP to use PGlite.")}const connectionString=UTF8ToString(connectionStringPrt);const pglite=new Module.PGlite(connectionString?"idb://"+connectionString:undefined);return Module.jsToZval(pglite,dbZv)})}__asyncjs__pdo_pglite_real_db_handle_factory.sig="vii";function __asyncjs__php_stream_fetch_real_open(path,_context,ptrsize,headersv,headersc){return Asyncify.handleAsync(async()=>{const pathString=UTF8ToString(path);const context=Module.targets.get(_context)||{};const response=await fetch(pathString,context);const buffer=new Uint8Array(await response.arrayBuffer());const status=response.status;const headerLines=[...response.headers.entries()].map(([key,val])=>`${key}: ${val}`);headerLines.unshift(`HTTP/1.1 ${response.status} ${response.statusText}`);const headersloc=_malloc(ptrsize*headerLines.length);setValue(headersv,headersloc,"*");setValue(headersc,headerLines.length,"i32");let i=0;for(const line of headerLines){const len=lengthBytesUTF8(line);const loc=_malloc(len);stringToUTF8(line,loc,len);setValue(headersloc+i*ptrsize,loc,"i"+8*ptrsize);i++}const parsed={status,buffer,context};Module.tacked.add(parsed);Module.tacked.delete(context);return Module.targets.add(parsed)})}__asyncjs__php_stream_fetch_real_open.sig="iiiiii";function __asyncjs__vrzno_await_internal(targetId,rv){return Asyncify.handleAsync(async()=>{const target=Module.targets.get(targetId);const result=await target;Module.jsToZval(result,rv)})}__asyncjs__vrzno_await_internal.sig="vii";function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var GOT={};var currentModuleWeakSymbols=new Set([]);var GOTHandler={get(obj,symName){var rtn=GOT[symName];if(!rtn){rtn=GOT[symName]=new WebAssembly.Global({value:"i32",mutable:true})}if(!currentModuleWeakSymbols.has(symName)){rtn.required=true}return rtn}};var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{idx>>>=0;var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var getDylinkMetadata=binary=>{var offset=0;var end=0;function getU8(){return binary[offset++]}function getLEB(){var ret=0;var mul=1;while(1){var byte=binary[offset++];ret+=(byte&127)*mul;mul*=128;if(!(byte&128))break}return ret}function getString(){var len=getLEB();offset+=len;return UTF8ArrayToString(binary,offset-len,len)}function failIf(condition,message){if(condition)throw new Error(message)}var name="dylink.0";if(binary instanceof WebAssembly.Module){var dylinkSection=WebAssembly.Module.customSections(binary,name);if(dylinkSection.length===0){name="dylink";dylinkSection=WebAssembly.Module.customSections(binary,name)}failIf(dylinkSection.length===0,"need dylink section");binary=new Uint8Array(dylinkSection[0]);end=binary.length}else{var int32View=new Uint32Array(new Uint8Array(binary.subarray(0,24)).buffer);var magicNumberFound=int32View[0]==1836278016;failIf(!magicNumberFound,"need to see wasm magic number");failIf(binary[8]!==0,"need the dylink section to be first");offset=9;var section_size=getLEB();end=offset+section_size;name=getString()}var customSection={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(name=="dylink"){customSection.memorySize=getLEB();customSection.memoryAlign=getLEB();customSection.tableSize=getLEB();customSection.tableAlign=getLEB();var neededDynlibsCount=getLEB();for(var i=0;i>>0];case"i8":return HEAP8[ptr>>>0];case"i16":return HEAP16[ptr>>>1>>>0];case"i32":return HEAP32[ptr>>>2>>>0];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>>2>>>0];case"double":return HEAPF64[ptr>>>3>>>0];case"*":return HEAPU32[ptr>>>2>>>0];default:abort(`invalid type for getValue: ${type}`)}}var newDSO=(name,handle,syms)=>{var dso={refcount:Infinity,name,exports:syms,global:true};LDSO.loadedLibsByName[name]=dso;if(handle!=undefined){LDSO.loadedLibsByHandle[handle]=dso}return dso};var LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}};var ___heap_base=35237216;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var getMemory=size=>{if(runtimeInitialized){return _calloc(size,1)}var ret=___heap_base;var end=ret+alignMemory(size,16);___heap_base=end;GOT["__heap_base"].value=end;return ret};var isInternalSym=symName=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(symName)||symName.startsWith("__em_js__");var uleb128Encode=(n,target)=>{if(n<128){target.push(n)}else{target.push(n%128|128,n>>7)}};var sigToWasmTypes=sig=>{var typeNames={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};var type={parameters:[],results:sig[0]=="v"?[]:[typeNames[sig[0]]]};for(var i=1;i{var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={i:127,p:127,j:126,f:125,d:124,e:111};target.push(96);uleb128Encode(sigParam.length,target);for(var i=0;i{if(typeof WebAssembly.Function=="function"){return new WebAssembly.Function(sigToWasmTypes(sig),func)}var typeSectionBody=[1];generateFuncType(sig,typeSectionBody);var bytes=[0,97,115,109,1,0,0,0,1];uleb128Encode(typeSectionBody.length,bytes);bytes.push(...typeSectionBody);bytes.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var module=new WebAssembly.Module(new Uint8Array(bytes));var instance=new WebAssembly.Instance(module,{e:{f:func}});var wrappedFunc=instance.exports["f"];return wrappedFunc};var wasmTableMirror=[];var wasmTable=new WebAssembly.Table({initial:4987,element:"anyfunc"});var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var updateTableMap=(offset,count)=>{if(functionsInTableMap){for(var i=offset;i{if(!functionsInTableMap){functionsInTableMap=new WeakMap;updateTableMap(0,wasmTable.length)}return functionsInTableMap.get(func)||0};var freeTableIndexes=[];var getEmptyTableSlot=()=>{if(freeTableIndexes.length){return freeTableIndexes.pop()}try{wasmTable.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return wasmTable.length-1};var setWasmTableEntry=(idx,func)=>{wasmTable.set(idx,func);wasmTableMirror[idx]=wasmTable.get(idx)};var addFunction=(func,sig)=>{var rtn=getFunctionAddress(func);if(rtn){return rtn}var ret=getEmptyTableSlot();try{setWasmTableEntry(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}var wrapped=convertJsFunctionToWasm(func,sig);setWasmTableEntry(ret,wrapped)}functionsInTableMap.set(func,ret);return ret};var updateGOT=(exports,replace)=>{for(var symName in exports){if(isInternalSym(symName)){continue}var value=exports[symName];if(symName.startsWith("orig$")){symName=symName.split("$")[1];replace=true}GOT[symName]||=new WebAssembly.Global({value:"i32",mutable:true});if(replace||GOT[symName].value==0){if(typeof value=="function"){GOT[symName].value=addFunction(value)}else if(typeof value=="number"){GOT[symName].value=value}else{err(`unhandled export type for '${symName}': ${typeof value}`)}}}};var relocateExports=(exports,memoryBase,replace)=>{var relocated={};for(var e in exports){var value=exports[e];if(typeof value=="object"){value=value.value}if(typeof value=="number"){value+=memoryBase}relocated[e]=value}updateGOT(relocated,replace);return relocated};var isSymbolDefined=symName=>{var existing=wasmImports[symName];if(!existing||existing.stub){return false}if(symName in asyncifyStubs&&!asyncifyStubs[symName]){return false}return true};var setTempRet0=val=>__emscripten_tempret_set(val);var setTempRet0=setTempRet0;Module["setTempRet0"]=setTempRet0;var createDyncallWrapper=sig=>{var sections=[];var prelude=[0,97,115,109,1,0,0,0];sections.push(prelude);var wrappersig=[sig[0].replace("j","i"),"i",sig.slice(1).replace(/j/g,"ii")].join("");var typeSectionBody=[3];generateFuncType(wrappersig,typeSectionBody);generateFuncType(sig,typeSectionBody);generateFuncType("vi",typeSectionBody);var typeSection=[1];uleb128Encode(typeSectionBody.length,typeSection);typeSection.push(...typeSectionBody);sections.push(typeSection);var importSection=[2,15,2,1,101,1,116,1,112,0,0,1,101,1,114,0,2];sections.push(importSection);var functionSection=[3,2,1,0];sections.push(functionSection);var exportSection=[7,5,1,1,102,0,1];sections.push(exportSection);var convert_code=[];if(sig[0]==="j"){convert_code=[1,1,126]}else{convert_code.push(0)}function localGet(j){convert_code.push(32);uleb128Encode(j,convert_code)}var j=1;for(var i=1;i{sig=sig.replace(/p/g,"i");if(!("dynCall_"+sig in Module)){Module["dynCall_"+sig]=createDyncallWrapper(sig)}var f=Module["dynCall_"+sig];return f(ptr,...args)};var dynCall=(sig,ptr,args=[])=>{var rtn=dynCallLegacy(sig,ptr,args);return sig[0]=="p"?rtn>>>0:rtn};var stackSave=()=>_emscripten_stack_get_current();var stackRestore=val=>__emscripten_stack_restore(val);var createInvokeFunction=sig=>(ptr,...args)=>{var sp=stackSave();try{return dynCall(sig,ptr,args)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}};var resolveGlobalSymbol=(symName,direct=false)=>{var sym;if(direct&&"orig$"+symName in wasmImports){symName="orig$"+symName}if(isSymbolDefined(symName)){sym=wasmImports[symName]}else if(symName.startsWith("invoke_")){sym=wasmImports[symName]=createInvokeFunction(symName.split("_")[1])}return{sym,name:symName}};var UTF8ToString=(ptr,maxBytesToRead)=>{ptr>>>=0;return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""};var loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8>>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign);var memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0;var tableBase=metadata.tableSize?wasmTable.length:0;if(handle){HEAP8[handle+8>>>0]=1;HEAPU32[handle+12>>>2>>>0]=memoryBase;HEAP32[handle+16>>>2>>>0]=metadata.memorySize;HEAPU32[handle+20>>>2>>>0]=tableBase;HEAP32[handle+24>>>2>>>0]=metadata.tableSize}}else{memoryBase=HEAPU32[handle+12>>>2>>>0];tableBase=HEAPU32[handle+20>>>2>>>0]}var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;if(tableGrowthNeeded>0){wasmTable.grow(tableGrowthNeeded)}var moduleExports;function resolveSymbol(sym){var resolved=resolveGlobalSymbol(sym).sym;if(!resolved&&localScope){resolved=localScope[sym]}if(!resolved){resolved=moduleExports[sym]}return resolved}var proxyHandler={get(stubs,prop){switch(prop){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(prop in wasmImports&&!wasmImports[prop].stub){return wasmImports[prop]}if(!(prop in stubs)){var resolved;stubs[prop]=(...args)=>{resolved||=resolveSymbol(prop);return resolved(...args)}}return stubs[prop]}};var proxy=new Proxy({},proxyHandler);var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize);moduleExports=relocateExports(instance.exports,memoryBase);moduleExports=Asyncify.instrumentWasmExports(moduleExports);if(!flags.allowUndefined){reportUndefinedSymbols()}function addEmAsm(addr,body){var args=[];var arity=0;for(;arity<16;arity++){if(body.indexOf("$"+arity)!=-1){args.push("$"+arity)}else{break}}args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports){var start=moduleExports["__start_em_asm"];var stop=moduleExports["__stop_em_asm"];while(start ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports){if(name.startsWith("__em_js__")){var start=moduleExports[name];var jsString=UTF8ToString(start);var parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]);delete moduleExports[name]}}var applyRelocs=moduleExports["__wasm_apply_data_relocs"];if(applyRelocs){if(runtimeInitialized){applyRelocs()}else{__RELOC_FUNCS__.push(applyRelocs)}}var init=moduleExports["__wasm_call_ctors"];if(init){if(runtimeInitialized){init()}else{__ATINIT__.push(init)}}return moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(result=>postInstantiation(result.module,result.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary);var instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}if(flags.loadAsync){return metadata.neededDynlibs.reduce((chain,dynNeeded)=>chain.then(()=>loadDynamicLibrary(dynNeeded,flags,localScope)),Promise.resolve()).then(loadModule)}metadata.neededDynlibs.forEach(needed=>loadDynamicLibrary(needed,flags,localScope));return loadModule()};var mergeLibSymbols=(exports,libName)=>{for(var[sym,exp]of Object.entries(exports)){const setImport=target=>{if(target in asyncifyStubs){asyncifyStubs[target]=exp}if(!isSymbolDefined(target)){wasmImports[target]=exp}};setImport(sym);if(sym.startsWith("dynCall_")&&!Module.hasOwnProperty(sym)){Module[sym]=exp}}};var asyncLoad=(url,onload,onerror,noRunDep)=>{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url).then(arrayBuffer=>{onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},err=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var preloadPlugins=Module["preloadPlugins"]||[];var registerWasmPlugin=()=>{var wasmPlugin={promiseChainEnd:Promise.resolve(),canHandle:name=>!Module["noWasmDecoding"]&&name.endsWith(".so"),handle:(byteArray,name,onload,onerror)=>{wasmPlugin["promiseChainEnd"]=wasmPlugin["promiseChainEnd"].then(()=>loadWebAssemblyModule(byteArray,{loadAsync:true,nodelete:true},name,{})).then(exports=>{preloadedWasm[name]=exports;onload(byteArray)},error=>{err(`failed to instantiate wasm: ${name}: ${error}`);onerror()})}};preloadPlugins.push(wasmPlugin)};var preloadedWasm={};function loadDynamicLibrary(libName,flags={global:true,nodelete:true},localScope,handle){var dso=LDSO.loadedLibsByName[libName];if(dso){if(!flags.global){if(localScope){Object.assign(localScope,dso.exports)}}else if(!dso.global){dso.global=true;mergeLibSymbols(dso.exports,libName)}if(flags.nodelete&&dso.refcount!==Infinity){dso.refcount=Infinity}dso.refcount++;if(handle){LDSO.loadedLibsByHandle[handle]=dso}return flags.loadAsync?Promise.resolve(true):true}dso=newDSO(libName,handle,"loading");dso.refcount=flags.nodelete?Infinity:1;dso.global=flags.global;function loadLibData(){if(handle){var data=HEAPU32[handle+28>>>2>>>0];var dataSize=HEAPU32[handle+32>>>2>>>0];if(data&&dataSize){var libData=HEAP8.slice(data,data+dataSize);return flags.loadAsync?Promise.resolve(libData):libData}}var libFile=locateFile(libName);if(flags.loadAsync){return new Promise((resolve,reject)=>asyncLoad(libFile,resolve,reject))}if(!readBinary){throw new Error(`${libFile}: file not found, and synchronous loading of external files is not available`)}return readBinary(libFile)}function getExports(){var preloaded=preloadedWasm[libName];if(preloaded){return flags.loadAsync?Promise.resolve(preloaded):preloaded}if(flags.loadAsync){return loadLibData().then(libData=>loadWebAssemblyModule(libData,flags,libName,localScope,handle))}return loadWebAssemblyModule(loadLibData(),flags,libName,localScope,handle)}function moduleLoaded(exports){if(dso.global){mergeLibSymbols(exports,libName)}else if(localScope){Object.assign(localScope,exports)}dso.exports=exports}if(flags.loadAsync){return getExports().then(exports=>{moduleLoaded(exports);return true})}moduleLoaded(getExports());return true}var reportUndefinedSymbols=()=>{for(var[symName,entry]of Object.entries(GOT)){if(entry.value==0){var value=resolveGlobalSymbol(symName,true).sym;if(!value&&!entry.required){continue}if(typeof value=="function"){entry.value=addFunction(value,value.sig)}else if(typeof value=="number"){entry.value=value}else{throw new Error(`bad export type for '${symName}': ${typeof value}`)}}}};var loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs");dynamicLibraries.reduce((chain,lib)=>chain.then(()=>loadDynamicLibrary(lib,{loadAsync:true,global:true,nodelete:true,allowUndefined:true})),Promise.resolve()).then(()=>{reportUndefinedSymbols();removeRunDependency("loadDylibs")})};var noExitRuntime=Module["noExitRuntime"]||false;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr>>>0]=value;break;case"i8":HEAP8[ptr>>>0]=value;break;case"i16":HEAP16[ptr>>>1>>>0]=value;break;case"i32":HEAP32[ptr>>>2>>>0]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>>2>>>0]=value;break;case"double":HEAPF64[ptr>>>3>>>0]=value;break;case"*":HEAPU32[ptr>>>2>>>0]=value;break;default:abort(`invalid type for setValue: ${type}`)}}function _UTF8ToHtml(...args){return asyncifyStubs["UTF8ToHtml"](...args)}_UTF8ToHtml.stub=true;asyncifyStubs["UTF8ToHtml"]=undefined;function _UTF8Toisolat1(...args){return asyncifyStubs["UTF8Toisolat1"](...args)}_UTF8Toisolat1.stub=true;asyncifyStubs["UTF8Toisolat1"]=undefined;var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function ___assert_fail(condition,filename,line,func){condition>>>=0;filename>>>=0;func>>>=0;abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}___assert_fail.sig="vppip";var ___asyncify_data=new WebAssembly.Global({value:"i32",mutable:true},0);var ___asyncify_state=new WebAssembly.Global({value:"i32",mutable:true},0);var ___call_sighandler=function(fp,sig){fp>>>=0;return(a1=>{})(sig)};___call_sighandler.sig="vpi";var ___memory_base=new WebAssembly.Global({value:"i32",mutable:false},1024);var ___stack_high=35237216;var ___stack_low=1682784;var ___stack_pointer=new WebAssembly.Global({value:"i32",mutable:true},35237216);var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:(...paths)=>PATH.normalize(paths.join("/")),join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>crypto.getRandomValues(view)}else abort("initRandomDevice")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:(...args)=>{var resolvedPath="",resolvedAbsolute=false;for(var i=args.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?args[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{outIdx>>>=0;if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++>>>0]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++>>>0]=192|u>>6;heap[outIdx++>>>0]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++>>>0]=224|u>>12;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++>>>0]=240|u>>18;heap[outIdx++>>>0]=128|u>>12&63;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63}}heap[outIdx>>>0]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else{}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){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(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var zeroMemory=(address,size)=>{HEAPU8.fill(0,address,address+size);return address};var mmapAlloc=size=>{size=alignMemory(size,65536);var ptr=_emscripten_builtin_memalign(65536,size);if(!ptr)return 0;return zeroMemory(ptr,size)};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}MEMFS.ops_table||={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key of Object.keys(node.contents)){entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length>>0)}}return{ptr,allocated}},msync(stream,buffer,offset,length,mmapFlags){MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){preFinish?.();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}onload?.();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{onerror?.();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,processData,onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={r:0,"r+":2,w:512|64|1,"w+":512|64|2,a:1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var IDBFS={dbs:{},indexedDB:()=>{if(typeof indexedDB!="undefined")return indexedDB;var ret=null;if(typeof window=="object")ret=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;return ret},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",queuePersist:mount=>{function onPersistComplete(){if(mount.idbPersistState==="again")startPersist();else mount.idbPersistState=0}function startPersist(){mount.idbPersistState="idb";IDBFS.syncfs(mount,false,onPersistComplete)}if(!mount.idbPersistState){mount.idbPersistState=setTimeout(startPersist,0)}else if(mount.idbPersistState==="idb"){mount.idbPersistState="again"}},mount:mount=>{var mnt=MEMFS.mount(mount);if(mount?.opts?.autoPersist){mnt.idbPersistState=0;var memfs_node_ops=mnt.node_ops;mnt.node_ops=Object.assign({},mnt.node_ops);mnt.node_ops.mknod=(parent,name,mode,dev)=>{var node=memfs_node_ops.mknod(parent,name,mode,dev);node.node_ops=mnt.node_ops;node.idbfs_mount=mnt.mount;node.memfs_stream_ops=node.stream_ops;node.stream_ops=Object.assign({},node.stream_ops);node.stream_ops.write=(stream,buffer,offset,length,position,canOwn)=>{stream.node.isModified=true;return node.memfs_stream_ops.write(stream,buffer,offset,length,position,canOwn)};node.stream_ops.close=stream=>{var n=stream.node;if(n.isModified){IDBFS.queuePersist(n.idbfs_mount);n.isModified=false}if(n.memfs_stream_ops.close)return n.memfs_stream_ops.close(stream)};return node};mnt.node_ops.mkdir=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.mkdir(...args));mnt.node_ops.rmdir=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.rmdir(...args));mnt.node_ops.symlink=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.symlink(...args));mnt.node_ops.unlink=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.unlink(...args));mnt.node_ops.rename=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.rename(...args))}return mnt},syncfs:(mount,populate,callback)=>{IDBFS.getLocalSet(mount,(err,local)=>{if(err)return callback(err);IDBFS.getRemoteSet(mount,(err,remote)=>{if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)})})},quit:()=>{Object.values(IDBFS.dbs).forEach(value=>value.close());IDBFS.dbs={}},getDB:(name,callback)=>{var db=IDBFS.dbs[name];if(db){return callback(null,db)}var req;try{req=IDBFS.indexedDB().open(name,IDBFS.DB_VERSION)}catch(e){return callback(e)}if(!req){return callback("Unable to connect to IndexedDB")}req.onupgradeneeded=e=>{var db=e.target.result;var transaction=e.target.transaction;var fileStore;if(db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){fileStore=transaction.objectStore(IDBFS.DB_STORE_NAME)}else{fileStore=db.createObjectStore(IDBFS.DB_STORE_NAME)}if(!fileStore.indexNames.contains("timestamp")){fileStore.createIndex("timestamp","timestamp",{unique:false})}};req.onsuccess=()=>{db=req.result;IDBFS.dbs[name]=db;callback(null,db)};req.onerror=e=>{callback(e.target.error);e.preventDefault()}},getLocalSet:(mount,callback)=>{var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return p=>PATH.join2(root,p)}var check=FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));while(check.length){var path=check.pop();var stat;try{stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){check.push(...FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))}entries[path]={timestamp:stat.mtime}}return callback(null,{type:"local",entries})},getRemoteSet:(mount,callback)=>{var entries={};IDBFS.getDB(mount.mountpoint,(err,db)=>{if(err)return callback(err);try{var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=e=>{callback(e.target.error);e.preventDefault()};var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=event=>{var cursor=event.target.result;if(!cursor){return callback(null,{type:"remote",db,entries})}entries[cursor.primaryKey]={timestamp:cursor.key};cursor.continue()}}catch(e){return callback(e)}})},loadLocalEntry:(path,callback)=>{var stat,node;try{var lookup=FS.lookupPath(path);node=lookup.node;stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){return callback(null,{timestamp:stat.mtime,mode:stat.mode})}else if(FS.isFile(stat.mode)){node.contents=MEMFS.getFileDataAsTypedArray(node);return callback(null,{timestamp:stat.mtime,mode:stat.mode,contents:node.contents})}else{return callback(new Error("node type not supported"))}},storeLocalEntry:(path,entry,callback)=>{const previousIgnore=FS.ignorePermissions;try{FS.ignorePermissions=true;if(FS.isDir(entry["mode"])){FS.mkdirTree(path,entry["mode"])}else if(FS.isFile(entry["mode"])){FS.writeFile(path,entry["contents"],{canOwn:true})}else{return callback(new Error("node type not supported"))}FS.chmod(path,entry["mode"]);FS.utime(path,entry["timestamp"],entry["timestamp"])}catch(e){return callback(e)}finally{FS.ignorePermissions=previousIgnore}callback(null)},removeLocalEntry:(path,callback)=>{try{var stat=FS.stat(path);if(FS.isDir(stat.mode)){FS.rmdir(path)}else if(FS.isFile(stat.mode)){FS.unlink(path)}}catch(e){return callback(e)}callback(null)},loadRemoteEntry:(store,path,callback)=>{var req=store.get(path);req.onsuccess=event=>callback(null,event.target.result);req.onerror=e=>{callback(e.target.error);e.preventDefault()}},storeRemoteEntry:(store,path,entry,callback)=>{try{var req=store.put(entry,path)}catch(e){callback(e);return}req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},removeRemoteEntry:(store,path,callback)=>{var req=store.delete(path);req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},reconcile:(src,dst,callback)=>{var total=0;var create=[];Object.keys(src.entries).forEach(key=>{var e=src.entries[key];var e2=dst.entries[key];if(!e2||e["timestamp"].getTime()!=e2["timestamp"].getTime()){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(key=>{if(!src.entries[key]){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err&&!errored){errored=true;return callback(err)}}transaction.onerror=transaction.onabort=e=>{done(e.target.error);e.preventDefault()};transaction.oncomplete=e=>{if(!errored){callback(null)}};create.sort().forEach(path=>{if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(err,entry)=>{if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,(err,entry)=>{if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(path=>{if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:class{constructor(errno){this.name="ErrnoError";this.errno=errno}},genericErrors:{},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(val){this.node=val}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(val){this.shared.flags=val}get position(){return this.shared.position}set position(val){this.shared.position=val}},FSNode:class{constructor(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev;this.readMode=292|73;this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(val){val?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(val){val?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return FS.isDir(this.mode)}get isDevice(){return FS.isChrdev(this.mode)}},lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){if(!FS.isDir(dir.mode))return 54;var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},dupStream(origStream,fd=-1){var stream=FS.createStream(origStream,fd);stream.stream_ops?.dup?.(stream);return stream},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;stream.stream_ops.open?.(stream)},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push(...m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type,opts,mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;iFS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(input,output,error){if(input){FS.createDevice("/dev","stdin",input)}else{FS.symlink("/dev/tty","/dev/stdin")}if(output){FS.createDevice("/dev","stdout",null,output)}else{FS.symlink("/dev/tty","/dev/stdout")}if(error){FS.createDevice("/dev","stderr",null,error)}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},staticInit(){[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""});FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={MEMFS,IDBFS}},init(input,output,error){FS.initialized=true;input??=Module["stdin"];output??=Module["stdout"];error??=Module["stderr"];FS.createStandardStreams(input,output,error)},quit(){FS.initialized=false;_fflush(0);for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]}setDataGetter(getter){this.getter=getter}cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true}get length(){if(!this.lengthKnown){this.cacheLength()}return this._length}get chunkSize(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=(...args)=>{FS.forceLoadFile(node);return fn(...args)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){var stat=func(path);HEAP32[buf>>>2>>>0]=stat.dev;HEAP32[buf+4>>>2>>>0]=stat.mode;HEAPU32[buf+8>>>2>>>0]=stat.nlink;HEAP32[buf+12>>>2>>>0]=stat.uid;HEAP32[buf+16>>>2>>>0]=stat.gid;HEAP32[buf+20>>>2>>>0]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>>2>>>0]=tempI64[0],HEAP32[buf+28>>>2>>>0]=tempI64[1];HEAP32[buf+32>>>2>>>0]=4096;HEAP32[buf+36>>>2>>>0]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>>2>>>0]=tempI64[0],HEAP32[buf+44>>>2>>>0]=tempI64[1];HEAPU32[buf+48>>>2>>>0]=atime%1e3*1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>>2>>>0]=tempI64[0],HEAP32[buf+60>>>2>>>0]=tempI64[1];HEAPU32[buf+64>>>2>>>0]=mtime%1e3*1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>>2>>>0]=tempI64[0],HEAP32[buf+76>>>2>>>0]=tempI64[1];HEAPU32[buf+80>>>2>>>0]=ctime%1e3*1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>>2>>>0]=tempI64[0],HEAP32[buf+92>>>2>>>0]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream},varargs:undefined,getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall__newselect(nfds,readfds,writefds,exceptfds,timeout){readfds>>>=0;writefds>>>=0;exceptfds>>>=0;timeout>>>=0;try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>>2>>>0]:0,srcReadHigh=readfds?HEAP32[readfds+4>>>2>>>0]:0;var srcWriteLow=writefds?HEAP32[writefds>>>2>>>0]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>>2>>>0]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>>2>>>0]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>>2>>>0]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>>2>>>0]:0)|(writefds?HEAP32[writefds>>>2>>>0]:0)|(exceptfds?HEAP32[exceptfds>>>2>>>0]:0);var allHigh=(readfds?HEAP32[readfds+4>>>2>>>0]:0)|(writefds?HEAP32[writefds+4>>>2>>>0]:0)|(exceptfds?HEAP32[exceptfds+4>>>2>>>0]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>>2>>>0]:0,tv_usec=readfds?HEAP32[timeout+4>>>2>>>0]:0;timeoutInMillis=(tv_sec+tv_usec/1e6)*1e3}flags=stream.stream_ops.poll(stream,timeoutInMillis)}if(flags&1&&check(fd,srcReadLow,srcReadHigh,mask)){fd<32?dstReadLow=dstReadLow|mask:dstReadHigh=dstReadHigh|mask;total++}if(flags&4&&check(fd,srcWriteLow,srcWriteHigh,mask)){fd<32?dstWriteLow=dstWriteLow|mask:dstWriteHigh=dstWriteHigh|mask;total++}if(flags&2&&check(fd,srcExceptLow,srcExceptHigh,mask)){fd<32?dstExceptLow=dstExceptLow|mask:dstExceptHigh=dstExceptHigh|mask;total++}}if(readfds){HEAP32[readfds>>>2>>>0]=dstReadLow;HEAP32[readfds+4>>>2>>>0]=dstReadHigh}if(writefds){HEAP32[writefds>>>2>>>0]=dstWriteLow;HEAP32[writefds+4>>>2>>>0]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>>2>>>0]=dstExceptLow;HEAP32[exceptfds+4>>>2>>>0]=dstExceptHigh}return total}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall__newselect.sig="iipppp";var SOCKFS={mount(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family,type,protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr,port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer(sock,addr,port){return sock.peers[addr+":"+port]},addPeer(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>>2>>>0]=bytes;return 0;default:return 28}},close(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i{var socket=SOCKFS.getSocket(fd);if(!socket)throw new FS.ErrnoError(8);return socket};var Sockets={BUFFER_SIZE:10240,MAX_BUFFER_SIZE:10485760,nextFd:1,fds:{},nextport:1,maxport:65535,peer:null,connections:{},portmap:{},localAddr:4261412874,addrPool:[33554442,50331658,67108874,83886090,100663306,117440522,134217738,150994954,167772170,184549386,201326602,218103818,234881034]};var inetPton4=str=>{var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0};var jstoi_q=str=>parseInt(str);var inetPton6=str=>{var words;var w,offset,z,i;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\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;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w{switch(family){case 2:addr=inetPton4(addr);zeroMemory(sa,16);if(addrlen){HEAP32[addrlen>>>2>>>0]=16}HEAP16[sa>>>1>>>0]=family;HEAP32[sa+4>>>2>>>0]=addr;HEAP16[sa+2>>>1>>>0]=_htons(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>>2>>>0]=28}HEAP32[sa>>>2>>>0]=family;HEAP32[sa+8>>>2>>>0]=addr[0];HEAP32[sa+12>>>2>>>0]=addr[1];HEAP32[sa+16>>>2>>>0]=addr[2];HEAP32[sa+20>>>2>>>0]=addr[3];HEAP16[sa+2>>>1>>>0]=_htons(port);break;default:return 5}return 0};var DNS={address_map:{id:1,addrs:{},names:{}},lookup_name(name){var res=inetPton4(name);if(res!==null){return name}res=inetPton6(name);if(res!==null){return name}var addr;if(DNS.address_map.addrs[name]){addr=DNS.address_map.addrs[name]}else{var id=DNS.address_map.id++;assert(id<65535,"exceeded max address mappings of 65535");addr="172.29."+(id&255)+"."+(id&65280);DNS.address_map.names[addr]=name;DNS.address_map.addrs[name]=addr}return addr},lookup_addr(addr){if(DNS.address_map.names[addr]){return DNS.address_map.names[addr]}return null}};function ___syscall_accept4(fd,addr,addrlen,flags,d1,d2){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var newsock=sock.sock_ops.accept(sock);if(addr){var errno=writeSockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_accept4.sig="iippiii";var inetNtop4=addr=>(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255);var inetNtop6=ints=>{var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word{var family=HEAP16[sa>>>1>>>0];var port=_ntohs(HEAPU16[sa+2>>>1>>>0]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>>2>>>0];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>>2>>>0],HEAP32[sa+12>>>2>>>0],HEAP32[sa+16>>>2>>>0],HEAP32[sa+20>>>2>>>0]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family,addr,port}};var getSocketAddress=(addrp,addrlen,allowNull)=>{if(allowNull&&addrp===0)return null;var info=readSockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info};function ___syscall_bind(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.bind(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_bind.sig="iippiii";function ___syscall_chdir(path){path>>>=0;try{path=SYSCALLS.getStr(path);FS.chdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_chdir.sig="ip";function ___syscall_chmod(path,mode){path>>>=0;try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_chmod.sig="ipi";function ___syscall_connect(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_connect.sig="iippiii";function ___syscall_dup(fd){try{var old=SYSCALLS.getStreamFromFD(fd);return FS.dupStream(old).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_dup.sig="ii";function ___syscall_dup3(fd,newfd,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===newfd)return-28;if(newfd<0||newfd>=FS.MAX_OPEN_FDS)return-8;var existing=FS.getStream(newfd);if(existing)FS.close(existing);return FS.dupStream(old,newfd).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_dup3.sig="iiii";function ___syscall_faccessat(dirfd,path,amode,flags){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_faccessat.sig="iipii";var ___syscall_fadvise64=(fd,offset,len,advice)=>0;___syscall_fadvise64.sig="iiiiiii";function ___syscall_fallocate(fd,mode,offset_low,offset_high,len_low,len_high){var offset=convertI32PairToI53Checked(offset_low,offset_high);var len=convertI32PairToI53Checked(len_low,len_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.allocate(stream,offset,len);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fallocate.sig="iiiiiii";function ___syscall_fchdir(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.chdir(stream.path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchdir.sig="ii";function ___syscall_fchmod(fd,mode){try{FS.fchmod(fd,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchmod.sig="iii";function ___syscall_fchmodat2(dirfd,path,mode,flags){path>>>=0;try{var nofollow=flags&256;path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);FS.chmod(path,mode,nofollow);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchmodat2.sig="iipii";function ___syscall_fchown32(fd,owner,group){try{FS.fchown(fd,owner,group);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchown32.sig="iiii";function ___syscall_fchownat(dirfd,path,owner,group,flags){path>>>=0;try{path=SYSCALLS.getStr(path);var nofollow=flags&256;flags=flags&~256;path=SYSCALLS.calculateAt(dirfd,path);(nofollow?FS.lchown:FS.chown)(path,owner,group);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchownat.sig="iipiii";function syscallGetVarargI(){var ret=HEAP32[+SYSCALLS.varargs>>>2>>>0];SYSCALLS.varargs+=4;return ret}var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(fd,cmd,varargs){varargs>>>=0;SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=syscallGetVarargI();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.dupStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=syscallGetVarargI();stream.flags|=arg;return 0}case 12:{var arg=syscallGetVarargP();var offset=0;HEAP16[arg+offset>>>1>>>0]=2;return 0}case 13:case 14:return 0}return-28}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fcntl64.sig="iiip";function ___syscall_fdatasync(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fdatasync.sig="ii";function ___syscall_fstat64(fd,buf){buf>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fstat64.sig="iip";function ___syscall_statfs64(path,size,buf){path>>>=0;size>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);HEAP32[buf+4>>>2>>>0]=4096;HEAP32[buf+40>>>2>>>0]=4096;HEAP32[buf+8>>>2>>>0]=1e6;HEAP32[buf+12>>>2>>>0]=5e5;HEAP32[buf+16>>>2>>>0]=5e5;HEAP32[buf+20>>>2>>>0]=FS.nextInode;HEAP32[buf+24>>>2>>>0]=1e6;HEAP32[buf+28>>>2>>>0]=42;HEAP32[buf+44>>>2>>>0]=2;HEAP32[buf+36>>>2>>>0]=255;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_statfs64.sig="ippp";function ___syscall_fstatfs64(fd,size,buf){size>>>=0;buf>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);return ___syscall_statfs64(0,size,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fstatfs64.sig="iipp";function ___syscall_ftruncate64(fd,length_low,length_high){var length=convertI32PairToI53Checked(length_low,length_high);try{if(isNaN(length))return 61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_ftruncate64.sig="iiii";var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);function ___syscall_getcwd(buf,size){buf>>>=0;size>>>=0;try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd)+1;if(size>>=0;count>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);stream.getdents||=FS.readdir(stream.path);var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var idx=Math.floor(off/struct_size);while(idx>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>>2>>>0]=tempI64[0],HEAP32[dirp+pos+4>>>2>>>0]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>>2>>>0]=tempI64[0],HEAP32[dirp+pos+12>>>2>>>0]=tempI64[1];HEAP16[dirp+pos+16>>>1>>>0]=280;HEAP8[dirp+pos+18>>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getdents64.sig="iipp";function ___syscall_getpeername(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);if(!sock.daddr){return-53}var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getpeername.sig="iippiii";function ___syscall_getsockname(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getsockname.sig="iippiii";function ___syscall_getsockopt(fd,level,optname,optval,optlen,d1){optval>>>=0;optlen>>>=0;try{var sock=getSocketFromFD(fd);if(level===1){if(optname===4){HEAP32[optval>>>2>>>0]=sock.error;HEAP32[optlen>>>2>>>0]=4;sock.error=null;return 0}}return-50}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getsockopt.sig="iiiippi";function ___syscall_ioctl(fd,op,varargs){varargs>>>=0;SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:{if(!stream.tty)return-59;return 0}case 21505:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcgets){var termios=stream.tty.ops.ioctl_tcgets(stream);var argp=syscallGetVarargP();HEAP32[argp>>>2>>>0]=termios.c_iflag||0;HEAP32[argp+4>>>2>>>0]=termios.c_oflag||0;HEAP32[argp+8>>>2>>>0]=termios.c_cflag||0;HEAP32[argp+12>>>2>>>0]=termios.c_lflag||0;for(var i=0;i<32;i++){HEAP8[argp+i+17>>>0]=termios.c_cc[i]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!stream.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcsets){var argp=syscallGetVarargP();var c_iflag=HEAP32[argp>>>2>>>0];var c_oflag=HEAP32[argp+4>>>2>>>0];var c_cflag=HEAP32[argp+8>>>2>>>0];var c_lflag=HEAP32[argp+12>>>2>>>0];var c_cc=[];for(var i=0;i<32;i++){c_cc.push(HEAP8[argp+i+17>>>0])}return stream.tty.ops.ioctl_tcsets(stream.tty,op,{c_iflag,c_oflag,c_cflag,c_lflag,c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=syscallGetVarargP();HEAP32[argp>>>2>>>0]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=syscallGetVarargP();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tiocgwinsz){var winsize=stream.tty.ops.ioctl_tiocgwinsz(stream.tty);var argp=syscallGetVarargP();HEAP16[argp>>>1>>>0]=winsize[0];HEAP16[argp+2>>>1>>>0]=winsize[1]}return 0}case 21524:{if(!stream.tty)return-59;return 0}case 21515:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_ioctl.sig="iiip";function ___syscall_listen(fd,backlog){try{var sock=getSocketFromFD(fd);sock.sock_ops.listen(sock,backlog);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_listen.sig="iiiiiii";function ___syscall_lstat64(path,buf){path>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_lstat64.sig="ipp";function ___syscall_mkdirat(dirfd,path,mode){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_mkdirat.sig="iipi";function ___syscall_mknodat(dirfd,path,mode,dev){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_mknodat.sig="iipii";function ___syscall_newfstatat(dirfd,path,buf,flags){path>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_newfstatat.sig="iippi";function ___syscall_openat(dirfd,path,flags,varargs){path>>>=0;varargs>>>=0;SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?syscallGetVarargI():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_openat.sig="iipip";var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount(mount){return FS.createNode(null,"/",16384|511,0)},createPipe(){var pipe={buckets:[],refcnt:2};pipe.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var rName=PIPEFS.nextname();var wName=PIPEFS.nextname();var rNode=FS.createNode(PIPEFS.root,rName,4096,0);var wNode=FS.createNode(PIPEFS.root,wName,4096,0);rNode.pipe=pipe;wNode.pipe=pipe;var readableStream=FS.createStream({path:rName,node:rNode,flags:0,seekable:false,stream_ops:PIPEFS.stream_ops});rNode.stream=readableStream;var writableStream=FS.createStream({path:wName,node:wNode,flags:1,seekable:false,stream_ops:PIPEFS.stream_ops});wNode.stream=writableStream;return{readable_fd:readableStream.fd,writable_fd:writableStream.fd}},stream_ops:{poll(stream){var pipe=stream.node.pipe;if((stream.flags&2097155)===1){return 256|4}if(pipe.buckets.length>0){for(var i=0;i0){return 64|1}}}return 0},ioctl(stream,request,varargs){return 28},fsync(stream){return 28},read(stream,buffer,offset,length,position){var pipe=stream.node.pipe;var currentLength=0;for(var i=0;i=dataLen){currBucket.buffer.set(data,currBucket.offset);currBucket.offset+=dataLen;return dataLen}else if(freeBytesInCurrBuffer>0){currBucket.buffer.set(data.subarray(0,freeBytesInCurrBuffer),currBucket.offset);currBucket.offset+=freeBytesInCurrBuffer;data=data.subarray(freeBytesInCurrBuffer,data.byteLength)}var numBuckets=data.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0;var remElements=data.byteLength%PIPEFS.BUCKET_BUFFER_SIZE;for(var i=0;i0){var newBucket={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:data.byteLength,roffset:0};pipe.buckets.push(newBucket);newBucket.buffer.set(data)}return dataLen},close(stream){var pipe=stream.node.pipe;pipe.refcnt--;if(pipe.refcnt===0){pipe.buckets=null}}},nextname(){if(!PIPEFS.nextname.current){PIPEFS.nextname.current=0}return"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall_pipe(fdPtr){fdPtr>>>=0;try{if(fdPtr==0){throw new FS.ErrnoError(21)}var res=PIPEFS.createPipe();HEAP32[fdPtr>>>2>>>0]=res.readable_fd;HEAP32[fdPtr+4>>>2>>>0]=res.writable_fd;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_pipe.sig="ip";function ___syscall_poll(fds,nfds,timeout){fds>>>=0;try{var nonzero=0;for(var i=0;i>>2>>>0];var events=HEAP16[pollfd+4>>>1>>>0];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream,-1)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>>1>>>0]=mask}return nonzero}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_poll.sig="ipii";function ___syscall_readlinkat(dirfd,path,buf,bufsize){path>>>=0;buf>>>=0;bufsize>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len>>>0];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len>>>0]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_readlinkat.sig="iippp";function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){buf>>>=0;len>>>=0;addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf>>>0);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_recvfrom.sig="iippipp";function ___syscall_recvmsg(fd,message,flags,d1,d2,d3){message>>>=0;try{var sock=getSocketFromFD(fd);var iov=HEAPU32[message+8>>>2>>>0];var num=HEAP32[message+12>>>2>>>0];var total=0;for(var i=0;i>>2>>>0]}var msg=sock.sock_ops.recvmsg(sock,total);if(!msg)return 0;var name=HEAPU32[message>>>2>>>0];if(name){var errno=writeSockaddr(name,sock.family,DNS.lookup_name(msg.addr),msg.port)}var bytesRead=0;var bytesRemaining=msg.buffer.byteLength;for(var i=0;bytesRemaining>0&&i>>2>>>0];var iovlen=HEAP32[iov+(8*i+4)>>>2>>>0];if(!iovlen){continue}var length=Math.min(iovlen,bytesRemaining);var buf=msg.buffer.subarray(bytesRead,bytesRead+length);HEAPU8.set(buf,iovbase+bytesRead>>>0);bytesRead+=length;bytesRemaining-=length}return bytesRead}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_recvmsg.sig="iipiiii";function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){oldpath>>>=0;newpath>>>=0;try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_renameat.sig="iipip";function ___syscall_rmdir(path){path>>>=0;try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_rmdir.sig="ip";function ___syscall_sendmsg(fd,message,flags,d1,d2,d3){message>>>=0;d1>>>=0;d2>>>=0;try{var sock=getSocketFromFD(fd);var iov=HEAPU32[message+8>>>2>>>0];var num=HEAP32[message+12>>>2>>>0];var addr,port;var name=HEAPU32[message>>>2>>>0];var namelen=HEAP32[message+4>>>2>>>0];if(name){var info=readSockaddr(name,namelen);if(info.errno)return-info.errno;port=info.port;addr=DNS.lookup_addr(info.addr)||info.addr}var total=0;for(var i=0;i>>2>>>0]}var view=new Uint8Array(total);var offset=0;for(var i=0;i>>2>>>0];var iovlen=HEAP32[iov+(8*i+4)>>>2>>>0];for(var j=0;j>>0]}}return sock.sock_ops.sendmsg(sock,view,0,total,addr,port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_sendmsg.sig="iipippi";function ___syscall_sendto(fd,message,length,flags,addr,addr_len){message>>>=0;length>>>=0;addr>>>=0;addr_len>>>=0;try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_sendto.sig="iippipp";function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_socket.sig="iiiiiii";function ___syscall_stat64(path,buf){path>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_stat64.sig="ipp";function ___syscall_symlink(target,linkpath){target>>>=0;linkpath>>>=0;try{target=SYSCALLS.getStr(target);linkpath=SYSCALLS.getStr(linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_symlink.sig="ipp";function ___syscall_symlinkat(target,newdirfd,linkpath){target>>>=0;linkpath>>>=0;try{linkpath=SYSCALLS.calculateAt(newdirfd,linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_symlinkat.sig="ipip";function ___syscall_truncate64(path,length_low,length_high){path>>>=0;var length=convertI32PairToI53Checked(length_low,length_high);try{if(isNaN(length))return 61;path=SYSCALLS.getStr(path);FS.truncate(path,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_truncate64.sig="ipii";function ___syscall_unlinkat(dirfd,path,flags){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_unlinkat.sig="iipi";var readI53FromI64=ptr=>HEAPU32[ptr>>>2>>>0]+HEAP32[ptr+4>>>2>>>0]*4294967296;function ___syscall_utimensat(dirfd,path,times,flags){path>>>=0;times>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path,true);var now=Date.now(),atime,mtime;if(!times){atime=now;mtime=now}else{var seconds=readI53FromI64(times);var nanoseconds=HEAP32[times+8>>>2>>>0];if(nanoseconds==1073741823){atime=now}else if(nanoseconds==1073741822){atime=-1}else{atime=seconds*1e3+nanoseconds/(1e3*1e3)}times+=16;seconds=readI53FromI64(times);nanoseconds=HEAP32[times+8>>>2>>>0];if(nanoseconds==1073741823){mtime=now}else if(nanoseconds==1073741822){mtime=-1}else{mtime=seconds*1e3+nanoseconds/(1e3*1e3)}}if(mtime!=-1||atime!=-1){FS.utime(path,atime,mtime)}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_utimensat.sig="iippi";var ___table_base=new WebAssembly.Global({value:"i32",mutable:false},1);function ___xmlOutputBufferCreateFilename(...args){return asyncifyStubs["__xmlOutputBufferCreateFilename"](...args)}___xmlOutputBufferCreateFilename.stub=true;asyncifyStubs["__xmlOutputBufferCreateFilename"]=undefined;function ___xmlParserInputBufferCreateFilename(...args){return asyncifyStubs["__xmlParserInputBufferCreateFilename"](...args)}___xmlParserInputBufferCreateFilename.stub=true;asyncifyStubs["__xmlParserInputBufferCreateFilename"]=undefined;function ___xmlRegisterCallbacks(...args){return asyncifyStubs["__xmlRegisterCallbacks"](...args)}___xmlRegisterCallbacks.stub=true;asyncifyStubs["__xmlRegisterCallbacks"]=undefined;var __abort_js=()=>{abort("")};__abort_js.sig="v";var ENV={};var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var dlSetError=msg=>{var sp=stackSave();var cmsg=stringToUTF8OnStack(msg);___dl_seterr(cmsg,0);stackRestore(sp)};var dlopenInternal=(handle,jsflags)=>{var filename=UTF8ToString(handle+36);var flags=HEAP32[handle+4>>>2>>>0];filename=PATH.normalize(filename);var searchpaths=[];var global=Boolean(flags&256);var localScope=global?null:{};var combinedFlags={global,nodelete:Boolean(flags&4096),loadAsync:jsflags.loadAsync};if(jsflags.loadAsync){return loadDynamicLibrary(filename,combinedFlags,localScope,handle)}try{return loadDynamicLibrary(filename,combinedFlags,localScope,handle)}catch(e){dlSetError(`Could not load dynamic lib: ${filename}\n${e}`);return 0}};var __dlopen_js=function(handle){handle>>>=0;return Asyncify.handleSleep(wakeUp=>{dlopenInternal(handle,{loadAsync:true}).then(wakeUp).catch(()=>wakeUp(0))})};__dlopen_js.sig="pp";__dlopen_js.isAsync=true;function __dlsym_js(handle,symbol,symbolIndex){handle>>>=0;symbol>>>=0;symbolIndex>>>=0;symbol=UTF8ToString(symbol);var result;var newSymIndex;var lib=LDSO.loadedLibsByHandle[handle];if(!lib.exports.hasOwnProperty(symbol)||lib.exports[symbol].stub){dlSetError(`Tried to lookup unknown symbol "${symbol}" in dynamic lib: ${lib.name}`);return 0}newSymIndex=Object.keys(lib.exports).indexOf(symbol);var origSym="orig$"+symbol;result=lib.exports[origSym];if(result){newSymIndex=Object.keys(lib.exports).indexOf(origSym)}else result=lib.exports[symbol];if(typeof result=="function"){if("orig"in result){result=result.orig}var addr=getFunctionAddress(result);if(addr){result=addr}else{result=addFunction(result,result.sig);HEAPU32[symbolIndex>>>2>>>0]=newSymIndex}}return result}__dlsym_js.sig="pppp";var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};_proc_exit.sig="vi";var exitJS=(status,implicit)=>{EXITSTATUS=status;if(!keepRuntimeAlive()){exitRuntime()}_proc_exit(status)};var _exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(runtimeExited){return}if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(runtimeExited||ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};runtimeKeepalivePush.sig="v";var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};runtimeKeepalivePop.sig="v";function __emscripten_dlopen_js(handle,onsuccess,onerror,user_data){handle>>>=0;onsuccess>>>=0;onerror>>>=0;user_data>>>=0;function errorCallback(e){var filename=UTF8ToString(handle+36);dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`);runtimeKeepalivePop();callUserCallback(()=>((a1,a2)=>{})(handle,user_data))}function successCallback(){runtimeKeepalivePop();callUserCallback(()=>((a1,a2)=>{})(handle,user_data))}runtimeKeepalivePush();var promise=dlopenInternal(handle,{loadAsync:true});if(promise){promise.then(successCallback,errorCallback)}else{errorCallback()}}__emscripten_dlopen_js.sig="vpppp";var nowIsMonotonic=1;var __emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var getExecutableName=()=>thisProgram||"./this.program";function __emscripten_get_progname(str,len){str>>>=0;stringToUTF8(getExecutableName(),str,len)}__emscripten_get_progname.sig="vpi";function __emscripten_lookup_name(name){name>>>=0;var nameString=UTF8ToString(name);return inetPton4(DNS.lookup_name(nameString))}__emscripten_lookup_name.sig="ip";function __emscripten_memcpy_js(dest,src,num){dest>>>=0;src>>>=0;num>>>=0;return HEAPU8.copyWithin(dest>>>0,src>>>0,src+num>>>0)}__emscripten_memcpy_js.sig="vppp";var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";function __emscripten_system(command){command>>>=0;if(!command)return 0;return-52}__emscripten_system.sig="ip";var __emscripten_throw_longjmp=()=>{throw Infinity};__emscripten_throw_longjmp.sig="v";function __gmtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);tmPtr>>>=0;var date=new Date(time*1e3);HEAP32[tmPtr>>>2>>>0]=date.getUTCSeconds();HEAP32[tmPtr+4>>>2>>>0]=date.getUTCMinutes();HEAP32[tmPtr+8>>>2>>>0]=date.getUTCHours();HEAP32[tmPtr+12>>>2>>>0]=date.getUTCDate();HEAP32[tmPtr+16>>>2>>>0]=date.getUTCMonth();HEAP32[tmPtr+20>>>2>>>0]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>>2>>>0]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>>2>>>0]=yday}__gmtime_js.sig="viip";var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);tmPtr>>>=0;var date=new Date(time*1e3);HEAP32[tmPtr>>>2>>>0]=date.getSeconds();HEAP32[tmPtr+4>>>2>>>0]=date.getMinutes();HEAP32[tmPtr+8>>>2>>>0]=date.getHours();HEAP32[tmPtr+12>>>2>>>0]=date.getDate();HEAP32[tmPtr+16>>>2>>>0]=date.getMonth();HEAP32[tmPtr+20>>>2>>>0]=date.getFullYear()-1900;HEAP32[tmPtr+24>>>2>>>0]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>>2>>>0]=yday;HEAP32[tmPtr+36>>>2>>>0]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>>2>>>0]=dst}__localtime_js.sig="viip";var __mktime_js=function(tmPtr){tmPtr>>>=0;var ret=(()=>{var date=new Date(HEAP32[tmPtr+20>>>2>>>0]+1900,HEAP32[tmPtr+16>>>2>>>0],HEAP32[tmPtr+12>>>2>>>0],HEAP32[tmPtr+8>>>2>>>0],HEAP32[tmPtr+4>>>2>>>0],HEAP32[tmPtr>>>2>>>0],0);var dst=HEAP32[tmPtr+32>>>2>>>0];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>>2>>>0]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>>2>>>0]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>>2>>>0]=yday;HEAP32[tmPtr>>>2>>>0]=date.getSeconds();HEAP32[tmPtr+4>>>2>>>0]=date.getMinutes();HEAP32[tmPtr+8>>>2>>>0]=date.getHours();HEAP32[tmPtr+12>>>2>>>0]=date.getDate();HEAP32[tmPtr+16>>>2>>>0]=date.getMonth();HEAP32[tmPtr+20>>>2>>>0]=date.getYear();var timeMs=date.getTime();if(isNaN(timeMs)){return-1}return timeMs/1e3})();return setTempRet0((tempDouble=ret,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),ret>>>0};__mktime_js.sig="ip";function __mmap_js(len,prot,flags,fd,offset_low,offset_high,allocated,addr){len>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);allocated>>>=0;addr>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var res=FS.mmap(stream,len,offset,prot,flags);var ptr=res.ptr;HEAP32[allocated>>>2>>>0]=res.allocated;HEAPU32[addr>>>2>>>0]=ptr;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}__mmap_js.sig="ipiiiiipp";function __msync_js(addr,len,prot,flags,fd,offset_low,offset_high){addr>>>=0;len>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;SYSCALLS.doMsync(addr,SYSCALLS.getStreamFromFD(fd),len,flags,offset);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}__msync_js.sig="ippiiiii";function __munmap_js(addr,len,prot,flags,fd,offset_low,offset_high){addr>>>=0;len>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);try{var stream=SYSCALLS.getStreamFromFD(fd);if(prot&2){SYSCALLS.doMsync(addr,stream,len,flags,offset)}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}__munmap_js.sig="ippiiiii";var timers={};var _emscripten_get_now=()=>performance.now();_emscripten_get_now.sig="d";var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};__setitimer_js.sig="iid";var __timegm_js=function(tmPtr){tmPtr>>>=0;var ret=(()=>{var time=Date.UTC(HEAP32[tmPtr+20>>>2>>>0]+1900,HEAP32[tmPtr+16>>>2>>>0],HEAP32[tmPtr+12>>>2>>>0],HEAP32[tmPtr+8>>>2>>>0],HEAP32[tmPtr+4>>>2>>>0],HEAP32[tmPtr>>>2>>>0],0);var date=new Date(time);HEAP32[tmPtr+24>>>2>>>0]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>>2>>>0]=yday;return date.getTime()/1e3})();return setTempRet0((tempDouble=ret,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),ret>>>0};__timegm_js.sig="ip";var __tzset_js=function(timezone,daylight,std_name,dst_name){timezone>>>=0;daylight>>>=0;std_name>>>=0;dst_name>>>=0;var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>>2>>>0]=stdTimezoneOffset*60;HEAP32[daylight>>>2>>>0]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset{readEmAsmArgsArray.length=0;var ch;while(ch=HEAPU8[sigPtr++>>>0]){var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?HEAPU32[buf>>>2>>>0]:ch==105?HEAP32[buf>>>2>>>0]:HEAPF64[buf>>>3>>>0]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code](...args)};function _emscripten_asm_const_int(code,sigPtr,argbuf){code>>>=0;sigPtr>>>=0;argbuf>>>=0;return runEmAsmFunction(code,sigPtr,argbuf)}_emscripten_asm_const_int.sig="ippp";function _emscripten_asm_const_ptr(code,sigPtr,argbuf){code>>>=0;sigPtr>>>=0;argbuf>>>=0;return runEmAsmFunction(code,sigPtr,argbuf)}_emscripten_asm_const_ptr.sig="pppp";function _emscripten_console_error(str){str>>>=0;console.error(UTF8ToString(str))}_emscripten_console_error.sig="vp";function _emscripten_console_log(str){str>>>=0;console.log(UTF8ToString(str))}_emscripten_console_log.sig="vp";function _emscripten_console_trace(str){str>>>=0;console.trace(UTF8ToString(str))}_emscripten_console_trace.sig="vp";function _emscripten_console_warn(str){str>>>=0;console.warn(UTF8ToString(str))}_emscripten_console_warn.sig="vp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";function _emscripten_err(str){str>>>=0;return err(UTF8ToString(str))}_emscripten_err.sig="vp";var getHeapMax=()=>4294901760;function _emscripten_get_heap_max(){return getHeapMax()}_emscripten_get_heap_max.sig="p";var _emscripten_get_now_res=()=>1e3;_emscripten_get_now_res.sig="d";function _emscripten_out(str){str>>>=0;return out(UTF8ToString(str))}_emscripten_out.sig="vp";class HandleAllocator{constructor(){this.allocated=[undefined];this.freelist=[]}get(id){return this.allocated[id]}has(id){return this.allocated[id]!==undefined}allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id}free(id){this.allocated[id]=undefined;this.freelist.push(id)}}var promiseMap=new HandleAllocator;var makePromise=()=>{var promiseInfo={};promiseInfo.promise=new Promise((resolve,reject)=>{promiseInfo.reject=reject;promiseInfo.resolve=resolve});promiseInfo.id=promiseMap.allocate(promiseInfo);return promiseInfo};function _emscripten_promise_create(){return makePromise().id}_emscripten_promise_create.sig="p";function _emscripten_promise_destroy(id){id>>>=0;promiseMap.free(id)}_emscripten_promise_destroy.sig="vp";var getPromise=id=>promiseMap.get(id).promise;function _emscripten_promise_resolve(id,result,value){id>>>=0;value>>>=0;var info=promiseMap.get(id);switch(result){case 0:info.resolve(value);return;case 1:info.resolve(getPromise(value));return;case 2:info.resolve(getPromise(value));_emscripten_promise_destroy(value);return;case 3:info.reject(value);return}}_emscripten_promise_resolve.sig="vpip";var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};function _emscripten_resize_heap(requestedSize){requestedSize>>>=0;var oldSize=HEAPU8.length;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false}_emscripten_resize_heap.sig="ip";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>>0]=str.charCodeAt(i)}HEAP8[buffer>>>0]=0};var _environ_get=function(__environ,environ_buf){__environ>>>=0;environ_buf>>>=0;var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>>2>>>0]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};_environ_get.sig="ipp";var _environ_sizes_get=function(penviron_count,penviron_buf_size){penviron_count>>>=0;penviron_buf_size>>>=0;var strings=getEnvStrings();HEAPU32[penviron_count>>>2>>>0]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>>2>>>0]=bufSize;return 0};_environ_sizes_get.sig="ipp";function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_close.sig="ii";function _fd_fdstat_get(fd,pbuf){pbuf>>>=0;try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf>>>0]=type;HEAP16[pbuf+2>>>1>>>0]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+8>>>2>>>0]=tempI64[0],HEAP32[pbuf+12>>>2>>>0]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+16>>>2>>>0]=tempI64[0],HEAP32[pbuf+20>>>2>>>0]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_fdstat_get.sig="iip";var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>>2>>>0];var len=HEAPU32[iov+4>>>2>>>0];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>=0;iovcnt>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);pnum>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt,offset);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_pread.sig="iippiip";var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>>2>>>0];var len=HEAPU32[iov+4>>>2>>>0];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>=0;iovcnt>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);pnum>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt,offset);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_pwrite.sig="iippiip";function _fd_read(fd,iov,iovcnt,pnum){iov>>>=0;iovcnt>>>=0;pnum>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_read.sig="iippp";function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);newOffset>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>>2>>>0]=tempI64[0],HEAP32[newOffset+4>>>2>>>0]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_seek.sig="iiiiip";var _fd_sync=function(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);return Asyncify.handleSleep(wakeUp=>{var mount=stream.node.mount;if(!mount.type.syncfs){wakeUp(0);return}mount.type.syncfs(mount,false,err=>{if(err){wakeUp(29);return}wakeUp(0)})})}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}};_fd_sync.sig="ii";_fd_sync.isAsync=true;function _fd_write(fd,iov,iovcnt,pnum){iov>>>=0;iovcnt>>>=0;pnum>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_write.sig="iippp";function _getaddrinfo(node,service,hint,out){node>>>=0;service>>>=0;hint>>>=0;out>>>=0;var addrs=[];var canon=null;var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai,last;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?inetNtop6(addr):inetNtop4(addr);sa=_malloc(salen);errno=writeSockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>>2>>>0]=family;HEAP32[ai+8>>>2>>>0]=type;HEAP32[ai+12>>>2>>>0]=proto;HEAPU32[ai+24>>>2>>>0]=canon;HEAPU32[ai+20>>>2>>>0]=sa;if(family===10){HEAP32[ai+16>>>2>>>0]=28}else{HEAP32[ai+16>>>2>>>0]=16}HEAP32[ai+28>>>2>>>0]=0;return ai}if(hint){flags=HEAP32[hint>>>2>>>0];family=HEAP32[hint+4>>>2>>>0];type=HEAP32[hint+8>>>2>>>0];proto=HEAP32[hint+12>>>2>>>0]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>>2>>>0]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>>2>>>0]=ai;return 0}node=UTF8ToString(node);addr=inetPton4(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=inetPton6(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAPU32[out>>>2>>>0]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=inetPton4(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>>2>>>0]=ai;return 0}_getaddrinfo.sig="ipppp";function _getcontext(...args){return asyncifyStubs["getcontext"](...args)}_getcontext.stub=true;asyncifyStubs["getcontext"]=undefined;function _getdtablesize(...args){return asyncifyStubs["getdtablesize"](...args)}_getdtablesize.stub=true;asyncifyStubs["getdtablesize"]=undefined;function _getentropy(buffer,size){buffer>>>=0;size>>>=0;randomFill(HEAPU8.subarray(buffer>>>0,buffer+size>>>0));return 0}_getentropy.sig="ipp";function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){sa>>>=0;node>>>=0;serv>>>=0;var info=readSockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}_getnameinfo.sig="ipipipii";var Protocols={list:[],map:{}};var _setprotoent=stayopen=>{function allocprotoent(name,proto,aliases){var nameBuf=_malloc(name.length+1);stringToAscii(name,nameBuf);var j=0;var length=aliases.length;var aliasListBuf=_malloc((length+1)*4);for(var i=0;i>>2>>>0]=aliasBuf}HEAPU32[aliasListBuf+j>>>2>>>0]=0;var pe=_malloc(12);HEAPU32[pe>>>2>>>0]=nameBuf;HEAPU32[pe+4>>>2>>>0]=aliasListBuf;HEAP32[pe+8>>>2>>>0]=proto;return pe}var list=Protocols.list;var map=Protocols.map;if(list.length===0){var entry=allocprotoent("tcp",6,["TCP"]);list.push(entry);map["tcp"]=map["6"]=entry;entry=allocprotoent("udp",17,["UDP"]);list.push(entry);map["udp"]=map["17"]=entry}_setprotoent.index=0};_setprotoent.sig="vi";function _getprotobyname(name){name>>>=0;name=UTF8ToString(name);_setprotoent(true);var result=Protocols.map[name];return result}_getprotobyname.sig="pp";function _getprotobynumber(number){_setprotoent(true);var result=Protocols.map[number];return result}_getprotobynumber.sig="pi";function _htmlDefaultSAXHandler(...args){return asyncifyStubs["htmlDefaultSAXHandler"](...args)}_htmlDefaultSAXHandler.stub=true;asyncifyStubs["htmlDefaultSAXHandler"]=undefined;function _isolat1ToUTF8(...args){return asyncifyStubs["isolat1ToUTF8"](...args)}_isolat1ToUTF8.stub=true;asyncifyStubs["isolat1ToUTF8"]=undefined;function _makecontext(...args){return asyncifyStubs["makecontext"](...args)}_makecontext.stub=true;asyncifyStubs["makecontext"]=undefined;function _oldXMLWDcompatibility(...args){return asyncifyStubs["oldXMLWDcompatibility"](...args)}_oldXMLWDcompatibility.stub=true;asyncifyStubs["oldXMLWDcompatibility"]=undefined;function _posix_spawnp(...args){return asyncifyStubs["posix_spawnp"](...args)}_posix_spawnp.stub=true;asyncifyStubs["posix_spawnp"]=undefined;var arraySum=(array,index)=>{var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum};var MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];var addDays=(date,days)=>{var newDate=new Date(date.getTime());while(days>0){var leap=isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate};function _strptime(buf,format,tm){buf>>>=0;format>>>=0;tm>>>=0;var pattern=UTF8ToString(format);var SPECIAL_CHARS="\\!@#$^&*()+=-[]/{}|:<>?,.";for(var i=0,ii=SPECIAL_CHARS.length;iEQUIVALENT_MATCHERS[c]||m).replace(/%(.)/g,(_,c)=>{let pat=DATE_PATTERNS[c];if(pat){capture.push(c);return`(${pat})`}else{return c}}).replace(/\s+/g,"\\s*");var matches=new RegExp("^"+pattern_out,"i").exec(UTF8ToString(buf));function initDate(){function fixup(value,min,max){return typeof value!="number"||isNaN(value)?min:value>=min?value<=max?value:max:min}return{year:fixup(HEAP32[tm+20>>>2>>>0]+1900,1970,9999),month:fixup(HEAP32[tm+16>>>2>>>0],0,11),day:fixup(HEAP32[tm+12>>>2>>>0],1,31),hour:fixup(HEAP32[tm+8>>>2>>>0],0,23),min:fixup(HEAP32[tm+4>>>2>>>0],0,59),sec:fixup(HEAP32[tm>>>2>>>0],0,59),gmtoff:0}}if(matches){var date=initDate();var value;var getMatch=symbol=>{var pos=capture.indexOf(symbol);if(pos>=0){return matches[pos+1]}return};if(value=getMatch("S")){date.sec=jstoi_q(value)}if(value=getMatch("M")){date.min=jstoi_q(value)}if(value=getMatch("H")){date.hour=jstoi_q(value)}else if(value=getMatch("I")){var hour=jstoi_q(value);if(value=getMatch("p")){hour+=value.toUpperCase()[0]==="P"?12:0}date.hour=hour}if(value=getMatch("Y")){date.year=jstoi_q(value)}else if(value=getMatch("y")){var year=jstoi_q(value);if(value=getMatch("C")){year+=jstoi_q(value)*100}else{year+=year<69?2e3:1900}date.year=year}if(value=getMatch("m")){date.month=jstoi_q(value)-1}else if(value=getMatch("b")){date.month=MONTH_NUMBERS[value.substring(0,3).toUpperCase()]||0}if(value=getMatch("d")){date.day=jstoi_q(value)}else if(value=getMatch("j")){var day=jstoi_q(value);var leapYear=isLeapYear(date.year);for(var month=0;month<12;++month){var daysUntilMonth=arraySum(leapYear?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,month-1);if(day<=daysUntilMonth+(leapYear?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[month]){date.day=day-daysUntilMonth}}}else if(value=getMatch("a")){var weekDay=value.substring(0,3).toUpperCase();if(value=getMatch("U")){var weekDayNumber=DAY_NUMBERS_SUN_FIRST[weekDay];var weekNumber=jstoi_q(value);var janFirst=new Date(date.year,0,1);var endDate;if(janFirst.getDay()===0){endDate=addDays(janFirst,weekDayNumber+7*(weekNumber-1))}else{endDate=addDays(janFirst,7-janFirst.getDay()+weekDayNumber+7*(weekNumber-1))}date.day=endDate.getDate();date.month=endDate.getMonth()}else if(value=getMatch("W")){var weekDayNumber=DAY_NUMBERS_MON_FIRST[weekDay];var weekNumber=jstoi_q(value);var janFirst=new Date(date.year,0,1);var endDate;if(janFirst.getDay()===1){endDate=addDays(janFirst,weekDayNumber+7*(weekNumber-1))}else{endDate=addDays(janFirst,7-janFirst.getDay()+1+weekDayNumber+7*(weekNumber-1))}date.day=endDate.getDate();date.month=endDate.getMonth()}}if(value=getMatch("z")){if(value.toLowerCase()==="z"){date.gmtoff=0}else{var match=value.match(/^((?:\-|\+)\d\d):?(\d\d)?/);date.gmtoff=match[1]*3600;if(match[2]){date.gmtoff+=date.gmtoff>0?match[2]*60:-match[2]*60}}}var fullDate=new Date(date.year,date.month,date.day,date.hour,date.min,date.sec,0);HEAP32[tm>>>2>>>0]=fullDate.getSeconds();HEAP32[tm+4>>>2>>>0]=fullDate.getMinutes();HEAP32[tm+8>>>2>>>0]=fullDate.getHours();HEAP32[tm+12>>>2>>>0]=fullDate.getDate();HEAP32[tm+16>>>2>>>0]=fullDate.getMonth();HEAP32[tm+20>>>2>>>0]=fullDate.getFullYear()-1900;HEAP32[tm+24>>>2>>>0]=fullDate.getDay();HEAP32[tm+28>>>2>>>0]=arraySum(isLeapYear(fullDate.getFullYear())?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,fullDate.getMonth()-1)+fullDate.getDate()-1;HEAP32[tm+32>>>2>>>0]=0;HEAP32[tm+36>>>2>>>0]=date.gmtoff;return buf+intArrayFromString(matches[0]).length-1}return 0}_strptime.sig="pppp";function _swapcontext(...args){return asyncifyStubs["swapcontext"](...args)}_swapcontext.stub=true;asyncifyStubs["swapcontext"]=undefined;function _xmlAllocOutputBuffer(...args){return asyncifyStubs["xmlAllocOutputBuffer"](...args)}_xmlAllocOutputBuffer.stub=true;asyncifyStubs["xmlAllocOutputBuffer"]=undefined;function _xmlAllocParserInputBuffer(...args){return asyncifyStubs["xmlAllocParserInputBuffer"](...args)}_xmlAllocParserInputBuffer.stub=true;asyncifyStubs["xmlAllocParserInputBuffer"]=undefined;function _xmlBufferAllocScheme(...args){return asyncifyStubs["xmlBufferAllocScheme"](...args)}_xmlBufferAllocScheme.stub=true;asyncifyStubs["xmlBufferAllocScheme"]=undefined;function _xmlCopyError(...args){return asyncifyStubs["xmlCopyError"](...args)}_xmlCopyError.stub=true;asyncifyStubs["xmlCopyError"]=undefined;function _xmlDefaultBufferSize(...args){return asyncifyStubs["xmlDefaultBufferSize"](...args)}_xmlDefaultBufferSize.stub=true;asyncifyStubs["xmlDefaultBufferSize"]=undefined;function _xmlDefaultSAXHandler(...args){return asyncifyStubs["xmlDefaultSAXHandler"](...args)}_xmlDefaultSAXHandler.stub=true;asyncifyStubs["xmlDefaultSAXHandler"]=undefined;function _xmlDefaultSAXLocator(...args){return asyncifyStubs["xmlDefaultSAXLocator"](...args)}_xmlDefaultSAXLocator.stub=true;asyncifyStubs["xmlDefaultSAXLocator"]=undefined;function _xmlDeregisterNodeDefaultValue(...args){return asyncifyStubs["xmlDeregisterNodeDefaultValue"](...args)}_xmlDeregisterNodeDefaultValue.stub=true;asyncifyStubs["xmlDeregisterNodeDefaultValue"]=undefined;function _xmlDictOwns(...args){return asyncifyStubs["xmlDictOwns"](...args)}_xmlDictOwns.stub=true;asyncifyStubs["xmlDictOwns"]=undefined;function _xmlDoValidityCheckingDefaultValue(...args){return asyncifyStubs["xmlDoValidityCheckingDefaultValue"](...args)}_xmlDoValidityCheckingDefaultValue.stub=true;asyncifyStubs["xmlDoValidityCheckingDefaultValue"]=undefined;function _xmlFileClose(...args){return asyncifyStubs["xmlFileClose"](...args)}_xmlFileClose.stub=true;asyncifyStubs["xmlFileClose"]=undefined;function _xmlFileMatch(...args){return asyncifyStubs["xmlFileMatch"](...args)}_xmlFileMatch.stub=true;asyncifyStubs["xmlFileMatch"]=undefined;function _xmlFileOpen(...args){return asyncifyStubs["xmlFileOpen"](...args)}_xmlFileOpen.stub=true;asyncifyStubs["xmlFileOpen"]=undefined;function _xmlFileRead(...args){return asyncifyStubs["xmlFileRead"](...args)}_xmlFileRead.stub=true;asyncifyStubs["xmlFileRead"]=undefined;function _xmlFree(...args){return asyncifyStubs["xmlFree"](...args)}_xmlFree.stub=true;asyncifyStubs["xmlFree"]=undefined;function _xmlFreeDoc(...args){return asyncifyStubs["xmlFreeDoc"](...args)}_xmlFreeDoc.stub=true;asyncifyStubs["xmlFreeDoc"]=undefined;function _xmlFreeNode(...args){return asyncifyStubs["xmlFreeNode"](...args)}_xmlFreeNode.stub=true;asyncifyStubs["xmlFreeNode"]=undefined;function _xmlFreeNodeList(...args){return asyncifyStubs["xmlFreeNodeList"](...args)}_xmlFreeNodeList.stub=true;asyncifyStubs["xmlFreeNodeList"]=undefined;function _xmlFreeNs(...args){return asyncifyStubs["xmlFreeNs"](...args)}_xmlFreeNs.stub=true;asyncifyStubs["xmlFreeNs"]=undefined;function _xmlFreeParserInputBuffer(...args){return asyncifyStubs["xmlFreeParserInputBuffer"](...args)}_xmlFreeParserInputBuffer.stub=true;asyncifyStubs["xmlFreeParserInputBuffer"]=undefined;function _xmlFreeProp(...args){return asyncifyStubs["xmlFreeProp"](...args)}_xmlFreeProp.stub=true;asyncifyStubs["xmlFreeProp"]=undefined;function _xmlFreeURI(...args){return asyncifyStubs["xmlFreeURI"](...args)}_xmlFreeURI.stub=true;asyncifyStubs["xmlFreeURI"]=undefined;function _xmlGenericError(...args){return asyncifyStubs["xmlGenericError"](...args)}_xmlGenericError.stub=true;asyncifyStubs["xmlGenericError"]=undefined;function _xmlGenericErrorContext(...args){return asyncifyStubs["xmlGenericErrorContext"](...args)}_xmlGenericErrorContext.stub=true;asyncifyStubs["xmlGenericErrorContext"]=undefined;function _xmlGenericErrorDefaultFunc(...args){return asyncifyStubs["xmlGenericErrorDefaultFunc"](...args)}_xmlGenericErrorDefaultFunc.stub=true;asyncifyStubs["xmlGenericErrorDefaultFunc"]=undefined;function _xmlGetExternalEntityLoader(...args){return asyncifyStubs["xmlGetExternalEntityLoader"](...args)}_xmlGetExternalEntityLoader.stub=true;asyncifyStubs["xmlGetExternalEntityLoader"]=undefined;function _xmlGetLastError(...args){return asyncifyStubs["xmlGetLastError"](...args)}_xmlGetLastError.stub=true;asyncifyStubs["xmlGetLastError"]=undefined;function _xmlGetWarningsDefaultValue(...args){return asyncifyStubs["xmlGetWarningsDefaultValue"](...args)}_xmlGetWarningsDefaultValue.stub=true;asyncifyStubs["xmlGetWarningsDefaultValue"]=undefined;function _xmlHashDefaultDeallocator(...args){return asyncifyStubs["xmlHashDefaultDeallocator"](...args)}_xmlHashDefaultDeallocator.stub=true;asyncifyStubs["xmlHashDefaultDeallocator"]=undefined;function _xmlHashLookup(...args){return asyncifyStubs["xmlHashLookup"](...args)}_xmlHashLookup.stub=true;asyncifyStubs["xmlHashLookup"]=undefined;function _xmlHashRemoveEntry(...args){return asyncifyStubs["xmlHashRemoveEntry"](...args)}_xmlHashRemoveEntry.stub=true;asyncifyStubs["xmlHashRemoveEntry"]=undefined;function _xmlHashScan(...args){return asyncifyStubs["xmlHashScan"](...args)}_xmlHashScan.stub=true;asyncifyStubs["xmlHashScan"]=undefined;function _xmlIndentTreeOutput(...args){return asyncifyStubs["xmlIndentTreeOutput"](...args)}_xmlIndentTreeOutput.stub=true;asyncifyStubs["xmlIndentTreeOutput"]=undefined;function _xmlInitParser(...args){return asyncifyStubs["xmlInitParser"](...args)}_xmlInitParser.stub=true;asyncifyStubs["xmlInitParser"]=undefined;function _xmlInputReadCallbackNop(...args){return asyncifyStubs["xmlInputReadCallbackNop"](...args)}_xmlInputReadCallbackNop.stub=true;asyncifyStubs["xmlInputReadCallbackNop"]=undefined;function _xmlIsBaseCharGroup(...args){return asyncifyStubs["xmlIsBaseCharGroup"](...args)}_xmlIsBaseCharGroup.stub=true;asyncifyStubs["xmlIsBaseCharGroup"]=undefined;function _xmlIsCombiningGroup(...args){return asyncifyStubs["xmlIsCombiningGroup"](...args)}_xmlIsCombiningGroup.stub=true;asyncifyStubs["xmlIsCombiningGroup"]=undefined;function _xmlIsDigitGroup(...args){return asyncifyStubs["xmlIsDigitGroup"](...args)}_xmlIsDigitGroup.stub=true;asyncifyStubs["xmlIsDigitGroup"]=undefined;function _xmlIsExtenderGroup(...args){return asyncifyStubs["xmlIsExtenderGroup"](...args)}_xmlIsExtenderGroup.stub=true;asyncifyStubs["xmlIsExtenderGroup"]=undefined;function _xmlIsPubidChar_tab(...args){return asyncifyStubs["xmlIsPubidChar_tab"](...args)}_xmlIsPubidChar_tab.stub=true;asyncifyStubs["xmlIsPubidChar_tab"]=undefined;function _xmlKeepBlanksDefaultValue(...args){return asyncifyStubs["xmlKeepBlanksDefaultValue"](...args)}_xmlKeepBlanksDefaultValue.stub=true;asyncifyStubs["xmlKeepBlanksDefaultValue"]=undefined;function _xmlLastError(...args){return asyncifyStubs["xmlLastError"](...args)}_xmlLastError.stub=true;asyncifyStubs["xmlLastError"]=undefined;function _xmlLineNumbersDefaultValue(...args){return asyncifyStubs["xmlLineNumbersDefaultValue"](...args)}_xmlLineNumbersDefaultValue.stub=true;asyncifyStubs["xmlLineNumbersDefaultValue"]=undefined;function _xmlLoadExtDtdDefaultValue(...args){return asyncifyStubs["xmlLoadExtDtdDefaultValue"](...args)}_xmlLoadExtDtdDefaultValue.stub=true;asyncifyStubs["xmlLoadExtDtdDefaultValue"]=undefined;function _xmlMalloc(...args){return asyncifyStubs["xmlMalloc"](...args)}_xmlMalloc.stub=true;asyncifyStubs["xmlMalloc"]=undefined;function _xmlMallocAtomic(...args){return asyncifyStubs["xmlMallocAtomic"](...args)}_xmlMallocAtomic.stub=true;asyncifyStubs["xmlMallocAtomic"]=undefined;function _xmlMemStrdup(...args){return asyncifyStubs["xmlMemStrdup"](...args)}_xmlMemStrdup.stub=true;asyncifyStubs["xmlMemStrdup"]=undefined;function _xmlNewIOInputStream(...args){return asyncifyStubs["xmlNewIOInputStream"](...args)}_xmlNewIOInputStream.stub=true;asyncifyStubs["xmlNewIOInputStream"]=undefined;function _xmlNewInputFromFile(...args){return asyncifyStubs["xmlNewInputFromFile"](...args)}_xmlNewInputFromFile.stub=true;asyncifyStubs["xmlNewInputFromFile"]=undefined;function _xmlOutputBufferCreateFilenameDefault(...args){return asyncifyStubs["xmlOutputBufferCreateFilenameDefault"](...args)}_xmlOutputBufferCreateFilenameDefault.stub=true;asyncifyStubs["xmlOutputBufferCreateFilenameDefault"]=undefined;function _xmlOutputBufferCreateFilenameValue(...args){return asyncifyStubs["xmlOutputBufferCreateFilenameValue"](...args)}_xmlOutputBufferCreateFilenameValue.stub=true;asyncifyStubs["xmlOutputBufferCreateFilenameValue"]=undefined;function _xmlParseCharEncoding(...args){return asyncifyStubs["xmlParseCharEncoding"](...args)}_xmlParseCharEncoding.stub=true;asyncifyStubs["xmlParseCharEncoding"]=undefined;function _xmlParseURI(...args){return asyncifyStubs["xmlParseURI"](...args)}_xmlParseURI.stub=true;asyncifyStubs["xmlParseURI"]=undefined;function _xmlParserDebugEntities(...args){return asyncifyStubs["xmlParserDebugEntities"](...args)}_xmlParserDebugEntities.stub=true;asyncifyStubs["xmlParserDebugEntities"]=undefined;function _xmlParserError(...args){return asyncifyStubs["xmlParserError"](...args)}_xmlParserError.stub=true;asyncifyStubs["xmlParserError"]=undefined;function _xmlParserInputBufferCreateFilenameDefault(...args){return asyncifyStubs["xmlParserInputBufferCreateFilenameDefault"](...args)}_xmlParserInputBufferCreateFilenameDefault.stub=true;asyncifyStubs["xmlParserInputBufferCreateFilenameDefault"]=undefined;function _xmlParserInputBufferCreateFilenameValue(...args){return asyncifyStubs["xmlParserInputBufferCreateFilenameValue"](...args)}_xmlParserInputBufferCreateFilenameValue.stub=true;asyncifyStubs["xmlParserInputBufferCreateFilenameValue"]=undefined;function _xmlParserMaxDepth(...args){return asyncifyStubs["xmlParserMaxDepth"](...args)}_xmlParserMaxDepth.stub=true;asyncifyStubs["xmlParserMaxDepth"]=undefined;function _xmlParserValidityError(...args){return asyncifyStubs["xmlParserValidityError"](...args)}_xmlParserValidityError.stub=true;asyncifyStubs["xmlParserValidityError"]=undefined;function _xmlParserValidityWarning(...args){return asyncifyStubs["xmlParserValidityWarning"](...args)}_xmlParserValidityWarning.stub=true;asyncifyStubs["xmlParserValidityWarning"]=undefined;function _xmlParserVersion(...args){return asyncifyStubs["xmlParserVersion"](...args)}_xmlParserVersion.stub=true;asyncifyStubs["xmlParserVersion"]=undefined;function _xmlParserWarning(...args){return asyncifyStubs["xmlParserWarning"](...args)}_xmlParserWarning.stub=true;asyncifyStubs["xmlParserWarning"]=undefined;function _xmlPedanticParserDefaultValue(...args){return asyncifyStubs["xmlPedanticParserDefaultValue"](...args)}_xmlPedanticParserDefaultValue.stub=true;asyncifyStubs["xmlPedanticParserDefaultValue"]=undefined;function _xmlRealloc(...args){return asyncifyStubs["xmlRealloc"](...args)}_xmlRealloc.stub=true;asyncifyStubs["xmlRealloc"]=undefined;function _xmlReconciliateNs(...args){return asyncifyStubs["xmlReconciliateNs"](...args)}_xmlReconciliateNs.stub=true;asyncifyStubs["xmlReconciliateNs"]=undefined;function _xmlRegisterNodeDefaultValue(...args){return asyncifyStubs["xmlRegisterNodeDefaultValue"](...args)}_xmlRegisterNodeDefaultValue.stub=true;asyncifyStubs["xmlRegisterNodeDefaultValue"]=undefined;function _xmlRelaxNGCleanupTypes(...args){return asyncifyStubs["xmlRelaxNGCleanupTypes"](...args)}_xmlRelaxNGCleanupTypes.stub=true;asyncifyStubs["xmlRelaxNGCleanupTypes"]=undefined;function _xmlRemoveID(...args){return asyncifyStubs["xmlRemoveID"](...args)}_xmlRemoveID.stub=true;asyncifyStubs["xmlRemoveID"]=undefined;function _xmlResetError(...args){return asyncifyStubs["xmlResetError"](...args)}_xmlResetError.stub=true;asyncifyStubs["xmlResetError"]=undefined;function _xmlResetLastError(...args){return asyncifyStubs["xmlResetLastError"](...args)}_xmlResetLastError.stub=true;asyncifyStubs["xmlResetLastError"]=undefined;function _xmlSAX2AttributeDecl(...args){return asyncifyStubs["xmlSAX2AttributeDecl"](...args)}_xmlSAX2AttributeDecl.stub=true;asyncifyStubs["xmlSAX2AttributeDecl"]=undefined;function _xmlSAX2CDataBlock(...args){return asyncifyStubs["xmlSAX2CDataBlock"](...args)}_xmlSAX2CDataBlock.stub=true;asyncifyStubs["xmlSAX2CDataBlock"]=undefined;function _xmlSAX2Characters(...args){return asyncifyStubs["xmlSAX2Characters"](...args)}_xmlSAX2Characters.stub=true;asyncifyStubs["xmlSAX2Characters"]=undefined;function _xmlSAX2Comment(...args){return asyncifyStubs["xmlSAX2Comment"](...args)}_xmlSAX2Comment.stub=true;asyncifyStubs["xmlSAX2Comment"]=undefined;function _xmlSAX2ElementDecl(...args){return asyncifyStubs["xmlSAX2ElementDecl"](...args)}_xmlSAX2ElementDecl.stub=true;asyncifyStubs["xmlSAX2ElementDecl"]=undefined;function _xmlSAX2EndDocument(...args){return asyncifyStubs["xmlSAX2EndDocument"](...args)}_xmlSAX2EndDocument.stub=true;asyncifyStubs["xmlSAX2EndDocument"]=undefined;function _xmlSAX2EndElement(...args){return asyncifyStubs["xmlSAX2EndElement"](...args)}_xmlSAX2EndElement.stub=true;asyncifyStubs["xmlSAX2EndElement"]=undefined;function _xmlSAX2EndElementNs(...args){return asyncifyStubs["xmlSAX2EndElementNs"](...args)}_xmlSAX2EndElementNs.stub=true;asyncifyStubs["xmlSAX2EndElementNs"]=undefined;function _xmlSAX2EntityDecl(...args){return asyncifyStubs["xmlSAX2EntityDecl"](...args)}_xmlSAX2EntityDecl.stub=true;asyncifyStubs["xmlSAX2EntityDecl"]=undefined;function _xmlSAX2ExternalSubset(...args){return asyncifyStubs["xmlSAX2ExternalSubset"](...args)}_xmlSAX2ExternalSubset.stub=true;asyncifyStubs["xmlSAX2ExternalSubset"]=undefined;function _xmlSAX2GetColumnNumber(...args){return asyncifyStubs["xmlSAX2GetColumnNumber"](...args)}_xmlSAX2GetColumnNumber.stub=true;asyncifyStubs["xmlSAX2GetColumnNumber"]=undefined;function _xmlSAX2GetEntity(...args){return asyncifyStubs["xmlSAX2GetEntity"](...args)}_xmlSAX2GetEntity.stub=true;asyncifyStubs["xmlSAX2GetEntity"]=undefined;function _xmlSAX2GetLineNumber(...args){return asyncifyStubs["xmlSAX2GetLineNumber"](...args)}_xmlSAX2GetLineNumber.stub=true;asyncifyStubs["xmlSAX2GetLineNumber"]=undefined;function _xmlSAX2GetParameterEntity(...args){return asyncifyStubs["xmlSAX2GetParameterEntity"](...args)}_xmlSAX2GetParameterEntity.stub=true;asyncifyStubs["xmlSAX2GetParameterEntity"]=undefined;function _xmlSAX2GetPublicId(...args){return asyncifyStubs["xmlSAX2GetPublicId"](...args)}_xmlSAX2GetPublicId.stub=true;asyncifyStubs["xmlSAX2GetPublicId"]=undefined;function _xmlSAX2GetSystemId(...args){return asyncifyStubs["xmlSAX2GetSystemId"](...args)}_xmlSAX2GetSystemId.stub=true;asyncifyStubs["xmlSAX2GetSystemId"]=undefined;function _xmlSAX2HasExternalSubset(...args){return asyncifyStubs["xmlSAX2HasExternalSubset"](...args)}_xmlSAX2HasExternalSubset.stub=true;asyncifyStubs["xmlSAX2HasExternalSubset"]=undefined;function _xmlSAX2HasInternalSubset(...args){return asyncifyStubs["xmlSAX2HasInternalSubset"](...args)}_xmlSAX2HasInternalSubset.stub=true;asyncifyStubs["xmlSAX2HasInternalSubset"]=undefined;function _xmlSAX2IgnorableWhitespace(...args){return asyncifyStubs["xmlSAX2IgnorableWhitespace"](...args)}_xmlSAX2IgnorableWhitespace.stub=true;asyncifyStubs["xmlSAX2IgnorableWhitespace"]=undefined;function _xmlSAX2InternalSubset(...args){return asyncifyStubs["xmlSAX2InternalSubset"](...args)}_xmlSAX2InternalSubset.stub=true;asyncifyStubs["xmlSAX2InternalSubset"]=undefined;function _xmlSAX2IsStandalone(...args){return asyncifyStubs["xmlSAX2IsStandalone"](...args)}_xmlSAX2IsStandalone.stub=true;asyncifyStubs["xmlSAX2IsStandalone"]=undefined;function _xmlSAX2NotationDecl(...args){return asyncifyStubs["xmlSAX2NotationDecl"](...args)}_xmlSAX2NotationDecl.stub=true;asyncifyStubs["xmlSAX2NotationDecl"]=undefined;function _xmlSAX2ProcessingInstruction(...args){return asyncifyStubs["xmlSAX2ProcessingInstruction"](...args)}_xmlSAX2ProcessingInstruction.stub=true;asyncifyStubs["xmlSAX2ProcessingInstruction"]=undefined;function _xmlSAX2Reference(...args){return asyncifyStubs["xmlSAX2Reference"](...args)}_xmlSAX2Reference.stub=true;asyncifyStubs["xmlSAX2Reference"]=undefined;function _xmlSAX2ResolveEntity(...args){return asyncifyStubs["xmlSAX2ResolveEntity"](...args)}_xmlSAX2ResolveEntity.stub=true;asyncifyStubs["xmlSAX2ResolveEntity"]=undefined;function _xmlSAX2SetDocumentLocator(...args){return asyncifyStubs["xmlSAX2SetDocumentLocator"](...args)}_xmlSAX2SetDocumentLocator.stub=true;asyncifyStubs["xmlSAX2SetDocumentLocator"]=undefined;function _xmlSAX2StartDocument(...args){return asyncifyStubs["xmlSAX2StartDocument"](...args)}_xmlSAX2StartDocument.stub=true;asyncifyStubs["xmlSAX2StartDocument"]=undefined;function _xmlSAX2StartElement(...args){return asyncifyStubs["xmlSAX2StartElement"](...args)}_xmlSAX2StartElement.stub=true;asyncifyStubs["xmlSAX2StartElement"]=undefined;function _xmlSAX2StartElementNs(...args){return asyncifyStubs["xmlSAX2StartElementNs"](...args)}_xmlSAX2StartElementNs.stub=true;asyncifyStubs["xmlSAX2StartElementNs"]=undefined;function _xmlSAX2UnparsedEntityDecl(...args){return asyncifyStubs["xmlSAX2UnparsedEntityDecl"](...args)}_xmlSAX2UnparsedEntityDecl.stub=true;asyncifyStubs["xmlSAX2UnparsedEntityDecl"]=undefined;function _xmlSaveNoEmptyTags(...args){return asyncifyStubs["xmlSaveNoEmptyTags"](...args)}_xmlSaveNoEmptyTags.stub=true;asyncifyStubs["xmlSaveNoEmptyTags"]=undefined;function _xmlSetExternalEntityLoader(...args){return asyncifyStubs["xmlSetExternalEntityLoader"](...args)}_xmlSetExternalEntityLoader.stub=true;asyncifyStubs["xmlSetExternalEntityLoader"]=undefined;function _xmlSetGenericErrorFunc(...args){return asyncifyStubs["xmlSetGenericErrorFunc"](...args)}_xmlSetGenericErrorFunc.stub=true;asyncifyStubs["xmlSetGenericErrorFunc"]=undefined;function _xmlSetStructuredErrorFunc(...args){return asyncifyStubs["xmlSetStructuredErrorFunc"](...args)}_xmlSetStructuredErrorFunc.stub=true;asyncifyStubs["xmlSetStructuredErrorFunc"]=undefined;function _xmlStrdup(...args){return asyncifyStubs["xmlStrdup"](...args)}_xmlStrdup.stub=true;asyncifyStubs["xmlStrdup"]=undefined;function _xmlStringComment(...args){return asyncifyStubs["xmlStringComment"](...args)}_xmlStringComment.stub=true;asyncifyStubs["xmlStringComment"]=undefined;function _xmlStringText(...args){return asyncifyStubs["xmlStringText"](...args)}_xmlStringText.stub=true;asyncifyStubs["xmlStringText"]=undefined;function _xmlStringTextNoenc(...args){return asyncifyStubs["xmlStringTextNoenc"](...args)}_xmlStringTextNoenc.stub=true;asyncifyStubs["xmlStringTextNoenc"]=undefined;function _xmlStrncmp(...args){return asyncifyStubs["xmlStrncmp"](...args)}_xmlStrncmp.stub=true;asyncifyStubs["xmlStrncmp"]=undefined;function _xmlStructuredError(...args){return asyncifyStubs["xmlStructuredError"](...args)}_xmlStructuredError.stub=true;asyncifyStubs["xmlStructuredError"]=undefined;function _xmlStructuredErrorContext(...args){return asyncifyStubs["xmlStructuredErrorContext"](...args)}_xmlStructuredErrorContext.stub=true;asyncifyStubs["xmlStructuredErrorContext"]=undefined;function _xmlSubstituteEntitiesDefaultValue(...args){return asyncifyStubs["xmlSubstituteEntitiesDefaultValue"](...args)}_xmlSubstituteEntitiesDefaultValue.stub=true;asyncifyStubs["xmlSubstituteEntitiesDefaultValue"]=undefined;function _xmlTreeIndentString(...args){return asyncifyStubs["xmlTreeIndentString"](...args)}_xmlTreeIndentString.stub=true;asyncifyStubs["xmlTreeIndentString"]=undefined;function _xmlUCSIsAegeanNumbers(...args){return asyncifyStubs["xmlUCSIsAegeanNumbers"](...args)}_xmlUCSIsAegeanNumbers.stub=true;asyncifyStubs["xmlUCSIsAegeanNumbers"]=undefined;function _xmlUCSIsAlphabeticPresentationForms(...args){return asyncifyStubs["xmlUCSIsAlphabeticPresentationForms"](...args)}_xmlUCSIsAlphabeticPresentationForms.stub=true;asyncifyStubs["xmlUCSIsAlphabeticPresentationForms"]=undefined;function _xmlUCSIsArabic(...args){return asyncifyStubs["xmlUCSIsArabic"](...args)}_xmlUCSIsArabic.stub=true;asyncifyStubs["xmlUCSIsArabic"]=undefined;function _xmlUCSIsArabicPresentationFormsA(...args){return asyncifyStubs["xmlUCSIsArabicPresentationFormsA"](...args)}_xmlUCSIsArabicPresentationFormsA.stub=true;asyncifyStubs["xmlUCSIsArabicPresentationFormsA"]=undefined;function _xmlUCSIsArabicPresentationFormsB(...args){return asyncifyStubs["xmlUCSIsArabicPresentationFormsB"](...args)}_xmlUCSIsArabicPresentationFormsB.stub=true;asyncifyStubs["xmlUCSIsArabicPresentationFormsB"]=undefined;function _xmlUCSIsArmenian(...args){return asyncifyStubs["xmlUCSIsArmenian"](...args)}_xmlUCSIsArmenian.stub=true;asyncifyStubs["xmlUCSIsArmenian"]=undefined;function _xmlUCSIsArrows(...args){return asyncifyStubs["xmlUCSIsArrows"](...args)}_xmlUCSIsArrows.stub=true;asyncifyStubs["xmlUCSIsArrows"]=undefined;function _xmlUCSIsBasicLatin(...args){return asyncifyStubs["xmlUCSIsBasicLatin"](...args)}_xmlUCSIsBasicLatin.stub=true;asyncifyStubs["xmlUCSIsBasicLatin"]=undefined;function _xmlUCSIsBengali(...args){return asyncifyStubs["xmlUCSIsBengali"](...args)}_xmlUCSIsBengali.stub=true;asyncifyStubs["xmlUCSIsBengali"]=undefined;function _xmlUCSIsBlockElements(...args){return asyncifyStubs["xmlUCSIsBlockElements"](...args)}_xmlUCSIsBlockElements.stub=true;asyncifyStubs["xmlUCSIsBlockElements"]=undefined;function _xmlUCSIsBopomofo(...args){return asyncifyStubs["xmlUCSIsBopomofo"](...args)}_xmlUCSIsBopomofo.stub=true;asyncifyStubs["xmlUCSIsBopomofo"]=undefined;function _xmlUCSIsBopomofoExtended(...args){return asyncifyStubs["xmlUCSIsBopomofoExtended"](...args)}_xmlUCSIsBopomofoExtended.stub=true;asyncifyStubs["xmlUCSIsBopomofoExtended"]=undefined;function _xmlUCSIsBoxDrawing(...args){return asyncifyStubs["xmlUCSIsBoxDrawing"](...args)}_xmlUCSIsBoxDrawing.stub=true;asyncifyStubs["xmlUCSIsBoxDrawing"]=undefined;function _xmlUCSIsBraillePatterns(...args){return asyncifyStubs["xmlUCSIsBraillePatterns"](...args)}_xmlUCSIsBraillePatterns.stub=true;asyncifyStubs["xmlUCSIsBraillePatterns"]=undefined;function _xmlUCSIsBuhid(...args){return asyncifyStubs["xmlUCSIsBuhid"](...args)}_xmlUCSIsBuhid.stub=true;asyncifyStubs["xmlUCSIsBuhid"]=undefined;function _xmlUCSIsByzantineMusicalSymbols(...args){return asyncifyStubs["xmlUCSIsByzantineMusicalSymbols"](...args)}_xmlUCSIsByzantineMusicalSymbols.stub=true;asyncifyStubs["xmlUCSIsByzantineMusicalSymbols"]=undefined;function _xmlUCSIsCJKCompatibility(...args){return asyncifyStubs["xmlUCSIsCJKCompatibility"](...args)}_xmlUCSIsCJKCompatibility.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibility"]=undefined;function _xmlUCSIsCJKCompatibilityForms(...args){return asyncifyStubs["xmlUCSIsCJKCompatibilityForms"](...args)}_xmlUCSIsCJKCompatibilityForms.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibilityForms"]=undefined;function _xmlUCSIsCJKCompatibilityIdeographs(...args){return asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographs"](...args)}_xmlUCSIsCJKCompatibilityIdeographs.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographs"]=undefined;function _xmlUCSIsCJKCompatibilityIdeographsSupplement(...args){return asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographsSupplement"](...args)}_xmlUCSIsCJKCompatibilityIdeographsSupplement.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographsSupplement"]=undefined;function _xmlUCSIsCJKRadicalsSupplement(...args){return asyncifyStubs["xmlUCSIsCJKRadicalsSupplement"](...args)}_xmlUCSIsCJKRadicalsSupplement.stub=true;asyncifyStubs["xmlUCSIsCJKRadicalsSupplement"]=undefined;function _xmlUCSIsCJKSymbolsandPunctuation(...args){return asyncifyStubs["xmlUCSIsCJKSymbolsandPunctuation"](...args)}_xmlUCSIsCJKSymbolsandPunctuation.stub=true;asyncifyStubs["xmlUCSIsCJKSymbolsandPunctuation"]=undefined;function _xmlUCSIsCJKUnifiedIdeographs(...args){return asyncifyStubs["xmlUCSIsCJKUnifiedIdeographs"](...args)}_xmlUCSIsCJKUnifiedIdeographs.stub=true;asyncifyStubs["xmlUCSIsCJKUnifiedIdeographs"]=undefined;function _xmlUCSIsCJKUnifiedIdeographsExtensionA(...args){return asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionA"](...args)}_xmlUCSIsCJKUnifiedIdeographsExtensionA.stub=true;asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionA"]=undefined;function _xmlUCSIsCJKUnifiedIdeographsExtensionB(...args){return asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionB"](...args)}_xmlUCSIsCJKUnifiedIdeographsExtensionB.stub=true;asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionB"]=undefined;function _xmlUCSIsCatC(...args){return asyncifyStubs["xmlUCSIsCatC"](...args)}_xmlUCSIsCatC.stub=true;asyncifyStubs["xmlUCSIsCatC"]=undefined;function _xmlUCSIsCatCc(...args){return asyncifyStubs["xmlUCSIsCatCc"](...args)}_xmlUCSIsCatCc.stub=true;asyncifyStubs["xmlUCSIsCatCc"]=undefined;function _xmlUCSIsCatCf(...args){return asyncifyStubs["xmlUCSIsCatCf"](...args)}_xmlUCSIsCatCf.stub=true;asyncifyStubs["xmlUCSIsCatCf"]=undefined;function _xmlUCSIsCatCo(...args){return asyncifyStubs["xmlUCSIsCatCo"](...args)}_xmlUCSIsCatCo.stub=true;asyncifyStubs["xmlUCSIsCatCo"]=undefined;function _xmlUCSIsCatCs(...args){return asyncifyStubs["xmlUCSIsCatCs"](...args)}_xmlUCSIsCatCs.stub=true;asyncifyStubs["xmlUCSIsCatCs"]=undefined;function _xmlUCSIsCatL(...args){return asyncifyStubs["xmlUCSIsCatL"](...args)}_xmlUCSIsCatL.stub=true;asyncifyStubs["xmlUCSIsCatL"]=undefined;function _xmlUCSIsCatLl(...args){return asyncifyStubs["xmlUCSIsCatLl"](...args)}_xmlUCSIsCatLl.stub=true;asyncifyStubs["xmlUCSIsCatLl"]=undefined;function _xmlUCSIsCatLm(...args){return asyncifyStubs["xmlUCSIsCatLm"](...args)}_xmlUCSIsCatLm.stub=true;asyncifyStubs["xmlUCSIsCatLm"]=undefined;function _xmlUCSIsCatLo(...args){return asyncifyStubs["xmlUCSIsCatLo"](...args)}_xmlUCSIsCatLo.stub=true;asyncifyStubs["xmlUCSIsCatLo"]=undefined;function _xmlUCSIsCatLt(...args){return asyncifyStubs["xmlUCSIsCatLt"](...args)}_xmlUCSIsCatLt.stub=true;asyncifyStubs["xmlUCSIsCatLt"]=undefined;function _xmlUCSIsCatLu(...args){return asyncifyStubs["xmlUCSIsCatLu"](...args)}_xmlUCSIsCatLu.stub=true;asyncifyStubs["xmlUCSIsCatLu"]=undefined;function _xmlUCSIsCatM(...args){return asyncifyStubs["xmlUCSIsCatM"](...args)}_xmlUCSIsCatM.stub=true;asyncifyStubs["xmlUCSIsCatM"]=undefined;function _xmlUCSIsCatMc(...args){return asyncifyStubs["xmlUCSIsCatMc"](...args)}_xmlUCSIsCatMc.stub=true;asyncifyStubs["xmlUCSIsCatMc"]=undefined;function _xmlUCSIsCatMe(...args){return asyncifyStubs["xmlUCSIsCatMe"](...args)}_xmlUCSIsCatMe.stub=true;asyncifyStubs["xmlUCSIsCatMe"]=undefined;function _xmlUCSIsCatMn(...args){return asyncifyStubs["xmlUCSIsCatMn"](...args)}_xmlUCSIsCatMn.stub=true;asyncifyStubs["xmlUCSIsCatMn"]=undefined;function _xmlUCSIsCatN(...args){return asyncifyStubs["xmlUCSIsCatN"](...args)}_xmlUCSIsCatN.stub=true;asyncifyStubs["xmlUCSIsCatN"]=undefined;function _xmlUCSIsCatNd(...args){return asyncifyStubs["xmlUCSIsCatNd"](...args)}_xmlUCSIsCatNd.stub=true;asyncifyStubs["xmlUCSIsCatNd"]=undefined;function _xmlUCSIsCatNl(...args){return asyncifyStubs["xmlUCSIsCatNl"](...args)}_xmlUCSIsCatNl.stub=true;asyncifyStubs["xmlUCSIsCatNl"]=undefined;function _xmlUCSIsCatNo(...args){return asyncifyStubs["xmlUCSIsCatNo"](...args)}_xmlUCSIsCatNo.stub=true;asyncifyStubs["xmlUCSIsCatNo"]=undefined;function _xmlUCSIsCatP(...args){return asyncifyStubs["xmlUCSIsCatP"](...args)}_xmlUCSIsCatP.stub=true;asyncifyStubs["xmlUCSIsCatP"]=undefined;function _xmlUCSIsCatPc(...args){return asyncifyStubs["xmlUCSIsCatPc"](...args)}_xmlUCSIsCatPc.stub=true;asyncifyStubs["xmlUCSIsCatPc"]=undefined;function _xmlUCSIsCatPd(...args){return asyncifyStubs["xmlUCSIsCatPd"](...args)}_xmlUCSIsCatPd.stub=true;asyncifyStubs["xmlUCSIsCatPd"]=undefined;function _xmlUCSIsCatPe(...args){return asyncifyStubs["xmlUCSIsCatPe"](...args)}_xmlUCSIsCatPe.stub=true;asyncifyStubs["xmlUCSIsCatPe"]=undefined;function _xmlUCSIsCatPf(...args){return asyncifyStubs["xmlUCSIsCatPf"](...args)}_xmlUCSIsCatPf.stub=true;asyncifyStubs["xmlUCSIsCatPf"]=undefined;function _xmlUCSIsCatPi(...args){return asyncifyStubs["xmlUCSIsCatPi"](...args)}_xmlUCSIsCatPi.stub=true;asyncifyStubs["xmlUCSIsCatPi"]=undefined;function _xmlUCSIsCatPo(...args){return asyncifyStubs["xmlUCSIsCatPo"](...args)}_xmlUCSIsCatPo.stub=true;asyncifyStubs["xmlUCSIsCatPo"]=undefined;function _xmlUCSIsCatPs(...args){return asyncifyStubs["xmlUCSIsCatPs"](...args)}_xmlUCSIsCatPs.stub=true;asyncifyStubs["xmlUCSIsCatPs"]=undefined;function _xmlUCSIsCatS(...args){return asyncifyStubs["xmlUCSIsCatS"](...args)}_xmlUCSIsCatS.stub=true;asyncifyStubs["xmlUCSIsCatS"]=undefined;function _xmlUCSIsCatSc(...args){return asyncifyStubs["xmlUCSIsCatSc"](...args)}_xmlUCSIsCatSc.stub=true;asyncifyStubs["xmlUCSIsCatSc"]=undefined;function _xmlUCSIsCatSk(...args){return asyncifyStubs["xmlUCSIsCatSk"](...args)}_xmlUCSIsCatSk.stub=true;asyncifyStubs["xmlUCSIsCatSk"]=undefined;function _xmlUCSIsCatSm(...args){return asyncifyStubs["xmlUCSIsCatSm"](...args)}_xmlUCSIsCatSm.stub=true;asyncifyStubs["xmlUCSIsCatSm"]=undefined;function _xmlUCSIsCatSo(...args){return asyncifyStubs["xmlUCSIsCatSo"](...args)}_xmlUCSIsCatSo.stub=true;asyncifyStubs["xmlUCSIsCatSo"]=undefined;function _xmlUCSIsCatZ(...args){return asyncifyStubs["xmlUCSIsCatZ"](...args)}_xmlUCSIsCatZ.stub=true;asyncifyStubs["xmlUCSIsCatZ"]=undefined;function _xmlUCSIsCatZl(...args){return asyncifyStubs["xmlUCSIsCatZl"](...args)}_xmlUCSIsCatZl.stub=true;asyncifyStubs["xmlUCSIsCatZl"]=undefined;function _xmlUCSIsCatZp(...args){return asyncifyStubs["xmlUCSIsCatZp"](...args)}_xmlUCSIsCatZp.stub=true;asyncifyStubs["xmlUCSIsCatZp"]=undefined;function _xmlUCSIsCatZs(...args){return asyncifyStubs["xmlUCSIsCatZs"](...args)}_xmlUCSIsCatZs.stub=true;asyncifyStubs["xmlUCSIsCatZs"]=undefined;function _xmlUCSIsCherokee(...args){return asyncifyStubs["xmlUCSIsCherokee"](...args)}_xmlUCSIsCherokee.stub=true;asyncifyStubs["xmlUCSIsCherokee"]=undefined;function _xmlUCSIsCombiningDiacriticalMarks(...args){return asyncifyStubs["xmlUCSIsCombiningDiacriticalMarks"](...args)}_xmlUCSIsCombiningDiacriticalMarks.stub=true;asyncifyStubs["xmlUCSIsCombiningDiacriticalMarks"]=undefined;function _xmlUCSIsCombiningDiacriticalMarksforSymbols(...args){return asyncifyStubs["xmlUCSIsCombiningDiacriticalMarksforSymbols"](...args)}_xmlUCSIsCombiningDiacriticalMarksforSymbols.stub=true;asyncifyStubs["xmlUCSIsCombiningDiacriticalMarksforSymbols"]=undefined;function _xmlUCSIsCombiningHalfMarks(...args){return asyncifyStubs["xmlUCSIsCombiningHalfMarks"](...args)}_xmlUCSIsCombiningHalfMarks.stub=true;asyncifyStubs["xmlUCSIsCombiningHalfMarks"]=undefined;function _xmlUCSIsCombiningMarksforSymbols(...args){return asyncifyStubs["xmlUCSIsCombiningMarksforSymbols"](...args)}_xmlUCSIsCombiningMarksforSymbols.stub=true;asyncifyStubs["xmlUCSIsCombiningMarksforSymbols"]=undefined;function _xmlUCSIsControlPictures(...args){return asyncifyStubs["xmlUCSIsControlPictures"](...args)}_xmlUCSIsControlPictures.stub=true;asyncifyStubs["xmlUCSIsControlPictures"]=undefined;function _xmlUCSIsCurrencySymbols(...args){return asyncifyStubs["xmlUCSIsCurrencySymbols"](...args)}_xmlUCSIsCurrencySymbols.stub=true;asyncifyStubs["xmlUCSIsCurrencySymbols"]=undefined;function _xmlUCSIsCypriotSyllabary(...args){return asyncifyStubs["xmlUCSIsCypriotSyllabary"](...args)}_xmlUCSIsCypriotSyllabary.stub=true;asyncifyStubs["xmlUCSIsCypriotSyllabary"]=undefined;function _xmlUCSIsCyrillic(...args){return asyncifyStubs["xmlUCSIsCyrillic"](...args)}_xmlUCSIsCyrillic.stub=true;asyncifyStubs["xmlUCSIsCyrillic"]=undefined;function _xmlUCSIsCyrillicSupplement(...args){return asyncifyStubs["xmlUCSIsCyrillicSupplement"](...args)}_xmlUCSIsCyrillicSupplement.stub=true;asyncifyStubs["xmlUCSIsCyrillicSupplement"]=undefined;function _xmlUCSIsDeseret(...args){return asyncifyStubs["xmlUCSIsDeseret"](...args)}_xmlUCSIsDeseret.stub=true;asyncifyStubs["xmlUCSIsDeseret"]=undefined;function _xmlUCSIsDevanagari(...args){return asyncifyStubs["xmlUCSIsDevanagari"](...args)}_xmlUCSIsDevanagari.stub=true;asyncifyStubs["xmlUCSIsDevanagari"]=undefined;function _xmlUCSIsDingbats(...args){return asyncifyStubs["xmlUCSIsDingbats"](...args)}_xmlUCSIsDingbats.stub=true;asyncifyStubs["xmlUCSIsDingbats"]=undefined;function _xmlUCSIsEnclosedAlphanumerics(...args){return asyncifyStubs["xmlUCSIsEnclosedAlphanumerics"](...args)}_xmlUCSIsEnclosedAlphanumerics.stub=true;asyncifyStubs["xmlUCSIsEnclosedAlphanumerics"]=undefined;function _xmlUCSIsEnclosedCJKLettersandMonths(...args){return asyncifyStubs["xmlUCSIsEnclosedCJKLettersandMonths"](...args)}_xmlUCSIsEnclosedCJKLettersandMonths.stub=true;asyncifyStubs["xmlUCSIsEnclosedCJKLettersandMonths"]=undefined;function _xmlUCSIsEthiopic(...args){return asyncifyStubs["xmlUCSIsEthiopic"](...args)}_xmlUCSIsEthiopic.stub=true;asyncifyStubs["xmlUCSIsEthiopic"]=undefined;function _xmlUCSIsGeneralPunctuation(...args){return asyncifyStubs["xmlUCSIsGeneralPunctuation"](...args)}_xmlUCSIsGeneralPunctuation.stub=true;asyncifyStubs["xmlUCSIsGeneralPunctuation"]=undefined;function _xmlUCSIsGeometricShapes(...args){return asyncifyStubs["xmlUCSIsGeometricShapes"](...args)}_xmlUCSIsGeometricShapes.stub=true;asyncifyStubs["xmlUCSIsGeometricShapes"]=undefined;function _xmlUCSIsGeorgian(...args){return asyncifyStubs["xmlUCSIsGeorgian"](...args)}_xmlUCSIsGeorgian.stub=true;asyncifyStubs["xmlUCSIsGeorgian"]=undefined;function _xmlUCSIsGothic(...args){return asyncifyStubs["xmlUCSIsGothic"](...args)}_xmlUCSIsGothic.stub=true;asyncifyStubs["xmlUCSIsGothic"]=undefined;function _xmlUCSIsGreek(...args){return asyncifyStubs["xmlUCSIsGreek"](...args)}_xmlUCSIsGreek.stub=true;asyncifyStubs["xmlUCSIsGreek"]=undefined;function _xmlUCSIsGreekExtended(...args){return asyncifyStubs["xmlUCSIsGreekExtended"](...args)}_xmlUCSIsGreekExtended.stub=true;asyncifyStubs["xmlUCSIsGreekExtended"]=undefined;function _xmlUCSIsGreekandCoptic(...args){return asyncifyStubs["xmlUCSIsGreekandCoptic"](...args)}_xmlUCSIsGreekandCoptic.stub=true;asyncifyStubs["xmlUCSIsGreekandCoptic"]=undefined;function _xmlUCSIsGujarati(...args){return asyncifyStubs["xmlUCSIsGujarati"](...args)}_xmlUCSIsGujarati.stub=true;asyncifyStubs["xmlUCSIsGujarati"]=undefined;function _xmlUCSIsGurmukhi(...args){return asyncifyStubs["xmlUCSIsGurmukhi"](...args)}_xmlUCSIsGurmukhi.stub=true;asyncifyStubs["xmlUCSIsGurmukhi"]=undefined;function _xmlUCSIsHalfwidthandFullwidthForms(...args){return asyncifyStubs["xmlUCSIsHalfwidthandFullwidthForms"](...args)}_xmlUCSIsHalfwidthandFullwidthForms.stub=true;asyncifyStubs["xmlUCSIsHalfwidthandFullwidthForms"]=undefined;function _xmlUCSIsHangulCompatibilityJamo(...args){return asyncifyStubs["xmlUCSIsHangulCompatibilityJamo"](...args)}_xmlUCSIsHangulCompatibilityJamo.stub=true;asyncifyStubs["xmlUCSIsHangulCompatibilityJamo"]=undefined;function _xmlUCSIsHangulJamo(...args){return asyncifyStubs["xmlUCSIsHangulJamo"](...args)}_xmlUCSIsHangulJamo.stub=true;asyncifyStubs["xmlUCSIsHangulJamo"]=undefined;function _xmlUCSIsHangulSyllables(...args){return asyncifyStubs["xmlUCSIsHangulSyllables"](...args)}_xmlUCSIsHangulSyllables.stub=true;asyncifyStubs["xmlUCSIsHangulSyllables"]=undefined;function _xmlUCSIsHanunoo(...args){return asyncifyStubs["xmlUCSIsHanunoo"](...args)}_xmlUCSIsHanunoo.stub=true;asyncifyStubs["xmlUCSIsHanunoo"]=undefined;function _xmlUCSIsHebrew(...args){return asyncifyStubs["xmlUCSIsHebrew"](...args)}_xmlUCSIsHebrew.stub=true;asyncifyStubs["xmlUCSIsHebrew"]=undefined;function _xmlUCSIsHighPrivateUseSurrogates(...args){return asyncifyStubs["xmlUCSIsHighPrivateUseSurrogates"](...args)}_xmlUCSIsHighPrivateUseSurrogates.stub=true;asyncifyStubs["xmlUCSIsHighPrivateUseSurrogates"]=undefined;function _xmlUCSIsHighSurrogates(...args){return asyncifyStubs["xmlUCSIsHighSurrogates"](...args)}_xmlUCSIsHighSurrogates.stub=true;asyncifyStubs["xmlUCSIsHighSurrogates"]=undefined;function _xmlUCSIsHiragana(...args){return asyncifyStubs["xmlUCSIsHiragana"](...args)}_xmlUCSIsHiragana.stub=true;asyncifyStubs["xmlUCSIsHiragana"]=undefined;function _xmlUCSIsIPAExtensions(...args){return asyncifyStubs["xmlUCSIsIPAExtensions"](...args)}_xmlUCSIsIPAExtensions.stub=true;asyncifyStubs["xmlUCSIsIPAExtensions"]=undefined;function _xmlUCSIsIdeographicDescriptionCharacters(...args){return asyncifyStubs["xmlUCSIsIdeographicDescriptionCharacters"](...args)}_xmlUCSIsIdeographicDescriptionCharacters.stub=true;asyncifyStubs["xmlUCSIsIdeographicDescriptionCharacters"]=undefined;function _xmlUCSIsKanbun(...args){return asyncifyStubs["xmlUCSIsKanbun"](...args)}_xmlUCSIsKanbun.stub=true;asyncifyStubs["xmlUCSIsKanbun"]=undefined;function _xmlUCSIsKangxiRadicals(...args){return asyncifyStubs["xmlUCSIsKangxiRadicals"](...args)}_xmlUCSIsKangxiRadicals.stub=true;asyncifyStubs["xmlUCSIsKangxiRadicals"]=undefined;function _xmlUCSIsKannada(...args){return asyncifyStubs["xmlUCSIsKannada"](...args)}_xmlUCSIsKannada.stub=true;asyncifyStubs["xmlUCSIsKannada"]=undefined;function _xmlUCSIsKatakana(...args){return asyncifyStubs["xmlUCSIsKatakana"](...args)}_xmlUCSIsKatakana.stub=true;asyncifyStubs["xmlUCSIsKatakana"]=undefined;function _xmlUCSIsKatakanaPhoneticExtensions(...args){return asyncifyStubs["xmlUCSIsKatakanaPhoneticExtensions"](...args)}_xmlUCSIsKatakanaPhoneticExtensions.stub=true;asyncifyStubs["xmlUCSIsKatakanaPhoneticExtensions"]=undefined;function _xmlUCSIsKhmer(...args){return asyncifyStubs["xmlUCSIsKhmer"](...args)}_xmlUCSIsKhmer.stub=true;asyncifyStubs["xmlUCSIsKhmer"]=undefined;function _xmlUCSIsKhmerSymbols(...args){return asyncifyStubs["xmlUCSIsKhmerSymbols"](...args)}_xmlUCSIsKhmerSymbols.stub=true;asyncifyStubs["xmlUCSIsKhmerSymbols"]=undefined;function _xmlUCSIsLao(...args){return asyncifyStubs["xmlUCSIsLao"](...args)}_xmlUCSIsLao.stub=true;asyncifyStubs["xmlUCSIsLao"]=undefined;function _xmlUCSIsLatin1Supplement(...args){return asyncifyStubs["xmlUCSIsLatin1Supplement"](...args)}_xmlUCSIsLatin1Supplement.stub=true;asyncifyStubs["xmlUCSIsLatin1Supplement"]=undefined;function _xmlUCSIsLatinExtendedA(...args){return asyncifyStubs["xmlUCSIsLatinExtendedA"](...args)}_xmlUCSIsLatinExtendedA.stub=true;asyncifyStubs["xmlUCSIsLatinExtendedA"]=undefined;function _xmlUCSIsLatinExtendedAdditional(...args){return asyncifyStubs["xmlUCSIsLatinExtendedAdditional"](...args)}_xmlUCSIsLatinExtendedAdditional.stub=true;asyncifyStubs["xmlUCSIsLatinExtendedAdditional"]=undefined;function _xmlUCSIsLatinExtendedB(...args){return asyncifyStubs["xmlUCSIsLatinExtendedB"](...args)}_xmlUCSIsLatinExtendedB.stub=true;asyncifyStubs["xmlUCSIsLatinExtendedB"]=undefined;function _xmlUCSIsLetterlikeSymbols(...args){return asyncifyStubs["xmlUCSIsLetterlikeSymbols"](...args)}_xmlUCSIsLetterlikeSymbols.stub=true;asyncifyStubs["xmlUCSIsLetterlikeSymbols"]=undefined;function _xmlUCSIsLimbu(...args){return asyncifyStubs["xmlUCSIsLimbu"](...args)}_xmlUCSIsLimbu.stub=true;asyncifyStubs["xmlUCSIsLimbu"]=undefined;function _xmlUCSIsLinearBIdeograms(...args){return asyncifyStubs["xmlUCSIsLinearBIdeograms"](...args)}_xmlUCSIsLinearBIdeograms.stub=true;asyncifyStubs["xmlUCSIsLinearBIdeograms"]=undefined;function _xmlUCSIsLinearBSyllabary(...args){return asyncifyStubs["xmlUCSIsLinearBSyllabary"](...args)}_xmlUCSIsLinearBSyllabary.stub=true;asyncifyStubs["xmlUCSIsLinearBSyllabary"]=undefined;function _xmlUCSIsLowSurrogates(...args){return asyncifyStubs["xmlUCSIsLowSurrogates"](...args)}_xmlUCSIsLowSurrogates.stub=true;asyncifyStubs["xmlUCSIsLowSurrogates"]=undefined;function _xmlUCSIsMalayalam(...args){return asyncifyStubs["xmlUCSIsMalayalam"](...args)}_xmlUCSIsMalayalam.stub=true;asyncifyStubs["xmlUCSIsMalayalam"]=undefined;function _xmlUCSIsMathematicalAlphanumericSymbols(...args){return asyncifyStubs["xmlUCSIsMathematicalAlphanumericSymbols"](...args)}_xmlUCSIsMathematicalAlphanumericSymbols.stub=true;asyncifyStubs["xmlUCSIsMathematicalAlphanumericSymbols"]=undefined;function _xmlUCSIsMathematicalOperators(...args){return asyncifyStubs["xmlUCSIsMathematicalOperators"](...args)}_xmlUCSIsMathematicalOperators.stub=true;asyncifyStubs["xmlUCSIsMathematicalOperators"]=undefined;function _xmlUCSIsMiscellaneousMathematicalSymbolsA(...args){return asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsA"](...args)}_xmlUCSIsMiscellaneousMathematicalSymbolsA.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsA"]=undefined;function _xmlUCSIsMiscellaneousMathematicalSymbolsB(...args){return asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsB"](...args)}_xmlUCSIsMiscellaneousMathematicalSymbolsB.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsB"]=undefined;function _xmlUCSIsMiscellaneousSymbols(...args){return asyncifyStubs["xmlUCSIsMiscellaneousSymbols"](...args)}_xmlUCSIsMiscellaneousSymbols.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousSymbols"]=undefined;function _xmlUCSIsMiscellaneousSymbolsandArrows(...args){return asyncifyStubs["xmlUCSIsMiscellaneousSymbolsandArrows"](...args)}_xmlUCSIsMiscellaneousSymbolsandArrows.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousSymbolsandArrows"]=undefined;function _xmlUCSIsMiscellaneousTechnical(...args){return asyncifyStubs["xmlUCSIsMiscellaneousTechnical"](...args)}_xmlUCSIsMiscellaneousTechnical.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousTechnical"]=undefined;function _xmlUCSIsMongolian(...args){return asyncifyStubs["xmlUCSIsMongolian"](...args)}_xmlUCSIsMongolian.stub=true;asyncifyStubs["xmlUCSIsMongolian"]=undefined;function _xmlUCSIsMusicalSymbols(...args){return asyncifyStubs["xmlUCSIsMusicalSymbols"](...args)}_xmlUCSIsMusicalSymbols.stub=true;asyncifyStubs["xmlUCSIsMusicalSymbols"]=undefined;function _xmlUCSIsMyanmar(...args){return asyncifyStubs["xmlUCSIsMyanmar"](...args)}_xmlUCSIsMyanmar.stub=true;asyncifyStubs["xmlUCSIsMyanmar"]=undefined;function _xmlUCSIsNumberForms(...args){return asyncifyStubs["xmlUCSIsNumberForms"](...args)}_xmlUCSIsNumberForms.stub=true;asyncifyStubs["xmlUCSIsNumberForms"]=undefined;function _xmlUCSIsOgham(...args){return asyncifyStubs["xmlUCSIsOgham"](...args)}_xmlUCSIsOgham.stub=true;asyncifyStubs["xmlUCSIsOgham"]=undefined;function _xmlUCSIsOldItalic(...args){return asyncifyStubs["xmlUCSIsOldItalic"](...args)}_xmlUCSIsOldItalic.stub=true;asyncifyStubs["xmlUCSIsOldItalic"]=undefined;function _xmlUCSIsOpticalCharacterRecognition(...args){return asyncifyStubs["xmlUCSIsOpticalCharacterRecognition"](...args)}_xmlUCSIsOpticalCharacterRecognition.stub=true;asyncifyStubs["xmlUCSIsOpticalCharacterRecognition"]=undefined;function _xmlUCSIsOriya(...args){return asyncifyStubs["xmlUCSIsOriya"](...args)}_xmlUCSIsOriya.stub=true;asyncifyStubs["xmlUCSIsOriya"]=undefined;function _xmlUCSIsOsmanya(...args){return asyncifyStubs["xmlUCSIsOsmanya"](...args)}_xmlUCSIsOsmanya.stub=true;asyncifyStubs["xmlUCSIsOsmanya"]=undefined;function _xmlUCSIsPhoneticExtensions(...args){return asyncifyStubs["xmlUCSIsPhoneticExtensions"](...args)}_xmlUCSIsPhoneticExtensions.stub=true;asyncifyStubs["xmlUCSIsPhoneticExtensions"]=undefined;function _xmlUCSIsPrivateUse(...args){return asyncifyStubs["xmlUCSIsPrivateUse"](...args)}_xmlUCSIsPrivateUse.stub=true;asyncifyStubs["xmlUCSIsPrivateUse"]=undefined;function _xmlUCSIsPrivateUseArea(...args){return asyncifyStubs["xmlUCSIsPrivateUseArea"](...args)}_xmlUCSIsPrivateUseArea.stub=true;asyncifyStubs["xmlUCSIsPrivateUseArea"]=undefined;function _xmlUCSIsRunic(...args){return asyncifyStubs["xmlUCSIsRunic"](...args)}_xmlUCSIsRunic.stub=true;asyncifyStubs["xmlUCSIsRunic"]=undefined;function _xmlUCSIsShavian(...args){return asyncifyStubs["xmlUCSIsShavian"](...args)}_xmlUCSIsShavian.stub=true;asyncifyStubs["xmlUCSIsShavian"]=undefined;function _xmlUCSIsSinhala(...args){return asyncifyStubs["xmlUCSIsSinhala"](...args)}_xmlUCSIsSinhala.stub=true;asyncifyStubs["xmlUCSIsSinhala"]=undefined;function _xmlUCSIsSmallFormVariants(...args){return asyncifyStubs["xmlUCSIsSmallFormVariants"](...args)}_xmlUCSIsSmallFormVariants.stub=true;asyncifyStubs["xmlUCSIsSmallFormVariants"]=undefined;function _xmlUCSIsSpacingModifierLetters(...args){return asyncifyStubs["xmlUCSIsSpacingModifierLetters"](...args)}_xmlUCSIsSpacingModifierLetters.stub=true;asyncifyStubs["xmlUCSIsSpacingModifierLetters"]=undefined;function _xmlUCSIsSpecials(...args){return asyncifyStubs["xmlUCSIsSpecials"](...args)}_xmlUCSIsSpecials.stub=true;asyncifyStubs["xmlUCSIsSpecials"]=undefined;function _xmlUCSIsSuperscriptsandSubscripts(...args){return asyncifyStubs["xmlUCSIsSuperscriptsandSubscripts"](...args)}_xmlUCSIsSuperscriptsandSubscripts.stub=true;asyncifyStubs["xmlUCSIsSuperscriptsandSubscripts"]=undefined;function _xmlUCSIsSupplementalArrowsA(...args){return asyncifyStubs["xmlUCSIsSupplementalArrowsA"](...args)}_xmlUCSIsSupplementalArrowsA.stub=true;asyncifyStubs["xmlUCSIsSupplementalArrowsA"]=undefined;function _xmlUCSIsSupplementalArrowsB(...args){return asyncifyStubs["xmlUCSIsSupplementalArrowsB"](...args)}_xmlUCSIsSupplementalArrowsB.stub=true;asyncifyStubs["xmlUCSIsSupplementalArrowsB"]=undefined;function _xmlUCSIsSupplementalMathematicalOperators(...args){return asyncifyStubs["xmlUCSIsSupplementalMathematicalOperators"](...args)}_xmlUCSIsSupplementalMathematicalOperators.stub=true;asyncifyStubs["xmlUCSIsSupplementalMathematicalOperators"]=undefined;function _xmlUCSIsSupplementaryPrivateUseAreaA(...args){return asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaA"](...args)}_xmlUCSIsSupplementaryPrivateUseAreaA.stub=true;asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaA"]=undefined;function _xmlUCSIsSupplementaryPrivateUseAreaB(...args){return asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaB"](...args)}_xmlUCSIsSupplementaryPrivateUseAreaB.stub=true;asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaB"]=undefined;function _xmlUCSIsSyriac(...args){return asyncifyStubs["xmlUCSIsSyriac"](...args)}_xmlUCSIsSyriac.stub=true;asyncifyStubs["xmlUCSIsSyriac"]=undefined;function _xmlUCSIsTagalog(...args){return asyncifyStubs["xmlUCSIsTagalog"](...args)}_xmlUCSIsTagalog.stub=true;asyncifyStubs["xmlUCSIsTagalog"]=undefined;function _xmlUCSIsTagbanwa(...args){return asyncifyStubs["xmlUCSIsTagbanwa"](...args)}_xmlUCSIsTagbanwa.stub=true;asyncifyStubs["xmlUCSIsTagbanwa"]=undefined;function _xmlUCSIsTags(...args){return asyncifyStubs["xmlUCSIsTags"](...args)}_xmlUCSIsTags.stub=true;asyncifyStubs["xmlUCSIsTags"]=undefined;function _xmlUCSIsTaiLe(...args){return asyncifyStubs["xmlUCSIsTaiLe"](...args)}_xmlUCSIsTaiLe.stub=true;asyncifyStubs["xmlUCSIsTaiLe"]=undefined;function _xmlUCSIsTaiXuanJingSymbols(...args){return asyncifyStubs["xmlUCSIsTaiXuanJingSymbols"](...args)}_xmlUCSIsTaiXuanJingSymbols.stub=true;asyncifyStubs["xmlUCSIsTaiXuanJingSymbols"]=undefined;function _xmlUCSIsTamil(...args){return asyncifyStubs["xmlUCSIsTamil"](...args)}_xmlUCSIsTamil.stub=true;asyncifyStubs["xmlUCSIsTamil"]=undefined;function _xmlUCSIsTelugu(...args){return asyncifyStubs["xmlUCSIsTelugu"](...args)}_xmlUCSIsTelugu.stub=true;asyncifyStubs["xmlUCSIsTelugu"]=undefined;function _xmlUCSIsThaana(...args){return asyncifyStubs["xmlUCSIsThaana"](...args)}_xmlUCSIsThaana.stub=true;asyncifyStubs["xmlUCSIsThaana"]=undefined;function _xmlUCSIsThai(...args){return asyncifyStubs["xmlUCSIsThai"](...args)}_xmlUCSIsThai.stub=true;asyncifyStubs["xmlUCSIsThai"]=undefined;function _xmlUCSIsTibetan(...args){return asyncifyStubs["xmlUCSIsTibetan"](...args)}_xmlUCSIsTibetan.stub=true;asyncifyStubs["xmlUCSIsTibetan"]=undefined;function _xmlUCSIsUgaritic(...args){return asyncifyStubs["xmlUCSIsUgaritic"](...args)}_xmlUCSIsUgaritic.stub=true;asyncifyStubs["xmlUCSIsUgaritic"]=undefined;function _xmlUCSIsUnifiedCanadianAboriginalSyllabics(...args){return asyncifyStubs["xmlUCSIsUnifiedCanadianAboriginalSyllabics"](...args)}_xmlUCSIsUnifiedCanadianAboriginalSyllabics.stub=true;asyncifyStubs["xmlUCSIsUnifiedCanadianAboriginalSyllabics"]=undefined;function _xmlUCSIsVariationSelectors(...args){return asyncifyStubs["xmlUCSIsVariationSelectors"](...args)}_xmlUCSIsVariationSelectors.stub=true;asyncifyStubs["xmlUCSIsVariationSelectors"]=undefined;function _xmlUCSIsVariationSelectorsSupplement(...args){return asyncifyStubs["xmlUCSIsVariationSelectorsSupplement"](...args)}_xmlUCSIsVariationSelectorsSupplement.stub=true;asyncifyStubs["xmlUCSIsVariationSelectorsSupplement"]=undefined;function _xmlUCSIsYiRadicals(...args){return asyncifyStubs["xmlUCSIsYiRadicals"](...args)}_xmlUCSIsYiRadicals.stub=true;asyncifyStubs["xmlUCSIsYiRadicals"]=undefined;function _xmlUCSIsYiSyllables(...args){return asyncifyStubs["xmlUCSIsYiSyllables"](...args)}_xmlUCSIsYiSyllables.stub=true;asyncifyStubs["xmlUCSIsYiSyllables"]=undefined;function _xmlUCSIsYijingHexagramSymbols(...args){return asyncifyStubs["xmlUCSIsYijingHexagramSymbols"](...args)}_xmlUCSIsYijingHexagramSymbols.stub=true;asyncifyStubs["xmlUCSIsYijingHexagramSymbols"]=undefined;function _xmlURIUnescapeString(...args){return asyncifyStubs["xmlURIUnescapeString"](...args)}_xmlURIUnescapeString.stub=true;asyncifyStubs["xmlURIUnescapeString"]=undefined;function _xmlUnlinkNode(...args){return asyncifyStubs["xmlUnlinkNode"](...args)}_xmlUnlinkNode.stub=true;asyncifyStubs["xmlUnlinkNode"]=undefined;function _xmlXPathBooleanFunction(...args){return asyncifyStubs["xmlXPathBooleanFunction"](...args)}_xmlXPathBooleanFunction.stub=true;asyncifyStubs["xmlXPathBooleanFunction"]=undefined;function _xmlXPathCeilingFunction(...args){return asyncifyStubs["xmlXPathCeilingFunction"](...args)}_xmlXPathCeilingFunction.stub=true;asyncifyStubs["xmlXPathCeilingFunction"]=undefined;function _xmlXPathConcatFunction(...args){return asyncifyStubs["xmlXPathConcatFunction"](...args)}_xmlXPathConcatFunction.stub=true;asyncifyStubs["xmlXPathConcatFunction"]=undefined;function _xmlXPathContainsFunction(...args){return asyncifyStubs["xmlXPathContainsFunction"](...args)}_xmlXPathContainsFunction.stub=true;asyncifyStubs["xmlXPathContainsFunction"]=undefined;function _xmlXPathCountFunction(...args){return asyncifyStubs["xmlXPathCountFunction"](...args)}_xmlXPathCountFunction.stub=true;asyncifyStubs["xmlXPathCountFunction"]=undefined;function _xmlXPathFalseFunction(...args){return asyncifyStubs["xmlXPathFalseFunction"](...args)}_xmlXPathFalseFunction.stub=true;asyncifyStubs["xmlXPathFalseFunction"]=undefined;function _xmlXPathFloorFunction(...args){return asyncifyStubs["xmlXPathFloorFunction"](...args)}_xmlXPathFloorFunction.stub=true;asyncifyStubs["xmlXPathFloorFunction"]=undefined;function _xmlXPathIdFunction(...args){return asyncifyStubs["xmlXPathIdFunction"](...args)}_xmlXPathIdFunction.stub=true;asyncifyStubs["xmlXPathIdFunction"]=undefined;function _xmlXPathLangFunction(...args){return asyncifyStubs["xmlXPathLangFunction"](...args)}_xmlXPathLangFunction.stub=true;asyncifyStubs["xmlXPathLangFunction"]=undefined;function _xmlXPathLastFunction(...args){return asyncifyStubs["xmlXPathLastFunction"](...args)}_xmlXPathLastFunction.stub=true;asyncifyStubs["xmlXPathLastFunction"]=undefined;function _xmlXPathLocalNameFunction(...args){return asyncifyStubs["xmlXPathLocalNameFunction"](...args)}_xmlXPathLocalNameFunction.stub=true;asyncifyStubs["xmlXPathLocalNameFunction"]=undefined;function _xmlXPathNAN(...args){return asyncifyStubs["xmlXPathNAN"](...args)}_xmlXPathNAN.stub=true;asyncifyStubs["xmlXPathNAN"]=undefined;function _xmlXPathNINF(...args){return asyncifyStubs["xmlXPathNINF"](...args)}_xmlXPathNINF.stub=true;asyncifyStubs["xmlXPathNINF"]=undefined;function _xmlXPathNamespaceURIFunction(...args){return asyncifyStubs["xmlXPathNamespaceURIFunction"](...args)}_xmlXPathNamespaceURIFunction.stub=true;asyncifyStubs["xmlXPathNamespaceURIFunction"]=undefined;function _xmlXPathNextAncestor(...args){return asyncifyStubs["xmlXPathNextAncestor"](...args)}_xmlXPathNextAncestor.stub=true;asyncifyStubs["xmlXPathNextAncestor"]=undefined;function _xmlXPathNextAncestorOrSelf(...args){return asyncifyStubs["xmlXPathNextAncestorOrSelf"](...args)}_xmlXPathNextAncestorOrSelf.stub=true;asyncifyStubs["xmlXPathNextAncestorOrSelf"]=undefined;function _xmlXPathNextAttribute(...args){return asyncifyStubs["xmlXPathNextAttribute"](...args)}_xmlXPathNextAttribute.stub=true;asyncifyStubs["xmlXPathNextAttribute"]=undefined;function _xmlXPathNextChild(...args){return asyncifyStubs["xmlXPathNextChild"](...args)}_xmlXPathNextChild.stub=true;asyncifyStubs["xmlXPathNextChild"]=undefined;function _xmlXPathNextDescendant(...args){return asyncifyStubs["xmlXPathNextDescendant"](...args)}_xmlXPathNextDescendant.stub=true;asyncifyStubs["xmlXPathNextDescendant"]=undefined;function _xmlXPathNextDescendantOrSelf(...args){return asyncifyStubs["xmlXPathNextDescendantOrSelf"](...args)}_xmlXPathNextDescendantOrSelf.stub=true;asyncifyStubs["xmlXPathNextDescendantOrSelf"]=undefined;function _xmlXPathNextFollowing(...args){return asyncifyStubs["xmlXPathNextFollowing"](...args)}_xmlXPathNextFollowing.stub=true;asyncifyStubs["xmlXPathNextFollowing"]=undefined;function _xmlXPathNextFollowingSibling(...args){return asyncifyStubs["xmlXPathNextFollowingSibling"](...args)}_xmlXPathNextFollowingSibling.stub=true;asyncifyStubs["xmlXPathNextFollowingSibling"]=undefined;function _xmlXPathNextNamespace(...args){return asyncifyStubs["xmlXPathNextNamespace"](...args)}_xmlXPathNextNamespace.stub=true;asyncifyStubs["xmlXPathNextNamespace"]=undefined;function _xmlXPathNextParent(...args){return asyncifyStubs["xmlXPathNextParent"](...args)}_xmlXPathNextParent.stub=true;asyncifyStubs["xmlXPathNextParent"]=undefined;function _xmlXPathNextPrecedingSibling(...args){return asyncifyStubs["xmlXPathNextPrecedingSibling"](...args)}_xmlXPathNextPrecedingSibling.stub=true;asyncifyStubs["xmlXPathNextPrecedingSibling"]=undefined;function _xmlXPathNextSelf(...args){return asyncifyStubs["xmlXPathNextSelf"](...args)}_xmlXPathNextSelf.stub=true;asyncifyStubs["xmlXPathNextSelf"]=undefined;function _xmlXPathNormalizeFunction(...args){return asyncifyStubs["xmlXPathNormalizeFunction"](...args)}_xmlXPathNormalizeFunction.stub=true;asyncifyStubs["xmlXPathNormalizeFunction"]=undefined;function _xmlXPathNotFunction(...args){return asyncifyStubs["xmlXPathNotFunction"](...args)}_xmlXPathNotFunction.stub=true;asyncifyStubs["xmlXPathNotFunction"]=undefined;function _xmlXPathNumberFunction(...args){return asyncifyStubs["xmlXPathNumberFunction"](...args)}_xmlXPathNumberFunction.stub=true;asyncifyStubs["xmlXPathNumberFunction"]=undefined;function _xmlXPathPINF(...args){return asyncifyStubs["xmlXPathPINF"](...args)}_xmlXPathPINF.stub=true;asyncifyStubs["xmlXPathPINF"]=undefined;function _xmlXPathPositionFunction(...args){return asyncifyStubs["xmlXPathPositionFunction"](...args)}_xmlXPathPositionFunction.stub=true;asyncifyStubs["xmlXPathPositionFunction"]=undefined;function _xmlXPathRoundFunction(...args){return asyncifyStubs["xmlXPathRoundFunction"](...args)}_xmlXPathRoundFunction.stub=true;asyncifyStubs["xmlXPathRoundFunction"]=undefined;function _xmlXPathStartsWithFunction(...args){return asyncifyStubs["xmlXPathStartsWithFunction"](...args)}_xmlXPathStartsWithFunction.stub=true;asyncifyStubs["xmlXPathStartsWithFunction"]=undefined;function _xmlXPathStringFunction(...args){return asyncifyStubs["xmlXPathStringFunction"](...args)}_xmlXPathStringFunction.stub=true;asyncifyStubs["xmlXPathStringFunction"]=undefined;function _xmlXPathStringLengthFunction(...args){return asyncifyStubs["xmlXPathStringLengthFunction"](...args)}_xmlXPathStringLengthFunction.stub=true;asyncifyStubs["xmlXPathStringLengthFunction"]=undefined;function _xmlXPathSubstringAfterFunction(...args){return asyncifyStubs["xmlXPathSubstringAfterFunction"](...args)}_xmlXPathSubstringAfterFunction.stub=true;asyncifyStubs["xmlXPathSubstringAfterFunction"]=undefined;function _xmlXPathSubstringBeforeFunction(...args){return asyncifyStubs["xmlXPathSubstringBeforeFunction"](...args)}_xmlXPathSubstringBeforeFunction.stub=true;asyncifyStubs["xmlXPathSubstringBeforeFunction"]=undefined;function _xmlXPathSubstringFunction(...args){return asyncifyStubs["xmlXPathSubstringFunction"](...args)}_xmlXPathSubstringFunction.stub=true;asyncifyStubs["xmlXPathSubstringFunction"]=undefined;function _xmlXPathSumFunction(...args){return asyncifyStubs["xmlXPathSumFunction"](...args)}_xmlXPathSumFunction.stub=true;asyncifyStubs["xmlXPathSumFunction"]=undefined;function _xmlXPathTranslateFunction(...args){return asyncifyStubs["xmlXPathTranslateFunction"](...args)}_xmlXPathTranslateFunction.stub=true;asyncifyStubs["xmlXPathTranslateFunction"]=undefined;function _xmlXPathTrueFunction(...args){return asyncifyStubs["xmlXPathTrueFunction"](...args)}_xmlXPathTrueFunction.stub=true;asyncifyStubs["xmlXPathTrueFunction"]=undefined;var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(invoke_.*|__asyncjs__.*)$/;for(let[x,original]of Object.entries(imports)){if(typeof original=="function"){let isAsyncifyImport=original.isAsync||importPattern.test(x)}}},instrumentWasmExports(exports){var ret={};for(let[x,original]of Object.entries(exports)){if(typeof original=="function"){ret[x]=(...args)=>{Asyncify.exportCallStack.push(x);try{return original(...args)}finally{if(!ABORT){var y=Asyncify.exportCallStack.pop();Asyncify.maybeStopUnwind()}}};ret[x].orig=original}else{ret[x]=original}}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(funcName){var id=Asyncify.callStackNameToId[funcName];if(id===undefined){id=Asyncify.callStackId++;Asyncify.callStackNameToId[funcName]=id;Asyncify.callStackIdToName[id]=funcName}return id},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runtimeKeepalivePush();runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!="undefined"){Fibers.trampoline()}}},whenDone(){return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve,reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){HEAPU32[ptr>>>2>>>0]=stack;HEAPU32[ptr+4>>>2>>>0]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);HEAP32[ptr+8>>>2>>>0]=rewindId},getDataRewindFuncName(ptr){var id=HEAP32[ptr+8>>>2>>>0];var name=Asyncify.callStackIdToName[id];return name},getDataRewindFunc__deps:["$resolveGlobalSymbol"],getDataRewindFunc(name){var func=wasmExports[name];if(!func){func=resolveGlobalSymbol(name,false).sym}return func},doRewind(ptr){var name=Asyncify.getDataRewindFuncName(ptr);var func=Asyncify.getDataRewindFunc(name);runtimeKeepalivePop();return func()},handleSleep(startAsync){if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(callUserCallback)}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync(startAsync){return Asyncify.handleSleep(wakeUp=>{startAsync().then(wakeUp)})}};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer>>>0)};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;iFS.unlink(path);var FS_createLazyFile=FS.createLazyFile;var FS_createDevice=FS.createDevice;var writeI53ToI64=(ptr,num)=>{HEAPU32[ptr>>>2>>>0]=num;var lower=HEAPU32[ptr>>>2>>>0];HEAPU32[ptr+4>>>2>>>0]=(num-lower)/4294967296};var writeI53ToI64Clamped=(ptr,num)=>{if(num>0x8000000000000000){HEAPU32[ptr>>>2>>>0]=4294967295;HEAPU32[ptr+4>>>2>>>0]=2147483647}else if(num<-0x8000000000000000){HEAPU32[ptr>>>2>>>0]=0;HEAPU32[ptr+4>>>2>>>0]=2147483648}else{writeI53ToI64(ptr,num)}};var writeI53ToI64Signaling=(ptr,num)=>{if(num>0x8000000000000000||num<-0x8000000000000000){throw`RangeError: ${num}`}writeI53ToI64(ptr,num)};var writeI53ToU64Clamped=(ptr,num)=>{if(num>0x10000000000000000){HEAPU32[ptr>>>2>>>0]=4294967295;HEAPU32[ptr+4>>>2>>>0]=4294967295}else if(num<0){HEAPU32[ptr>>>2>>>0]=0;HEAPU32[ptr+4>>>2>>>0]=0}else{writeI53ToI64(ptr,num)}};var writeI53ToU64Signaling=(ptr,num)=>{if(num<0||num>0x10000000000000000){throw`RangeError: ${num}`}writeI53ToI64(ptr,num)};var readI53FromU64=ptr=>HEAPU32[ptr>>>2>>>0]+HEAPU32[ptr+4>>>2>>>0]*4294967296;var convertI32PairToI53=(lo,hi)=>(lo>>>0)+hi*4294967296;var convertU32PairToI53=(lo,hi)=>(lo>>>0)+(hi>>>0)*4294967296;var getTempRet0=val=>__emscripten_tempret_get();var _stackAlloc=stackAlloc;var _stackSave=stackSave;var _stackRestore=stackSave;var ptrToString=ptr=>"0x"+ptr.toString(16).padStart(8,"0");function _emscripten_notify_memory_growth(memoryIndex){memoryIndex>>>=0;updateMemoryViews()}_emscripten_notify_memory_growth.sig="vp";var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var strError=errno=>UTF8ToString(_strerror(errno));var _endprotoent=()=>{};_endprotoent.sig="v";function _getprotoent(number){if(_setprotoent.index===Protocols.list.length){return 0}var result=Protocols.list[_setprotoent.index++];return result}_getprotoent.sig="p";function _emscripten_run_script(ptr){ptr>>>=0;eval(UTF8ToString(ptr))}_emscripten_run_script.sig="vp";function _emscripten_run_script_int(ptr){ptr>>>=0;return eval(UTF8ToString(ptr))|0}_emscripten_run_script_int.sig="ip";function _emscripten_run_script_string(ptr){ptr>>>=0;var s=eval(UTF8ToString(ptr));if(s==null){return 0}s+="";var me=_emscripten_run_script_string;var len=lengthBytesUTF8(s);if(!me.bufferSize||me.bufferSizeMath.random();_emscripten_random.sig="f";var warnOnce=text=>{warnOnce.shown||={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}};function jsStackTrace(){return(new Error).stack.toString()}function getCallstack(flags){var callstack=jsStackTrace();var iThisFunc=callstack.lastIndexOf("_emscripten_log");var iThisFunc2=callstack.lastIndexOf("_emscripten_get_callstack");var iNextLine=callstack.indexOf("\n",Math.max(iThisFunc,iThisFunc2))+1;callstack=callstack.slice(iNextLine);if(flags&8&&typeof emscripten_source_map=="undefined"){warnOnce('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.');flags^=8;flags|=16}var lines=callstack.split("\n");callstack="";var newFirefoxRe=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)");var firefoxRe=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?");var chromeRe=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var l in lines){var line=lines[l];var symbolName="";var file="";var lineno=0;var column=0;var parts=chromeRe.exec(line);if(parts&&parts.length==5){symbolName=parts[1];file=parts[2];lineno=parts[3];column=parts[4]}else{parts=newFirefoxRe.exec(line)||firefoxRe.exec(line);if(parts&&parts.length>=4){symbolName=parts[1];file=parts[2];lineno=parts[3];column=parts[4]|0}else{callstack+=line+"\n";continue}}var haveSourceMap=false;if(flags&8){var orig=emscripten_source_map.originalPositionFor({line:lineno,column});haveSourceMap=orig?.source;if(haveSourceMap){if(flags&64){orig.source=orig.source.substring(orig.source.replace(/\\/g,"/").lastIndexOf("/")+1)}callstack+=` at ${symbolName} (${orig.source}:${orig.line}:${orig.column})\n`}}if(flags&16||!haveSourceMap){if(flags&64){file=file.substring(file.replace(/\\/g,"/").lastIndexOf("/")+1)}callstack+=(haveSourceMap?` = ${symbolName}`:` at ${symbolName}`)+` (${file}:${lineno}:${column})\n`}}callstack=callstack.replace(/\s+$/,"");return callstack}var emscriptenLog=(flags,str)=>{if(flags&24){str=str.replace(/\s+$/,"");str+=(str.length>0?"\n":"")+getCallstack(flags)}if(flags&1){if(flags&4){console.error(str)}else if(flags&2){console.warn(str)}else if(flags&512){console.info(str)}else if(flags&256){console.debug(str)}else{console.log(str)}}else if(flags&6){err(str)}else{out(str)}};var reallyNegative=x=>x<0||x===0&&1/x===-Infinity;var reSign=(value,bits)=>{if(value<=0){return value}var half=bits<=32?Math.abs(1<=half&&(bits<=32||value>half)){value=-2*half+value}return value};var unSign=(value,bits)=>{if(value>=0){return value}return bits<=32?2*Math.abs(1<{var end=ptr;while(HEAPU8[end>>>0])++end;return end-ptr};var formatString=(format,varargs)=>{var textIndex=format;var argIndex=varargs;function prepVararg(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){ptr+=4}}else{}return ptr}function getNextArg(type){var ret;argIndex=prepVararg(argIndex,type);if(type==="double"){ret=HEAPF64[argIndex>>>3>>>0];argIndex+=8}else if(type=="i64"){ret=[HEAP32[argIndex>>>2>>>0],HEAP32[argIndex+4>>>2>>>0]];argIndex+=8}else{type="i32";ret=HEAP32[argIndex>>>2>>>0];argIndex+=4}return ret}var ret=[];var curr,next,currArg;while(1){var startTextIndex=textIndex;curr=HEAP8[textIndex>>>0];if(curr===0)break;next=HEAP8[textIndex+1>>>0];if(curr==37){var flagAlwaysSigned=false;var flagLeftAlign=false;var flagAlternative=false;var flagZeroPad=false;var flagPadSign=false;flagsLoop:while(1){switch(next){case 43:flagAlwaysSigned=true;break;case 45:flagLeftAlign=true;break;case 35:flagAlternative=true;break;case 48:if(flagZeroPad){break flagsLoop}else{flagZeroPad=true;break}case 32:flagPadSign=true;break;default:break flagsLoop}textIndex++;next=HEAP8[textIndex+1>>>0]}var width=0;if(next==42){width=getNextArg("i32");textIndex++;next=HEAP8[textIndex+1>>>0]}else{while(next>=48&&next<=57){width=width*10+(next-48);textIndex++;next=HEAP8[textIndex+1>>>0]}}var precisionSet=false,precision=-1;if(next==46){precision=0;precisionSet=true;textIndex++;next=HEAP8[textIndex+1>>>0];if(next==42){precision=getNextArg("i32");textIndex++}else{while(1){var precisionChr=HEAP8[textIndex+1>>>0];if(precisionChr<48||precisionChr>57)break;precision=precision*10+(precisionChr-48);textIndex++}}next=HEAP8[textIndex+1>>>0]}if(precision<0){precision=6;precisionSet=false}var argSize;switch(String.fromCharCode(next)){case"h":var nextNext=HEAP8[textIndex+2>>>0];if(nextNext==104){textIndex++;argSize=1}else{argSize=2}break;case"l":var nextNext=HEAP8[textIndex+2>>>0];if(nextNext==108){textIndex++;argSize=8}else{argSize=4}break;case"L":case"q":case"j":argSize=8;break;case"z":case"t":case"I":argSize=4;break;default:argSize=null}if(argSize)textIndex++;next=HEAP8[textIndex+1>>>0];switch(String.fromCharCode(next)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var signed=next==100||next==105;argSize=argSize||4;currArg=getNextArg("i"+argSize*8);var argText;if(argSize==8){currArg=next==117?convertU32PairToI53(currArg[0],currArg[1]):convertI32PairToI53(currArg[0],currArg[1])}if(argSize<=4){var limit=Math.pow(256,argSize)-1;currArg=(signed?reSign:unSign)(currArg&limit,argSize*8)}var currAbsArg=Math.abs(currArg);var prefix="";if(next==100||next==105){argText=reSign(currArg,8*argSize).toString(10)}else if(next==117){argText=unSign(currArg,8*argSize).toString(10);currArg=Math.abs(currArg)}else if(next==111){argText=(flagAlternative?"0":"")+currAbsArg.toString(8)}else if(next==120||next==88){prefix=flagAlternative&&currArg!=0?"0x":"";if(currArg<0){currArg=-currArg;argText=(currAbsArg-1).toString(16);var buffer=[];for(var i=0;i=0){if(flagAlwaysSigned){prefix="+"+prefix}else if(flagPadSign){prefix=" "+prefix}}if(argText.charAt(0)=="-"){prefix="-"+prefix;argText=argText.substr(1)}while(prefix.length+argText.lengthret.push(chr.charCodeAt(0)));break}case"f":case"F":case"e":case"E":case"g":case"G":{currArg=getNextArg("double");var argText;if(isNaN(currArg)){argText="nan";flagZeroPad=false}else if(!isFinite(currArg)){argText=(currArg<0?"-":"")+"inf";flagZeroPad=false}else{var isGeneral=false;var effectivePrecision=Math.min(precision,20);if(next==103||next==71){isGeneral=true;precision=precision||1;var exponent=parseInt(currArg.toExponential(effectivePrecision).split("e")[1],10);if(precision>exponent&&exponent>=-4){next=(next==103?"f":"F").charCodeAt(0);precision-=exponent+1}else{next=(next==103?"e":"E").charCodeAt(0);precision--}effectivePrecision=Math.min(precision,20)}if(next==101||next==69){argText=currArg.toExponential(effectivePrecision);if(/[eE][-+]\d$/.test(argText)){argText=argText.slice(0,-1)+"0"+argText.slice(-1)}}else if(next==102||next==70){argText=currArg.toFixed(effectivePrecision);if(currArg===0&&reallyNegative(currArg)){argText="-"+argText}}var parts=argText.split("e");if(isGeneral&&!flagAlternative){while(parts[0].length>1&&parts[0].includes(".")&&(parts[0].slice(-1)=="0"||parts[0].slice(-1)==".")){parts[0]=parts[0].slice(0,-1)}}else{if(flagAlternative&&argText.indexOf(".")==-1)parts[0]+=".";while(precision>effectivePrecision++)parts[0]+="0"}argText=parts[0]+(parts.length>1?"e"+parts[1]:"");if(next==69)argText=argText.toUpperCase();if(currArg>=0){if(flagAlwaysSigned){argText="+"+argText}else if(flagPadSign){argText=" "+argText}}}while(argText.lengthret.push(chr.charCodeAt(0)));break}case"s":{var arg=getNextArg("i8*");var argLength=arg?strLen(arg):"(null)".length;if(precisionSet)argLength=Math.min(argLength,precision);if(!flagLeftAlign){while(argLength>>0])}}else{ret=ret.concat(intArrayFromString("(null)".substr(0,argLength),true))}if(flagLeftAlign){while(argLength0){ret.push(32)}if(!flagLeftAlign)ret.push(getNextArg("i8"));break}case"n":{var ptr=getNextArg("i32*");HEAP32[ptr>>>2>>>0]=ret.length;break}case"%":{ret.push(curr);break}default:{for(var i=startTextIndex;i>>0])}}}textIndex+=2}else{ret.push(curr);textIndex+=1}}return ret};function _emscripten_log(flags,format,varargs){format>>>=0;varargs>>>=0;var result=formatString(format,varargs);var str=UTF8ArrayToString(result,0);emscriptenLog(flags,str)}_emscripten_log.sig="vipp";function _emscripten_get_compiler_setting(name){name>>>=0;throw"You must build with -sRETAIN_COMPILER_SETTINGS for getCompilerSetting or emscripten_get_compiler_setting to work"}_emscripten_get_compiler_setting.sig="pp";var _emscripten_has_asyncify=()=>1;_emscripten_has_asyncify.sig="i";function _emscripten_debugger(){debugger}_emscripten_debugger.sig="v";function _emscripten_print_double(x,to,max){to>>>=0;var str=x+"";if(to)return stringToUTF8(str,to,max);else return lengthBytesUTF8(str)}_emscripten_print_double.sig="idpi";function _emscripten_asm_const_double(code,sigPtr,argbuf){code>>>=0;sigPtr>>>=0;argbuf>>>=0;return runEmAsmFunction(code,sigPtr,argbuf)}_emscripten_asm_const_double.sig="dppp";var runMainThreadEmAsm=(emAsmAddr,sigPtr,argbuf,sync)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[emAsmAddr](...args)};function _emscripten_asm_const_int_sync_on_main_thread(emAsmAddr,sigPtr,argbuf){emAsmAddr>>>=0;sigPtr>>>=0;argbuf>>>=0;return runMainThreadEmAsm(emAsmAddr,sigPtr,argbuf,1)}_emscripten_asm_const_int_sync_on_main_thread.sig="ippp";function _emscripten_asm_const_ptr_sync_on_main_thread(emAsmAddr,sigPtr,argbuf){emAsmAddr>>>=0;sigPtr>>>=0;argbuf>>>=0;return runMainThreadEmAsm(emAsmAddr,sigPtr,argbuf,1)}_emscripten_asm_const_ptr_sync_on_main_thread.sig="pppp";var _emscripten_asm_const_double_sync_on_main_thread=_emscripten_asm_const_int_sync_on_main_thread;_emscripten_asm_const_double_sync_on_main_thread.sig="dppp";function _emscripten_asm_const_async_on_main_thread(emAsmAddr,sigPtr,argbuf){emAsmAddr>>>=0;sigPtr>>>=0;argbuf>>>=0;return runMainThreadEmAsm(emAsmAddr,sigPtr,argbuf,0)}_emscripten_asm_const_async_on_main_thread.sig="vppp";var jstoi_s=Number;var __Unwind_Backtrace=function(func,arg){func>>>=0;arg>>>=0;var trace=getCallstack();var parts=trace.split("\n");for(var i=0;i{})(0,arg);if(ret!==0)return}};__Unwind_Backtrace.sig="ipp";function __Unwind_GetIPInfo(context,ipBefore){context>>>=0;ipBefore>>>=0;return abort("Unwind_GetIPInfo")}__Unwind_GetIPInfo.sig="ppp";function __Unwind_FindEnclosingFunction(ip){ip>>>=0;return 0}__Unwind_FindEnclosingFunction.sig="pp";class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>>2>>>0]=type}get_type(){return HEAPU32[this.ptr+4>>>2>>>0]}set_destructor(destructor){HEAPU32[this.ptr+8>>>2>>>0]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>>2>>>0]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12>>>0]=caught}get_caught(){return HEAP8[this.ptr+12>>>0]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>>0]=rethrown}get_rethrown(){return HEAP8[this.ptr+13>>>0]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>>2>>>0]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>>2>>>0]}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){ptr>>>=0;type>>>=0;destructor>>>=0;var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast}___cxa_throw.sig="vppp";function __Unwind_RaiseException(ex){ex>>>=0;err("Warning: _Unwind_RaiseException is not correctly implemented");return ___cxa_throw(ex,0,0)}__Unwind_RaiseException.sig="ip";function __Unwind_DeleteException(ex){ex>>>=0;err("TODO: Unwind_DeleteException")}__Unwind_DeleteException.sig="vp";var listenOnce=(object,event,func)=>{object.addEventListener(event,func,{once:true})};var autoResumeAudioContext=(ctx,elements)=>{if(!elements){elements=[document,document.getElementById("canvas")]}["keydown","mousedown","touchstart"].forEach(event=>{elements.forEach(element=>{if(element){listenOnce(element,event,()=>{if(ctx.state==="suspended")ctx.resume()})}})})};var getDynCaller=(sig,ptr)=>(...args)=>dynCall(sig,ptr,args);var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};_emscripten_exit_with_live_runtime.sig="v";var _emscripten_force_exit=status=>{__emscripten_runtime_keepalive_clear();_exit(status)};_emscripten_force_exit.sig="vi";function _emscripten_outn(str,len){str>>>=0;len>>>=0;return out(UTF8ToString(str,len))}_emscripten_outn.sig="vpp";function _emscripten_errn(str,len){str>>>=0;len>>>=0;return err(UTF8ToString(str,len))}_emscripten_errn.sig="vpp";var _emscripten_throw_number=number=>{throw number};_emscripten_throw_number.sig="vd";function _emscripten_throw_string(str){str>>>=0;throw UTF8ToString(str)}_emscripten_throw_string.sig="vp";var _emscripten_runtime_keepalive_push=runtimeKeepalivePush;_emscripten_runtime_keepalive_push.sig="v";var _emscripten_runtime_keepalive_pop=runtimeKeepalivePop;_emscripten_runtime_keepalive_pop.sig="v";var _emscripten_runtime_keepalive_check=keepRuntimeAlive;_emscripten_runtime_keepalive_check.sig="i";var asmjsMangle=x=>{if(x=="__main_argc_argv"){x="main"}return x.startsWith("dynCall_")?x:"_"+x};var ___global_base=1024;function __emscripten_fs_load_embedded_files(ptr){ptr>>>=0;do{var name_addr=HEAPU32[ptr>>>2>>>0];ptr+=4;var len=HEAPU32[ptr>>>2>>>0];ptr+=4;var content=HEAPU32[ptr>>>2>>>0];ptr+=4;var name=UTF8ToString(name_addr);FS.createPath("/",PATH.dirname(name),true,true);FS.createDataFile(name,null,HEAP8.subarray(content>>>0,content+len>>>0),true,true,true)}while(HEAPU32[ptr>>>2>>>0])}__emscripten_fs_load_embedded_files.sig="vp";var POINTER_SIZE=4;function getNativeTypeSize(type){switch(type){case"i1":case"i8":case"u8":return 1;case"i16":case"u16":return 2;case"i32":case"u32":return 4;case"i64":case"u64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return POINTER_SIZE}if(type[0]==="i"){const bits=Number(type.substr(1));assert(bits%8===0,`getNativeTypeSize invalid bits ${bits}, ${type} type`);return bits/8}return 0}}}var STACK_SIZE=33554432;var STACK_ALIGN=16;var ASSERTIONS=0;var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};var removeFunction=index=>{functionsInTableMap.delete(getWasmTableEntry(index));setWasmTableEntry(index,null);freeTableIndexes.push(index)};var _emscripten_math_cbrt=Math.cbrt;_emscripten_math_cbrt.sig="dd";var _emscripten_math_pow=Math.pow;_emscripten_math_pow.sig="ddd";var _emscripten_math_random=Math.random;_emscripten_math_random.sig="d";var _emscripten_math_sign=Math.sign;_emscripten_math_sign.sig="dd";var _emscripten_math_sqrt=Math.sqrt;_emscripten_math_sqrt.sig="dd";var _emscripten_math_exp=Math.exp;_emscripten_math_exp.sig="dd";var _emscripten_math_expm1=Math.expm1;_emscripten_math_expm1.sig="dd";var _emscripten_math_fmod=(x,y)=>x%y;_emscripten_math_fmod.sig="ddd";var _emscripten_math_log=Math.log;_emscripten_math_log.sig="dd";var _emscripten_math_log1p=Math.log1p;_emscripten_math_log1p.sig="dd";var _emscripten_math_log10=Math.log10;_emscripten_math_log10.sig="dd";var _emscripten_math_log2=Math.log2;_emscripten_math_log2.sig="dd";var _emscripten_math_round=Math.round;_emscripten_math_round.sig="dd";var _emscripten_math_acos=Math.acos;_emscripten_math_acos.sig="dd";var _emscripten_math_acosh=Math.acosh;_emscripten_math_acosh.sig="dd";var _emscripten_math_asin=Math.asin;_emscripten_math_asin.sig="dd";var _emscripten_math_asinh=Math.asinh;_emscripten_math_asinh.sig="dd";var _emscripten_math_atan=Math.atan;_emscripten_math_atan.sig="dd";var _emscripten_math_atanh=Math.atanh;_emscripten_math_atanh.sig="dd";var _emscripten_math_atan2=Math.atan2;_emscripten_math_atan2.sig="ddd";var _emscripten_math_cos=Math.cos;_emscripten_math_cos.sig="dd";var _emscripten_math_cosh=Math.cosh;_emscripten_math_cosh.sig="dd";function _emscripten_math_hypot(count,varargs){varargs>>>=0;var args=[];for(var i=0;i>>3>>>0])}return Math.hypot(...args)}_emscripten_math_hypot.sig="dip";var _emscripten_math_sin=Math.sin;_emscripten_math_sin.sig="dd";var _emscripten_math_sinh=Math.sinh;_emscripten_math_sinh.sig="dd";var _emscripten_math_tan=Math.tan;_emscripten_math_tan.sig="dd";var _emscripten_math_tanh=Math.tanh;_emscripten_math_tanh.sig="dd";function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var AsciiToString=ptr=>{ptr>>>=0;var str="";while(1){var ch=HEAPU8[ptr++>>>0];if(!ch)return str;str+=String.fromCharCode(ch)}};var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):undefined;var UTF16ToString=(ptr,maxBytesToRead)=>{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx>>>0])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr>>>0,endPtr>>>0));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>>1>>>0];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>>1>>>0]=codeUnit;outPtr+=2}HEAP16[outPtr>>>1>>>0]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>>2>>>0];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{outPtr>>>=0;maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>>2>>>0]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>>2>>>0]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var JSEvents={removeAllEventListeners(){while(JSEvents.eventHandlers.length){JSEvents._removeHandler(JSEvents.eventHandlers.length-1)}JSEvents.deferredCalls=[]},registerRemoveEventListeners(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},inEventHandler:0,deferredCalls:[],deferCall(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var call of JSEvents.deferredCalls){if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction,precedence,argsList});JSEvents.deferredCalls.sort((x,y)=>x.precedencecall.targetFunction!=targetFunction)},canPerformEventHandlerRequests(){if(navigator.userActivation){return navigator.userActivation.isActive}return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls(){if(!JSEvents.canPerformEventHandlerRequests()){return}var deferredCalls=JSEvents.deferredCalls;JSEvents.deferredCalls=[];for(var call of deferredCalls){call.targetFunction(...call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(target,eventTypeString)=>{for(var i=0;icString>2?UTF8ToString(cString):cString;var specialHTMLTargets=[0,document,window];var findEventTarget=target=>{target=maybeCStringToJsString(target);var domElement=specialHTMLTargets[target]||document.querySelector(target);return domElement};var registerKeyEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.keyEvent||=_malloc(160);var keyEventHandlerFunc=e=>{var keyEventData=JSEvents.keyEvent;HEAPF64[keyEventData>>>3>>>0]=e.timeStamp;var idx=keyEventData>>>2;HEAP32[idx+2>>>0]=e.location;HEAP8[keyEventData+12>>>0]=e.ctrlKey;HEAP8[keyEventData+13>>>0]=e.shiftKey;HEAP8[keyEventData+14>>>0]=e.altKey;HEAP8[keyEventData+15>>>0]=e.metaKey;HEAP8[keyEventData+16>>>0]=e.repeat;HEAP32[idx+5>>>0]=e.charCode;HEAP32[idx+6>>>0]=e.keyCode;HEAP32[idx+7>>>0]=e.which;stringToUTF8(e.key||"",keyEventData+32,32);stringToUTF8(e.code||"",keyEventData+64,32);stringToUTF8(e.char||"",keyEventData+96,32);stringToUTF8(e.locale||"",keyEventData+128,32);if(((a1,a2,a3)=>{})(eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};var findCanvasEventTarget=findEventTarget;function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread)}_emscripten_set_keypress_callback_on_thread.sig="ippipp";function _emscripten_set_keydown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerKeyEventCallback(target,userData,useCapture,callbackfunc,2,"keydown",targetThread)}_emscripten_set_keydown_callback_on_thread.sig="ippipp";function _emscripten_set_keyup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerKeyEventCallback(target,userData,useCapture,callbackfunc,3,"keyup",targetThread)}_emscripten_set_keyup_callback_on_thread.sig="ippipp";var getBoundingClientRect=e=>specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0};var fillMouseEventData=(eventStruct,e,target)=>{HEAPF64[eventStruct>>>3>>>0]=e.timeStamp;var idx=eventStruct>>>2;HEAP32[idx+2>>>0]=e.screenX;HEAP32[idx+3>>>0]=e.screenY;HEAP32[idx+4>>>0]=e.clientX;HEAP32[idx+5>>>0]=e.clientY;HEAP8[eventStruct+24>>>0]=e.ctrlKey;HEAP8[eventStruct+25>>>0]=e.shiftKey;HEAP8[eventStruct+26>>>0]=e.altKey;HEAP8[eventStruct+27>>>0]=e.metaKey;HEAP16[idx*2+14>>>0]=e.button;HEAP16[idx*2+15>>>0]=e.buttons;HEAP32[idx+8>>>0]=e["movementX"];HEAP32[idx+9>>>0]=e["movementY"];var rect=getBoundingClientRect(target);HEAP32[idx+10>>>0]=e.clientX-(rect.left|0);HEAP32[idx+11>>>0]=e.clientY-(rect.top|0)};var registerMouseEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.mouseEvent||=_malloc(64);target=findEventTarget(target);var mouseEventHandlerFunc=(e=event)=>{fillMouseEventData(JSEvents.mouseEvent,e,target);if(((a1,a2,a3)=>{})(eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString,callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_click_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,4,"click",targetThread)}_emscripten_set_click_callback_on_thread.sig="ippipp";function _emscripten_set_mousedown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,5,"mousedown",targetThread)}_emscripten_set_mousedown_callback_on_thread.sig="ippipp";function _emscripten_set_mouseup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,6,"mouseup",targetThread)}_emscripten_set_mouseup_callback_on_thread.sig="ippipp";function _emscripten_set_dblclick_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,7,"dblclick",targetThread)}_emscripten_set_dblclick_callback_on_thread.sig="ippipp";function _emscripten_set_mousemove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,8,"mousemove",targetThread)}_emscripten_set_mousemove_callback_on_thread.sig="ippipp";function _emscripten_set_mouseenter_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,33,"mouseenter",targetThread)}_emscripten_set_mouseenter_callback_on_thread.sig="ippipp";function _emscripten_set_mouseleave_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,34,"mouseleave",targetThread)}_emscripten_set_mouseleave_callback_on_thread.sig="ippipp";function _emscripten_set_mouseover_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,35,"mouseover",targetThread)}_emscripten_set_mouseover_callback_on_thread.sig="ippipp";function _emscripten_set_mouseout_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,36,"mouseout",targetThread)}_emscripten_set_mouseout_callback_on_thread.sig="ippipp";function _emscripten_get_mouse_status(mouseState){mouseState>>>=0;if(!JSEvents.mouseEvent)return-7;HEAP8.set(HEAP8.subarray(JSEvents.mouseEvent>>>0,JSEvents.mouseEvent+64>>>0),mouseState>>>0);return 0}_emscripten_get_mouse_status.sig="ip";var registerWheelEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.wheelEvent||=_malloc(96);var wheelHandlerFunc=(e=event)=>{var wheelEvent=JSEvents.wheelEvent;fillMouseEventData(wheelEvent,e,target);HEAPF64[wheelEvent+64>>>3>>>0]=e["deltaX"];HEAPF64[wheelEvent+72>>>3>>>0]=e["deltaY"];HEAPF64[wheelEvent+80>>>3>>>0]=e["deltaZ"];HEAP32[wheelEvent+88>>>2>>>0]=e["deltaMode"];if(((a1,a2,a3)=>{})(eventTypeId,wheelEvent,userData))e.preventDefault()};var eventHandler={target,allowsDeferredCalls:true,eventTypeString,callbackfunc,handlerFunc:wheelHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_wheel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;target=findEventTarget(target);if(!target)return-4;if(typeof target.onwheel!="undefined"){return registerWheelEventCallback(target,userData,useCapture,callbackfunc,9,"wheel",targetThread)}else{return-1}}_emscripten_set_wheel_callback_on_thread.sig="ippipp";var registerUiEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.uiEvent||=_malloc(36);target=findEventTarget(target);var uiEventHandlerFunc=(e=event)=>{if(e.target!=target){return}var b=document.body;if(!b){return}var uiEvent=JSEvents.uiEvent;HEAP32[uiEvent>>>2>>>0]=0;HEAP32[uiEvent+4>>>2>>>0]=b.clientWidth;HEAP32[uiEvent+8>>>2>>>0]=b.clientHeight;HEAP32[uiEvent+12>>>2>>>0]=innerWidth;HEAP32[uiEvent+16>>>2>>>0]=innerHeight;HEAP32[uiEvent+20>>>2>>>0]=outerWidth;HEAP32[uiEvent+24>>>2>>>0]=outerHeight;HEAP32[uiEvent+28>>>2>>>0]=pageXOffset|0;HEAP32[uiEvent+32>>>2>>>0]=pageYOffset|0;if(((a1,a2,a3)=>{})(eventTypeId,uiEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:uiEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_resize_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerUiEventCallback(target,userData,useCapture,callbackfunc,10,"resize",targetThread)}_emscripten_set_resize_callback_on_thread.sig="ippipp";function _emscripten_set_scroll_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerUiEventCallback(target,userData,useCapture,callbackfunc,11,"scroll",targetThread)}_emscripten_set_scroll_callback_on_thread.sig="ippipp";var registerFocusEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.focusEvent||=_malloc(256);var focusEventHandlerFunc=(e=event)=>{var nodeName=JSEvents.getNodeNameForTarget(e.target);var id=e.target.id?e.target.id:"";var focusEvent=JSEvents.focusEvent;stringToUTF8(nodeName,focusEvent+0,128);stringToUTF8(id,focusEvent+128,128);if(((a1,a2,a3)=>{})(eventTypeId,focusEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:focusEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_blur_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,12,"blur",targetThread)}_emscripten_set_blur_callback_on_thread.sig="ippipp";function _emscripten_set_focus_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,13,"focus",targetThread)}_emscripten_set_focus_callback_on_thread.sig="ippipp";function _emscripten_set_focusin_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,14,"focusin",targetThread)}_emscripten_set_focusin_callback_on_thread.sig="ippipp";function _emscripten_set_focusout_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,15,"focusout",targetThread)}_emscripten_set_focusout_callback_on_thread.sig="ippipp";var fillDeviceOrientationEventData=(eventStruct,e,target)=>{HEAPF64[eventStruct>>>3>>>0]=e.alpha;HEAPF64[eventStruct+8>>>3>>>0]=e.beta;HEAPF64[eventStruct+16>>>3>>>0]=e.gamma;HEAP8[eventStruct+24>>>0]=e.absolute};var registerDeviceOrientationEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.deviceOrientationEvent||=_malloc(32);var deviceOrientationEventHandlerFunc=(e=event)=>{fillDeviceOrientationEventData(JSEvents.deviceOrientationEvent,e,target);if(((a1,a2,a3)=>{})(eventTypeId,JSEvents.deviceOrientationEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:deviceOrientationEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_deviceorientation_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerDeviceOrientationEventCallback(2,userData,useCapture,callbackfunc,16,"deviceorientation",targetThread)}_emscripten_set_deviceorientation_callback_on_thread.sig="ipipp";function _emscripten_get_deviceorientation_status(orientationState){orientationState>>>=0;if(!JSEvents.deviceOrientationEvent)return-7;HEAP32.set(HEAP32.subarray(JSEvents.deviceOrientationEvent>>>0,32>>>0),orientationState>>>0);return 0}_emscripten_get_deviceorientation_status.sig="ip";var fillDeviceMotionEventData=(eventStruct,e,target)=>{var supportedFields=0;var a=e["acceleration"];supportedFields|=a&&1;var ag=e["accelerationIncludingGravity"];supportedFields|=ag&&2;var rr=e["rotationRate"];supportedFields|=rr&&4;a=a||{};ag=ag||{};rr=rr||{};HEAPF64[eventStruct>>>3>>>0]=a["x"];HEAPF64[eventStruct+8>>>3>>>0]=a["y"];HEAPF64[eventStruct+16>>>3>>>0]=a["z"];HEAPF64[eventStruct+24>>>3>>>0]=ag["x"];HEAPF64[eventStruct+32>>>3>>>0]=ag["y"];HEAPF64[eventStruct+40>>>3>>>0]=ag["z"];HEAPF64[eventStruct+48>>>3>>>0]=rr["alpha"];HEAPF64[eventStruct+56>>>3>>>0]=rr["beta"];HEAPF64[eventStruct+64>>>3>>>0]=rr["gamma"]};var registerDeviceMotionEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.deviceMotionEvent||=_malloc(80);var deviceMotionEventHandlerFunc=(e=event)=>{fillDeviceMotionEventData(JSEvents.deviceMotionEvent,e,target);if(((a1,a2,a3)=>{})(eventTypeId,JSEvents.deviceMotionEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:deviceMotionEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_devicemotion_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerDeviceMotionEventCallback(2,userData,useCapture,callbackfunc,17,"devicemotion",targetThread)}_emscripten_set_devicemotion_callback_on_thread.sig="ipipp";function _emscripten_get_devicemotion_status(motionState){motionState>>>=0;if(!JSEvents.deviceMotionEvent)return-7;HEAP32.set(HEAP32.subarray(JSEvents.deviceMotionEvent>>>0,80>>>0),motionState>>>0);return 0}_emscripten_get_devicemotion_status.sig="ip";var screenOrientation=()=>{if(!window.screen)return undefined;return screen.orientation||screen["mozOrientation"]||screen["webkitOrientation"]};var fillOrientationChangeEventData=eventStruct=>{var orientationsType1=["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];var orientationsType2=["portrait","portrait","landscape","landscape"];var orientationIndex=0;var orientationAngle=0;var screenOrientObj=screenOrientation();if(typeof screenOrientObj==="object"){orientationIndex=orientationsType1.indexOf(screenOrientObj.type);if(orientationIndex<0){orientationIndex=orientationsType2.indexOf(screenOrientObj.type)}if(orientationIndex>=0){orientationIndex=1<>>2>>>0]=orientationIndex;HEAP32[eventStruct+4>>>2>>>0]=orientationAngle};var registerOrientationChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.orientationChangeEvent||=_malloc(8);var orientationChangeEventHandlerFunc=(e=event)=>{var orientationChangeEvent=JSEvents.orientationChangeEvent;fillOrientationChangeEventData(orientationChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,orientationChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:orientationChangeEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_orientationchange_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!window.screen||!screen.orientation)return-1;return registerOrientationChangeEventCallback(screen.orientation,userData,useCapture,callbackfunc,18,"change",targetThread)}_emscripten_set_orientationchange_callback_on_thread.sig="ipipp";function _emscripten_get_orientation_status(orientationChangeEvent){orientationChangeEvent>>>=0;if(!screenOrientation()&&typeof orientation=="undefined")return-1;fillOrientationChangeEventData(orientationChangeEvent);return 0}_emscripten_get_orientation_status.sig="ip";var _emscripten_lock_orientation=allowedOrientations=>{var orientations=[];if(allowedOrientations&1)orientations.push("portrait-primary");if(allowedOrientations&2)orientations.push("portrait-secondary");if(allowedOrientations&4)orientations.push("landscape-primary");if(allowedOrientations&8)orientations.push("landscape-secondary");var succeeded;if(screen.lockOrientation){succeeded=screen.lockOrientation(orientations)}else if(screen.mozLockOrientation){succeeded=screen.mozLockOrientation(orientations)}else if(screen.webkitLockOrientation){succeeded=screen.webkitLockOrientation(orientations)}else{return-1}if(succeeded){return 0}return-6};_emscripten_lock_orientation.sig="ii";var _emscripten_unlock_orientation=()=>{if(screen.unlockOrientation){screen.unlockOrientation()}else if(screen.mozUnlockOrientation){screen.mozUnlockOrientation()}else if(screen.webkitUnlockOrientation){screen.webkitUnlockOrientation()}else{return-1}return 0};_emscripten_unlock_orientation.sig="i";var fillFullscreenChangeEventData=eventStruct=>{var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP8[eventStruct>>>0]=isFullscreen;HEAP8[eventStruct+1>>>0]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement?.id||"";stringToUTF8(nodeName,eventStruct+2,128);stringToUTF8(id,eventStruct+130,128);HEAP32[eventStruct+260>>>2>>>0]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+264>>>2>>>0]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+268>>>2>>>0]=screen.width;HEAP32[eventStruct+272>>>2>>>0]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}};var registerFullscreenChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.fullscreenChangeEvent||=_malloc(276);var fullscreenChangeEventhandlerFunc=(e=event)=>{var fullscreenChangeEvent=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(fullscreenChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,fullscreenChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:fullscreenChangeEventhandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_fullscreenchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!JSEvents.fullscreenEnabled())return-1;target=findEventTarget(target);if(!target)return-4;registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"webkitfullscreenchange",targetThread);return registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"fullscreenchange",targetThread)}_emscripten_set_fullscreenchange_callback_on_thread.sig="ippipp";function _emscripten_get_fullscreen_status(fullscreenStatus){fullscreenStatus>>>=0;if(!JSEvents.fullscreenEnabled())return-1;fillFullscreenChangeEventData(fullscreenStatus);return 0}_emscripten_get_fullscreen_status.sig="ip";function _emscripten_get_canvas_element_size(target,width,height){target>>>=0;width>>>=0;height>>>=0;var canvas=findCanvasEventTarget(target);if(!canvas)return-4;HEAP32[width>>>2>>>0]=canvas.width;HEAP32[height>>>2>>>0]=canvas.height}_emscripten_get_canvas_element_size.sig="ippp";var getCanvasElementSize=target=>{var sp=stackSave();var w=stackAlloc(8);var h=w+4;var targetInt=stringToUTF8OnStack(target.id);var ret=_emscripten_get_canvas_element_size(targetInt,w,h);var size=[HEAP32[w>>>2>>>0],HEAP32[h>>>2>>>0]];stackRestore(sp);return size};function _emscripten_set_canvas_element_size(target,width,height){target>>>=0;var canvas=findCanvasEventTarget(target);if(!canvas)return-4;canvas.width=width;canvas.height=height;return 0}_emscripten_set_canvas_element_size.sig="ipii";var setCanvasElementSize=(target,width,height)=>{if(!target.controlTransferredOffscreen){target.width=width;target.height=height}else{var sp=stackSave();var targetInt=stringToUTF8OnStack(target.id);_emscripten_set_canvas_element_size(targetInt,width,height);stackRestore(sp)}};var registerRestoreOldStyle=canvas=>{var canvasSize=getCanvasElementSize(canvas);var oldWidth=canvasSize[0];var oldHeight=canvasSize[1];var oldCssWidth=canvas.style.width;var oldCssHeight=canvas.style.height;var oldBackgroundColor=canvas.style.backgroundColor;var oldDocumentBackgroundColor=document.body.style.backgroundColor;var oldPaddingLeft=canvas.style.paddingLeft;var oldPaddingRight=canvas.style.paddingRight;var oldPaddingTop=canvas.style.paddingTop;var oldPaddingBottom=canvas.style.paddingBottom;var oldMarginLeft=canvas.style.marginLeft;var oldMarginRight=canvas.style.marginRight;var oldMarginTop=canvas.style.marginTop;var oldMarginBottom=canvas.style.marginBottom;var oldDocumentBodyMargin=document.body.style.margin;var oldDocumentOverflow=document.documentElement.style.overflow;var oldDocumentScroll=document.body.scroll;var oldImageRendering=canvas.style.imageRendering;function restoreOldStyle(){var fullscreenElement=document.fullscreenElement||document.webkitFullscreenElement;if(!fullscreenElement){document.removeEventListener("fullscreenchange",restoreOldStyle);document.removeEventListener("webkitfullscreenchange",restoreOldStyle);setCanvasElementSize(canvas,oldWidth,oldHeight);canvas.style.width=oldCssWidth;canvas.style.height=oldCssHeight;canvas.style.backgroundColor=oldBackgroundColor;if(!oldDocumentBackgroundColor)document.body.style.backgroundColor="white";document.body.style.backgroundColor=oldDocumentBackgroundColor;canvas.style.paddingLeft=oldPaddingLeft;canvas.style.paddingRight=oldPaddingRight;canvas.style.paddingTop=oldPaddingTop;canvas.style.paddingBottom=oldPaddingBottom;canvas.style.marginLeft=oldMarginLeft;canvas.style.marginRight=oldMarginRight;canvas.style.marginTop=oldMarginTop;canvas.style.marginBottom=oldMarginBottom;document.body.style.margin=oldDocumentBodyMargin;document.documentElement.style.overflow=oldDocumentOverflow;document.body.scroll=oldDocumentScroll;canvas.style.imageRendering=oldImageRendering;if(canvas.GLctxObject)canvas.GLctxObject.GLctx.viewport(0,0,oldWidth,oldHeight);if(currentFullscreenStrategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)}}}document.addEventListener("fullscreenchange",restoreOldStyle);document.addEventListener("webkitfullscreenchange",restoreOldStyle);return restoreOldStyle};var setLetterbox=(element,topBottom,leftRight)=>{element.style.paddingLeft=element.style.paddingRight=leftRight+"px";element.style.paddingTop=element.style.paddingBottom=topBottom+"px"};var JSEvents_resizeCanvasForFullscreen=(target,strategy)=>{var restoreOldStyle=registerRestoreOldStyle(target);var cssWidth=strategy.softFullscreen?innerWidth:screen.width;var cssHeight=strategy.softFullscreen?innerHeight:screen.height;var rect=getBoundingClientRect(target);var windowedCssWidth=rect.width;var windowedCssHeight=rect.height;var canvasSize=getCanvasElementSize(target);var windowedRttWidth=canvasSize[0];var windowedRttHeight=canvasSize[1];if(strategy.scaleMode==3){setLetterbox(target,(cssHeight-windowedCssHeight)/2,(cssWidth-windowedCssWidth)/2);cssWidth=windowedCssWidth;cssHeight=windowedCssHeight}else if(strategy.scaleMode==2){if(cssWidth*windowedRttHeight{if(strategy.scaleMode!=0||strategy.canvasResolutionScaleMode!=0){JSEvents_resizeCanvasForFullscreen(target,strategy)}if(target.requestFullscreen){target.requestFullscreen()}else if(target.webkitRequestFullscreen){target.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}else{return JSEvents.fullscreenEnabled()?-3:-1}currentFullscreenStrategy=strategy;if(strategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,strategy.canvasResizedCallbackUserData)}return 0};var hideEverythingExceptGivenElement=onlyVisibleElement=>{var child=onlyVisibleElement;var parent=child.parentNode;var hiddenElements=[];while(child!=document.body){var children=parent.children;for(var i=0;i{for(var elem of hiddenElements){elem.node.style.display=elem.displayState}};var currentFullscreenStrategy={};var restoreOldWindowedStyle=null;var softFullscreenResizeWebGLRenderTarget=()=>{var dpr=devicePixelRatio;var inHiDPIFullscreenMode=currentFullscreenStrategy.canvasResolutionScaleMode==2;var inAspectRatioFixedFullscreenMode=currentFullscreenStrategy.scaleMode==2;var inPixelPerfectFullscreenMode=currentFullscreenStrategy.canvasResolutionScaleMode!=0;var inCenteredWithoutScalingFullscreenMode=currentFullscreenStrategy.scaleMode==3;var screenWidth=inHiDPIFullscreenMode?Math.round(innerWidth*dpr):innerWidth;var screenHeight=inHiDPIFullscreenMode?Math.round(innerHeight*dpr):innerHeight;var w=screenWidth;var h=screenHeight;var canvas=currentFullscreenStrategy.target;var canvasSize=getCanvasElementSize(canvas);var x=canvasSize[0];var y=canvasSize[1];var topMargin;if(inAspectRatioFixedFullscreenMode){if(w*yx*h)w=h*x/y|0;topMargin=(screenHeight-h)/2|0}if(inPixelPerfectFullscreenMode){setCanvasElementSize(canvas,w,h);if(canvas.GLctxObject)canvas.GLctxObject.GLctx.viewport(0,0,w,h)}if(inHiDPIFullscreenMode){topMargin/=dpr;w/=dpr;h/=dpr;w=Math.round(w*1e4)/1e4;h=Math.round(h*1e4)/1e4;topMargin=Math.round(topMargin*1e4)/1e4}if(inCenteredWithoutScalingFullscreenMode){var t=(innerHeight-jstoi_q(canvas.style.height))/2;var b=(innerWidth-jstoi_q(canvas.style.width))/2;setLetterbox(canvas,t,b)}else{canvas.style.width=w+"px";canvas.style.height=h+"px";var b=(innerWidth-w)/2;setLetterbox(canvas,topMargin,b)}if(!inCenteredWithoutScalingFullscreenMode&¤tFullscreenStrategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)}};var doRequestFullscreen=(target,strategy)=>{if(!JSEvents.fullscreenEnabled())return-1;target=findEventTarget(target);if(!target)return-4;if(!target.requestFullscreen&&!target.webkitRequestFullscreen){return-3}if(!JSEvents.canPerformEventHandlerRequests()){if(strategy.deferUntilInEventHandler){JSEvents.deferCall(JSEvents_requestFullscreen,1,[target,strategy]);return 1}return-2}return JSEvents_requestFullscreen(target,strategy)};function _emscripten_request_fullscreen(target,deferUntilInEventHandler){target>>>=0;var strategy={scaleMode:0,canvasResolutionScaleMode:0,filteringMode:0,deferUntilInEventHandler,canvasResizedCallbackTargetThread:2};return doRequestFullscreen(target,strategy)}_emscripten_request_fullscreen.sig="ipi";function _emscripten_request_fullscreen_strategy(target,deferUntilInEventHandler,fullscreenStrategy){target>>>=0;fullscreenStrategy>>>=0;var strategy={scaleMode:HEAP32[fullscreenStrategy>>>2>>>0],canvasResolutionScaleMode:HEAP32[fullscreenStrategy+4>>>2>>>0],filteringMode:HEAP32[fullscreenStrategy+8>>>2>>>0],deferUntilInEventHandler,canvasResizedCallback:HEAP32[fullscreenStrategy+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[fullscreenStrategy+16>>>2>>>0]};return doRequestFullscreen(target,strategy)}_emscripten_request_fullscreen_strategy.sig="ipip";function _emscripten_enter_soft_fullscreen(target,fullscreenStrategy){target>>>=0;fullscreenStrategy>>>=0;target=findEventTarget(target);if(!target)return-4;var strategy={scaleMode:HEAP32[fullscreenStrategy>>>2>>>0],canvasResolutionScaleMode:HEAP32[fullscreenStrategy+4>>>2>>>0],filteringMode:HEAP32[fullscreenStrategy+8>>>2>>>0],canvasResizedCallback:HEAP32[fullscreenStrategy+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[fullscreenStrategy+16>>>2>>>0],target,softFullscreen:true};var restoreOldStyle=JSEvents_resizeCanvasForFullscreen(target,strategy);document.documentElement.style.overflow="hidden";document.body.scroll="no";document.body.style.margin="0px";var hiddenElements=hideEverythingExceptGivenElement(target);function restoreWindowedState(){restoreOldStyle();restoreHiddenElements(hiddenElements);removeEventListener("resize",softFullscreenResizeWebGLRenderTarget);if(strategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,strategy.canvasResizedCallbackUserData)}currentFullscreenStrategy=0}restoreOldWindowedStyle=restoreWindowedState;currentFullscreenStrategy=strategy;addEventListener("resize",softFullscreenResizeWebGLRenderTarget);if(strategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,strategy.canvasResizedCallbackUserData)}return 0}_emscripten_enter_soft_fullscreen.sig="ipp";var _emscripten_exit_soft_fullscreen=()=>{restoreOldWindowedStyle?.();restoreOldWindowedStyle=null;return 0};_emscripten_exit_soft_fullscreen.sig="i";var _emscripten_exit_fullscreen=()=>{if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var d=specialHTMLTargets[1];if(d.exitFullscreen){d.fullscreenElement&&d.exitFullscreen()}else if(d.webkitExitFullscreen){d.webkitFullscreenElement&&d.webkitExitFullscreen()}else{return-1}return 0};_emscripten_exit_fullscreen.sig="i";var fillPointerlockChangeEventData=eventStruct=>{var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP8[eventStruct>>>0]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement?.id||"";stringToUTF8(nodeName,eventStruct+1,128);stringToUTF8(id,eventStruct+129,128)};var registerPointerlockChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.pointerlockChangeEvent||=_malloc(257);var pointerlockChangeEventHandlerFunc=(e=event)=>{var pointerlockChangeEvent=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(pointerlockChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,pointerlockChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:pointerlockChangeEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_pointerlockchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!document||!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}target=findEventTarget(target);if(!target)return-4;registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"mozpointerlockchange",targetThread);registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"webkitpointerlockchange",targetThread);registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"mspointerlockchange",targetThread);return registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"pointerlockchange",targetThread)}_emscripten_set_pointerlockchange_callback_on_thread.sig="ippipp";var registerPointerlockErrorEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{var pointerlockErrorEventHandlerFunc=(e=event)=>{if(((a1,a2,a3)=>{})(eventTypeId,0,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:pointerlockErrorEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_pointerlockerror_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!document||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}target=findEventTarget(target);if(!target)return-4;registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"mozpointerlockerror",targetThread);registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"webkitpointerlockerror",targetThread);registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"mspointerlockerror",targetThread);return registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"pointerlockerror",targetThread)}_emscripten_set_pointerlockerror_callback_on_thread.sig="ippipp";function _emscripten_get_pointerlock_status(pointerlockStatus){pointerlockStatus>>>=0;if(pointerlockStatus)fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}_emscripten_get_pointerlock_status.sig="ip";var requestPointerLock=target=>{if(target.requestPointerLock){target.requestPointerLock()}else{if(document.body.requestPointerLock){return-3}return-1}return 0};function _emscripten_request_pointerlock(target,deferUntilInEventHandler){target>>>=0;target=findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock){return-1}if(!JSEvents.canPerformEventHandlerRequests()){if(deferUntilInEventHandler){JSEvents.deferCall(requestPointerLock,2,[target]);return 1}return-2}return requestPointerLock(target)}_emscripten_request_pointerlock.sig="ipi";var _emscripten_exit_pointerlock=()=>{JSEvents.removeDeferredCalls(requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else{return-1}return 0};_emscripten_exit_pointerlock.sig="i";var _emscripten_vibrate=msecs=>{if(!navigator.vibrate)return-1;navigator.vibrate(msecs);return 0};_emscripten_vibrate.sig="ii";function _emscripten_vibrate_pattern(msecsArray,numEntries){msecsArray>>>=0;if(!navigator.vibrate)return-1;var vibrateList=[];for(var i=0;i>>2>>>0];vibrateList.push(msecs)}navigator.vibrate(vibrateList);return 0}_emscripten_vibrate_pattern.sig="ipi";var fillVisibilityChangeEventData=eventStruct=>{var visibilityStates=["hidden","visible","prerender","unloaded"];var visibilityState=visibilityStates.indexOf(document.visibilityState);HEAP8[eventStruct>>>0]=document.hidden;HEAP32[eventStruct+4>>>2>>>0]=visibilityState};var registerVisibilityChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.visibilityChangeEvent||=_malloc(8);var visibilityChangeEventHandlerFunc=(e=event)=>{var visibilityChangeEvent=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(visibilityChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,visibilityChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:visibilityChangeEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_visibilitychange_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerVisibilityChangeEventCallback(specialHTMLTargets[1],userData,useCapture,callbackfunc,21,"visibilitychange",targetThread)}_emscripten_set_visibilitychange_callback_on_thread.sig="ipipp";function _emscripten_get_visibility_status(visibilityStatus){visibilityStatus>>>=0;if(typeof document.visibilityState=="undefined"&&typeof document.hidden=="undefined"){return-1}fillVisibilityChangeEventData(visibilityStatus);return 0}_emscripten_get_visibility_status.sig="ip";var registerTouchEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.touchEvent||=_malloc(1552);target=findEventTarget(target);var touchEventHandlerFunc=e=>{var t,touches={},et=e.touches;for(let t of et){t.isChanged=t.onTarget=0;touches[t.identifier]=t}for(let t of e.changedTouches){t.isChanged=1;touches[t.identifier]=t}for(let t of e.targetTouches){touches[t.identifier].onTarget=1}var touchEvent=JSEvents.touchEvent;HEAPF64[touchEvent>>>3>>>0]=e.timeStamp;HEAP8[touchEvent+12>>>0]=e.ctrlKey;HEAP8[touchEvent+13>>>0]=e.shiftKey;HEAP8[touchEvent+14>>>0]=e.altKey;HEAP8[touchEvent+15>>>0]=e.metaKey;var idx=touchEvent+16;var targetRect=getBoundingClientRect(target);var numTouches=0;for(let t of Object.values(touches)){var idx32=idx>>>2;HEAP32[idx32+0>>>0]=t.identifier;HEAP32[idx32+1>>>0]=t.screenX;HEAP32[idx32+2>>>0]=t.screenY;HEAP32[idx32+3>>>0]=t.clientX;HEAP32[idx32+4>>>0]=t.clientY;HEAP32[idx32+5>>>0]=t.pageX;HEAP32[idx32+6>>>0]=t.pageY;HEAP8[idx+28>>>0]=t.isChanged;HEAP8[idx+29>>>0]=t.onTarget;HEAP32[idx32+8>>>0]=t.clientX-(targetRect.left|0);HEAP32[idx32+9>>>0]=t.clientY-(targetRect.top|0);idx+=48;if(++numTouches>31){break}}HEAP32[touchEvent+8>>>2>>>0]=numTouches;if(((a1,a2,a3)=>{})(eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString,callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread)}_emscripten_set_touchstart_callback_on_thread.sig="ippipp";function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread)}_emscripten_set_touchend_callback_on_thread.sig="ippipp";function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread)}_emscripten_set_touchmove_callback_on_thread.sig="ippipp";function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread)}_emscripten_set_touchcancel_callback_on_thread.sig="ippipp";var fillGamepadEventData=(eventStruct,e)=>{HEAPF64[eventStruct>>>3>>>0]=e.timestamp;for(var i=0;i>>3>>>0]=e.axes[i]}for(var i=0;i>>3>>>0]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>>3>>>0]=e.buttons[i]}}for(var i=0;i>>0]=e.buttons[i].pressed}else{HEAP8[eventStruct+i+1040>>>0]=e.buttons[i]==1}}HEAP8[eventStruct+1104>>>0]=e.connected;HEAP32[eventStruct+1108>>>2>>>0]=e.index;HEAP32[eventStruct+8>>>2>>>0]=e.axes.length;HEAP32[eventStruct+12>>>2>>>0]=e.buttons.length;stringToUTF8(e.id,eventStruct+1112,64);stringToUTF8(e.mapping,eventStruct+1176,64)};var registerGamepadEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.gamepadEvent||=_malloc(1240);var gamepadEventHandlerFunc=(e=event)=>{var gamepadEvent=JSEvents.gamepadEvent;fillGamepadEventData(gamepadEvent,e["gamepad"]);if(((a1,a2,a3)=>{})(eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),allowsDeferredCalls:true,eventTypeString,callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};var _emscripten_sample_gamepad_data=()=>{try{if(navigator.getGamepads)return(JSEvents.lastGamepadState=navigator.getGamepads())?0:-1}catch(e){navigator.getGamepads=null}return-1};_emscripten_sample_gamepad_data.sig="i";function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(_emscripten_sample_gamepad_data())return-1;return registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread)}_emscripten_set_gamepadconnected_callback_on_thread.sig="ipipp";function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(_emscripten_sample_gamepad_data())return-1;return registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread)}_emscripten_set_gamepaddisconnected_callback_on_thread.sig="ipipp";var _emscripten_get_num_gamepads=()=>JSEvents.lastGamepadState.length;_emscripten_get_num_gamepads.sig="i";function _emscripten_get_gamepad_status(index,gamepadState){gamepadState>>>=0;if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}_emscripten_get_gamepad_status.sig="iip";var registerBeforeUnloadEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString)=>{var beforeUnloadEventHandlerFunc=(e=event)=>{var confirmationMessage=((a1,a2,a3)=>{})(eventTypeId,0,userData);if(confirmationMessage){confirmationMessage=UTF8ToString(confirmationMessage)}if(confirmationMessage){e.preventDefault();e.returnValue=confirmationMessage;return confirmationMessage}};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:beforeUnloadEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_beforeunload_callback_on_thread(userData,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(typeof onbeforeunload=="undefined")return-1;if(targetThread!==1)return-5;return registerBeforeUnloadEventCallback(2,userData,true,callbackfunc,28,"beforeunload")}_emscripten_set_beforeunload_callback_on_thread.sig="ippp";var fillBatteryEventData=(eventStruct,e)=>{HEAPF64[eventStruct>>>3>>>0]=e.chargingTime;HEAPF64[eventStruct+8>>>3>>>0]=e.dischargingTime;HEAPF64[eventStruct+16>>>3>>>0]=e.level;HEAP8[eventStruct+24>>>0]=e.charging};var battery=()=>navigator.battery||navigator.mozBattery||navigator.webkitBattery;var registerBatteryEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.batteryEvent||=_malloc(32);var batteryEventHandlerFunc=(e=event)=>{var batteryEvent=JSEvents.batteryEvent;fillBatteryEventData(batteryEvent,battery());if(((a1,a2,a3)=>{})(eventTypeId,batteryEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:batteryEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_batterychargingchange_callback_on_thread(userData,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!battery())return-1;return registerBatteryEventCallback(battery(),userData,true,callbackfunc,29,"chargingchange",targetThread)}_emscripten_set_batterychargingchange_callback_on_thread.sig="ippp";function _emscripten_set_batterylevelchange_callback_on_thread(userData,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!battery())return-1;return registerBatteryEventCallback(battery(),userData,true,callbackfunc,30,"levelchange",targetThread)}_emscripten_set_batterylevelchange_callback_on_thread.sig="ippp";function _emscripten_get_battery_status(batteryState){batteryState>>>=0;if(!battery())return-1;fillBatteryEventData(batteryState,battery());return 0}_emscripten_get_battery_status.sig="ip";function __emscripten_set_offscreencanvas_size(target,width,height){target>>>=0;return-1}__emscripten_set_offscreencanvas_size.sig="ipii";function _emscripten_set_element_css_size(target,width,height){target>>>=0;target=findEventTarget(target);if(!target)return-4;target.style.width=width+"px";target.style.height=height+"px";return 0}_emscripten_set_element_css_size.sig="ipdd";function _emscripten_get_element_css_size(target,width,height){target>>>=0;width>>>=0;height>>>=0;target=findEventTarget(target);if(!target)return-4;var rect=getBoundingClientRect(target);HEAPF64[width>>>3>>>0]=rect.width;HEAPF64[height>>>3>>>0]=rect.height;return 0}_emscripten_get_element_css_size.sig="ippp";var _emscripten_html5_remove_all_event_listeners=()=>JSEvents.removeAllEventListeners();_emscripten_html5_remove_all_event_listeners.sig="v";var _emscripten_request_animation_frame=function(cb,userData){cb>>>=0;userData>>>=0;return requestAnimationFrame(timeStamp=>((a1,a2)=>{})(timeStamp,userData))};_emscripten_request_animation_frame.sig="ipp";var _emscripten_cancel_animation_frame=id=>cancelAnimationFrame(id);_emscripten_cancel_animation_frame.sig="vi";var _emscripten_request_animation_frame_loop=function(cb,userData){cb>>>=0;userData>>>=0;function tick(timeStamp){if(((a1,a2)=>{})(timeStamp,userData)){requestAnimationFrame(tick)}}return requestAnimationFrame(tick)};_emscripten_request_animation_frame_loop.sig="vpp";var _emscripten_performance_now=()=>performance.now();_emscripten_performance_now.sig="d";var _emscripten_get_device_pixel_ratio=()=>devicePixelRatio;_emscripten_get_device_pixel_ratio.sig="d";function _emscripten_get_callstack(flags,str,maxbytes){str>>>=0;var callstack=getCallstack(flags);if(!str||maxbytes<=0){return lengthBytesUTF8(callstack)+1}var bytesWrittenExcludingNull=stringToUTF8(callstack,str,maxbytes);return bytesWrittenExcludingNull+1}_emscripten_get_callstack.sig="iipi";var convertFrameToPC=frame=>{abort("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER");return 0};function _emscripten_return_address(level){var callstack=jsStackTrace().split("\n");if(callstack[0]=="Error"){callstack.shift()}var caller=callstack[level+3];return convertFrameToPC(caller)}_emscripten_return_address.sig="pi";var UNWIND_CACHE={};var saveInUnwindCache=callstack=>{callstack.forEach(frame=>{var pc=convertFrameToPC(frame);if(pc){UNWIND_CACHE[pc]=frame}})};function _emscripten_stack_snapshot(){var callstack=jsStackTrace().split("\n");if(callstack[0]=="Error"){callstack.shift()}saveInUnwindCache(callstack);UNWIND_CACHE.last_addr=convertFrameToPC(callstack[3]);UNWIND_CACHE.last_stack=callstack;return UNWIND_CACHE.last_addr}_emscripten_stack_snapshot.sig="p";function _emscripten_stack_unwind_buffer(addr,buffer,count){addr>>>=0;buffer>>>=0;var stack;if(UNWIND_CACHE.last_addr==addr){stack=UNWIND_CACHE.last_stack}else{stack=jsStackTrace().split("\n");if(stack[0]=="Error"){stack.shift()}saveInUnwindCache(stack)}var offset=3;while(stack[offset]&&convertFrameToPC(stack[offset])!=addr){++offset}for(var i=0;i>>2>>>0]=convertFrameToPC(stack[i+offset])}return i}_emscripten_stack_unwind_buffer.sig="ippi";function _emscripten_pc_get_function(pc){pc>>>=0;abort("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER");return 0}_emscripten_pc_get_function.sig="pp";var convertPCtoSourceLocation=pc=>{if(UNWIND_CACHE.last_get_source_pc==pc)return UNWIND_CACHE.last_source;var match;var source;if(!source){var frame=UNWIND_CACHE[pc];if(!frame)return null;if(match=/\((.*):(\d+):(\d+)\)$/.exec(frame)){source={file:match[1],line:match[2],column:match[3]}}else if(match=/@(.*):(\d+):(\d+)/.exec(frame)){source={file:match[1],line:match[2],column:match[3]}}}UNWIND_CACHE.last_get_source_pc=pc;UNWIND_CACHE.last_source=source;return source};function _emscripten_pc_get_file(pc){pc>>>=0;var result=convertPCtoSourceLocation(pc);if(!result)return 0;if(_emscripten_pc_get_file.ret)_free(_emscripten_pc_get_file.ret);_emscripten_pc_get_file.ret=stringToNewUTF8(result.file);return _emscripten_pc_get_file.ret}_emscripten_pc_get_file.sig="pp";function _emscripten_pc_get_line(pc){pc>>>=0;var result=convertPCtoSourceLocation(pc);return result?result.line:0}_emscripten_pc_get_line.sig="ip";function _emscripten_pc_get_column(pc){pc>>>=0;var result=convertPCtoSourceLocation(pc);return result?result.column||0:0}_emscripten_pc_get_column.sig="ip";var _sched_yield=()=>0;Module["_sched_yield"]=_sched_yield;_sched_yield.sig="i";function _random_get(buf,buf_len){buf>>>=0;buf_len>>>=0;try{_getentropy(buf,buf_len);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_random_get.sig="ipp";var checkWasiClock=clock_id=>clock_id==0||clock_id==1||clock_id==2||clock_id==3;function _clock_time_get(clk_id,ignored_precision_low,ignored_precision_high,ptime){var ignored_precision=convertI32PairToI53Checked(ignored_precision_low,ignored_precision_high);ptime>>>=0;if(!checkWasiClock(clk_id)){return 28}var now;if(clk_id===0){now=Date.now()}else if(nowIsMonotonic){now=_emscripten_get_now()}else{return 52}var nsec=Math.round(now*1e3*1e3);HEAP32[ptime>>>2>>>0]=nsec>>>0;HEAP32[ptime+4>>>2>>>0]=nsec/Math.pow(2,32)>>>0;return 0}_clock_time_get.sig="iiiip";function _clock_res_get(clk_id,pres){pres>>>=0;if(!checkWasiClock(clk_id)){return 28}var nsec;if(clk_id===0){nsec=1e3*1e3}else if(nowIsMonotonic){nsec=_emscripten_get_now_res()}else{return 52}HEAP32[pres>>>2>>>0]=nsec>>>0;HEAP32[pres+4>>>2>>>0]=nsec/Math.pow(2,32)>>>0;return 0}_clock_res_get.sig="iip";var wasiRightsToMuslOFlags=rights=>{if(rights&2&&rights&64){return 2}if(rights&2){return 0}if(rights&64){return 1}throw new FS.ErrnoError(28)};var wasiOFlagsToMuslOFlags=oflags=>{var musl_oflags=0;if(oflags&1){musl_oflags|=64}if(oflags&8){musl_oflags|=512}if(oflags&2){musl_oflags|=65536}if(oflags&4){musl_oflags|=128}return musl_oflags};var _emscripten_unwind_to_js_event_loop=()=>{throw"unwind"};_emscripten_unwind_to_js_event_loop.sig="v";var safeSetTimeout=(func,timeout)=>{runtimeKeepalivePush();return setTimeout(()=>{runtimeKeepalivePop();callUserCallback(func)},timeout)};var setImmediateWrapped=func=>{setImmediateWrapped.mapping||=[];var id=setImmediateWrapped.mapping.length;setImmediateWrapped.mapping[id]=setImmediate(()=>{setImmediateWrapped.mapping[id]=undefined;func()});return id};var clearImmediateWrapped=id=>{clearImmediate(setImmediateWrapped.mapping[id]);setImmediateWrapped.mapping[id]=undefined};var polyfillSetImmediate=()=>{};var _emscripten_set_immediate=function(cb,userData){cb>>>=0;userData>>>=0;runtimeKeepalivePush();return emSetImmediate(()=>{runtimeKeepalivePop();callUserCallback(()=>(a1=>{})(userData))})};_emscripten_set_immediate.sig="ipp";var _emscripten_clear_immediate=id=>{runtimeKeepalivePop();emClearImmediate(id)};_emscripten_clear_immediate.sig="vi";var _emscripten_set_immediate_loop=function(cb,userData){cb>>>=0;userData>>>=0;function tick(){callUserCallback(()=>{if((a1=>{})(userData)){emSetImmediate(tick)}else{runtimeKeepalivePop()}})}runtimeKeepalivePush();emSetImmediate(tick)};_emscripten_set_immediate_loop.sig="vpp";var _emscripten_set_timeout=function(cb,msecs,userData){cb>>>=0;userData>>>=0;return safeSetTimeout(()=>(a1=>{})(userData),msecs)};_emscripten_set_timeout.sig="ipdp";var _emscripten_clear_timeout=clearTimeout;_emscripten_clear_timeout.sig="vi";var _emscripten_set_timeout_loop=function(cb,msecs,userData){cb>>>=0;userData>>>=0;function tick(){var t=_emscripten_get_now();var n=t+msecs;runtimeKeepalivePop();callUserCallback(()=>{if(((a1,a2)=>{})(t,userData)){runtimeKeepalivePush();setTimeout(tick,n-_emscripten_get_now())}})}runtimeKeepalivePush();return setTimeout(tick,0)};_emscripten_set_timeout_loop.sig="vpdp";var _emscripten_set_interval=function(cb,msecs,userData){cb>>>=0;userData>>>=0;runtimeKeepalivePush();return setInterval(()=>{callUserCallback(()=>(a1=>{})(userData))},msecs)};_emscripten_set_interval.sig="ipdp";var _emscripten_clear_interval=id=>{runtimeKeepalivePop();clearInterval(id)};_emscripten_clear_interval.sig="vi";var idsToPromises=(idBuf,size)=>{var promises=[];for(var i=0;i>>2>>>0];promises[i]=getPromise(id)}return promises};var makePromiseCallback=(callback,userData)=>value=>{runtimeKeepalivePop();var stack=stackSave();var resultPtr=stackAlloc(POINTER_SIZE);HEAPU32[resultPtr>>>2>>>0]=0;try{var result=((a1,a2,a3)=>{})(resultPtr,userData,value);var resultVal=HEAPU32[resultPtr>>>2>>>0]}catch(e){if(typeof e!="number"){throw 0}throw e}finally{stackRestore(stack)}switch(result){case 0:return resultVal;case 1:return getPromise(resultVal);case 2:var ret=getPromise(resultVal);_emscripten_promise_destroy(resultVal);return ret;case 3:throw resultVal}};function _emscripten_promise_then(id,onFulfilled,onRejected,userData){id>>>=0;onFulfilled>>>=0;onRejected>>>=0;userData>>>=0;runtimeKeepalivePush();var promise=getPromise(id);var newId=promiseMap.allocate({promise:promise.then(makePromiseCallback(onFulfilled,userData),makePromiseCallback(onRejected,userData))});return newId}_emscripten_promise_then.sig="ppppp";var _emscripten_promise_all=function(idBuf,resultBuf,size){idBuf>>>=0;resultBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.all(promises).then(results=>{if(resultBuf){for(var i=0;i>>2>>>0]=result}}return resultBuf})});return id};_emscripten_promise_all.sig="pppp";var setPromiseResult=(ptr,fulfill,value)=>{var result=fulfill?0:3;HEAP32[ptr>>>2>>>0]=result;HEAPU32[ptr+4>>>2>>>0]=value};var _emscripten_promise_all_settled=function(idBuf,resultBuf,size){idBuf>>>=0;resultBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.allSettled(promises).then(results=>{if(resultBuf){var offset=resultBuf;for(var i=0;i>>=0;errorBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.any(promises).catch(err=>{if(errorBuf){for(var i=0;i>>2>>>0]=err.errors[i]}}throw errorBuf})});return id};_emscripten_promise_any.sig="pppp";function _emscripten_promise_race(idBuf,size){idBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.race(promises)});return id}_emscripten_promise_race.sig="ppp";var _emscripten_promise_await=function(returnValuePtr,id){returnValuePtr>>>=0;id>>>=0;return Asyncify.handleSleep(wakeUp=>{getPromise(id).then(value=>{setPromiseResult(returnValuePtr,true,value);wakeUp()},value=>{setPromiseResult(returnValuePtr,false,value);wakeUp()})})};_emscripten_promise_await.sig="vpp";_emscripten_promise_await.isAsync=true;function ___resumeException(ptr){ptr>>>=0;if(!exceptionLast){exceptionLast=ptr}throw exceptionLast}___resumeException.sig="vp";var findMatchingCatch=args=>{var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var caughtType of args){if(caughtType===0||caughtType===thrownType){break}var adjusted_ptr_addr=info.ptr+16;if(___cxa_can_catch(caughtType,thrownType,adjusted_ptr_addr)){setTempRet0(caughtType);return thrown}}setTempRet0(thrownType);return thrown};function ___cxa_find_matching_catch_2(){return findMatchingCatch([])}___cxa_find_matching_catch_2.sig="p";function ___cxa_find_matching_catch_3(arg0){arg0>>>=0;return findMatchingCatch([arg0])}___cxa_find_matching_catch_3.sig="pp";function ___cxa_find_matching_catch_4(arg0,arg1){arg0>>>=0;arg1>>>=0;return findMatchingCatch([arg0,arg1])}___cxa_find_matching_catch_4.sig="ppp";var exceptionCaught=[];var ___cxa_rethrow=()=>{var info=exceptionCaught.pop();if(!info){abort("no exception to throw")}var ptr=info.excPtr;if(!info.get_rethrown()){exceptionCaught.push(info);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}exceptionLast=ptr;throw exceptionLast};___cxa_rethrow.sig="v";function _llvm_eh_typeid_for(type){type>>>=0;return type}_llvm_eh_typeid_for.sig="vp";function ___cxa_begin_catch(ptr){ptr>>>=0;var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);___cxa_increment_exception_refcount(ptr);return ___cxa_get_exception_ptr(ptr)}___cxa_begin_catch.sig="pp";var ___cxa_end_catch=()=>{_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=0};___cxa_end_catch.sig="v";var ___cxa_uncaught_exceptions=()=>uncaughtExceptionCount;Module["___cxa_uncaught_exceptions"]=___cxa_uncaught_exceptions;___cxa_uncaught_exceptions.sig="i";function ___cxa_call_unexpected(exception){exception>>>=0;return abort("Unexpected exception thrown, this is not properly supported - aborting")}___cxa_call_unexpected.sig="vp";function ___cxa_current_primary_exception(){if(!exceptionCaught.length){return 0}var info=exceptionCaught[exceptionCaught.length-1];___cxa_increment_exception_refcount(info.excPtr);return info.excPtr}Module["___cxa_current_primary_exception"]=___cxa_current_primary_exception;___cxa_current_primary_exception.sig="p";function ___cxa_rethrow_primary_exception(ptr){ptr>>>=0;if(!ptr)return;var info=new ExceptionInfo(ptr);exceptionCaught.push(info);info.set_rethrown(true);___cxa_rethrow()}Module["___cxa_rethrow_primary_exception"]=___cxa_rethrow_primary_exception;___cxa_rethrow_primary_exception.sig="vp";var _emscripten_set_main_loop_timing=(mode,value)=>{Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(!Browser.mainLoop.running){runtimeKeepalivePush();Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof Browser.setImmediate=="undefined"){if(typeof setImmediate=="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=event=>{if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);Browser.setImmediate=func=>{setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){Module["setImmediates"]??=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}else{Browser.setImmediate=setImmediate}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){Browser.setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0};_emscripten_set_main_loop_timing.sig="iii";var setMainLoop=(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming)=>{Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(!checkIsRunning())return;if(typeof SDL=="object")SDL.audio?.queueNewAudioData?.();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0){_emscripten_set_main_loop_timing(0,1e3/fps)}else{_emscripten_set_main_loop_timing(1,1)}Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}};var Browser={mainLoop:{running:false,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining{var canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);preloadedImages[name]=canvas;URL.revokeObjectURL(url);onload?.(byteArray)};img.onerror=event=>{err(`Image ${url} could not be decoded`);onerror?.()};img.src=url};preloadPlugins.push(imagePlugin);var audioPlugin={};audioPlugin["canHandle"]=function audioPlugin_canHandle(name){return!Module["noAudioDecoding"]&&name.substr(-4)in{".ogg":1,".wav":1,".mp3":1}};audioPlugin["handle"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;preloadedAudios[name]=audio;onload?.(byteArray)}function fail(){if(done)return;done=true;preloadedAudios[name]=new Audio;onerror?.()}var b=new Blob([byteArray],{type:Browser.getMimetype(name)});var url=URL.createObjectURL(b);var audio=new Audio;audio.addEventListener("canplaythrough",()=>finish(audio),false);audio.onerror=function audio_onerror(event){if(done)return;err(`warning: browser could not fully decode audio ${name}, trying slower base64 approach`);function encode64(data){var BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD="=";var ret="";var leftchar=0;var leftbits=0;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(()=>{finish(audio)},1e4)};preloadPlugins.push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(()=>{});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(()=>{});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",ev=>{if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Browser.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(callback=>callback());Browser.init()}return ctx},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer=="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas=="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}Module["onFullScreen"]?.(Browser.isFullscreen);Module["onFullscreen"]?.(Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?()=>canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]):null)||(canvasContainer["webkitRequestFullScreen"]?()=>canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]):null);canvasContainer.requestFullscreen()},exitFullscreen(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||(()=>{});CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame(func){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout(func,timeout){return safeSetTimeout(func,timeout)},safeRequestAnimationFrame(func){runtimeKeepalivePush();return Browser.requestAnimationFrame(()=>{runtimeKeepalivePop();callUserCallback(func)})},getMimetype(name){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia(func){window.getUserMedia||=navigator["getUserMedia"]||navigator["mozGetUserMedia"];window.getUserMedia(func)},getMovementX(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(pageX,pageY){var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;var adjustedX=pageX-(scrollX+rect.left);var adjustedY=pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);return{x:adjustedX,y:adjustedY}},setMouseCoords(pageX,pageY){const{x,y}=Browser.calculateMouseCoords(pageX,pageY);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y},calculateMouseEvent(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}else{if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var coords=Browser.calculateMouseCoords(touch.pageX,touch.pageY);if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];last||=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}Browser.setMouseCoords(event.pageX,event.pageY)}},resizeListeners:[],updateResizeListeners(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(listener=>listener(canvas.width,canvas.height))},setCanvasSize(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>>2>>>0];flags=flags|8388608;HEAP32[SDL.screen>>>2>>>0]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>>2>>>0];flags=flags&~8388608;HEAP32[SDL.screen>>>2>>>0]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();var _file=UTF8ToString(file);var data=FS.analyzePath(_file);if(!data.exists)return-1;FS.createPreloadedFile(PATH.dirname(_file),PATH.basename(_file),new Uint8Array(data.object.contents),true,true,()=>{runtimeKeepalivePop();if(onload)(a1=>{})(file)},()=>{runtimeKeepalivePop();if(onerror)(a1=>{})(file)},true);return 0};_emscripten_run_preload_plugins.sig="ippp";var Browser_asyncPrepareDataCounter=0;var _emscripten_run_preload_plugins_data=function(data,size,suffix,arg,onload,onerror){data>>>=0;suffix>>>=0;arg>>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();var _suffix=UTF8ToString(suffix);var name="prepare_data_"+Browser_asyncPrepareDataCounter+++"."+_suffix;var cname=stringToNewUTF8(name);FS.createPreloadedFile("/",name,HEAPU8.subarray(data>>>0,data+size>>>0),true,true,()=>{runtimeKeepalivePop();if(onload)((a1,a2)=>{})(arg,cname)},()=>{runtimeKeepalivePop();if(onerror)(a1=>{})(arg)},true)};_emscripten_run_preload_plugins_data.sig="vpipppp";var _emscripten_async_run_script=function(script,millis){script>>>=0;safeSetTimeout(()=>_emscripten_run_script(script),millis)};_emscripten_async_run_script.sig="vpi";var _emscripten_async_load_script=function(url,onload,onerror){url>>>=0;onload>>>=0;onerror>>>=0;url=UTF8ToString(url);runtimeKeepalivePush();var loadDone=()=>{runtimeKeepalivePop();if(onload){var onloadCallback=()=>callUserCallback(()=>{});if(runDependencies>0){dependenciesFulfilled=onloadCallback}else{onloadCallback()}}};var loadError=()=>{runtimeKeepalivePop();if(onerror){callUserCallback(()=>{})}};var script=document.createElement("script");script.onload=loadDone;script.onerror=loadError;script.src=url;document.body.appendChild(script)};_emscripten_async_load_script.sig="vppp";function _emscripten_get_main_loop_timing(mode,value){mode>>>=0;value>>>=0;if(mode)HEAP32[mode>>>2>>>0]=Browser.mainLoop.timingMode;if(value)HEAP32[value>>>2>>>0]=Browser.mainLoop.timingValue}_emscripten_get_main_loop_timing.sig="vpp";var _emscripten_set_main_loop=function(func,fps,simulateInfiniteLoop){func>>>=0;var browserIterationFunc=()=>{};setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop)};_emscripten_set_main_loop.sig="vpii";var _emscripten_set_main_loop_arg=function(func,arg,fps,simulateInfiniteLoop){func>>>=0;arg>>>=0;var browserIterationFunc=()=>(a1=>{})(arg);setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg)};_emscripten_set_main_loop_arg.sig="vppii";var _emscripten_cancel_main_loop=()=>{Browser.mainLoop.pause();Browser.mainLoop.func=null};_emscripten_cancel_main_loop.sig="v";var _emscripten_pause_main_loop=()=>{Browser.mainLoop.pause()};_emscripten_pause_main_loop.sig="v";var _emscripten_resume_main_loop=()=>{Browser.mainLoop.resume()};_emscripten_resume_main_loop.sig="v";var __emscripten_push_main_loop_blocker=function(func,arg,name){func>>>=0;arg>>>=0;name>>>=0;Browser.mainLoop.queue.push({func:()=>{(a1=>{})(arg)},name:UTF8ToString(name),counted:true});Browser.mainLoop.updateStatus()};__emscripten_push_main_loop_blocker.sig="vppp";var __emscripten_push_uncounted_main_loop_blocker=function(func,arg,name){func>>>=0;arg>>>=0;name>>>=0;Browser.mainLoop.queue.push({func:()=>{(a1=>{})(arg)},name:UTF8ToString(name),counted:false});Browser.mainLoop.updateStatus()};__emscripten_push_uncounted_main_loop_blocker.sig="vppp";var _emscripten_set_main_loop_expected_blockers=num=>{Browser.mainLoop.expectedBlockers=num;Browser.mainLoop.remainingBlockers=num;Browser.mainLoop.updateStatus()};_emscripten_set_main_loop_expected_blockers.sig="vi";var _emscripten_async_call=function(func,arg,millis){func>>>=0;arg>>>=0;function wrapper(){(a1=>{})(arg)}if(millis>=0){safeSetTimeout(wrapper,millis)}else{Browser.safeRequestAnimationFrame(wrapper)}};_emscripten_async_call.sig="vppi";function _emscripten_get_window_title(){var buflen=256;if(!_emscripten_get_window_title.buffer){_emscripten_get_window_title.buffer=_malloc(buflen)}stringToUTF8(document.title,_emscripten_get_window_title.buffer,buflen);return _emscripten_get_window_title.buffer}_emscripten_get_window_title.sig="p";function _emscripten_set_window_title(title){title>>>=0;return document.title=UTF8ToString(title)}_emscripten_set_window_title.sig="vp";function _emscripten_get_screen_size(width,height){width>>>=0;height>>>=0;HEAP32[width>>>2>>>0]=screen.width;HEAP32[height>>>2>>>0]=screen.height}_emscripten_get_screen_size.sig="vpp";var _emscripten_hide_mouse=()=>{var styleSheet=document.styleSheets[0];var rules=styleSheet.cssRules;for(var i=0;i{Browser.setCanvasSize(width,height)};_emscripten_set_canvas_size.sig="vii";function _emscripten_get_canvas_size(width,height,isFullscreen){width>>>=0;height>>>=0;isFullscreen>>>=0;var canvas=Module["canvas"];HEAP32[width>>>2>>>0]=canvas.width;HEAP32[height>>>2>>>0]=canvas.height;HEAP32[isFullscreen>>>2>>>0]=Browser.isFullscreen?1:0}_emscripten_get_canvas_size.sig="vppp";function _emscripten_create_worker(url){url>>>=0;url=UTF8ToString(url);var id=Browser.workers.length;var info={worker:new Worker(url),callbacks:[],awaited:0,buffer:0,bufferSize:0};info.worker.onmessage=function info_worker_onmessage(msg){if(ABORT)return;var info=Browser.workers[id];if(!info)return;var callbackId=msg.data["callbackId"];var callbackInfo=info.callbacks[callbackId];if(!callbackInfo)return;if(msg.data["finalResponse"]){info.awaited--;info.callbacks[callbackId]=null;runtimeKeepalivePop()}var data=msg.data["data"];if(data){if(!data.byteLength)data=new Uint8Array(data);if(!info.buffer||info.bufferSize>>0);callbackInfo.func(info.buffer,data.length,callbackInfo.arg)}else{callbackInfo.func(0,0,callbackInfo.arg)}};Browser.workers.push(info);return id}_emscripten_create_worker.sig="ip";var _emscripten_destroy_worker=id=>{var info=Browser.workers[id];info.worker.terminate();if(info.buffer)_free(info.buffer);Browser.workers[id]=null};_emscripten_destroy_worker.sig="vi";var _emscripten_call_worker=function(id,funcName,data,size,callback,arg){funcName>>>=0;data>>>=0;callback>>>=0;arg>>>=0;funcName=UTF8ToString(funcName);var info=Browser.workers[id];var callbackId=-1;if(callback){runtimeKeepalivePush();callbackId=info.callbacks.length;info.callbacks.push({func:(a1,a2,a3)=>{},arg});info.awaited++}var transferObject={funcName,callbackId,data:data?new Uint8Array(HEAPU8.subarray(data>>>0,data+size>>>0)):0};if(data){info.worker.postMessage(transferObject,[transferObject.data.buffer])}else{info.worker.postMessage(transferObject)}};_emscripten_call_worker.sig="vippipp";var _emscripten_get_worker_queue_size=id=>{var info=Browser.workers[id];if(!info)return-1;return info.awaited};_emscripten_get_worker_queue_size.sig="ii";var getPreloadedImageData=(path,w,h)=>{path=PATH_FS.resolve(path);var canvas=preloadedImages[path];if(!canvas)return 0;var ctx=canvas.getContext("2d");var image=ctx.getImageData(0,0,canvas.width,canvas.height);var buf=_malloc(canvas.width*canvas.height*4);HEAPU8.set(image.data,buf>>>0);HEAP32[w>>>2>>>0]=canvas.width;HEAP32[h>>>2>>>0]=canvas.height;return buf};function _emscripten_get_preloaded_image_data(path,w,h){path>>>=0;w>>>=0;h>>>=0;return getPreloadedImageData(UTF8ToString(path),w,h)}_emscripten_get_preloaded_image_data.sig="pppp";var getPreloadedImageData__data=["$PATH_FS","malloc"];function _emscripten_get_preloaded_image_data_from_FILE(file,w,h){file>>>=0;w>>>=0;h>>>=0;var fd=_fileno(file);var stream=FS.getStream(fd);if(stream){return getPreloadedImageData(stream.path,w,h)}return 0}_emscripten_get_preloaded_image_data_from_FILE.sig="pppp";var wget={wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle(){var handle=wget.nextWgetRequestHandle;wget.nextWgetRequestHandle++;return handle}};var FS_mkdirTree=(path,mode)=>FS.mkdirTree(path,mode);var _emscripten_async_wget=function(url,file,onload,onerror){url>>>=0;file>>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();var _url=UTF8ToString(url);var _file=UTF8ToString(file);_file=PATH_FS.resolve(_file);function doCallback(callback){if(callback){runtimeKeepalivePop();callUserCallback(()=>{var sp=stackSave();(a1=>{})(stringToUTF8OnStack(_file));stackRestore(sp)})}}var destinationDirectory=PATH.dirname(_file);FS_createPreloadedFile(destinationDirectory,PATH.basename(_file),_url,true,true,()=>doCallback(onload),()=>doCallback(onerror),false,false,()=>{try{FS_unlink(_file)}catch(e){}FS_mkdirTree(destinationDirectory)})};_emscripten_async_wget.sig="vpppp";var _emscripten_async_wget_data=function(url,userdata,onload,onerror){url>>>=0;userdata>>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();asyncLoad(UTF8ToString(url),byteArray=>{runtimeKeepalivePop();callUserCallback(()=>{var buffer=_malloc(byteArray.length);HEAPU8.set(byteArray,buffer>>>0);((a1,a2,a3)=>{})(userdata,buffer,byteArray.length);_free(buffer)})},()=>{if(onerror){runtimeKeepalivePop();callUserCallback(()=>{(a1=>{})(userdata)})}},true)};_emscripten_async_wget_data.sig="vpppp";var _emscripten_async_wget2=function(url,file,request,param,userdata,onload,onerror,onprogress){url>>>=0;file>>>=0;request>>>=0;param>>>=0;userdata>>>=0;onload>>>=0;onerror>>>=0;onprogress>>>=0;runtimeKeepalivePush();var _url=UTF8ToString(url);var _file=UTF8ToString(file);_file=PATH_FS.resolve(_file);var _request=UTF8ToString(request);var _param=UTF8ToString(param);var index=_file.lastIndexOf("/");var http=new XMLHttpRequest;http.open(_request,_url,true);http.responseType="arraybuffer";var handle=wget.getNextWgetRequestHandle();var destinationDirectory=PATH.dirname(_file);http.onload=e=>{runtimeKeepalivePop();if(http.status>=200&&http.status<300){try{FS.unlink(_file)}catch(e){}FS.mkdirTree(destinationDirectory);FS.createDataFile(_file.substr(0,index),_file.substr(index+1),new Uint8Array(http.response),true,true,false);if(onload){var sp=stackSave();((a1,a2,a3)=>{})(handle,userdata,stringToUTF8OnStack(_file));stackRestore(sp)}}else{if(onerror)((a1,a2,a3)=>{})(handle,userdata,http.status)}delete wget.wgetRequests[handle]};http.onerror=e=>{runtimeKeepalivePop();if(onerror)((a1,a2,a3)=>{})(handle,userdata,http.status);delete wget.wgetRequests[handle]};http.onprogress=e=>{if(e.lengthComputable||e.lengthComputable===undefined&&e.total!=0){var percentComplete=e.loaded/e.total*100;if(onprogress)((a1,a2,a3)=>{})(handle,userdata,percentComplete)}};http.onabort=e=>{runtimeKeepalivePop();delete wget.wgetRequests[handle]};if(_request=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.send(_param)}else{http.send(null)}wget.wgetRequests[handle]=http;return handle};_emscripten_async_wget2.sig="ipppppppp";function _emscripten_async_wget2_data(url,request,param,userdata,free,onload,onerror,onprogress){url>>>=0;request>>>=0;param>>>=0;userdata>>>=0;onload>>>=0;onerror>>>=0;onprogress>>>=0;var _url=UTF8ToString(url);var _request=UTF8ToString(request);var _param=UTF8ToString(param);var http=new XMLHttpRequest;http.open(_request,_url,true);http.responseType="arraybuffer";var handle=wget.getNextWgetRequestHandle();function onerrorjs(){if(onerror){var sp=stackSave();var statusText=0;if(http.statusText){statusText=stringToUTF8OnStack(http.statusText)}((a1,a2,a3,a4)=>{})(handle,userdata,http.status,statusText);stackRestore(sp)}}http.onload=e=>{if(http.status>=200&&http.status<300||http.status===0&&_url.substr(0,4).toLowerCase()!="http"){var byteArray=new Uint8Array(http.response);var buffer=_malloc(byteArray.length);HEAPU8.set(byteArray,buffer>>>0);if(onload)((a1,a2,a3,a4)=>{})(handle,userdata,buffer,byteArray.length);if(free)_free(buffer)}else{onerrorjs()}delete wget.wgetRequests[handle]};http.onerror=e=>{onerrorjs();delete wget.wgetRequests[handle]};http.onprogress=e=>{if(onprogress)((a1,a2,a3,a4)=>{})(handle,userdata,e.loaded,e.lengthComputable||e.lengthComputable===undefined?e.total:0)};http.onabort=e=>{delete wget.wgetRequests[handle]};if(_request=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.send(_param)}else{http.send(null)}wget.wgetRequests[handle]=http;return handle}_emscripten_async_wget2_data.sig="ippppippp";var _emscripten_async_wget2_abort=handle=>{var http=wget.wgetRequests[handle];http?.abort()};_emscripten_async_wget2_abort.sig="vi";function ___asctime_r(tmPtr,buf){tmPtr>>>=0;buf>>>=0;var date={tm_sec:HEAP32[tmPtr>>>2>>>0],tm_min:HEAP32[tmPtr+4>>>2>>>0],tm_hour:HEAP32[tmPtr+8>>>2>>>0],tm_mday:HEAP32[tmPtr+12>>>2>>>0],tm_mon:HEAP32[tmPtr+16>>>2>>>0],tm_year:HEAP32[tmPtr+20>>>2>>>0],tm_wday:HEAP32[tmPtr+24>>>2>>>0]};var days=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var s=days[date.tm_wday]+" "+months[date.tm_mon]+(date.tm_mday<10?" ":" ")+date.tm_mday+(date.tm_hour<10?" 0":" ")+date.tm_hour+(date.tm_min<10?":0":":")+date.tm_min+(date.tm_sec<10?":0":":")+date.tm_sec+" "+(1900+date.tm_year)+"\n";stringToUTF8(s,buf,26);return buf}___asctime_r.sig="ppp";function _strptime_l(buf,format,tm,locale){buf>>>=0;format>>>=0;tm>>>=0;locale>>>=0;return _strptime(buf,format,tm)}_strptime_l.sig="ppppp";function ___syscall_shutdown(fd,how){try{getSocketFromFD(fd);return-52}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}Module["___syscall_shutdown"]=___syscall_shutdown;___syscall_shutdown.sig="iiiiiii";function __dlsym_catchup_js(handle,symbolIndex){handle>>>=0;var lib=LDSO.loadedLibsByHandle[handle];var symDict=lib.exports;var symName=Object.keys(symDict)[symbolIndex];var sym=symDict[symName];var result=addFunction(sym,sym.sig);return result}__dlsym_catchup_js.sig="ppi";var FS_readFile=FS.readFile;var _setNetworkCallback=(event,userData,callback)=>{function _callback(data){try{if(event==="error"){var sp=stackSave();var msg=stringToUTF8OnStack(data[2]);((a1,a2,a3,a4)=>{})(data[0],data[1],msg,userData);stackRestore(sp)}else{((a1,a2)=>{})(data,userData)}}catch(e){if(!(e instanceof ExitStatus)){if(e&&typeof e=="object"&&e.stack)err("exception thrown: "+[e,e.stack]);throw e}}}runtimeKeepalivePush();Module["websocket"]["on"](event,callback?_callback:null)};function _emscripten_set_socket_error_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("error",userData,callback)}_emscripten_set_socket_error_callback.sig="vpp";function _emscripten_set_socket_open_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("open",userData,callback)}_emscripten_set_socket_open_callback.sig="vpp";function _emscripten_set_socket_listen_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("listen",userData,callback)}_emscripten_set_socket_listen_callback.sig="vpp";function _emscripten_set_socket_connection_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("connection",userData,callback)}_emscripten_set_socket_connection_callback.sig="vpp";function _emscripten_set_socket_message_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("message",userData,callback)}_emscripten_set_socket_message_callback.sig="vpp";function _emscripten_set_socket_close_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("close",userData,callback)}_emscripten_set_socket_close_callback.sig="vpp";var _emscripten_sleep=ms=>Asyncify.handleSleep(wakeUp=>safeSetTimeout(wakeUp,ms));_emscripten_sleep.sig="vi";_emscripten_sleep.isAsync=true;var _emscripten_wget_data=function(url,pbuffer,pnum,perror){url>>>=0;pbuffer>>>=0;pnum>>>=0;perror>>>=0;return Asyncify.handleSleep(wakeUp=>{asyncLoad(UTF8ToString(url),byteArray=>{var buffer=_malloc(byteArray.length);HEAPU8.set(byteArray,buffer>>>0);HEAPU32[pbuffer>>>2>>>0]=buffer;HEAP32[pnum>>>2>>>0]=byteArray.length;HEAP32[perror>>>2>>>0]=0;wakeUp()},()=>{HEAP32[perror>>>2>>>0]=1;wakeUp()},true)})};_emscripten_wget_data.sig="vpppp";_emscripten_wget_data.isAsync=true;var _emscripten_scan_registers=function(func){func>>>=0;return Asyncify.handleSleep(wakeUp=>{safeSetTimeout(()=>{var stackBegin=Asyncify.currData+12;var stackEnd=HEAPU32[Asyncify.currData>>>2>>>0];((a1,a2)=>{})(stackBegin,stackEnd);wakeUp()},0)})};_emscripten_scan_registers.sig="vp";_emscripten_scan_registers.isAsync=true;var _emscripten_lazy_load_code=()=>Asyncify.handleSleep(wakeUp=>{wasmBinaryFile+=".lazy.wasm";dependenciesFulfilled=wakeUp;createWasm()});_emscripten_lazy_load_code.sig="v";_emscripten_lazy_load_code.isAsync=true;async function __load_secondary_module(){wasmExports["load_secondary_module_status"].value=1;var imports={primary:wasmExports};var deferred=wasmBinaryFile.slice(0,-5)+".deferred.wasm";await new Promise(resolve=>{instantiateAsync(null,deferred,imports,resolve)})}__load_secondary_module.sig="v";__load_secondary_module.isAsync=true;var Fibers={nextFiber:0,trampolineRunning:false,trampoline(){if(!Fibers.trampolineRunning&&Fibers.nextFiber){Fibers.trampolineRunning=true;do{var fiber=Fibers.nextFiber;Fibers.nextFiber=0;Fibers.finishContextSwitch(fiber)}while(Fibers.nextFiber);Fibers.trampolineRunning=false}},finishContextSwitch(newFiber){var stack_base=HEAPU32[newFiber>>>2>>>0];var stack_max=HEAPU32[newFiber+4>>>2>>>0];_emscripten_stack_set_limits(stack_base,stack_max);stackRestore(HEAPU32[newFiber+8>>>2>>>0]);var entryPoint=HEAPU32[newFiber+12>>>2>>>0];if(entryPoint!==0){Asyncify.currData=null;HEAPU32[newFiber+12>>>2>>>0]=0;var userData=HEAPU32[newFiber+16>>>2>>>0];(a1=>{})(userData)}else{var asyncifyData=newFiber+20;Asyncify.currData=asyncifyData;Asyncify.state=Asyncify.State.Rewinding;_asyncify_start_rewind(asyncifyData);Asyncify.doRewind(asyncifyData)}}};function _emscripten_fiber_swap(oldFiber,newFiber){oldFiber>>>=0;newFiber>>>=0;if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){Asyncify.state=Asyncify.State.Unwinding;var asyncifyData=oldFiber+20;Asyncify.setDataRewindFunc(asyncifyData);Asyncify.currData=asyncifyData;_asyncify_start_unwind(asyncifyData);var stackTop=stackSave();HEAPU32[oldFiber+8>>>2>>>0]=stackTop;Fibers.nextFiber=newFiber}else{Asyncify.state=Asyncify.State.Normal;_asyncify_stop_rewind();Asyncify.currData=null}}_emscripten_fiber_swap.sig="vpp";_emscripten_fiber_swap.isAsync=true;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var allocate=(slab,allocator)=>{var ret;if(allocator==ALLOC_STACK){ret=stackAlloc(slab.length)}else{ret=_malloc(slab.length)}if(!slab.subarray&&!slab.slice){slab=new Uint8Array(slab)}HEAPU8.set(slab,ret>>>0);return ret};var writeStringToMemory=(string,buffer,dontAddNull)=>{warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end>>>0]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end>>>0]=lastChar};var writeAsciiToMemory=(str,buffer,dontAddNull)=>{for(var i=0;i>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>>0]=0};var allocateUTF8=stringToNewUTF8;var allocateUTF8OnStack=stringToUTF8OnStack;var setErrNo=value=>{HEAP32[___errno_location()>>>2>>>0]=value;return value};var demangle=func=>{demangle.recursionGuard=(demangle.recursionGuard|0)+1;if(demangle.recursionGuard>1)return func;return withStackSave(()=>{try{var s=func;if(s.startsWith("__Z"))s=s.substr(1);var buf=stringToUTF8OnStack(s);var status=stackAlloc(4);var ret=___cxa_demangle(buf,0,0,status);if(HEAP32[status>>>2>>>0]===0&&ret){return UTF8ToString(ret)}}catch(e){}finally{_free(ret);if(demangle.recursionGuard<2)--demangle.recursionGuard}return func})};function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return js}var print=out;var printErr=err;var _emscripten_is_main_browser_thread=()=>!ENVIRONMENT_IS_WORKER;registerWasmPlugin();FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_unlink"]=FS.unlink;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createDevice"]=FS.createDevice;var emSetImmediate;var emClearImmediate;if(typeof setImmediate!="undefined"){emSetImmediate=setImmediateWrapped;emClearImmediate=clearImmediateWrapped}else if(typeof addEventListener=="function"){var __setImmediate_id_counter=0;var __setImmediate_queue=[];var __setImmediate_message_id="_si";var __setImmediate_cb=e=>{if(e.data===__setImmediate_message_id){e.stopPropagation();__setImmediate_queue.shift()();++__setImmediate_id_counter}};addEventListener("message",__setImmediate_cb,true);emSetImmediate=func=>{postMessage(__setImmediate_message_id,"*");return __setImmediate_id_counter+__setImmediate_queue.push(func)-1};emClearImmediate=id=>{var index=id-__setImmediate_id_counter;if(index>=0&&index<__setImmediate_queue.length)__setImmediate_queue[index]=()=>{}}}Module["requestFullscreen"]=Browser.requestFullscreen;Module["requestAnimationFrame"]=Browser.requestAnimationFrame;Module["setCanvasSize"]=Browser.setCanvasSize;Module["pauseMainLoop"]=Browser.mainLoop.pause;Module["resumeMainLoop"]=Browser.mainLoop.resume;Module["getUserMedia"]=Browser.getUserMedia;Module["createContext"]=Browser.createContext;var preloadedImages={};var preloadedAudios={};var wasmImports={UTF8ToHtml:_UTF8ToHtml,UTF8Toisolat1:_UTF8Toisolat1,_Unwind_Backtrace:__Unwind_Backtrace,_Unwind_DeleteException:__Unwind_DeleteException,_Unwind_FindEnclosingFunction:__Unwind_FindEnclosingFunction,_Unwind_GetIPInfo:__Unwind_GetIPInfo,_Unwind_RaiseException:__Unwind_RaiseException,__asctime_r:___asctime_r,__assert_fail:___assert_fail,__asyncify_data:___asyncify_data,__asyncify_state:___asyncify_state,__asyncjs__pdo_pglite_real_db_handle_factory,__asyncjs__pdo_pglite_real_handle_begin,__asyncjs__pdo_pglite_real_handle_commit,__asyncjs__pdo_pglite_real_handle_rollback,__asyncjs__pdo_pglite_real_last_insert_id,__asyncjs__pdo_pglite_real_stmt_execute,__asyncjs__php_stream_fetch_real_open,__asyncjs__vrzno_await_internal,__call_sighandler:___call_sighandler,__cxa_begin_catch:___cxa_begin_catch,__cxa_call_unexpected:___cxa_call_unexpected,__cxa_end_catch:___cxa_end_catch,__cxa_find_matching_catch_2:___cxa_find_matching_catch_2,__cxa_find_matching_catch_3:___cxa_find_matching_catch_3,__cxa_find_matching_catch_4:___cxa_find_matching_catch_4,__cxa_rethrow:___cxa_rethrow,__cxa_throw:___cxa_throw,__global_base:___global_base,__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__resumeException:___resumeException,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__syscall__newselect:___syscall__newselect,__syscall_accept4:___syscall_accept4,__syscall_bind:___syscall_bind,__syscall_chdir:___syscall_chdir,__syscall_chmod:___syscall_chmod,__syscall_connect:___syscall_connect,__syscall_dup:___syscall_dup,__syscall_dup3:___syscall_dup3,__syscall_faccessat:___syscall_faccessat,__syscall_fadvise64:___syscall_fadvise64,__syscall_fallocate:___syscall_fallocate,__syscall_fchdir:___syscall_fchdir,__syscall_fchmod:___syscall_fchmod,__syscall_fchmodat2:___syscall_fchmodat2,__syscall_fchown32:___syscall_fchown32,__syscall_fchownat:___syscall_fchownat,__syscall_fcntl64:___syscall_fcntl64,__syscall_fdatasync:___syscall_fdatasync,__syscall_fstat64:___syscall_fstat64,__syscall_fstatfs64:___syscall_fstatfs64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getcwd:___syscall_getcwd,__syscall_getdents64:___syscall_getdents64,__syscall_getpeername:___syscall_getpeername,__syscall_getsockname:___syscall_getsockname,__syscall_getsockopt:___syscall_getsockopt,__syscall_ioctl:___syscall_ioctl,__syscall_listen:___syscall_listen,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_mknodat:___syscall_mknodat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_pipe:___syscall_pipe,__syscall_poll:___syscall_poll,__syscall_readlinkat:___syscall_readlinkat,__syscall_recvfrom:___syscall_recvfrom,__syscall_recvmsg:___syscall_recvmsg,__syscall_renameat:___syscall_renameat,__syscall_rmdir:___syscall_rmdir,__syscall_sendmsg:___syscall_sendmsg,__syscall_sendto:___syscall_sendto,__syscall_socket:___syscall_socket,__syscall_stat64:___syscall_stat64,__syscall_statfs64:___syscall_statfs64,__syscall_symlink:___syscall_symlink,__syscall_symlinkat:___syscall_symlinkat,__syscall_truncate64:___syscall_truncate64,__syscall_unlinkat:___syscall_unlinkat,__syscall_utimensat:___syscall_utimensat,__table_base:___table_base,__xmlOutputBufferCreateFilename:___xmlOutputBufferCreateFilename,__xmlParserInputBufferCreateFilename:___xmlParserInputBufferCreateFilename,__xmlRegisterCallbacks:___xmlRegisterCallbacks,_abort_js:__abort_js,_dlopen_js:__dlopen_js,_dlsym_catchup_js:__dlsym_catchup_js,_dlsym_js:__dlsym_js,_emscripten_dlopen_js:__emscripten_dlopen_js,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_get_progname:__emscripten_get_progname,_emscripten_lookup_name:__emscripten_lookup_name,_emscripten_memcpy_js:__emscripten_memcpy_js,_emscripten_push_main_loop_blocker:__emscripten_push_main_loop_blocker,_emscripten_push_uncounted_main_loop_blocker:__emscripten_push_uncounted_main_loop_blocker,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_set_offscreencanvas_size:__emscripten_set_offscreencanvas_size,_emscripten_system:__emscripten_system,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_gmtime_js:__gmtime_js,_load_secondary_module:__load_secondary_module,_localtime_js:__localtime_js,_mktime_js:__mktime_js,_mmap_js:__mmap_js,_msync_js:__msync_js,_munmap_js:__munmap_js,_setitimer_js:__setitimer_js,_timegm_js:__timegm_js,_tzset_js:__tzset_js,clock_res_get:_clock_res_get,clock_time_get:_clock_time_get,docbDefaultSAXHandler:_docbDefaultSAXHandler,emscripten_asm_const_async_on_main_thread:_emscripten_asm_const_async_on_main_thread,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_double_sync_on_main_thread:_emscripten_asm_const_double_sync_on_main_thread,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_asm_const_int_sync_on_main_thread:_emscripten_asm_const_int_sync_on_main_thread,emscripten_asm_const_ptr:_emscripten_asm_const_ptr,emscripten_asm_const_ptr_sync_on_main_thread:_emscripten_asm_const_ptr_sync_on_main_thread,emscripten_async_call:_emscripten_async_call,emscripten_async_load_script:_emscripten_async_load_script,emscripten_async_run_script:_emscripten_async_run_script,emscripten_async_wget:_emscripten_async_wget,emscripten_async_wget2:_emscripten_async_wget2,emscripten_async_wget2_abort:_emscripten_async_wget2_abort,emscripten_async_wget2_data:_emscripten_async_wget2_data,emscripten_async_wget_data:_emscripten_async_wget_data,emscripten_call_worker:_emscripten_call_worker,emscripten_cancel_animation_frame:_emscripten_cancel_animation_frame,emscripten_cancel_main_loop:_emscripten_cancel_main_loop,emscripten_clear_immediate:_emscripten_clear_immediate,emscripten_clear_interval:_emscripten_clear_interval,emscripten_clear_timeout:_emscripten_clear_timeout,emscripten_console_error:_emscripten_console_error,emscripten_console_log:_emscripten_console_log,emscripten_console_trace:_emscripten_console_trace,emscripten_console_warn:_emscripten_console_warn,emscripten_create_worker:_emscripten_create_worker,emscripten_date_now:_emscripten_date_now,emscripten_debugger:_emscripten_debugger,emscripten_destroy_worker:_emscripten_destroy_worker,emscripten_enter_soft_fullscreen:_emscripten_enter_soft_fullscreen,emscripten_err:_emscripten_err,emscripten_errn:_emscripten_errn,emscripten_exit_fullscreen:_emscripten_exit_fullscreen,emscripten_exit_pointerlock:_emscripten_exit_pointerlock,emscripten_exit_soft_fullscreen:_emscripten_exit_soft_fullscreen,emscripten_exit_with_live_runtime:_emscripten_exit_with_live_runtime,emscripten_fiber_swap:_emscripten_fiber_swap,emscripten_force_exit:_emscripten_force_exit,emscripten_get_battery_status:_emscripten_get_battery_status,emscripten_get_callstack:_emscripten_get_callstack,emscripten_get_canvas_element_size:_emscripten_get_canvas_element_size,emscripten_get_canvas_size:_emscripten_get_canvas_size,emscripten_get_compiler_setting:_emscripten_get_compiler_setting,emscripten_get_device_pixel_ratio:_emscripten_get_device_pixel_ratio,emscripten_get_devicemotion_status:_emscripten_get_devicemotion_status,emscripten_get_deviceorientation_status:_emscripten_get_deviceorientation_status,emscripten_get_element_css_size:_emscripten_get_element_css_size,emscripten_get_fullscreen_status:_emscripten_get_fullscreen_status,emscripten_get_gamepad_status:_emscripten_get_gamepad_status,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_main_loop_timing:_emscripten_get_main_loop_timing,emscripten_get_mouse_status:_emscripten_get_mouse_status,emscripten_get_now:_emscripten_get_now,emscripten_get_now_res:_emscripten_get_now_res,emscripten_get_num_gamepads:_emscripten_get_num_gamepads,emscripten_get_orientation_status:_emscripten_get_orientation_status,emscripten_get_pointerlock_status:_emscripten_get_pointerlock_status,emscripten_get_preloaded_image_data:_emscripten_get_preloaded_image_data,emscripten_get_preloaded_image_data_from_FILE:_emscripten_get_preloaded_image_data_from_FILE,emscripten_get_screen_size:_emscripten_get_screen_size,emscripten_get_visibility_status:_emscripten_get_visibility_status,emscripten_get_window_title:_emscripten_get_window_title,emscripten_get_worker_queue_size:_emscripten_get_worker_queue_size,emscripten_has_asyncify:_emscripten_has_asyncify,emscripten_hide_mouse:_emscripten_hide_mouse,emscripten_html5_remove_all_event_listeners:_emscripten_html5_remove_all_event_listeners,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_lazy_load_code:_emscripten_lazy_load_code,emscripten_lock_orientation:_emscripten_lock_orientation,emscripten_log:_emscripten_log,emscripten_math_acos:_emscripten_math_acos,emscripten_math_acosh:_emscripten_math_acosh,emscripten_math_asin:_emscripten_math_asin,emscripten_math_asinh:_emscripten_math_asinh,emscripten_math_atan:_emscripten_math_atan,emscripten_math_atan2:_emscripten_math_atan2,emscripten_math_atanh:_emscripten_math_atanh,emscripten_math_cbrt:_emscripten_math_cbrt,emscripten_math_cos:_emscripten_math_cos,emscripten_math_cosh:_emscripten_math_cosh,emscripten_math_exp:_emscripten_math_exp,emscripten_math_expm1:_emscripten_math_expm1,emscripten_math_fmod:_emscripten_math_fmod,emscripten_math_hypot:_emscripten_math_hypot,emscripten_math_log:_emscripten_math_log,emscripten_math_log10:_emscripten_math_log10,emscripten_math_log1p:_emscripten_math_log1p,emscripten_math_log2:_emscripten_math_log2,emscripten_math_pow:_emscripten_math_pow,emscripten_math_random:_emscripten_math_random,emscripten_math_round:_emscripten_math_round,emscripten_math_sign:_emscripten_math_sign,emscripten_math_sin:_emscripten_math_sin,emscripten_math_sinh:_emscripten_math_sinh,emscripten_math_sqrt:_emscripten_math_sqrt,emscripten_math_tan:_emscripten_math_tan,emscripten_math_tanh:_emscripten_math_tanh,emscripten_notify_memory_growth:_emscripten_notify_memory_growth,emscripten_out:_emscripten_out,emscripten_outn:_emscripten_outn,emscripten_pause_main_loop:_emscripten_pause_main_loop,emscripten_pc_get_column:_emscripten_pc_get_column,emscripten_pc_get_file:_emscripten_pc_get_file,emscripten_pc_get_function:_emscripten_pc_get_function,emscripten_pc_get_line:_emscripten_pc_get_line,emscripten_performance_now:_emscripten_performance_now,emscripten_print_double:_emscripten_print_double,emscripten_promise_all:_emscripten_promise_all,emscripten_promise_all_settled:_emscripten_promise_all_settled,emscripten_promise_any:_emscripten_promise_any,emscripten_promise_await:_emscripten_promise_await,emscripten_promise_create:_emscripten_promise_create,emscripten_promise_destroy:_emscripten_promise_destroy,emscripten_promise_race:_emscripten_promise_race,emscripten_promise_resolve:_emscripten_promise_resolve,emscripten_promise_then:_emscripten_promise_then,emscripten_random:_emscripten_random,emscripten_request_animation_frame:_emscripten_request_animation_frame,emscripten_request_animation_frame_loop:_emscripten_request_animation_frame_loop,emscripten_request_fullscreen:_emscripten_request_fullscreen,emscripten_request_fullscreen_strategy:_emscripten_request_fullscreen_strategy,emscripten_request_pointerlock:_emscripten_request_pointerlock,emscripten_resize_heap:_emscripten_resize_heap,emscripten_resume_main_loop:_emscripten_resume_main_loop,emscripten_return_address:_emscripten_return_address,emscripten_run_preload_plugins:_emscripten_run_preload_plugins,emscripten_run_preload_plugins_data:_emscripten_run_preload_plugins_data,emscripten_run_script:_emscripten_run_script,emscripten_run_script_int:_emscripten_run_script_int,emscripten_run_script_string:_emscripten_run_script_string,emscripten_runtime_keepalive_check:_emscripten_runtime_keepalive_check,emscripten_runtime_keepalive_pop:_emscripten_runtime_keepalive_pop,emscripten_runtime_keepalive_push:_emscripten_runtime_keepalive_push,emscripten_sample_gamepad_data:_emscripten_sample_gamepad_data,emscripten_scan_registers:_emscripten_scan_registers,emscripten_set_batterychargingchange_callback_on_thread:_emscripten_set_batterychargingchange_callback_on_thread,emscripten_set_batterylevelchange_callback_on_thread:_emscripten_set_batterylevelchange_callback_on_thread,emscripten_set_beforeunload_callback_on_thread:_emscripten_set_beforeunload_callback_on_thread,emscripten_set_blur_callback_on_thread:_emscripten_set_blur_callback_on_thread,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_canvas_size:_emscripten_set_canvas_size,emscripten_set_click_callback_on_thread:_emscripten_set_click_callback_on_thread,emscripten_set_dblclick_callback_on_thread:_emscripten_set_dblclick_callback_on_thread,emscripten_set_devicemotion_callback_on_thread:_emscripten_set_devicemotion_callback_on_thread,emscripten_set_deviceorientation_callback_on_thread:_emscripten_set_deviceorientation_callback_on_thread,emscripten_set_element_css_size:_emscripten_set_element_css_size,emscripten_set_focus_callback_on_thread:_emscripten_set_focus_callback_on_thread,emscripten_set_focusin_callback_on_thread:_emscripten_set_focusin_callback_on_thread,emscripten_set_focusout_callback_on_thread:_emscripten_set_focusout_callback_on_thread,emscripten_set_fullscreenchange_callback_on_thread:_emscripten_set_fullscreenchange_callback_on_thread,emscripten_set_gamepadconnected_callback_on_thread:_emscripten_set_gamepadconnected_callback_on_thread,emscripten_set_gamepaddisconnected_callback_on_thread:_emscripten_set_gamepaddisconnected_callback_on_thread,emscripten_set_immediate:_emscripten_set_immediate,emscripten_set_immediate_loop:_emscripten_set_immediate_loop,emscripten_set_interval:_emscripten_set_interval,emscripten_set_keydown_callback_on_thread:_emscripten_set_keydown_callback_on_thread,emscripten_set_keypress_callback_on_thread:_emscripten_set_keypress_callback_on_thread,emscripten_set_keyup_callback_on_thread:_emscripten_set_keyup_callback_on_thread,emscripten_set_main_loop:_emscripten_set_main_loop,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_main_loop_expected_blockers:_emscripten_set_main_loop_expected_blockers,emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,emscripten_set_mousedown_callback_on_thread:_emscripten_set_mousedown_callback_on_thread,emscripten_set_mouseenter_callback_on_thread:_emscripten_set_mouseenter_callback_on_thread,emscripten_set_mouseleave_callback_on_thread:_emscripten_set_mouseleave_callback_on_thread,emscripten_set_mousemove_callback_on_thread:_emscripten_set_mousemove_callback_on_thread,emscripten_set_mouseout_callback_on_thread:_emscripten_set_mouseout_callback_on_thread,emscripten_set_mouseover_callback_on_thread:_emscripten_set_mouseover_callback_on_thread,emscripten_set_mouseup_callback_on_thread:_emscripten_set_mouseup_callback_on_thread,emscripten_set_orientationchange_callback_on_thread:_emscripten_set_orientationchange_callback_on_thread,emscripten_set_pointerlockchange_callback_on_thread:_emscripten_set_pointerlockchange_callback_on_thread,emscripten_set_pointerlockerror_callback_on_thread:_emscripten_set_pointerlockerror_callback_on_thread,emscripten_set_resize_callback_on_thread:_emscripten_set_resize_callback_on_thread,emscripten_set_scroll_callback_on_thread:_emscripten_set_scroll_callback_on_thread,emscripten_set_socket_close_callback:_emscripten_set_socket_close_callback,emscripten_set_socket_connection_callback:_emscripten_set_socket_connection_callback,emscripten_set_socket_error_callback:_emscripten_set_socket_error_callback,emscripten_set_socket_listen_callback:_emscripten_set_socket_listen_callback,emscripten_set_socket_message_callback:_emscripten_set_socket_message_callback,emscripten_set_socket_open_callback:_emscripten_set_socket_open_callback,emscripten_set_timeout:_emscripten_set_timeout,emscripten_set_timeout_loop:_emscripten_set_timeout_loop,emscripten_set_touchcancel_callback_on_thread:_emscripten_set_touchcancel_callback_on_thread,emscripten_set_touchend_callback_on_thread:_emscripten_set_touchend_callback_on_thread,emscripten_set_touchmove_callback_on_thread:_emscripten_set_touchmove_callback_on_thread,emscripten_set_touchstart_callback_on_thread:_emscripten_set_touchstart_callback_on_thread,emscripten_set_visibilitychange_callback_on_thread:_emscripten_set_visibilitychange_callback_on_thread,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_sleep:_emscripten_sleep,emscripten_stack_snapshot:_emscripten_stack_snapshot,emscripten_stack_unwind_buffer:_emscripten_stack_unwind_buffer,emscripten_throw_number:_emscripten_throw_number,emscripten_throw_string:_emscripten_throw_string,emscripten_unlock_orientation:_emscripten_unlock_orientation,emscripten_unwind_to_js_event_loop:_emscripten_unwind_to_js_event_loop,emscripten_vibrate:_emscripten_vibrate,emscripten_vibrate_pattern:_emscripten_vibrate_pattern,emscripten_wget_data:_emscripten_wget_data,endprotoent:_endprotoent,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_pread:_fd_pread,fd_pwrite:_fd_pwrite,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,getaddrinfo:_getaddrinfo,getcontext:_getcontext,getdtablesize:_getdtablesize,getentropy:_getentropy,getnameinfo:_getnameinfo,getprotobyname:_getprotobyname,getprotobynumber:_getprotobynumber,getprotoent:_getprotoent,htmlDefaultSAXHandler:_htmlDefaultSAXHandler,invoke_i,invoke_ii,invoke_iii,invoke_iiii,invoke_iiiii,invoke_iiiiii,invoke_iiiiiii,invoke_iiiiiiii,invoke_iiiiiiiiii,invoke_v,invoke_vi,invoke_vii,invoke_viii,invoke_viiii,invoke_viiiiii,isolat1ToUTF8:_isolat1ToUTF8,llvm_eh_typeid_for:_llvm_eh_typeid_for,makecontext:_makecontext,memory:wasmMemory,oldXMLWDcompatibility:_oldXMLWDcompatibility,posix_spawnp:_posix_spawnp,proc_exit:_proc_exit,random_get:_random_get,setNetworkCallback:_setNetworkCallback,setprotoent:_setprotoent,stackAlloc:_stackAlloc,stackRestore:_stackRestore,stackSave:_stackSave,strptime:_strptime,strptime_l:_strptime_l,swapcontext:_swapcontext,xmlAllocOutputBuffer:_xmlAllocOutputBuffer,xmlAllocParserInputBuffer:_xmlAllocParserInputBuffer,xmlBufferAllocScheme:_xmlBufferAllocScheme,xmlCopyError:_xmlCopyError,xmlDefaultBufferSize:_xmlDefaultBufferSize,xmlDefaultSAXHandler:_xmlDefaultSAXHandler,xmlDefaultSAXLocator:_xmlDefaultSAXLocator,xmlDeregisterNodeDefaultValue:_xmlDeregisterNodeDefaultValue,xmlDictOwns:_xmlDictOwns,xmlDoValidityCheckingDefaultValue:_xmlDoValidityCheckingDefaultValue,xmlFileClose:_xmlFileClose,xmlFileMatch:_xmlFileMatch,xmlFileOpen:_xmlFileOpen,xmlFileRead:_xmlFileRead,xmlFree:_xmlFree,xmlFreeDoc:_xmlFreeDoc,xmlFreeNode:_xmlFreeNode,xmlFreeNodeList:_xmlFreeNodeList,xmlFreeNs:_xmlFreeNs,xmlFreeParserInputBuffer:_xmlFreeParserInputBuffer,xmlFreeProp:_xmlFreeProp,xmlFreeURI:_xmlFreeURI,xmlGenericError:_xmlGenericError,xmlGenericErrorContext:_xmlGenericErrorContext,xmlGenericErrorDefaultFunc:_xmlGenericErrorDefaultFunc,xmlGetExternalEntityLoader:_xmlGetExternalEntityLoader,xmlGetLastError:_xmlGetLastError,xmlGetWarningsDefaultValue:_xmlGetWarningsDefaultValue,xmlHashDefaultDeallocator:_xmlHashDefaultDeallocator,xmlHashLookup:_xmlHashLookup,xmlHashRemoveEntry:_xmlHashRemoveEntry,xmlHashScan:_xmlHashScan,xmlIndentTreeOutput:_xmlIndentTreeOutput,xmlInitParser:_xmlInitParser,xmlInputReadCallbackNop:_xmlInputReadCallbackNop,xmlIsBaseCharGroup:_xmlIsBaseCharGroup,xmlIsCombiningGroup:_xmlIsCombiningGroup,xmlIsDigitGroup:_xmlIsDigitGroup,xmlIsExtenderGroup:_xmlIsExtenderGroup,xmlIsPubidChar_tab:_xmlIsPubidChar_tab,xmlKeepBlanksDefaultValue:_xmlKeepBlanksDefaultValue,xmlLastError:_xmlLastError,xmlLineNumbersDefaultValue:_xmlLineNumbersDefaultValue,xmlLoadExtDtdDefaultValue:_xmlLoadExtDtdDefaultValue,xmlMalloc:_xmlMalloc,xmlMallocAtomic:_xmlMallocAtomic,xmlMemStrdup:_xmlMemStrdup,xmlNewIOInputStream:_xmlNewIOInputStream,xmlNewInputFromFile:_xmlNewInputFromFile,xmlOutputBufferCreateFilenameDefault:_xmlOutputBufferCreateFilenameDefault,xmlOutputBufferCreateFilenameValue:_xmlOutputBufferCreateFilenameValue,xmlParseCharEncoding:_xmlParseCharEncoding,xmlParseURI:_xmlParseURI,xmlParserDebugEntities:_xmlParserDebugEntities,xmlParserError:_xmlParserError,xmlParserInputBufferCreateFilenameDefault:_xmlParserInputBufferCreateFilenameDefault,xmlParserInputBufferCreateFilenameValue:_xmlParserInputBufferCreateFilenameValue,xmlParserMaxDepth:_xmlParserMaxDepth,xmlParserValidityError:_xmlParserValidityError,xmlParserValidityWarning:_xmlParserValidityWarning,xmlParserVersion:_xmlParserVersion,xmlParserWarning:_xmlParserWarning,xmlPedanticParserDefaultValue:_xmlPedanticParserDefaultValue,xmlRealloc:_xmlRealloc,xmlReconciliateNs:_xmlReconciliateNs,xmlRegisterNodeDefaultValue:_xmlRegisterNodeDefaultValue,xmlRelaxNGCleanupTypes:_xmlRelaxNGCleanupTypes,xmlRemoveID:_xmlRemoveID,xmlResetError:_xmlResetError,xmlResetLastError:_xmlResetLastError,xmlSAX2AttributeDecl:_xmlSAX2AttributeDecl,xmlSAX2CDataBlock:_xmlSAX2CDataBlock,xmlSAX2Characters:_xmlSAX2Characters,xmlSAX2Comment:_xmlSAX2Comment,xmlSAX2ElementDecl:_xmlSAX2ElementDecl,xmlSAX2EndDocument:_xmlSAX2EndDocument,xmlSAX2EndElement:_xmlSAX2EndElement,xmlSAX2EndElementNs:_xmlSAX2EndElementNs,xmlSAX2EntityDecl:_xmlSAX2EntityDecl,xmlSAX2ExternalSubset:_xmlSAX2ExternalSubset,xmlSAX2GetColumnNumber:_xmlSAX2GetColumnNumber,xmlSAX2GetEntity:_xmlSAX2GetEntity,xmlSAX2GetLineNumber:_xmlSAX2GetLineNumber,xmlSAX2GetParameterEntity:_xmlSAX2GetParameterEntity,xmlSAX2GetPublicId:_xmlSAX2GetPublicId,xmlSAX2GetSystemId:_xmlSAX2GetSystemId,xmlSAX2HasExternalSubset:_xmlSAX2HasExternalSubset,xmlSAX2HasInternalSubset:_xmlSAX2HasInternalSubset,xmlSAX2IgnorableWhitespace:_xmlSAX2IgnorableWhitespace,xmlSAX2InternalSubset:_xmlSAX2InternalSubset,xmlSAX2IsStandalone:_xmlSAX2IsStandalone,xmlSAX2NotationDecl:_xmlSAX2NotationDecl,xmlSAX2ProcessingInstruction:_xmlSAX2ProcessingInstruction,xmlSAX2Reference:_xmlSAX2Reference,xmlSAX2ResolveEntity:_xmlSAX2ResolveEntity,xmlSAX2SetDocumentLocator:_xmlSAX2SetDocumentLocator,xmlSAX2StartDocument:_xmlSAX2StartDocument,xmlSAX2StartElement:_xmlSAX2StartElement,xmlSAX2StartElementNs:_xmlSAX2StartElementNs,xmlSAX2UnparsedEntityDecl:_xmlSAX2UnparsedEntityDecl,xmlSaveNoEmptyTags:_xmlSaveNoEmptyTags,xmlSetExternalEntityLoader:_xmlSetExternalEntityLoader,xmlSetGenericErrorFunc:_xmlSetGenericErrorFunc,xmlSetStructuredErrorFunc:_xmlSetStructuredErrorFunc,xmlStrdup:_xmlStrdup,xmlStringComment:_xmlStringComment,xmlStringText:_xmlStringText,xmlStringTextNoenc:_xmlStringTextNoenc,xmlStrncmp:_xmlStrncmp,xmlStructuredError:_xmlStructuredError,xmlStructuredErrorContext:_xmlStructuredErrorContext,xmlSubstituteEntitiesDefaultValue:_xmlSubstituteEntitiesDefaultValue,xmlTreeIndentString:_xmlTreeIndentString,xmlUCSIsAegeanNumbers:_xmlUCSIsAegeanNumbers,xmlUCSIsAlphabeticPresentationForms:_xmlUCSIsAlphabeticPresentationForms,xmlUCSIsArabic:_xmlUCSIsArabic,xmlUCSIsArabicPresentationFormsA:_xmlUCSIsArabicPresentationFormsA,xmlUCSIsArabicPresentationFormsB:_xmlUCSIsArabicPresentationFormsB,xmlUCSIsArmenian:_xmlUCSIsArmenian,xmlUCSIsArrows:_xmlUCSIsArrows,xmlUCSIsBasicLatin:_xmlUCSIsBasicLatin,xmlUCSIsBengali:_xmlUCSIsBengali,xmlUCSIsBlockElements:_xmlUCSIsBlockElements,xmlUCSIsBopomofo:_xmlUCSIsBopomofo,xmlUCSIsBopomofoExtended:_xmlUCSIsBopomofoExtended,xmlUCSIsBoxDrawing:_xmlUCSIsBoxDrawing,xmlUCSIsBraillePatterns:_xmlUCSIsBraillePatterns,xmlUCSIsBuhid:_xmlUCSIsBuhid,xmlUCSIsByzantineMusicalSymbols:_xmlUCSIsByzantineMusicalSymbols,xmlUCSIsCJKCompatibility:_xmlUCSIsCJKCompatibility,xmlUCSIsCJKCompatibilityForms:_xmlUCSIsCJKCompatibilityForms,xmlUCSIsCJKCompatibilityIdeographs:_xmlUCSIsCJKCompatibilityIdeographs,xmlUCSIsCJKCompatibilityIdeographsSupplement:_xmlUCSIsCJKCompatibilityIdeographsSupplement,xmlUCSIsCJKRadicalsSupplement:_xmlUCSIsCJKRadicalsSupplement,xmlUCSIsCJKSymbolsandPunctuation:_xmlUCSIsCJKSymbolsandPunctuation,xmlUCSIsCJKUnifiedIdeographs:_xmlUCSIsCJKUnifiedIdeographs,xmlUCSIsCJKUnifiedIdeographsExtensionA:_xmlUCSIsCJKUnifiedIdeographsExtensionA,xmlUCSIsCJKUnifiedIdeographsExtensionB:_xmlUCSIsCJKUnifiedIdeographsExtensionB,xmlUCSIsCatC:_xmlUCSIsCatC,xmlUCSIsCatCc:_xmlUCSIsCatCc,xmlUCSIsCatCf:_xmlUCSIsCatCf,xmlUCSIsCatCo:_xmlUCSIsCatCo,xmlUCSIsCatCs:_xmlUCSIsCatCs,xmlUCSIsCatL:_xmlUCSIsCatL,xmlUCSIsCatLl:_xmlUCSIsCatLl,xmlUCSIsCatLm:_xmlUCSIsCatLm,xmlUCSIsCatLo:_xmlUCSIsCatLo,xmlUCSIsCatLt:_xmlUCSIsCatLt,xmlUCSIsCatLu:_xmlUCSIsCatLu,xmlUCSIsCatM:_xmlUCSIsCatM,xmlUCSIsCatMc:_xmlUCSIsCatMc,xmlUCSIsCatMe:_xmlUCSIsCatMe,xmlUCSIsCatMn:_xmlUCSIsCatMn,xmlUCSIsCatN:_xmlUCSIsCatN,xmlUCSIsCatNd:_xmlUCSIsCatNd,xmlUCSIsCatNl:_xmlUCSIsCatNl,xmlUCSIsCatNo:_xmlUCSIsCatNo,xmlUCSIsCatP:_xmlUCSIsCatP,xmlUCSIsCatPc:_xmlUCSIsCatPc,xmlUCSIsCatPd:_xmlUCSIsCatPd,xmlUCSIsCatPe:_xmlUCSIsCatPe,xmlUCSIsCatPf:_xmlUCSIsCatPf,xmlUCSIsCatPi:_xmlUCSIsCatPi,xmlUCSIsCatPo:_xmlUCSIsCatPo,xmlUCSIsCatPs:_xmlUCSIsCatPs,xmlUCSIsCatS:_xmlUCSIsCatS,xmlUCSIsCatSc:_xmlUCSIsCatSc,xmlUCSIsCatSk:_xmlUCSIsCatSk,xmlUCSIsCatSm:_xmlUCSIsCatSm,xmlUCSIsCatSo:_xmlUCSIsCatSo,xmlUCSIsCatZ:_xmlUCSIsCatZ,xmlUCSIsCatZl:_xmlUCSIsCatZl,xmlUCSIsCatZp:_xmlUCSIsCatZp,xmlUCSIsCatZs:_xmlUCSIsCatZs,xmlUCSIsCherokee:_xmlUCSIsCherokee,xmlUCSIsCombiningDiacriticalMarks:_xmlUCSIsCombiningDiacriticalMarks,xmlUCSIsCombiningDiacriticalMarksforSymbols:_xmlUCSIsCombiningDiacriticalMarksforSymbols,xmlUCSIsCombiningHalfMarks:_xmlUCSIsCombiningHalfMarks,xmlUCSIsCombiningMarksforSymbols:_xmlUCSIsCombiningMarksforSymbols,xmlUCSIsControlPictures:_xmlUCSIsControlPictures,xmlUCSIsCurrencySymbols:_xmlUCSIsCurrencySymbols,xmlUCSIsCypriotSyllabary:_xmlUCSIsCypriotSyllabary,xmlUCSIsCyrillic:_xmlUCSIsCyrillic,xmlUCSIsCyrillicSupplement:_xmlUCSIsCyrillicSupplement,xmlUCSIsDeseret:_xmlUCSIsDeseret,xmlUCSIsDevanagari:_xmlUCSIsDevanagari,xmlUCSIsDingbats:_xmlUCSIsDingbats,xmlUCSIsEnclosedAlphanumerics:_xmlUCSIsEnclosedAlphanumerics,xmlUCSIsEnclosedCJKLettersandMonths:_xmlUCSIsEnclosedCJKLettersandMonths,xmlUCSIsEthiopic:_xmlUCSIsEthiopic,xmlUCSIsGeneralPunctuation:_xmlUCSIsGeneralPunctuation,xmlUCSIsGeometricShapes:_xmlUCSIsGeometricShapes,xmlUCSIsGeorgian:_xmlUCSIsGeorgian,xmlUCSIsGothic:_xmlUCSIsGothic,xmlUCSIsGreek:_xmlUCSIsGreek,xmlUCSIsGreekExtended:_xmlUCSIsGreekExtended,xmlUCSIsGreekandCoptic:_xmlUCSIsGreekandCoptic,xmlUCSIsGujarati:_xmlUCSIsGujarati,xmlUCSIsGurmukhi:_xmlUCSIsGurmukhi,xmlUCSIsHalfwidthandFullwidthForms:_xmlUCSIsHalfwidthandFullwidthForms,xmlUCSIsHangulCompatibilityJamo:_xmlUCSIsHangulCompatibilityJamo,xmlUCSIsHangulJamo:_xmlUCSIsHangulJamo,xmlUCSIsHangulSyllables:_xmlUCSIsHangulSyllables,xmlUCSIsHanunoo:_xmlUCSIsHanunoo,xmlUCSIsHebrew:_xmlUCSIsHebrew,xmlUCSIsHighPrivateUseSurrogates:_xmlUCSIsHighPrivateUseSurrogates,xmlUCSIsHighSurrogates:_xmlUCSIsHighSurrogates,xmlUCSIsHiragana:_xmlUCSIsHiragana,xmlUCSIsIPAExtensions:_xmlUCSIsIPAExtensions,xmlUCSIsIdeographicDescriptionCharacters:_xmlUCSIsIdeographicDescriptionCharacters,xmlUCSIsKanbun:_xmlUCSIsKanbun,xmlUCSIsKangxiRadicals:_xmlUCSIsKangxiRadicals,xmlUCSIsKannada:_xmlUCSIsKannada,xmlUCSIsKatakana:_xmlUCSIsKatakana,xmlUCSIsKatakanaPhoneticExtensions:_xmlUCSIsKatakanaPhoneticExtensions,xmlUCSIsKhmer:_xmlUCSIsKhmer,xmlUCSIsKhmerSymbols:_xmlUCSIsKhmerSymbols,xmlUCSIsLao:_xmlUCSIsLao,xmlUCSIsLatin1Supplement:_xmlUCSIsLatin1Supplement,xmlUCSIsLatinExtendedA:_xmlUCSIsLatinExtendedA,xmlUCSIsLatinExtendedAdditional:_xmlUCSIsLatinExtendedAdditional,xmlUCSIsLatinExtendedB:_xmlUCSIsLatinExtendedB,xmlUCSIsLetterlikeSymbols:_xmlUCSIsLetterlikeSymbols,xmlUCSIsLimbu:_xmlUCSIsLimbu,xmlUCSIsLinearBIdeograms:_xmlUCSIsLinearBIdeograms,xmlUCSIsLinearBSyllabary:_xmlUCSIsLinearBSyllabary,xmlUCSIsLowSurrogates:_xmlUCSIsLowSurrogates,xmlUCSIsMalayalam:_xmlUCSIsMalayalam,xmlUCSIsMathematicalAlphanumericSymbols:_xmlUCSIsMathematicalAlphanumericSymbols,xmlUCSIsMathematicalOperators:_xmlUCSIsMathematicalOperators,xmlUCSIsMiscellaneousMathematicalSymbolsA:_xmlUCSIsMiscellaneousMathematicalSymbolsA,xmlUCSIsMiscellaneousMathematicalSymbolsB:_xmlUCSIsMiscellaneousMathematicalSymbolsB,xmlUCSIsMiscellaneousSymbols:_xmlUCSIsMiscellaneousSymbols,xmlUCSIsMiscellaneousSymbolsandArrows:_xmlUCSIsMiscellaneousSymbolsandArrows,xmlUCSIsMiscellaneousTechnical:_xmlUCSIsMiscellaneousTechnical,xmlUCSIsMongolian:_xmlUCSIsMongolian,xmlUCSIsMusicalSymbols:_xmlUCSIsMusicalSymbols,xmlUCSIsMyanmar:_xmlUCSIsMyanmar,xmlUCSIsNumberForms:_xmlUCSIsNumberForms,xmlUCSIsOgham:_xmlUCSIsOgham,xmlUCSIsOldItalic:_xmlUCSIsOldItalic,xmlUCSIsOpticalCharacterRecognition:_xmlUCSIsOpticalCharacterRecognition,xmlUCSIsOriya:_xmlUCSIsOriya,xmlUCSIsOsmanya:_xmlUCSIsOsmanya,xmlUCSIsPhoneticExtensions:_xmlUCSIsPhoneticExtensions,xmlUCSIsPrivateUse:_xmlUCSIsPrivateUse,xmlUCSIsPrivateUseArea:_xmlUCSIsPrivateUseArea,xmlUCSIsRunic:_xmlUCSIsRunic,xmlUCSIsShavian:_xmlUCSIsShavian,xmlUCSIsSinhala:_xmlUCSIsSinhala,xmlUCSIsSmallFormVariants:_xmlUCSIsSmallFormVariants,xmlUCSIsSpacingModifierLetters:_xmlUCSIsSpacingModifierLetters,xmlUCSIsSpecials:_xmlUCSIsSpecials,xmlUCSIsSuperscriptsandSubscripts:_xmlUCSIsSuperscriptsandSubscripts,xmlUCSIsSupplementalArrowsA:_xmlUCSIsSupplementalArrowsA,xmlUCSIsSupplementalArrowsB:_xmlUCSIsSupplementalArrowsB,xmlUCSIsSupplementalMathematicalOperators:_xmlUCSIsSupplementalMathematicalOperators,xmlUCSIsSupplementaryPrivateUseAreaA:_xmlUCSIsSupplementaryPrivateUseAreaA,xmlUCSIsSupplementaryPrivateUseAreaB:_xmlUCSIsSupplementaryPrivateUseAreaB,xmlUCSIsSyriac:_xmlUCSIsSyriac,xmlUCSIsTagalog:_xmlUCSIsTagalog,xmlUCSIsTagbanwa:_xmlUCSIsTagbanwa,xmlUCSIsTags:_xmlUCSIsTags,xmlUCSIsTaiLe:_xmlUCSIsTaiLe,xmlUCSIsTaiXuanJingSymbols:_xmlUCSIsTaiXuanJingSymbols,xmlUCSIsTamil:_xmlUCSIsTamil,xmlUCSIsTelugu:_xmlUCSIsTelugu,xmlUCSIsThaana:_xmlUCSIsThaana,xmlUCSIsThai:_xmlUCSIsThai,xmlUCSIsTibetan:_xmlUCSIsTibetan,xmlUCSIsUgaritic:_xmlUCSIsUgaritic,xmlUCSIsUnifiedCanadianAboriginalSyllabics:_xmlUCSIsUnifiedCanadianAboriginalSyllabics,xmlUCSIsVariationSelectors:_xmlUCSIsVariationSelectors,xmlUCSIsVariationSelectorsSupplement:_xmlUCSIsVariationSelectorsSupplement,xmlUCSIsYiRadicals:_xmlUCSIsYiRadicals,xmlUCSIsYiSyllables:_xmlUCSIsYiSyllables,xmlUCSIsYijingHexagramSymbols:_xmlUCSIsYijingHexagramSymbols,xmlURIUnescapeString:_xmlURIUnescapeString,xmlUnlinkNode:_xmlUnlinkNode,xmlXPathBooleanFunction:_xmlXPathBooleanFunction,xmlXPathCeilingFunction:_xmlXPathCeilingFunction,xmlXPathConcatFunction:_xmlXPathConcatFunction,xmlXPathContainsFunction:_xmlXPathContainsFunction,xmlXPathCountFunction:_xmlXPathCountFunction,xmlXPathFalseFunction:_xmlXPathFalseFunction,xmlXPathFloorFunction:_xmlXPathFloorFunction,xmlXPathIdFunction:_xmlXPathIdFunction,xmlXPathLangFunction:_xmlXPathLangFunction,xmlXPathLastFunction:_xmlXPathLastFunction,xmlXPathLocalNameFunction:_xmlXPathLocalNameFunction,xmlXPathNAN:_xmlXPathNAN,xmlXPathNINF:_xmlXPathNINF,xmlXPathNamespaceURIFunction:_xmlXPathNamespaceURIFunction,xmlXPathNextAncestor:_xmlXPathNextAncestor,xmlXPathNextAncestorOrSelf:_xmlXPathNextAncestorOrSelf,xmlXPathNextAttribute:_xmlXPathNextAttribute,xmlXPathNextChild:_xmlXPathNextChild,xmlXPathNextDescendant:_xmlXPathNextDescendant,xmlXPathNextDescendantOrSelf:_xmlXPathNextDescendantOrSelf,xmlXPathNextFollowing:_xmlXPathNextFollowing,xmlXPathNextFollowingSibling:_xmlXPathNextFollowingSibling,xmlXPathNextNamespace:_xmlXPathNextNamespace,xmlXPathNextParent:_xmlXPathNextParent,xmlXPathNextPrecedingSibling:_xmlXPathNextPrecedingSibling,xmlXPathNextSelf:_xmlXPathNextSelf,xmlXPathNormalizeFunction:_xmlXPathNormalizeFunction,xmlXPathNotFunction:_xmlXPathNotFunction,xmlXPathNumberFunction:_xmlXPathNumberFunction,xmlXPathPINF:_xmlXPathPINF,xmlXPathPositionFunction:_xmlXPathPositionFunction,xmlXPathRoundFunction:_xmlXPathRoundFunction,xmlXPathStartsWithFunction:_xmlXPathStartsWithFunction,xmlXPathStringFunction:_xmlXPathStringFunction,xmlXPathStringLengthFunction:_xmlXPathStringLengthFunction,xmlXPathSubstringAfterFunction:_xmlXPathSubstringAfterFunction,xmlXPathSubstringBeforeFunction:_xmlXPathSubstringBeforeFunction,xmlXPathSubstringFunction:_xmlXPathSubstringFunction,xmlXPathSumFunction:_xmlXPathSumFunction,xmlXPathTranslateFunction:_xmlXPathTranslateFunction,xmlXPathTrueFunction:_xmlXPathTrueFunction};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["__wasm_call_ctors"])();var ___wasm_apply_data_relocs=()=>(___wasm_apply_data_relocs=wasmExports["__wasm_apply_data_relocs"])();var _time=a0=>(_time=wasmExports["time"])(a0);var _strlen=a0=>(_strlen=wasmExports["strlen"])(a0);var _memcmp=(a0,a1,a2)=>(_memcmp=wasmExports["memcmp"])(a0,a1,a2);var _strcmp=(a0,a1)=>(_strcmp=wasmExports["strcmp"])(a0,a1);var _free=a0=>(_free=wasmExports["free"])(a0);var _strchr=(a0,a1)=>(_strchr=wasmExports["strchr"])(a0,a1);var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var _snprintf=(a0,a1,a2,a3)=>(_snprintf=wasmExports["snprintf"])(a0,a1,a2,a3);var _toupper=a0=>(_toupper=wasmExports["toupper"])(a0);var _malloc=a0=>(_malloc=wasmExports["malloc"])(a0);var _memchr=(a0,a1,a2)=>(_memchr=wasmExports["memchr"])(a0,a1,a2);var _strcpy=(a0,a1)=>(_strcpy=wasmExports["strcpy"])(a0,a1);var _stat=(a0,a1)=>(_stat=wasmExports["stat"])(a0,a1);var _strncmp=(a0,a1,a2)=>(_strncmp=wasmExports["strncmp"])(a0,a1,a2);var _strncpy=(a0,a1,a2)=>(_strncpy=wasmExports["strncpy"])(a0,a1,a2);var _main=Module["_main"]=(a0,a1)=>(_main=Module["_main"]=wasmExports["main"])(a0,a1);var _pib_init=Module["_pib_init"]=()=>(_pib_init=Module["_pib_init"]=wasmExports["pib_init"])();var _pib_storage_init=Module["_pib_storage_init"]=()=>(_pib_storage_init=Module["_pib_storage_init"]=wasmExports["pib_storage_init"])();var _pib_refresh=Module["_pib_refresh"]=()=>(_pib_refresh=Module["_pib_refresh"]=wasmExports["pib_refresh"])();var _pib_flush=Module["_pib_flush"]=()=>(_pib_flush=Module["_pib_flush"]=wasmExports["pib_flush"])();var _pib_exec=Module["_pib_exec"]=a0=>(_pib_exec=Module["_pib_exec"]=wasmExports["pib_exec"])(a0);var _pib_run=Module["_pib_run"]=a0=>(_pib_run=Module["_pib_run"]=wasmExports["pib_run"])(a0);var _pib_php_version=Module["_pib_php_version"]=()=>(_pib_php_version=Module["_pib_php_version"]=wasmExports["pib_php_version"])();var _pib_php_ext_api_version=Module["_pib_php_ext_api_version"]=()=>(_pib_php_ext_api_version=Module["_pib_php_ext_api_version"]=wasmExports["pib_php_ext_api_version"])();var _pib_tokenize=Module["_pib_tokenize"]=a0=>(_pib_tokenize=Module["_pib_tokenize"]=wasmExports["pib_tokenize"])(a0);var _close=a0=>(_close=wasmExports["close"])(a0);var _open=(a0,a1,a2)=>(_open=wasmExports["open"])(a0,a1,a2);var _strerror=a0=>(_strerror=wasmExports["strerror"])(a0);var _read=(a0,a1,a2)=>(_read=wasmExports["read"])(a0,a1,a2);var _write=(a0,a1,a2)=>(_write=wasmExports["write"])(a0,a1,a2);var _realloc=(a0,a1)=>(_realloc=wasmExports["realloc"])(a0,a1);var _strcat=(a0,a1)=>(_strcat=wasmExports["strcat"])(a0,a1);var _htonl=a0=>(_htonl=wasmExports["htonl"])(a0);var _getenv=a0=>(_getenv=wasmExports["getenv"])(a0);var _ntohs=a0=>(_ntohs=wasmExports["ntohs"])(a0);var _htons=a0=>(_htons=wasmExports["htons"])(a0);var _fopen=(a0,a1)=>(_fopen=wasmExports["fopen"])(a0,a1);var _getcwd=(a0,a1)=>(_getcwd=wasmExports["getcwd"])(a0,a1);var _dlopen=(a0,a1)=>(_dlopen=wasmExports["dlopen"])(a0,a1);var _dlerror=()=>(_dlerror=wasmExports["dlerror"])();var _dlsym=(a0,a1)=>(_dlsym=wasmExports["dlsym"])(a0,a1);var _dlclose=a0=>(_dlclose=wasmExports["dlclose"])(a0);var _fclose=a0=>(_fclose=wasmExports["fclose"])(a0);var _sscanf=(a0,a1,a2)=>(_sscanf=wasmExports["sscanf"])(a0,a1,a2);var _fileno=a0=>(_fileno=wasmExports["fileno"])(a0);var _fprintf=(a0,a1,a2)=>(_fprintf=wasmExports["fprintf"])(a0,a1,a2);var _vrzno_expose_inc_refcount=Module["_vrzno_expose_inc_refcount"]=a0=>(_vrzno_expose_inc_refcount=Module["_vrzno_expose_inc_refcount"]=wasmExports["vrzno_expose_inc_refcount"])(a0);var _vrzno_expose_dec_refcount=Module["_vrzno_expose_dec_refcount"]=a0=>(_vrzno_expose_dec_refcount=Module["_vrzno_expose_dec_refcount"]=wasmExports["vrzno_expose_dec_refcount"])(a0);var _vrzno_expose_zrefcount=Module["_vrzno_expose_zrefcount"]=a0=>(_vrzno_expose_zrefcount=Module["_vrzno_expose_zrefcount"]=wasmExports["vrzno_expose_zrefcount"])(a0);var _vrzno_expose_inc_crefcount=Module["_vrzno_expose_inc_crefcount"]=a0=>(_vrzno_expose_inc_crefcount=Module["_vrzno_expose_inc_crefcount"]=wasmExports["vrzno_expose_inc_crefcount"])(a0);var _vrzno_expose_dec_crefcount=Module["_vrzno_expose_dec_crefcount"]=a0=>(_vrzno_expose_dec_crefcount=Module["_vrzno_expose_dec_crefcount"]=wasmExports["vrzno_expose_dec_crefcount"])(a0);var _vrzno_expose_efree=Module["_vrzno_expose_efree"]=a0=>(_vrzno_expose_efree=Module["_vrzno_expose_efree"]=wasmExports["vrzno_expose_efree"])(a0);var _vrzno_expose_create_bool=Module["_vrzno_expose_create_bool"]=(a0,a1)=>(_vrzno_expose_create_bool=Module["_vrzno_expose_create_bool"]=wasmExports["vrzno_expose_create_bool"])(a0,a1);var _vrzno_expose_create_null=Module["_vrzno_expose_create_null"]=a0=>(_vrzno_expose_create_null=Module["_vrzno_expose_create_null"]=wasmExports["vrzno_expose_create_null"])(a0);var _vrzno_expose_create_undef=Module["_vrzno_expose_create_undef"]=a0=>(_vrzno_expose_create_undef=Module["_vrzno_expose_create_undef"]=wasmExports["vrzno_expose_create_undef"])(a0);var _vrzno_expose_create_long=Module["_vrzno_expose_create_long"]=(a0,a1)=>(_vrzno_expose_create_long=Module["_vrzno_expose_create_long"]=wasmExports["vrzno_expose_create_long"])(a0,a1);var _vrzno_expose_create_double=Module["_vrzno_expose_create_double"]=(a0,a1)=>(_vrzno_expose_create_double=Module["_vrzno_expose_create_double"]=wasmExports["vrzno_expose_create_double"])(a0,a1);var _vrzno_expose_create_string=Module["_vrzno_expose_create_string"]=(a0,a1)=>(_vrzno_expose_create_string=Module["_vrzno_expose_create_string"]=wasmExports["vrzno_expose_create_string"])(a0,a1);var _vrzno_expose_create_object_for_target=Module["_vrzno_expose_create_object_for_target"]=(a0,a1,a2,a3)=>(_vrzno_expose_create_object_for_target=Module["_vrzno_expose_create_object_for_target"]=wasmExports["vrzno_expose_create_object_for_target"])(a0,a1,a2,a3);var _vrzno_expose_create_params=Module["_vrzno_expose_create_params"]=a0=>(_vrzno_expose_create_params=Module["_vrzno_expose_create_params"]=wasmExports["vrzno_expose_create_params"])(a0);var _vrzno_expose_object_keys=Module["_vrzno_expose_object_keys"]=a0=>(_vrzno_expose_object_keys=Module["_vrzno_expose_object_keys"]=wasmExports["vrzno_expose_object_keys"])(a0);var _vrzno_expose_array_keys=Module["_vrzno_expose_array_keys"]=a0=>(_vrzno_expose_array_keys=Module["_vrzno_expose_array_keys"]=wasmExports["vrzno_expose_array_keys"])(a0);var _vrzno_expose_zval_deref=Module["_vrzno_expose_zval_deref"]=a0=>(_vrzno_expose_zval_deref=Module["_vrzno_expose_zval_deref"]=wasmExports["vrzno_expose_zval_deref"])(a0);var _vrzno_expose_zval_dump=Module["_vrzno_expose_zval_dump"]=(a0,a1)=>(_vrzno_expose_zval_dump=Module["_vrzno_expose_zval_dump"]=wasmExports["vrzno_expose_zval_dump"])(a0,a1);var _vrzno_expose_type=Module["_vrzno_expose_type"]=a0=>(_vrzno_expose_type=Module["_vrzno_expose_type"]=wasmExports["vrzno_expose_type"])(a0);var _vrzno_expose_array_length=Module["_vrzno_expose_array_length"]=a0=>(_vrzno_expose_array_length=Module["_vrzno_expose_array_length"]=wasmExports["vrzno_expose_array_length"])(a0);var _vrzno_expose_target=Module["_vrzno_expose_target"]=a0=>(_vrzno_expose_target=Module["_vrzno_expose_target"]=wasmExports["vrzno_expose_target"])(a0);var _vrzno_expose_callable=Module["_vrzno_expose_callable"]=a0=>(_vrzno_expose_callable=Module["_vrzno_expose_callable"]=wasmExports["vrzno_expose_callable"])(a0);var _vrzno_expose_long=Module["_vrzno_expose_long"]=a0=>(_vrzno_expose_long=Module["_vrzno_expose_long"]=wasmExports["vrzno_expose_long"])(a0);var _vrzno_expose_double=Module["_vrzno_expose_double"]=a0=>(_vrzno_expose_double=Module["_vrzno_expose_double"]=wasmExports["vrzno_expose_double"])(a0);var _vrzno_expose_string=Module["_vrzno_expose_string"]=a0=>(_vrzno_expose_string=Module["_vrzno_expose_string"]=wasmExports["vrzno_expose_string"])(a0);var _vrzno_expose_key_pointer=Module["_vrzno_expose_key_pointer"]=(a0,a1)=>(_vrzno_expose_key_pointer=Module["_vrzno_expose_key_pointer"]=wasmExports["vrzno_expose_key_pointer"])(a0,a1);var _vrzno_expose_property_pointer=Module["_vrzno_expose_property_pointer"]=(a0,a1)=>(_vrzno_expose_property_pointer=Module["_vrzno_expose_property_pointer"]=wasmExports["vrzno_expose_property_pointer"])(a0,a1);var _vrzno_expose_dimension_pointer=Module["_vrzno_expose_dimension_pointer"]=(a0,a1)=>(_vrzno_expose_dimension_pointer=Module["_vrzno_expose_dimension_pointer"]=wasmExports["vrzno_expose_dimension_pointer"])(a0,a1);var _vrzno_expose_method_pointer=Module["_vrzno_expose_method_pointer"]=(a0,a1)=>(_vrzno_expose_method_pointer=Module["_vrzno_expose_method_pointer"]=wasmExports["vrzno_expose_method_pointer"])(a0,a1);var _vrzno_exec_callback=Module["_vrzno_exec_callback"]=(a0,a1,a2,a3)=>(_vrzno_exec_callback=Module["_vrzno_exec_callback"]=wasmExports["vrzno_exec_callback"])(a0,a1,a2,a3);var _vrzno_del_callback=Module["_vrzno_del_callback"]=a0=>(_vrzno_del_callback=Module["_vrzno_del_callback"]=wasmExports["vrzno_del_callback"])(a0);var _fwrite=(a0,a1,a2,a3)=>(_fwrite=wasmExports["fwrite"])(a0,a1,a2,a3);var _fflush=a0=>(_fflush=wasmExports["fflush"])(a0);var _fread=(a0,a1,a2,a3)=>(_fread=wasmExports["fread"])(a0,a1,a2,a3);var _memset=(a0,a1,a2)=>(_memset=wasmExports["memset"])(a0,a1,a2);var ___funcs_on_exit=()=>(___funcs_on_exit=wasmExports["__funcs_on_exit"])();var _vsnprintf=(a0,a1,a2,a3)=>(_vsnprintf=wasmExports["vsnprintf"])(a0,a1,a2,a3);var ___dl_seterr=(a0,a1)=>(___dl_seterr=wasmExports["__dl_seterr"])(a0,a1);var _calloc=(a0,a1)=>(_calloc=wasmExports["calloc"])(a0,a1);var _memcpy=(a0,a1,a2)=>(_memcpy=wasmExports["memcpy"])(a0,a1,a2);var _memmove=(a0,a1,a2)=>(_memmove=wasmExports["memmove"])(a0,a1,a2);var _ferror=a0=>(_ferror=wasmExports["ferror"])(a0);var _fmod=(a0,a1)=>(_fmod=wasmExports["fmod"])(a0,a1);var _vfprintf=(a0,a1,a2)=>(_vfprintf=wasmExports["vfprintf"])(a0,a1,a2);var _fiprintf=(a0,a1,a2)=>(_fiprintf=wasmExports["fiprintf"])(a0,a1,a2);var ___small_fprintf=(a0,a1,a2)=>(___small_fprintf=wasmExports["__small_fprintf"])(a0,a1,a2);var _fputc=(a0,a1)=>(_fputc=wasmExports["fputc"])(a0,a1);var _fputs=(a0,a1)=>(_fputs=wasmExports["fputs"])(a0,a1);var _iconv_open=(a0,a1)=>(_iconv_open=wasmExports["iconv_open"])(a0,a1);var _iconv=(a0,a1,a2,a3,a4)=>(_iconv=wasmExports["iconv"])(a0,a1,a2,a3,a4);var _iconv_close=a0=>(_iconv_close=wasmExports["iconv_close"])(a0);var _log10=a0=>(_log10=wasmExports["log10"])(a0);var _emscripten_builtin_memalign=(a0,a1)=>(_emscripten_builtin_memalign=wasmExports["emscripten_builtin_memalign"])(a0,a1);var _pow=(a0,a1)=>(_pow=wasmExports["pow"])(a0,a1);var _puts=a0=>(_puts=wasmExports["puts"])(a0);var _rand_r=a0=>(_rand_r=wasmExports["rand_r"])(a0);var __emscripten_timeout=(a0,a1)=>(__emscripten_timeout=wasmExports["_emscripten_timeout"])(a0,a1);var _setThrew=(a0,a1)=>(_setThrew=wasmExports["setThrew"])(a0,a1);var __emscripten_tempret_set=a0=>(__emscripten_tempret_set=wasmExports["_emscripten_tempret_set"])(a0);var __emscripten_tempret_get=()=>(__emscripten_tempret_get=wasmExports["_emscripten_tempret_get"])();var ___get_temp_ret=()=>(___get_temp_ret=wasmExports["__get_temp_ret"])();var ___set_temp_ret=a0=>(___set_temp_ret=wasmExports["__set_temp_ret"])(a0);var _getTempRet0=()=>(_getTempRet0=wasmExports["getTempRet0"])();var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["emscripten_stack_set_limits"])(a0,a1);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["_emscripten_stack_restore"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["_emscripten_stack_alloc"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"])();var ___cxa_demangle=(a0,a1,a2,a3)=>(___cxa_demangle=wasmExports["__cxa_demangle"])(a0,a1,a2,a3);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"])(a0);var ___cxa_decrement_exception_refcount=a0=>(___cxa_decrement_exception_refcount=wasmExports["__cxa_decrement_exception_refcount"])(a0);var ___cxa_can_catch=(a0,a1,a2)=>(___cxa_can_catch=wasmExports["__cxa_can_catch"])(a0,a1,a2);var ___cxa_get_exception_ptr=a0=>(___cxa_get_exception_ptr=wasmExports["__cxa_get_exception_ptr"])(a0);var _asyncify_start_unwind=a0=>(_asyncify_start_unwind=wasmExports["asyncify_start_unwind"])(a0);var _asyncify_stop_unwind=()=>(_asyncify_stop_unwind=wasmExports["asyncify_stop_unwind"])();var _asyncify_start_rewind=a0=>(_asyncify_start_rewind=wasmExports["asyncify_start_rewind"])(a0);var _asyncify_stop_rewind=()=>(_asyncify_stop_rewind=wasmExports["asyncify_stop_rewind"])();var _stdin=Module["_stdin"]=1316048;var _stdout=Module["_stdout"]=1316200;var _stderr=Module["_stderr"]=1315896;function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{Module["dynCall_vi"](index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{Module["dynCall_v"](index)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return Module["dynCall_i"](index)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return Module["dynCall_iii"](index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{Module["dynCall_vii"](index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return Module["dynCall_ii"](index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return Module["dynCall_iiiii"](index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return Module["dynCall_iiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return Module["dynCall_iiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function applySignatureConversions(wasmExports){wasmExports=Object.assign({},wasmExports);var makeWrapper_p=f=>()=>f()>>>0;var makeWrapper_pp=f=>a0=>f(a0)>>>0;var makeWrapper_p_=f=>a0=>f(a0)>>>0;var makeWrapper_pppp=f=>(a0,a1,a2)=>f(a0,a1,a2)>>>0;var makeWrapper_ppp=f=>(a0,a1)=>f(a0,a1)>>>0;var makeWrapper_pP=f=>a0=>f(a0)>>>0;wasmExports["__errno_location"]=makeWrapper_p(wasmExports["__errno_location"]);wasmExports["malloc"]=makeWrapper_pp(wasmExports["malloc"]);wasmExports["strerror"]=makeWrapper_p_(wasmExports["strerror"]);wasmExports["emscripten_builtin_malloc"]=makeWrapper_pp(wasmExports["emscripten_builtin_malloc"]);wasmExports["memcpy"]=makeWrapper_pppp(wasmExports["memcpy"]);wasmExports["calloc"]=makeWrapper_ppp(wasmExports["calloc"]);wasmExports["emscripten_stack_get_base"]=makeWrapper_p(wasmExports["emscripten_stack_get_base"]);wasmExports["emscripten_stack_get_end"]=makeWrapper_p(wasmExports["emscripten_stack_get_end"]);wasmExports["emscripten_builtin_memalign"]=makeWrapper_ppp(wasmExports["emscripten_builtin_memalign"]);wasmExports["emscripten_stack_get_current"]=makeWrapper_p(wasmExports["emscripten_stack_get_current"]);wasmExports["pthread_self"]=makeWrapper_p(wasmExports["pthread_self"]);wasmExports["emscripten_main_runtime_thread_id"]=makeWrapper_p(wasmExports["emscripten_main_runtime_thread_id"]);wasmExports["sbrk"]=makeWrapper_pP(wasmExports["sbrk"]);wasmExports["memalign"]=makeWrapper_ppp(wasmExports["memalign"]);wasmExports["emscripten_builtin_calloc"]=makeWrapper_ppp(wasmExports["emscripten_builtin_calloc"]);wasmExports["_emscripten_stack_alloc"]=makeWrapper_pp(wasmExports["_emscripten_stack_alloc"]);wasmExports["__cxa_get_exception_ptr"]=makeWrapper_pp(wasmExports["__cxa_get_exception_ptr"]);return wasmExports}Module["addRunDependency"]=addRunDependency;Module["removeRunDependency"]=removeRunDependency;Module["ENV"]=ENV;Module["ccall"]=ccall;Module["getValue"]=getValue;Module["UTF8ToString"]=UTF8ToString;Module["lengthBytesUTF8"]=lengthBytesUTF8;Module["FS_createPreloadedFile"]=FS_createPreloadedFile;Module["FS_unlink"]=FS_unlink;Module["FS_createPath"]=FS_createPath;Module["FS_createDevice"]=FS_createDevice;Module["FS"]=FS;Module["FS_createDataFile"]=FS_createDataFile;Module["FS_createLazyFile"]=FS_createLazyFile;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args=[]){var entryFunction=resolveGlobalSymbol("main").sym;if(!entryFunction)return;args.unshift(thisProgram);var argc=args.length;var argv=stackAlloc((argc+1)*4);var argv_ptr=argv;args.forEach(arg=>{HEAPU32[argv_ptr>>>2>>>0]=stringToUTF8OnStack(arg);argv_ptr+=4});HEAPU32[argv_ptr>>>2>>>0]=0;try{var ret=entryFunction(argc,argv);exitJS(ret,true);return ret}catch(e){return handleException(e)}}function run(args=arguments_){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=false;if(Module["noInitialRun"])shouldRunNow=false;run();moduleRtn=readyPromise; - - - return moduleRtn; -} -); -})(); -export default PHP; diff --git a/demo-web/public/static/php-web.mjs.wasm b/demo-web/public/static/php-web.mjs.wasm deleted file mode 100755 index bc2b560a..00000000 Binary files a/demo-web/public/static/php-web.mjs.wasm and /dev/null differ diff --git a/demo-web/public/static/phpinfo.html b/demo-web/public/static/phpinfo.html index ac0a071b..621eb453 100644 --- a/demo-web/public/static/phpinfo.html +++ b/demo-web/public/static/phpinfo.html @@ -1,22 +1,55 @@ - - - + - - + +

php-wasm & pglite in html

+

https://github.com/seanmorris/php-wasm

+

+		
diff --git a/demo-web/public/static/resolveDependencies.mjs b/demo-web/public/static/resolveDependencies.mjs deleted file mode 100644 index 8910d554..00000000 --- a/demo-web/public/static/resolveDependencies.mjs +++ /dev/null @@ -1,80 +0,0 @@ -/** - * An object representing files, libs and urlLibs for a shared library. - * @typedef {object} ResolvedDependencies - * @property {FileDef[]} files - * @property {LibDef[]} libs - * @property {Object} urlLibs mapping of resource names to URLs - */ - -/** - * Resolves dependencies related to dynamically loaded shared libs. - * Normalizes LibDefs & FileDefs, and extracts URLs to specified resources. - * @param {LibDef[]} sharedLibs List of LibDefs to resolve dependencies for. - * @param {object} wrapper PHP Object to resolve depencencies for. - * @returns {ResolvedDependencies} Normalized LibDefs, FileDefs, and their URLs. - */ -export const resolveDependencies = (sharedLibs, wrapper) => { - const _files = []; - const _libs = []; - - (sharedLibs || []).forEach(libDef => { - if(typeof libDef === 'object') - { - if(typeof libDef.getLibs === 'function') - { - _libs.push(...libDef.getLibs(wrapper.constructor)); - } - else - { - _libs.push(libDef); - } - - if(typeof libDef.getFiles === 'function') - { - _files.push(...libDef.getFiles(wrapper.constructor)); - } - } - else - { - _libs.push(libDef); - } - }); - - const files = _files.map(fileDef => { - const url = String(fileDef.url); - const path = fileDef.path; - const name = fileDef.name || path.split('/').pop(); - const parent = path.substr(0, path.length - name.length); - return {parent, name, url}; - }); - - const urlLibs = {}; - - const libs = _libs.map(libDef => { - if(typeof libDef === 'string' || libDef instanceof URL) - { - if(libDef.substr(0, 1) == '/' - || libDef.substr(0, 2) == './' - || libDef.substr(0, 8) == 'https://' - || libDef.substr(0, 7) == 'http://' - ){ - const name = String(libDef).split('/').pop(); - const url = libDef - urlLibs[name] = url; - - return {name, url, ini: true}; - } - - return libDef; - } - else if(typeof libDef === 'object') - { - const name = libDef.name ?? String(libDef.url).split('/').pop(); - urlLibs[ name ] = libDef.url; - - return libDef; - } - }); - - return {files, libs, urlLibs}; -}; diff --git a/demo-web/public/static/webTransactions.mjs b/demo-web/public/static/webTransactions.mjs deleted file mode 100644 index 7f648824..00000000 --- a/demo-web/public/static/webTransactions.mjs +++ /dev/null @@ -1,52 +0,0 @@ -export async function startTransaction(wrapper) -{ - const php = await wrapper.binary; - - if(wrapper.transactionStarted || !php.persist) - { - return; - } - - return await new Promise((accept, reject) => { - return php.FS.syncfs(true, error => { - if(error) - { - reject(error); - } - else - { - wrapper.transactionStarted = true; - accept(); - } - }); - }); -} - -export async function commitTransaction(wrapper) -{ - const php = await wrapper.binary; - - if(!php.persist) - { - return; - } - - if(!wrapper.transactionStarted) - { - throw new Error('No transaction initialized.'); - } - - return await new Promise((accept, reject) => { - return php.FS.syncfs(false, error => { - if(error) - { - reject(error); - } - else - { - wrapper.transactionStarted = false; - accept(); - } - } - )}); -} diff --git a/docs/static/OutputBuffer.mjs b/docs/static/OutputBuffer.mjs deleted file mode 100644 index 15ef5479..00000000 --- a/docs/static/OutputBuffer.mjs +++ /dev/null @@ -1,57 +0,0 @@ -import { _Event } from "./_Event.mjs"; - -export class OutputBuffer -{ - constructor(target, eventType, maxLength) - { - Object.defineProperty(this, 'target', {value: target}); - Object.defineProperty(this, 'buffer', {value: []}); - Object.defineProperty(this, 'eventType', {value: eventType}); - Object.defineProperty(this, 'maxLength', {value: maxLength}); - Object.defineProperty(this, 'decoder', {value: new TextDecoder()}); - Object.defineProperty(this, 'queue', {value: new Set}); - } - - push(...items) - { - this.buffer.push(...items); - - const end = this.buffer.length - 1; - - if(this.maxLength === -1 && this.buffer[end] === 10) - { - this.flush(); - } - - if(this.maxLength >= 0 && this.buffer.length >= this.maxLength) - { - this.flush(); - } - } - - flush() - { - if(!this.buffer.length) - { - return; - } - - const detail = [this.decoder.decode(new Uint8Array(this.buffer))]; - const event = new _Event(this.eventType, {detail}); - - if(this.target['on' + this.eventType]) - { - if(this.target['on' + this.eventType](event) === false) - { - return; - } - } - - if(!this.target.dispatchEvent(event)) - { - return; - } - - this.buffer.splice(0); - } -} diff --git a/docs/static/PhpBase.mjs b/docs/static/PhpBase.mjs deleted file mode 100644 index d4239c31..00000000 --- a/docs/static/PhpBase.mjs +++ /dev/null @@ -1,402 +0,0 @@ -import { phpVersion } from './config.mjs'; -import { phpVersionFull } from './config.mjs'; -import { OutputBuffer } from './OutputBuffer.mjs'; -import { _Event } from './_Event.mjs'; -import { fsOps } from './fsOps.mjs'; -import { resolveDependencies } from './resolveDependencies.mjs'; - -const STR = 'string'; -const NUM = 'number'; - -export class PhpBase extends EventTarget -{ - constructor(PhpBinary, args = {}) - { - super(); - - this.queue = []; - - this.onerror = function () {}; - this.onoutput = function () {}; - this.onready = function () {}; - - Object.defineProperty(this, 'encoder', {value: new TextEncoder()}); - Object.defineProperty(this, 'buffers', {value: { - stdin: [], - stdout: new OutputBuffer(this, 'output', -1), - stderr: new OutputBuffer(this, 'error', -1), - } }); - - Object.freeze(this.buffers); - - this.autoTransaction = ('autoTransaction' in args) ? args.autoTransaction : true; - this.transactionStarted = false; - - this.shared = args.shared = ('shared' in args) ? args.shared : {}; - - this.phpArgs = args; - - const defaults = { - stdin: () => this.buffers.stdin.shift() ?? null, - stdout: byte => this.buffers.stdout.push(byte), - stderr: byte => this.buffers.stderr.push(byte), - - postRun: () => { - const event = new _Event('ready'); - this.onready(event); - this.dispatchEvent(event); - }, - }; - - const fixed = { onRefresh: new Set }; - const phpSettings = globalThis.phpSettings ?? {}; - const userLocateFile = args.locateFile || (() => undefined); - - const files = args.files || []; - - const {files: extraFiles, libs, urlLibs} = resolveDependencies(args.sharedLibs, this); - - args.locateFile = (path, directory) => { - let located = userLocateFile(path, directory); - if(located !== undefined) - { - return located; - } - if(urlLibs[path]) - { - return urlLibs[path]; - } - }; - - this.valueIndex = 0; - - this.binary = new PhpBinary(Object.assign({}, defaults, phpSettings, args, fixed)).then(async php => { - php.ccall( - 'pib_storage_init' - , NUM - , [] - , [] - ); - - if(!php.FS.analyzePath('/preload').exists) - { - php.FS.mkdir('/preload'); - } - - await Promise.all(files.concat(extraFiles).map( - fileDef => new Promise(accept => php.FS.createPreloadedFile( - fileDef.parent, - fileDef.name, - fileDef.url, - true, - false, - accept, - )) - )); - - const iniLines = libs.map(lib => { - if(typeof lib === 'string' || lib instanceof URL) - { - return `extension=${lib}`; - } - else if(typeof lib === 'object' && lib.ini) - { - return `extension=${String(lib.url).split('/').pop()}`; - } - }); - - args.ini && iniLines.push(args.ini.replace(/\n\s+/g, '\n')); - - php.FS.writeFile('/php.ini', iniLines.join("\n") + "\n", {encoding: 'utf8'}); - - await php.ccall( - 'pib_init' - , NUM - , [] - , [] - , {async: true} - ); - - return php; - }); - } - - inputString(byteString) - { - this.input(this.encoder.encode(byteString)); - } - - input(items) - { - this.buffers.stdin.push(...items); - } - - flush() - { - this.buffers.stdout.flush(); - this.buffers.stderr.flush(); - } - - tokenize(phpCode) - { - return this.binary.then(php => php.ccall( - 'pib_tokenize' - , STR - , [STR] - , [phpCode] - )); - } - - startTransaction() - { - return Promise.resolve(); - } - - commitTransaction() - { - return Promise.resolve(); - } - - async _enqueue(callback, params = []) - { - let accept, reject; - - const coordinator = new Promise((a,r) => [accept, reject] = [a, r]); - - const _accept = result => accept(result); - const _reject = reason => reject(reason); - - this.queue.push([callback, params, _accept, _reject]); - - if(!this.queue.length) - { - return; - } - - await this.autoTransaction ? this.startTransaction() : Promise.resolve(); - - while(this.queue.length) - { - const [callback, params, accept, reject] = this.queue.shift(); - await callback(...params).then(accept).catch(reject); - } - - await this.autoTransaction ? this.commitTransaction() : Promise.resolve(); - - return coordinator; - } - - run(phpCode) - { - return this._enqueue(phpCode => this._run(phpCode), [phpCode]); - } - - async _run(phpCode) - { - const call = (await this.binary).ccall( - 'pib_run' - , NUM - , [STR] - , [`?>${phpCode}`] - , {async: true} - ); - - return call.finally(() => this.flush()); - } - - exec(phpCode) - { - return this._enqueue(phpCode => this._exec(phpCode), [phpCode]); - } - - async _exec(phpCode) - { - const call = (await this.binary).ccall( - 'pib_exec' - , STR - , [STR] - , [phpCode] - , {async: true} - ); - - return call.finally(() => this.flush()); - } - - async x(fragments, ...values) - { - const names = []; - const phpModule = await this.binary; - - if(phpModule.hasVrzno) - { - for(const value of values) - { - const name = `___value__${this.valueIndex++}`; - this.shared[name] = value; - names.push(name); - } - - let code = ''; - - fragments = [...fragments]; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(names.length) - { - code += `(vrzno_shared('${names.shift()}'))`; - } - } - - code = `vrzno_zval( ${code} );`; - - return phpModule.zvalToJS(await this.exec(code)); - } - else - { - const encoded = values.map(value => JSON.stringify(value)); - - fragments = [...fragments]; - - let code = ''; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(encoded.length) - { - code += `(json_decode('${encoded.shift()}'))`; - } - } - - return this.exec(code); - } - } - - async r(fragments, ...values) - { - const names = []; - const phpModule = await this.binary; - - if(phpModule.hasVrzno) - { - for(const value of values) - { - const name = `___value__${this.valueIndex++}`; - this.shared[name] = value; - names.push(name); - } - - let code = ''; - - fragments = [...fragments]; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(names.length) - { - code += `(vrzno_shared('${names.shift()}'))`; - } - } - - return this.run(code); - } - else - { - const encoded = values.map(value => JSON.stringify(value)); - - fragments = [...fragments]; - - let code = ''; - - while(fragments.length || names.length) - { - if(fragments.length) - code += fragments.shift(); - - if(encoded.length) - { - code += `(json_decode('${encoded.shift()}'))`; - } - } - - return this.run(code); - } - } - - async refresh() - { - const php = await this.binary; - - for(const callback of php.onRefresh) - { - callback(); - } - - Object.keys(this.shared).forEach(key => delete this.shared[key]); - - return php.ccall( - 'pib_refresh' - , NUM - , [] - , [] - , {async: true} - ); - } - - analyzePath(path) - { - return this._enqueue(fsOps.analyzePath, [this.binary, path]); - } - - readdir(path) - { - return this._enqueue(fsOps.readdir, [this.binary, path]); - } - - readFile(path, options) - { - return this._enqueue(fsOps.readFile, [this.binary, path, options]); - } - - stat(path) - { - return this._enqueue(fsOps.stat, [this.binary, path]); - } - - mkdir(path) - { - return this._enqueue(fsOps.mkdir, [this.binary, path]); - } - - rmdir(path) - { - return this._enqueue(fsOps.rmdir, [this.binary, path]); - } - - rename(path, newPath) - { - return this._enqueue(fsOps.rename, [this.binary, path, newPath]); - } - - writeFile(path, data, options) - { - return this._enqueue(fsOps.writeFile, [this.binary, path, data, options]); - } - - unlink(path) - { - return this._enqueue(fsOps.unlink, [this.binary, path]); - } -} - -PhpBase.phpVersion = phpVersion; -PhpBase.phpVersionFull = phpVersionFull; diff --git a/docs/static/PhpWeb.mjs b/docs/static/PhpWeb.mjs deleted file mode 100644 index d5fd7aab..00000000 --- a/docs/static/PhpWeb.mjs +++ /dev/null @@ -1,70 +0,0 @@ -import { PhpBase } from './PhpBase.mjs'; -import PhpBinary from './php-web.mjs'; -import { commitTransaction, startTransaction } from './webTransactions.mjs'; - -export class PhpWeb extends PhpBase -{ - constructor(args = {}) - { - super(PhpBinary, args); - } - - startTransaction() - { - return startTransaction(this); - } - - commitTransaction() - { - return commitTransaction(this); - } - - async refresh() - { - super.refresh(); - const php = await this.binary; - await navigator.locks.request('php-wasm-fs-lock', () => { - return new Promise((accept, reject) => { - php.FS.syncfs(true, error => { - if(error) reject(error); - else accept(); - }); - }); - }); - } - - async _enqueue(callback, params = []) - { - await this.binary; - - let accept, reject; - - const coordinator = new Promise((a,r) => [accept, reject] = [a, r]); - - const _accept = result => accept(result); - const _reject = reason => reject(reason); - - this.queue.push([callback, params, _accept, _reject]); - - navigator.locks.request('php-wasm-fs-lock', async () => { - if(!this.queue.length) - { - return; - } - - await (this.autoTransaction ? this.startTransaction() : Promise.resolve()); - - do - { - const [callback, params, accept, reject] = this.queue.shift(); - const run = callback(...params); - run.then(accept).catch(reject); - await run; - } while(this.queue.length) - - await (this.autoTransaction ? this.commitTransaction() : Promise.resolve()); - }); - - return coordinator; - } -} diff --git a/docs/static/_Event.mjs b/docs/static/_Event.mjs deleted file mode 100644 index bb7eb61c..00000000 --- a/docs/static/_Event.mjs +++ /dev/null @@ -1,8 +0,0 @@ -export const _Event = globalThis.CustomEvent ?? class extends globalThis.Event -{ - constructor(name, options = {}) - { - super(name, options) - this.detail = options.detail; - } -}; diff --git a/docs/static/config.mjs b/docs/static/config.mjs deleted file mode 100644 index 56b941e4..00000000 --- a/docs/static/config.mjs +++ /dev/null @@ -1,3 +0,0 @@ - -export const phpVersion = "8.3"; -export const phpVersionFull = "8.3.7"; diff --git a/docs/static/fsOps.mjs b/docs/static/fsOps.mjs deleted file mode 100644 index 70d67bc6..00000000 --- a/docs/static/fsOps.mjs +++ /dev/null @@ -1,108 +0,0 @@ -export class fsOps -{ - static async analyzePath(binary, path) - { - const result = (await binary).FS.analyzePath(path); - - if(!result.object) - { - return { exists: false }; - } - - const object = { - exists: true - , id: result.object.id - , mode : result.object.mode - , mount: { - mountpoint: result.object.mount.mountpoint - , mounts: result.object.mount.mounts.map(m => m.mountpoint) - } - , isDevice: result.object.isDevice - , isFolder: result.object.isFolder - , read: result.object.read - , write: result.object.write - }; - - return {...result, object, parentObject: undefined}; - } - - static async readdir(binary, path) - { - return (await binary).FS.readdir(path); - } - - static async readFile(binary, path, options) - { - return (await binary).FS.readFile(path, options); - } - - static async stat(binary, path) - { - return (await binary).FS.stat(path); - } - - static async mkdir(binary, path) - { - const php = (await binary); - const _result = php.FS.mkdir(path); - - return { - id: _result.id - , mode : _result.mode - , mount: { - mountpoint: _result.mount.mountpoint - , mounts: _result.mount.mounts.map(m => m.mountpoint) - } - , isDevice: _result.isDevice - , isFolder: _result.isFolder - , read: _result.read - , write: _result.write - }; - } - - static async rmdir(binary, path) - { - return (await binary).FS.rmdir(path); - } - - static async rename(binary, path, newPath) - { - return (await binary).FS.rename(path, newPath); - } - - static async writeFile(binary, path, data, options) - { - const bin = (await binary); - - const about = bin.FS.analyzePath(path); - - let forced = false; - - if(about.object && about.object.mode) - { - if(!(about.object.mode & 0o200)) - { - await bin.FS.chmod(path, about.object.mode | 0o200); - } - } - - const result = bin.FS.writeFile(path, data, options); - - if(forced) - { - await bin.FS.chmod(path, about.object.mode); - } - - return result; - } - - static async unlink(binary, path) - { - return (await binary).FS.unlink(path); - } - - static async chmod(binary, mode) - { - return (await binary).FS.chmod(mode); - } -} diff --git a/docs/static/libxml2.so b/docs/static/libxml2.so deleted file mode 100755 index c7ed7129..00000000 Binary files a/docs/static/libxml2.so and /dev/null differ diff --git a/docs/static/php-tags.mjs b/docs/static/php-tags.mjs deleted file mode 100644 index 24cbacb3..00000000 --- a/docs/static/php-tags.mjs +++ /dev/null @@ -1,195 +0,0 @@ -import { PhpWeb } from './PhpWeb.mjs'; - -const runPhpScriptTag = async (element) => { - - const scope = { - stdin: null, - canvas: null, - stdout: null, - stderr: null, - ini: '', - libs: [], - files: [], - imports: {} - }; - - if(element.hasAttribute('data-ini')) - { - scope.ini = element.getAttribute('data-ini'); - } - - if(element.hasAttribute('data-stdin')) - { - scope.stdin = document.querySelector(element.getAttribute('data-stdin')); - } - - if(element.hasAttribute('data-stdout')) - { - scope.stdout = document.querySelector(element.getAttribute('data-stdout')); - } - - if(element.hasAttribute('data-stderr')) - { - scope.stderr = document.querySelector(element.getAttribute('data-stderr')); - } - - if(element.hasAttribute('data-libs')) - { - try - { - scope.libs = JSON.parse(element.getAttribute('data-libs')); - } - catch(error) - { - console.error(error); - } - } - - if(element.hasAttribute('data-files')) - { - try - { - scope.files = JSON.parse(element.getAttribute('data-files')); - } - catch(error) - { - console.error(error); - } - } - - if(element.hasAttribute('data-imports')) - { - try - { - scope.imports = JSON.parse(element.getAttribute('data-imports')); - } - catch(error) - { - console.error(error); - } - } - - if(element.hasAttribute('data-canvas')) - { - scope.canvas = document.querySelector(element.getAttribute('data-canvas')); - } - - let stdout = ''; - let stderr = ''; - let ran = false; - - let getCode = Promise.resolve(element.innerText); - - if(element.hasAttribute('src')) - { - getCode = fetch(element.getAttribute('src')).then(response => response.text()); - } - - let getInput = Promise.resolve(''); - - if(scope.stdin) - { - getInput = Promise.resolve(scope.stdin.innerText); - - if(scope.stdin.hasAttribute('src')) - { - getInput = fetch(scope.stdin.getAttribute('src')).then(response => response.text()); - } - } - - let getImports = Promise.resolve(); - - if(scope.imports) - { - getImports = Promise.all(Object.entries(scope.imports).map(async ([url, names]) => { - const pkg = await import(url); - if(typeof names === 'string') - { - return {[names]: pkg}; - } - else if(Array.isArray(names)) - { - return names.map(name => ({[name]: pkg[name]})); - } - })); - } - - const [code, input, imports] = await Promise.all([getCode, getInput, getImports]); - - const flatImports = Object.assign({}, ...(imports.flat())); - - const php = new PhpWeb({ - ...flatImports, - sharedLibs: scope.libs, - ini: scope.ini, - files: scope.files, - canvas: scope.canvas, - }); - - php.inputString(input); - - const outListener = event => { - - stdout += event.detail; - - if(ran && scope.stdout) - { - scope.stdout.innerHTML = stdout; - } - }; - - const errListener = event => { - - stderr += event.detail; - - if(ran && scope.stderr) - { - scope.stderr.innerHTML = stderr; - } - }; - - php.addEventListener('output', outListener); - php.addEventListener('error', errListener); - php.addEventListener('ready', () => { - php.run(code) - .then(exitCode => exitCode && console.warn('WARNING! PHP exited with code: ' + exitCode)) - .catch(error => console.error(error)) - .finally(() => { - ran = true; - php.flush(); - scope.stdout && (scope.stdout.innerHTML = stdout); - scope.stderr && (scope.stderr.innerHTML = stderr); - }); - }); -} - -const phpSelector = 'script[type="text/php"]'; - -const runPhpTags = (doc) => { - - const phpNodes = doc.querySelectorAll(phpSelector); - - for(const phpNode of phpNodes) - { - runPhpScriptTag(phpNode); - } - - const observer = new MutationObserver((mutations, observer) => { - for(const mutation of mutations) - { - for(const addedNode of mutation.addedNodes) - { - if(!addedNode.matches || !addedNode.matches(phpSelector)) - { - continue; - } - - runPhpScriptTag(addedNode); - } - } - }); - - observer.observe(document.body.parentElement, {childList: true, subtree: true}); -} - -runPhpTags(document); \ No newline at end of file diff --git a/docs/static/php-web.mjs b/docs/static/php-web.mjs deleted file mode 100644 index 9c1ccbc8..00000000 --- a/docs/static/php-web.mjs +++ /dev/null @@ -1,16 +0,0 @@ - -var PHP = (() => { - const importMeta = import.meta;var _scriptName = importMeta.url; - - return ( -function(moduleArg = {}) { - var moduleRtn; - -var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;Module.preRun=Module.preRun||[];if(typeof Module.preRun=="function")Module.preRun=[Module.preRun];Module.preRun.push(()=>Object.assign(ENV,Module.ENV||{}));Module.preRun=Module.preRun||[];if(typeof Module.preRun=="function")Module.preRun=[Module.preRun];Module.preRun.push(()=>ENV.ICU_DATA=ENV.ICU_DATA||"/preload");var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path,defaultPath=null){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)??defaultPath??scriptDirectory+path}return defaultPath??scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptName){scriptDirectory=_scriptName}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{readAsync=url=>fetch(url,{credentials:"same-origin"}).then(response=>{if(response.ok){return response.arrayBuffer()}return Promise.reject(new Error(response.status+" : "+response.url))})}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var dynamicLibraries=Module["dynamicLibraries"]||[];var wasmBinary=Module["wasmBinary"];function intArrayFromBase64(s){var decoded=atob(s);var bytes=new Uint8Array(decoded.length);for(var i=0;ifilename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){if(Module["locateFile"]){var f="php-web.mjs.wasm";if(!isDataURI(f)){return locateFile(f,new URL("php-web.mjs.wasm",import.meta.url).href)}return f}return new URL("php-web.mjs.wasm",import.meta.url).href}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw`failed to load wasm binary file at '${binaryFile}'`}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}return readAsync(binaryFile).then(response=>new Uint8Array(response),()=>getBinarySync(binaryFile))}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var info=getWasmImports();function receiveInstance(instance,module){wasmExports=instance.exports;wasmExports=relocateExports(wasmExports,1024);wasmExports=Asyncify.instrumentWasmExports(wasmExports);var metadata=getDylinkMetadata(module);if(metadata.neededDynlibs){dynamicLibraries=metadata.neededDynlibs.concat(dynamicLibraries)}mergeLibSymbols(wasmExports,"main");LDSO.init();loadDylibs();wasmExports=applySignatureConversions(wasmExports);addOnInit(wasmExports["__wasm_call_ctors"]);__RELOC_FUNCS__.push(wasmExports["__wasm_apply_data_relocs"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}wasmBinaryFile??=findWasmBinary();instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;var asyncifyStubs={};var ASM_CONSTS={1514511:()=>!!Module.PGlite,1514538:$0=>{const statement=Module.targets.get($0);Module.PdoParams.delete(statement)},1514620:$0=>{const results=Module.targets.get($0);if(results)return results.length;return 0},1514709:$0=>{const results=Module.targets.get($0);if(results.length)return Object.keys(results[0]).length;return 0},1514821:($0,$1)=>{const targetId=$0;const target=Module.targets.get(targetId);const current=$1;if(current>=target.length){return false}return true},1514971:($0,$1)=>{const results=Module.targets.get($0);if(results.length){const str=Object.keys(results[0])[$1];const len=lengthBytesUTF8(str)+1;const loc=_malloc(len);stringToUTF8(str,loc,len);return loc}return 0},1515194:($0,$1,$2,$3)=>{const results=Module.targets.get($0);const current=-1+$1;const colno=$2;const rv=$3;if(current>=results.length){return null}const result=results[current];const key=Object.keys(result)[$2];Module.jsToZval(result[key],rv)},1515447:($0,$1,$2)=>{const stmtTgtId=$0;const paramPtr=$1;const paramPos=$2;const statement=Module.targets.get(stmtTgtId);const paramVal=Module.zvalToJS(paramPtr);if(!Module.PdoParams.has(statement)){Module.PdoParams.set(statement,[])}const paramList=Module.PdoParams.get(statement);paramList[paramPos]=paramVal},1515769:($0,$1,$2)=>{console.log("GET ATTR",$0,$1,$2)},1515810:($0,$1,$2)=>{console.log("COL META",$0,$1,$2)},1515851:($0,$1,$2)=>{console.log("CLOSE",$0,$1,$2)},1515889:($0,$1,$2,$3)=>{const db=Module.zvalToJS($0);const query=UTF8ToString($1);const supports_placeholders=$2;const zv=$3;const prepared=(...params)=>db.query(query,params);prepared.query=query;Module.jsToZval(prepared,zv)},1516118:()=>1,1516132:($0,$1,$2)=>{console.log("SET ATTR",$0,$1,$2);return true},1516186:($0,$1,$2)=>{console.log("GET ATTR",$0,$1,$2);return 1},1516237:$0=>{console.log("SHUTDOWN",$0)},1516270:($0,$1)=>{console.log("GET GC",$0,$1)},1516305:$0=>{if(Module.persist){const persist=Array.isArray(Module.persist)?Module.persist:[Module.persist];const useNodeRawFS=$0;persist.forEach(p=>{const mountPath=p.mountPath||"/persist";const localPath=p.localPath||"./persist";FS.mkdir(mountPath);if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){FS.mount(IDBFS,{autoPersist:false},mountPath)}else if(ENVIRONMENT_IS_NODE){if(!useNodeRawFS){const fs=(globalThis.__non_webpack_require__||require)("fs");if(!fs.existsSync(localPath)){fs.mkdirSync(localPath,{recursive:true})}FS.mount(NODEFS,{root:localPath},mountPath)}}})}},1516929:($0,$1,$2)=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const rv=$2;if(!(property in target)){return Module.jsToZval(undefined,rv)}Module.jsToZval(target[property],rv)},1517130:($0,$1,$2,$3,$4)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const funcPtr=$2;const zvalPtr=$3;const paramCount=$4;target[property]=Module.callableToJs(funcPtr)})()},1517333:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const zvalPtr=$2;if(!Module.targets.has(target[property])){target[property]=Module.marshalObject(zvalPtr)}})()},1517540:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);delete target[property]})()},1517656:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=null})()},1517772:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=false})()},1517889:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=true})()},1518005:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=$2})()},1518119:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);target[property]=$2})()},1518233:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);const newValue=UTF8ToString($2);target[property]=newValue})()},1518388:($0,$1,$2)=>{let target=Module.targets.get($0);const property=$1;const rv=$2;if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}target=Module.bufferMaps.get(target)}if(!(property in target)){return Module.jsToZval(undefined,rv)}Module.jsToZval(target[property],rv)},1518745:($0,$1,$2,$3)=>{(()=>{const target=Module.targets.get($0);const property=$1;const funcPtr=$2;const zvalPtr=$3;target[property]=Module.callableToJs(funcPtr)})()},1518912:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;const zvalPtr=$2;if(!Module.targets.has(target[property])){target[property]=Module.marshalObject(zvalPtr)}})()},1519105:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;delete target[property]})()},1519207:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=null})()},1519309:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=false})()},1519412:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=true})()},1519514:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=$2})()},1519614:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;target[property]=$2})()},1519714:($0,$1,$2)=>{(()=>{const target=Module.targets.get($0);const property=$1;const newValue=UTF8ToString($2);target[property]=newValue})()},1519855:($0,$1,$2)=>{console.log("HASD",$0);const target=Module.targets.get($0);const property=$1;const check_empty=$2;if(Array.isArray(target)){return typeof target[property]!=="undefined"}if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}const targetBytes=Module.bufferMaps.get(target);return targetBytes[property]!=="undefined"}if(!check_empty){return property in target}else{return!!target[property]}},1520359:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=UTF8ToString($1);delete target[property]})()},1520475:($0,$1)=>{(()=>{const target=Module.targets.get($0);const property=$1;delete target[property]})()},1520577:$0=>{const target=Module.targets.get($0);let json;if(typeof target==="function"){json=JSON.stringify({})}else{try{json=JSON.stringify({...target})}catch{json=JSON.stringify({})}}const str=String(json);const len=1+lengthBytesUTF8(str);const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1520914:($0,$1)=>{const target=Module.targets.get($0);const property=UTF8ToString($1);return property in target},1521019:($0,$1,$2)=>{const target=Module.targets.get($0);const property_name=UTF8ToString($1);const rv=$2;return Module.jsToZval(target[property_name],rv)},1521168:($0,$1,$2,$3,$4,$5)=>{const target=Module.targets.get($0);const method_name=UTF8ToString($1);const argp=$2;const argc=$3;const size=$4;const rv=$5;const args=[];for(let i=0;i{const target=Module.targets.get($0);const argv=$1;const argc=$2;const size=$3;const rv=$4;const args=[];for(let i=0;i{const _class=Module._classes.get($0);const argv=$1;const argc=$2;const size=$3;const args=[];for(let i=0;i{const target=Module.targets.get($0);Module.tacked.delete(target);Module.targets.remove(target)},1522202:$0=>{const target=Module.targets.get($0);const str=String(target);const len=1+lengthBytesUTF8(str);const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1522378:()=>{const context={};Module.tacked.add(context);return Module.targets.add(context)},1522466:($0,$1)=>{const context=Module.targets.get($0);const method=UTF8ToString($1);context.method=method},1522572:($0,$1)=>{(()=>{const context=Module.targets.get($0);const headerLine=UTF8ToString($1);const colon=headerLine.indexOf(":");const key=headerLine.substr(0,colon).trim();const val=headerLine.substr(1+colon).trim();context.headers=context.headers??{};context.headers[key]=val;console.log(context.headers)})()},1522902:($0,$1)=>{(()=>{const context=Module.targets.get($0);const headerLines=UTF8ToString($1);headerLines.split("\n").forEach(headerLine=>{const context=Module.targets.get($0);const colon=headerLine.indexOf(":");const key=headerLine.substr(0,colon).trim();const val=headerLine.substr(1+colon).trim();context.headers=context.headers??{};context.headers[key]=val;console.log(context.headers)})})()},1523325:($0,$1,$2)=>{(()=>{const context=Module.targets.get($0);context.body=Module.HEAPU8.slice($1,$1+$2)})()},1523432:($0,$1)=>{const context=Module.targets.get($0);context.ignoreErrors=$1},1523507:$0=>{const{status}=Module.targets.get($0);return status},1523571:$0=>{const str=String(eval(UTF8ToString($0)));const len=lengthBytesUTF8(str)+1;const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1523724:($0,$1)=>{const funcName=UTF8ToString($0);const argJson=UTF8ToString($1);const func=globalThis[funcName];const args=JSON.parse(argJson||"[]")||[];const str=String(func(...args));const len=lengthBytesUTF8(str)+1;const loc=_malloc(len);stringToUTF8(str,loc,len);return loc},1524020:($0,$1)=>{const timeout=Number(UTF8ToString($0));const funcPtr=$1;setTimeout(()=>{Module.ccall("vrzno_exec_callback","number",["number","number","number","number"],[funcPtr,null,0,0]);Module.ccall("vrzno_del_callback","number",["number"],[funcPtr])},timeout)},1524304:($0,$1)=>{const name=UTF8ToString($0);const rv=$1;Module.jsToZval(Module[name],rv)},1524389:($0,$1)=>{const name=UTF8ToString($0);const rv=$1;Module.jsToZval(Module.shared[name],rv)},1524481:($0,$1)=>{const name=UTF8ToString($0);const rv=$1;Module.jsToZval(import(/* webpackIgnore: true */ name),rv)},1524566:()=>{const IS_UNDEF=0;const IS_NULL=1;const IS_FALSE=2;const IS_TRUE=3;const IS_LONG=4;const IS_DOUBLE=5;const IS_STRING=6;const IS_ARRAY=7;const IS_OBJECT=8;Module.hasVrzno=true;Module.tacked=new Set;const FinReg=globalThis.FinalizationRegistry||class{register(){}unregister(){}};const wRef=globalThis.WeakRef||class{constructor(val){this.val=val}deref(){return this.val}};Module.fRegistry=Module.fRegistry||new FinReg(zvalPtr=>{Module.ccall("vrzno_expose_dec_refcount","number",["number"],[zvalPtr])});Module.bufferMaps=new WeakMap;const getRegistry=weakerMap=>{const registry=new FinReg(key=>{if(weakerMap.registry!==registry){return}if(weakerMap.map.has(key)&&weakerMap.map.get(key).deref()){return}weakerMap.delete(key)});return registry};Module.WeakerMap=Module.WeakerMap||class WeakerMap{constructor(entries){this.map=new Map;this.registry=getRegistry(this);entries&&entries.forEach(([key,value])=>this.set(key,value))}get size(){return this.map.size}clear(){this.registry=getRegistry(this);this.map.clear()}delete(key){if(!this.has(key)){return}this.registry.unregister(this.get(key));this.map.delete(key)}[Symbol.iterator](){const mapIterator=this.map[Symbol.iterator]();return{next:()=>{do{const entry=mapIterator.next();if(entry.done){return{done:true}}const[key,ref]=entry.value;const value=ref.deref();if(!value){this.map.delete(key);continue}return{done:false,value:[key,value]}}while(true)}}}entries(){return{[Symbol.iterator]:()=>this[Symbol.iterator]()}}forEach(callback){for(const[k,v]of this){callback(v,k,this)}}get(key){if(!this.has(key)){return}const value=this.map.get(key).deref();if(!value){this.map.delete(key)}return value}has(key){if(!this.map.has(key)){return false}const result=this.map.get(key).deref();if(!result){this.map.delete(key)}return Boolean(result)}keys(){return[...this].map(v=>v[0])}set(key,value){if(typeof value!=="function"&&typeof value!=="object"){throw new Error("WeakerMap values must be objects.")}if(this.map.has(key)){this.registry.unregister(this.get(key))}this.registry.register(value,key,value);return this.map.set(key,new wRef(value))}values(){return[...this].map(v=>v[1])}};Module.marshalObject=(zv,type)=>{const nativeTarget=Module.ccall("vrzno_expose_target","number",["number"],[zv]);if(nativeTarget&&Module.targets.hasId(nativeTarget)){return Module.targets.get(nativeTarget)}const proxy=new Proxy({},{ownKeys:target=>{let keysLoc;if(type===IS_ARRAY){keysLoc=Module.ccall("vrzno_expose_array_keys","number",["number"],[zv])}else if(type===IS_OBJECT){keysLoc=Module.ccall("vrzno_expose_object_keys","number",["number"],[zv])}if(keysLoc){const keyJson=UTF8ToString(keysLoc);const keys=JSON.parse(keyJson);_free(keysLoc);keys.push(...Reflect.ownKeys(target));return keys}return[]},has:(target,prop)=>{switch(typeof prop){case"number":return!!Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,prop]);case"string":const len=lengthBytesUTF8(prop)+1;const namePtr=_malloc(len);stringToUTF8(prop,namePtr,len);const propPtr=Module.ccall("vrzno_expose_property_pointer","number",["number","number"],[zv,namePtr]);_free(namePtr);return propPtr;default:return false}},get:(target,prop)=>{let retPtr;if(prop===Symbol.iterator){let iterator;if(type===IS_ARRAY){const max=Module.ccall("vrzno_expose_array_length","number",["number"],[zv]);iterator=()=>{let current=-1;return{next(){const done=++current>=max;return{done,value:Module.zvalToJS(Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,current]))}}}}}else if(type===IS_OBJECT){const keysLoc=Module.ccall("vrzno_expose_object_keys","number",["number"],[zv]);const keyJson=UTF8ToString(keysLoc);const keys=JSON.parse(keyJson);_free(keysLoc);iterator=()=>{let current=-1;return{next(){const done=++current>=keys.length;return{done,value:[keys[current],Module.zvalToJS(Module.ccall("vrzno_expose_property_pointer","number",["number","string"],[zv,keys[current]]))]}}}}}Module.ccall("vrzno_expose_inc_refcount","number",["number"],[zv]);Module.fRegistry.register(iterator,zv,iterator);return iterator}if(prop===Symbol.toPrimitive){const method="__toString";const len=lengthBytesUTF8(method)+1;const loc=_malloc(len);stringToUTF8(method,loc,len);const methodPtr=Module.ccall("vrzno_expose_method_pointer","number",["number","number"],[zv,loc]);_free(loc);return()=>Module.callableToJs(methodPtr,zv)()}switch(typeof prop){case"number":retPtr=Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,prop]);break;case"string":prop=String(prop);const len=lengthBytesUTF8(prop)+1;const loc=_malloc(len);stringToUTF8(prop,loc,len);if(type===IS_OBJECT){const methodPtr=Module.ccall("vrzno_expose_method_pointer","number",["number","number"],[zv,loc]);if(methodPtr){return Module.callableToJs(methodPtr,zv)}retPtr=Module.ccall("vrzno_expose_property_pointer","number",["number","number"],[zv,loc])}else if(type===IS_ARRAY){retPtr=Module.ccall("vrzno_expose_key_pointer","number",["number","number"],[zv,loc])}_free(loc);break;default:return false}if(!retPtr){return}const proxy=Module.zvalToJS(retPtr);return proxy??Reflect.get(target,prop)},getOwnPropertyDescriptor:(target,prop)=>{let retPtr;switch(typeof prop){case"number":retPtr=Module.ccall("vrzno_expose_dimension_pointer","number",["number","number"],[zv,prop]);break;case"string":const len=lengthBytesUTF8(prop)+1;const namePtr=_malloc(len);stringToUTF8(prop,namePtr,len);if(type===IS_OBJECT){retPtr=Module.ccall("vrzno_expose_property_pointer","number",["number","number"],[zv,namePtr])}else if(type===IS_ARRAY){retPtr=Module.ccall("vrzno_expose_key_pointer","number",["number","number"],[zv,namePtr])}_free(namePtr);break;default:return false}const proxy=Module.zvalToJS(retPtr);return{configurable:true,enumerable:true,value:target[prop]}}});Module.ccall("vrzno_expose_inc_refcount","number",["number"],[zv]);return proxy};Module.callableToJs=Module.callableToJs||((funcPtr,objPtr=null)=>{if(Module.callables.has(funcPtr)){return Module.callables.get(funcPtr)}const wrapped=(...args)=>{let paramsPtr=null;if(args.length){paramsPtr=Module.ccall("vrzno_expose_create_params","number",["number"],[args.length]);for(let i=0;i{if(!zv){return}zv=Module.ccall("vrzno_expose_zval_deref","number",["number"],[zv]);const isNative=Module.ccall("vrzno_expose_target","number",["number"],[zv]);if(isNative){return Module.targets.get(isNative)}const callable=Module.ccall("vrzno_expose_callable","number",["number"],[zv]);let valPtr;if(callable){const wrapped=Module.callableToJs(callable);if(!Module.targets.has(wrapped)){Module.targets.add(wrapped);Module.ccall("vrzno_expose_inc_refcount","number",["number"],[zv]);Module.fRegistry.register(wrapped,zv,wrapped)}return wrapped}const type=Module.ccall("vrzno_expose_type","number",["number"],[zv]);switch(type){case IS_UNDEF:return undefined;break;case IS_NULL:return null;break;case IS_TRUE:return true;break;case IS_FALSE:return false;break;case IS_LONG:return Module.ccall("vrzno_expose_long","number",["number"],[zv]);break;case IS_DOUBLE:valPtr=Module.ccall("vrzno_expose_double","number",["number"],[zv]);if(!valPtr){return null}return getValue(valPtr,"double");break;case IS_STRING:valPtr=Module.ccall("vrzno_expose_string","number",["number"],[zv]);if(!valPtr){return null}return UTF8ToString(valPtr);break;case IS_ARRAY:case IS_OBJECT:return Module.marshalObject(zv,type);default:return null;break}});Module.jsToZval=Module.jsToZval||((value,rv)=>{if(typeof value==="undefined"){Module.ccall("vrzno_expose_create_undef","number",["number"],[rv])}else if(value===null){Module.ccall("vrzno_expose_create_null","number",["number"],[rv])}else if([true,false].includes(value)){Module.ccall("vrzno_expose_create_bool","number",["number","number"],[value,rv])}else if(value&&["function","object"].includes(typeof value)){const index=Module.targets.add(value);const isFunction=typeof value==="function"?index:0;const isConstructor=isFunction&&!!(value.prototype&&value.prototype.constructor);Module.ccall("vrzno_expose_create_object_for_target","number",["number","number","number","number"],[index,isFunction,isConstructor,rv]);Module.tacked.add(value);Module.ccall("vrzno_expose_inc_refcount","number",["number"],[rv]);Module.fRegistry.register(value,rv,value)}else if(typeof value==="number"){if(Number.isInteger(value)){Module.ccall("vrzno_expose_create_long","number",["number","number"],[value,rv])}else if(Number.isFinite(value)){Module.ccall("vrzno_expose_create_double","number",["number","number"],[value,rv])}}else if(typeof value==="string"){const len=lengthBytesUTF8(value)+1;const loc=_malloc(len);stringToUTF8(value,loc,len);Module.ccall("vrzno_expose_create_string","number",["number","number"],[loc,rv]);_free(loc)}});Module.UniqueIndex=Module.UniqueIndex||class UniqueIndex{constructor(){this.byObject=new WeakMap;this.byInteger=new Module.WeakerMap;this.id=0;Object.defineProperty(this,"add",{configurable:false,writable:false,value:callback=>{if(this.byObject.has(callback)){const id=this.byObject.get(callback);return id}const newid=++this.id;this.byObject.set(callback,newid);this.byInteger.set(newid,callback);return newid}});Object.defineProperty(this,"has",{configurable:false,writable:false,value:obj=>{if(this.byObject.has(obj)){return this.byObject.get(obj)}}});Object.defineProperty(this,"hasId",{configurable:false,writable:false,value:address=>{if(this.byInteger.has(address)){return this.byInteger.get(address)}}});Object.defineProperty(this,"get",{configurable:false,writable:false,value:address=>{if(this.byInteger.has(address)){return this.byInteger.get(address)}}});Object.defineProperty(this,"getId",{configurable:false,writable:false,value:obj=>{if(this.byObject.has(obj)){return this.byObject.get(obj)}}});Object.defineProperty(this,"remove",{configurable:false,writable:false,value:address=>{const obj=this.byInteger.get(address);if(obj){this.byObject.delete(obj);this.byInteger.delete(address)}}})}};Module.classes=Module.classes||new WeakMap;Module._classes=Module._classes||new Module.WeakerMap;Module.callables=Module.callables||new Module.WeakerMap;Module.targets=Module.targets||new Module.UniqueIndex;Module.targets.add(globalThis);Module.PdoParams=new WeakMap},1537013:$0=>{const target=Module.targets.get($0);return Module.classes.get(target)},1537091:($0,$1)=>{const target=Module.targets.get($0);Module.classes.set(target,$1);Module._classes.set($1,target)},1537199:($0,$1,$2,$3)=>{const target=Module.targets.get($0);const dest=$1;const fpos=$2;let count=$3;if(target.status>=400&&!target.context.ignoreErrors){return 0}if(fpos>=target.buffer.length){count=0}else if(fpos+count>target.buffer.length){count=target.buffer.length-fpos}if(count){Module.HEAPU8.set(target.buffer.slice(fpos,fpos+count),dest)}return count},1537591:$0=>{const parsed=Module.targets.get($0);Module.tacked.delete(parsed)},1537664:$0=>{const _class=Module._classes.get($0);if(_class){return Module.targets.getId(_class)}return Module.targets.add(globalThis)},1537799:($0,$1)=>{let target=Module.targets.get($0);const property=$1;if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}target=Module.bufferMaps.get(target)}if(Array.isArray(target)||ArrayBuffer.isView(target)){if(property>=0&&property{let target=Module.targets.get($0);const property=$1;const rv=$2;if(target instanceof ArrayBuffer){if(!Module.bufferMaps.has(target)){Module.bufferMaps.set(target,new Uint8Array(target))}target=Module.bufferMaps.get(target)}return Module.jsToZval(target[property],rv)},1538457:$0=>{const target=Module.targets.get($0);if(target){Module.tacked.delete(target);Module.fRegistry.unregister(target)}}};function __asyncjs__pdo_pglite_real_stmt_execute(targetId,error,rv){return Asyncify.handleAsync(async()=>{const statement=Module.targets.get(targetId);if(!Module.PdoParams.has(statement)){Module.PdoParams.set(statement,[])}const params=Module.PdoParams.get(statement);try{const result=await statement(...params);const rows=result.rows??[];const _fields=result.fields??[];const fields=new Map;_fields.forEach(field=>{fields.set(field.name,field)});const utf8decoder=new TextDecoder;const mapped=rows.map(row=>{const _row={};for(const[key,val]of Object.entries(row)){if(fields.has(key)&&fields.get(key).dataTypeID===17){_row[key]=val?utf8decoder.decode(val):null;continue}_row[key]=val}return _row});Module.jsToZval(mapped,rv);return 1}catch(exception){const message=String(exception.message);const len=lengthBytesUTF8(message)+1;const loc=_malloc(len);console.error(message,statement.query,exception);stringToUTF8(message,loc,len);setValue(error,loc,"*");return 0}})}__asyncjs__pdo_pglite_real_stmt_execute.sig="iiii";function __asyncjs__pdo_pglite_real_handle_begin(handle){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);await db.query("BEGIN")})}__asyncjs__pdo_pglite_real_handle_begin.sig="ii";function __asyncjs__pdo_pglite_real_handle_commit(handle){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);await db.query("COMMIT")})}__asyncjs__pdo_pglite_real_handle_commit.sig="ii";function __asyncjs__pdo_pglite_real_handle_rollback(handle){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);await db.query("ROLLBACK")})}__asyncjs__pdo_pglite_real_handle_rollback.sig="ii";function __asyncjs__pdo_pglite_real_last_insert_id(handle,namePtr){return Asyncify.handleAsync(async()=>{const db=Module.targets.get(handle);if(namePtr){const name=UTF8ToString(namePtr);console.log("LAST INSERT ID",$0,name);const result=await db.query("SELECT CURRVAL($1)",name);console.log(result)}else{console.log("LAST INSERT ID",$0);const result=await db.query("SELECT CURRVAL($1)",name);console.log(result)}return 0})}__asyncjs__pdo_pglite_real_last_insert_id.sig="iii";function __asyncjs__pdo_pglite_real_db_handle_factory(connectionStringPrt,dbZv){return Asyncify.handleAsync(async()=>{if(!Module.PGlite){throw new Error("The PGlite class must be provided as a constructor arg to PHP to use PGlite.")}const connectionString=UTF8ToString(connectionStringPrt);const pglite=new Module.PGlite(connectionString?"idb://"+connectionString:undefined);return Module.jsToZval(pglite,dbZv)})}__asyncjs__pdo_pglite_real_db_handle_factory.sig="vii";function __asyncjs__php_stream_fetch_real_open(path,_context,ptrsize,headersv,headersc){return Asyncify.handleAsync(async()=>{const pathString=UTF8ToString(path);const context=Module.targets.get(_context)||{};const response=await fetch(pathString,context);const buffer=new Uint8Array(await response.arrayBuffer());const status=response.status;const headerLines=[...response.headers.entries()].map(([key,val])=>`${key}: ${val}`);headerLines.unshift(`HTTP/1.1 ${response.status} ${response.statusText}`);const headersloc=_malloc(ptrsize*headerLines.length);setValue(headersv,headersloc,"*");setValue(headersc,headerLines.length,"i32");let i=0;for(const line of headerLines){const len=lengthBytesUTF8(line);const loc=_malloc(len);stringToUTF8(line,loc,len);setValue(headersloc+i*ptrsize,loc,"i"+8*ptrsize);i++}const parsed={status,buffer,context};Module.tacked.add(parsed);Module.tacked.delete(context);return Module.targets.add(parsed)})}__asyncjs__php_stream_fetch_real_open.sig="iiiiii";function __asyncjs__vrzno_await_internal(targetId,rv){return Asyncify.handleAsync(async()=>{const target=Module.targets.get(targetId);const result=await target;Module.jsToZval(result,rv)})}__asyncjs__vrzno_await_internal.sig="vii";function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var GOT={};var currentModuleWeakSymbols=new Set([]);var GOTHandler={get(obj,symName){var rtn=GOT[symName];if(!rtn){rtn=GOT[symName]=new WebAssembly.Global({value:"i32",mutable:true})}if(!currentModuleWeakSymbols.has(symName)){rtn.required=true}return rtn}};var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{idx>>>=0;var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var getDylinkMetadata=binary=>{var offset=0;var end=0;function getU8(){return binary[offset++]}function getLEB(){var ret=0;var mul=1;while(1){var byte=binary[offset++];ret+=(byte&127)*mul;mul*=128;if(!(byte&128))break}return ret}function getString(){var len=getLEB();offset+=len;return UTF8ArrayToString(binary,offset-len,len)}function failIf(condition,message){if(condition)throw new Error(message)}var name="dylink.0";if(binary instanceof WebAssembly.Module){var dylinkSection=WebAssembly.Module.customSections(binary,name);if(dylinkSection.length===0){name="dylink";dylinkSection=WebAssembly.Module.customSections(binary,name)}failIf(dylinkSection.length===0,"need dylink section");binary=new Uint8Array(dylinkSection[0]);end=binary.length}else{var int32View=new Uint32Array(new Uint8Array(binary.subarray(0,24)).buffer);var magicNumberFound=int32View[0]==1836278016;failIf(!magicNumberFound,"need to see wasm magic number");failIf(binary[8]!==0,"need the dylink section to be first");offset=9;var section_size=getLEB();end=offset+section_size;name=getString()}var customSection={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(name=="dylink"){customSection.memorySize=getLEB();customSection.memoryAlign=getLEB();customSection.tableSize=getLEB();customSection.tableAlign=getLEB();var neededDynlibsCount=getLEB();for(var i=0;i>>0];case"i8":return HEAP8[ptr>>>0];case"i16":return HEAP16[ptr>>>1>>>0];case"i32":return HEAP32[ptr>>>2>>>0];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>>2>>>0];case"double":return HEAPF64[ptr>>>3>>>0];case"*":return HEAPU32[ptr>>>2>>>0];default:abort(`invalid type for getValue: ${type}`)}}var newDSO=(name,handle,syms)=>{var dso={refcount:Infinity,name,exports:syms,global:true};LDSO.loadedLibsByName[name]=dso;if(handle!=undefined){LDSO.loadedLibsByHandle[handle]=dso}return dso};var LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}};var ___heap_base=35237216;var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var getMemory=size=>{if(runtimeInitialized){return _calloc(size,1)}var ret=___heap_base;var end=ret+alignMemory(size,16);___heap_base=end;GOT["__heap_base"].value=end;return ret};var isInternalSym=symName=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(symName)||symName.startsWith("__em_js__");var uleb128Encode=(n,target)=>{if(n<128){target.push(n)}else{target.push(n%128|128,n>>7)}};var sigToWasmTypes=sig=>{var typeNames={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};var type={parameters:[],results:sig[0]=="v"?[]:[typeNames[sig[0]]]};for(var i=1;i{var sigRet=sig.slice(0,1);var sigParam=sig.slice(1);var typeCodes={i:127,p:127,j:126,f:125,d:124,e:111};target.push(96);uleb128Encode(sigParam.length,target);for(var i=0;i{if(typeof WebAssembly.Function=="function"){return new WebAssembly.Function(sigToWasmTypes(sig),func)}var typeSectionBody=[1];generateFuncType(sig,typeSectionBody);var bytes=[0,97,115,109,1,0,0,0,1];uleb128Encode(typeSectionBody.length,bytes);bytes.push(...typeSectionBody);bytes.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var module=new WebAssembly.Module(new Uint8Array(bytes));var instance=new WebAssembly.Instance(module,{e:{f:func}});var wrappedFunc=instance.exports["f"];return wrappedFunc};var wasmTableMirror=[];var wasmTable=new WebAssembly.Table({initial:4987,element:"anyfunc"});var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var updateTableMap=(offset,count)=>{if(functionsInTableMap){for(var i=offset;i{if(!functionsInTableMap){functionsInTableMap=new WeakMap;updateTableMap(0,wasmTable.length)}return functionsInTableMap.get(func)||0};var freeTableIndexes=[];var getEmptyTableSlot=()=>{if(freeTableIndexes.length){return freeTableIndexes.pop()}try{wasmTable.grow(1)}catch(err){if(!(err instanceof RangeError)){throw err}throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return wasmTable.length-1};var setWasmTableEntry=(idx,func)=>{wasmTable.set(idx,func);wasmTableMirror[idx]=wasmTable.get(idx)};var addFunction=(func,sig)=>{var rtn=getFunctionAddress(func);if(rtn){return rtn}var ret=getEmptyTableSlot();try{setWasmTableEntry(ret,func)}catch(err){if(!(err instanceof TypeError)){throw err}var wrapped=convertJsFunctionToWasm(func,sig);setWasmTableEntry(ret,wrapped)}functionsInTableMap.set(func,ret);return ret};var updateGOT=(exports,replace)=>{for(var symName in exports){if(isInternalSym(symName)){continue}var value=exports[symName];if(symName.startsWith("orig$")){symName=symName.split("$")[1];replace=true}GOT[symName]||=new WebAssembly.Global({value:"i32",mutable:true});if(replace||GOT[symName].value==0){if(typeof value=="function"){GOT[symName].value=addFunction(value)}else if(typeof value=="number"){GOT[symName].value=value}else{err(`unhandled export type for '${symName}': ${typeof value}`)}}}};var relocateExports=(exports,memoryBase,replace)=>{var relocated={};for(var e in exports){var value=exports[e];if(typeof value=="object"){value=value.value}if(typeof value=="number"){value+=memoryBase}relocated[e]=value}updateGOT(relocated,replace);return relocated};var isSymbolDefined=symName=>{var existing=wasmImports[symName];if(!existing||existing.stub){return false}if(symName in asyncifyStubs&&!asyncifyStubs[symName]){return false}return true};var setTempRet0=val=>__emscripten_tempret_set(val);var setTempRet0=setTempRet0;Module["setTempRet0"]=setTempRet0;var createDyncallWrapper=sig=>{var sections=[];var prelude=[0,97,115,109,1,0,0,0];sections.push(prelude);var wrappersig=[sig[0].replace("j","i"),"i",sig.slice(1).replace(/j/g,"ii")].join("");var typeSectionBody=[3];generateFuncType(wrappersig,typeSectionBody);generateFuncType(sig,typeSectionBody);generateFuncType("vi",typeSectionBody);var typeSection=[1];uleb128Encode(typeSectionBody.length,typeSection);typeSection.push(...typeSectionBody);sections.push(typeSection);var importSection=[2,15,2,1,101,1,116,1,112,0,0,1,101,1,114,0,2];sections.push(importSection);var functionSection=[3,2,1,0];sections.push(functionSection);var exportSection=[7,5,1,1,102,0,1];sections.push(exportSection);var convert_code=[];if(sig[0]==="j"){convert_code=[1,1,126]}else{convert_code.push(0)}function localGet(j){convert_code.push(32);uleb128Encode(j,convert_code)}var j=1;for(var i=1;i{sig=sig.replace(/p/g,"i");if(!("dynCall_"+sig in Module)){Module["dynCall_"+sig]=createDyncallWrapper(sig)}var f=Module["dynCall_"+sig];return f(ptr,...args)};var dynCall=(sig,ptr,args=[])=>{var rtn=dynCallLegacy(sig,ptr,args);return sig[0]=="p"?rtn>>>0:rtn};var stackSave=()=>_emscripten_stack_get_current();var stackRestore=val=>__emscripten_stack_restore(val);var createInvokeFunction=sig=>(ptr,...args)=>{var sp=stackSave();try{return dynCall(sig,ptr,args)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}};var resolveGlobalSymbol=(symName,direct=false)=>{var sym;if(direct&&"orig$"+symName in wasmImports){symName="orig$"+symName}if(isSymbolDefined(symName)){sym=wasmImports[symName]}else if(symName.startsWith("invoke_")){sym=wasmImports[symName]=createInvokeFunction(symName.split("_")[1])}return{sym,name:symName}};var UTF8ToString=(ptr,maxBytesToRead)=>{ptr>>>=0;return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""};var loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8>>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign);var memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0;var tableBase=metadata.tableSize?wasmTable.length:0;if(handle){HEAP8[handle+8>>>0]=1;HEAPU32[handle+12>>>2>>>0]=memoryBase;HEAP32[handle+16>>>2>>>0]=metadata.memorySize;HEAPU32[handle+20>>>2>>>0]=tableBase;HEAP32[handle+24>>>2>>>0]=metadata.tableSize}}else{memoryBase=HEAPU32[handle+12>>>2>>>0];tableBase=HEAPU32[handle+20>>>2>>>0]}var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;if(tableGrowthNeeded>0){wasmTable.grow(tableGrowthNeeded)}var moduleExports;function resolveSymbol(sym){var resolved=resolveGlobalSymbol(sym).sym;if(!resolved&&localScope){resolved=localScope[sym]}if(!resolved){resolved=moduleExports[sym]}return resolved}var proxyHandler={get(stubs,prop){switch(prop){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(prop in wasmImports&&!wasmImports[prop].stub){return wasmImports[prop]}if(!(prop in stubs)){var resolved;stubs[prop]=(...args)=>{resolved||=resolveSymbol(prop);return resolved(...args)}}return stubs[prop]}};var proxy=new Proxy({},proxyHandler);var info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize);moduleExports=relocateExports(instance.exports,memoryBase);moduleExports=Asyncify.instrumentWasmExports(moduleExports);if(!flags.allowUndefined){reportUndefinedSymbols()}function addEmAsm(addr,body){var args=[];var arity=0;for(;arity<16;arity++){if(body.indexOf("$"+arity)!=-1){args.push("$"+arity)}else{break}}args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports){var start=moduleExports["__start_em_asm"];var stop=moduleExports["__stop_em_asm"];while(start ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports){if(name.startsWith("__em_js__")){var start=moduleExports[name];var jsString=UTF8ToString(start);var parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]);delete moduleExports[name]}}var applyRelocs=moduleExports["__wasm_apply_data_relocs"];if(applyRelocs){if(runtimeInitialized){applyRelocs()}else{__RELOC_FUNCS__.push(applyRelocs)}}var init=moduleExports["__wasm_call_ctors"];if(init){if(runtimeInitialized){init()}else{__ATINIT__.push(init)}}return moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(result=>postInstantiation(result.module,result.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary);var instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}if(flags.loadAsync){return metadata.neededDynlibs.reduce((chain,dynNeeded)=>chain.then(()=>loadDynamicLibrary(dynNeeded,flags,localScope)),Promise.resolve()).then(loadModule)}metadata.neededDynlibs.forEach(needed=>loadDynamicLibrary(needed,flags,localScope));return loadModule()};var mergeLibSymbols=(exports,libName)=>{for(var[sym,exp]of Object.entries(exports)){const setImport=target=>{if(target in asyncifyStubs){asyncifyStubs[target]=exp}if(!isSymbolDefined(target)){wasmImports[target]=exp}};setImport(sym);if(sym.startsWith("dynCall_")&&!Module.hasOwnProperty(sym)){Module[sym]=exp}}};var asyncLoad=(url,onload,onerror,noRunDep)=>{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url).then(arrayBuffer=>{onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},err=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var preloadPlugins=Module["preloadPlugins"]||[];var registerWasmPlugin=()=>{var wasmPlugin={promiseChainEnd:Promise.resolve(),canHandle:name=>!Module["noWasmDecoding"]&&name.endsWith(".so"),handle:(byteArray,name,onload,onerror)=>{wasmPlugin["promiseChainEnd"]=wasmPlugin["promiseChainEnd"].then(()=>loadWebAssemblyModule(byteArray,{loadAsync:true,nodelete:true},name,{})).then(exports=>{preloadedWasm[name]=exports;onload(byteArray)},error=>{err(`failed to instantiate wasm: ${name}: ${error}`);onerror()})}};preloadPlugins.push(wasmPlugin)};var preloadedWasm={};function loadDynamicLibrary(libName,flags={global:true,nodelete:true},localScope,handle){var dso=LDSO.loadedLibsByName[libName];if(dso){if(!flags.global){if(localScope){Object.assign(localScope,dso.exports)}}else if(!dso.global){dso.global=true;mergeLibSymbols(dso.exports,libName)}if(flags.nodelete&&dso.refcount!==Infinity){dso.refcount=Infinity}dso.refcount++;if(handle){LDSO.loadedLibsByHandle[handle]=dso}return flags.loadAsync?Promise.resolve(true):true}dso=newDSO(libName,handle,"loading");dso.refcount=flags.nodelete?Infinity:1;dso.global=flags.global;function loadLibData(){if(handle){var data=HEAPU32[handle+28>>>2>>>0];var dataSize=HEAPU32[handle+32>>>2>>>0];if(data&&dataSize){var libData=HEAP8.slice(data,data+dataSize);return flags.loadAsync?Promise.resolve(libData):libData}}var libFile=locateFile(libName);if(flags.loadAsync){return new Promise((resolve,reject)=>asyncLoad(libFile,resolve,reject))}if(!readBinary){throw new Error(`${libFile}: file not found, and synchronous loading of external files is not available`)}return readBinary(libFile)}function getExports(){var preloaded=preloadedWasm[libName];if(preloaded){return flags.loadAsync?Promise.resolve(preloaded):preloaded}if(flags.loadAsync){return loadLibData().then(libData=>loadWebAssemblyModule(libData,flags,libName,localScope,handle))}return loadWebAssemblyModule(loadLibData(),flags,libName,localScope,handle)}function moduleLoaded(exports){if(dso.global){mergeLibSymbols(exports,libName)}else if(localScope){Object.assign(localScope,exports)}dso.exports=exports}if(flags.loadAsync){return getExports().then(exports=>{moduleLoaded(exports);return true})}moduleLoaded(getExports());return true}var reportUndefinedSymbols=()=>{for(var[symName,entry]of Object.entries(GOT)){if(entry.value==0){var value=resolveGlobalSymbol(symName,true).sym;if(!value&&!entry.required){continue}if(typeof value=="function"){entry.value=addFunction(value,value.sig)}else if(typeof value=="number"){entry.value=value}else{throw new Error(`bad export type for '${symName}': ${typeof value}`)}}}};var loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs");dynamicLibraries.reduce((chain,lib)=>chain.then(()=>loadDynamicLibrary(lib,{loadAsync:true,global:true,nodelete:true,allowUndefined:true})),Promise.resolve()).then(()=>{reportUndefinedSymbols();removeRunDependency("loadDylibs")})};var noExitRuntime=Module["noExitRuntime"]||false;function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr>>>0]=value;break;case"i8":HEAP8[ptr>>>0]=value;break;case"i16":HEAP16[ptr>>>1>>>0]=value;break;case"i32":HEAP32[ptr>>>2>>>0]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>>2>>>0]=value;break;case"double":HEAPF64[ptr>>>3>>>0]=value;break;case"*":HEAPU32[ptr>>>2>>>0]=value;break;default:abort(`invalid type for setValue: ${type}`)}}function _UTF8ToHtml(...args){return asyncifyStubs["UTF8ToHtml"](...args)}_UTF8ToHtml.stub=true;asyncifyStubs["UTF8ToHtml"]=undefined;function _UTF8Toisolat1(...args){return asyncifyStubs["UTF8Toisolat1"](...args)}_UTF8Toisolat1.stub=true;asyncifyStubs["UTF8Toisolat1"]=undefined;var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function ___assert_fail(condition,filename,line,func){condition>>>=0;filename>>>=0;func>>>=0;abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}___assert_fail.sig="vppip";var ___asyncify_data=new WebAssembly.Global({value:"i32",mutable:true},0);var ___asyncify_state=new WebAssembly.Global({value:"i32",mutable:true},0);var ___call_sighandler=function(fp,sig){fp>>>=0;return(a1=>{})(sig)};___call_sighandler.sig="vpi";var ___memory_base=new WebAssembly.Global({value:"i32",mutable:false},1024);var ___stack_high=35237216;var ___stack_low=1682784;var ___stack_pointer=new WebAssembly.Global({value:"i32",mutable:true},35237216);var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:(...paths)=>PATH.normalize(paths.join("/")),join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>crypto.getRandomValues(view)}else abort("initRandomDevice")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:(...args)=>{var resolvedPath="",resolvedAbsolute=false;for(var i=args.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?args[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{outIdx>>>=0;if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++>>>0]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++>>>0]=192|u>>6;heap[outIdx++>>>0]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++>>>0]=224|u>>12;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++>>>0]=240|u>>18;heap[outIdx++>>>0]=128|u>>12&63;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63}}heap[outIdx>>>0]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else{}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){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(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var zeroMemory=(address,size)=>{HEAPU8.fill(0,address,address+size);return address};var mmapAlloc=size=>{size=alignMemory(size,65536);var ptr=_emscripten_builtin_memalign(65536,size);if(!ptr)return 0;return zeroMemory(ptr,size)};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}MEMFS.ops_table||={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key of Object.keys(node.contents)){entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length>>0)}}return{ptr,allocated}},msync(stream,buffer,offset,length,mmapFlags){MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){preFinish?.();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}onload?.();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{onerror?.();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,processData,onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={r:0,"r+":2,w:512|64|1,"w+":512|64|2,a:1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var IDBFS={dbs:{},indexedDB:()=>{if(typeof indexedDB!="undefined")return indexedDB;var ret=null;if(typeof window=="object")ret=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;return ret},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",queuePersist:mount=>{function onPersistComplete(){if(mount.idbPersistState==="again")startPersist();else mount.idbPersistState=0}function startPersist(){mount.idbPersistState="idb";IDBFS.syncfs(mount,false,onPersistComplete)}if(!mount.idbPersistState){mount.idbPersistState=setTimeout(startPersist,0)}else if(mount.idbPersistState==="idb"){mount.idbPersistState="again"}},mount:mount=>{var mnt=MEMFS.mount(mount);if(mount?.opts?.autoPersist){mnt.idbPersistState=0;var memfs_node_ops=mnt.node_ops;mnt.node_ops=Object.assign({},mnt.node_ops);mnt.node_ops.mknod=(parent,name,mode,dev)=>{var node=memfs_node_ops.mknod(parent,name,mode,dev);node.node_ops=mnt.node_ops;node.idbfs_mount=mnt.mount;node.memfs_stream_ops=node.stream_ops;node.stream_ops=Object.assign({},node.stream_ops);node.stream_ops.write=(stream,buffer,offset,length,position,canOwn)=>{stream.node.isModified=true;return node.memfs_stream_ops.write(stream,buffer,offset,length,position,canOwn)};node.stream_ops.close=stream=>{var n=stream.node;if(n.isModified){IDBFS.queuePersist(n.idbfs_mount);n.isModified=false}if(n.memfs_stream_ops.close)return n.memfs_stream_ops.close(stream)};return node};mnt.node_ops.mkdir=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.mkdir(...args));mnt.node_ops.rmdir=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.rmdir(...args));mnt.node_ops.symlink=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.symlink(...args));mnt.node_ops.unlink=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.unlink(...args));mnt.node_ops.rename=(...args)=>(IDBFS.queuePersist(mnt.mount),memfs_node_ops.rename(...args))}return mnt},syncfs:(mount,populate,callback)=>{IDBFS.getLocalSet(mount,(err,local)=>{if(err)return callback(err);IDBFS.getRemoteSet(mount,(err,remote)=>{if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)})})},quit:()=>{Object.values(IDBFS.dbs).forEach(value=>value.close());IDBFS.dbs={}},getDB:(name,callback)=>{var db=IDBFS.dbs[name];if(db){return callback(null,db)}var req;try{req=IDBFS.indexedDB().open(name,IDBFS.DB_VERSION)}catch(e){return callback(e)}if(!req){return callback("Unable to connect to IndexedDB")}req.onupgradeneeded=e=>{var db=e.target.result;var transaction=e.target.transaction;var fileStore;if(db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){fileStore=transaction.objectStore(IDBFS.DB_STORE_NAME)}else{fileStore=db.createObjectStore(IDBFS.DB_STORE_NAME)}if(!fileStore.indexNames.contains("timestamp")){fileStore.createIndex("timestamp","timestamp",{unique:false})}};req.onsuccess=()=>{db=req.result;IDBFS.dbs[name]=db;callback(null,db)};req.onerror=e=>{callback(e.target.error);e.preventDefault()}},getLocalSet:(mount,callback)=>{var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return p=>PATH.join2(root,p)}var check=FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));while(check.length){var path=check.pop();var stat;try{stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){check.push(...FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))}entries[path]={timestamp:stat.mtime}}return callback(null,{type:"local",entries})},getRemoteSet:(mount,callback)=>{var entries={};IDBFS.getDB(mount.mountpoint,(err,db)=>{if(err)return callback(err);try{var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=e=>{callback(e.target.error);e.preventDefault()};var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=event=>{var cursor=event.target.result;if(!cursor){return callback(null,{type:"remote",db,entries})}entries[cursor.primaryKey]={timestamp:cursor.key};cursor.continue()}}catch(e){return callback(e)}})},loadLocalEntry:(path,callback)=>{var stat,node;try{var lookup=FS.lookupPath(path);node=lookup.node;stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){return callback(null,{timestamp:stat.mtime,mode:stat.mode})}else if(FS.isFile(stat.mode)){node.contents=MEMFS.getFileDataAsTypedArray(node);return callback(null,{timestamp:stat.mtime,mode:stat.mode,contents:node.contents})}else{return callback(new Error("node type not supported"))}},storeLocalEntry:(path,entry,callback)=>{const previousIgnore=FS.ignorePermissions;try{FS.ignorePermissions=true;if(FS.isDir(entry["mode"])){FS.mkdirTree(path,entry["mode"])}else if(FS.isFile(entry["mode"])){FS.writeFile(path,entry["contents"],{canOwn:true})}else{return callback(new Error("node type not supported"))}FS.chmod(path,entry["mode"]);FS.utime(path,entry["timestamp"],entry["timestamp"])}catch(e){return callback(e)}finally{FS.ignorePermissions=previousIgnore}callback(null)},removeLocalEntry:(path,callback)=>{try{var stat=FS.stat(path);if(FS.isDir(stat.mode)){FS.rmdir(path)}else if(FS.isFile(stat.mode)){FS.unlink(path)}}catch(e){return callback(e)}callback(null)},loadRemoteEntry:(store,path,callback)=>{var req=store.get(path);req.onsuccess=event=>callback(null,event.target.result);req.onerror=e=>{callback(e.target.error);e.preventDefault()}},storeRemoteEntry:(store,path,entry,callback)=>{try{var req=store.put(entry,path)}catch(e){callback(e);return}req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},removeRemoteEntry:(store,path,callback)=>{var req=store.delete(path);req.onsuccess=event=>callback();req.onerror=e=>{callback(e.target.error);e.preventDefault()}},reconcile:(src,dst,callback)=>{var total=0;var create=[];Object.keys(src.entries).forEach(key=>{var e=src.entries[key];var e2=dst.entries[key];if(!e2||e["timestamp"].getTime()!=e2["timestamp"].getTime()){create.push(key);total++}});var remove=[];Object.keys(dst.entries).forEach(key=>{if(!src.entries[key]){remove.push(key);total++}});if(!total){return callback(null)}var errored=false;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err&&!errored){errored=true;return callback(err)}}transaction.onerror=transaction.onabort=e=>{done(e.target.error);e.preventDefault()};transaction.oncomplete=e=>{if(!errored){callback(null)}};create.sort().forEach(path=>{if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(err,entry)=>{if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)})}else{IDBFS.loadLocalEntry(path,(err,entry)=>{if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)})}});remove.sort().reverse().forEach(path=>{if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}})}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:class{constructor(errno){this.name="ErrnoError";this.errno=errno}},genericErrors:{},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(val){this.node=val}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(val){this.shared.flags=val}get position(){return this.shared.position}set position(val){this.shared.position=val}},FSNode:class{constructor(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev;this.readMode=292|73;this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(val){val?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(val){val?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return FS.isDir(this.mode)}get isDevice(){return FS.isChrdev(this.mode)}},lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){if(!FS.isDir(dir.mode))return 54;var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},dupStream(origStream,fd=-1){var stream=FS.createStream(origStream,fd);stream.stream_ops?.dup?.(stream);return stream},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;stream.stream_ops.open?.(stream)},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push(...m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type,opts,mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;iFS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(input,output,error){if(input){FS.createDevice("/dev","stdin",input)}else{FS.symlink("/dev/tty","/dev/stdin")}if(output){FS.createDevice("/dev","stdout",null,output)}else{FS.symlink("/dev/tty","/dev/stdout")}if(error){FS.createDevice("/dev","stderr",null,error)}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},staticInit(){[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""});FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={MEMFS,IDBFS}},init(input,output,error){FS.initialized=true;input??=Module["stdin"];output??=Module["stdout"];error??=Module["stderr"];FS.createStandardStreams(input,output,error)},quit(){FS.initialized=false;_fflush(0);for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]}setDataGetter(getter){this.getter=getter}cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true}get length(){if(!this.lengthKnown){this.cacheLength()}return this._length}get chunkSize(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=(...args)=>{FS.forceLoadFile(node);return fn(...args)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){var stat=func(path);HEAP32[buf>>>2>>>0]=stat.dev;HEAP32[buf+4>>>2>>>0]=stat.mode;HEAPU32[buf+8>>>2>>>0]=stat.nlink;HEAP32[buf+12>>>2>>>0]=stat.uid;HEAP32[buf+16>>>2>>>0]=stat.gid;HEAP32[buf+20>>>2>>>0]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>>2>>>0]=tempI64[0],HEAP32[buf+28>>>2>>>0]=tempI64[1];HEAP32[buf+32>>>2>>>0]=4096;HEAP32[buf+36>>>2>>>0]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>>2>>>0]=tempI64[0],HEAP32[buf+44>>>2>>>0]=tempI64[1];HEAPU32[buf+48>>>2>>>0]=atime%1e3*1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>>2>>>0]=tempI64[0],HEAP32[buf+60>>>2>>>0]=tempI64[1];HEAPU32[buf+64>>>2>>>0]=mtime%1e3*1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>>2>>>0]=tempI64[0],HEAP32[buf+76>>>2>>>0]=tempI64[1];HEAPU32[buf+80>>>2>>>0]=ctime%1e3*1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>>2>>>0]=tempI64[0],HEAP32[buf+92>>>2>>>0]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream},varargs:undefined,getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall__newselect(nfds,readfds,writefds,exceptfds,timeout){readfds>>>=0;writefds>>>=0;exceptfds>>>=0;timeout>>>=0;try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>>2>>>0]:0,srcReadHigh=readfds?HEAP32[readfds+4>>>2>>>0]:0;var srcWriteLow=writefds?HEAP32[writefds>>>2>>>0]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>>2>>>0]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>>2>>>0]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>>2>>>0]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>>2>>>0]:0)|(writefds?HEAP32[writefds>>>2>>>0]:0)|(exceptfds?HEAP32[exceptfds>>>2>>>0]:0);var allHigh=(readfds?HEAP32[readfds+4>>>2>>>0]:0)|(writefds?HEAP32[writefds+4>>>2>>>0]:0)|(exceptfds?HEAP32[exceptfds+4>>>2>>>0]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>>2>>>0]:0,tv_usec=readfds?HEAP32[timeout+4>>>2>>>0]:0;timeoutInMillis=(tv_sec+tv_usec/1e6)*1e3}flags=stream.stream_ops.poll(stream,timeoutInMillis)}if(flags&1&&check(fd,srcReadLow,srcReadHigh,mask)){fd<32?dstReadLow=dstReadLow|mask:dstReadHigh=dstReadHigh|mask;total++}if(flags&4&&check(fd,srcWriteLow,srcWriteHigh,mask)){fd<32?dstWriteLow=dstWriteLow|mask:dstWriteHigh=dstWriteHigh|mask;total++}if(flags&2&&check(fd,srcExceptLow,srcExceptHigh,mask)){fd<32?dstExceptLow=dstExceptLow|mask:dstExceptHigh=dstExceptHigh|mask;total++}}if(readfds){HEAP32[readfds>>>2>>>0]=dstReadLow;HEAP32[readfds+4>>>2>>>0]=dstReadHigh}if(writefds){HEAP32[writefds>>>2>>>0]=dstWriteLow;HEAP32[writefds+4>>>2>>>0]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>>2>>>0]=dstExceptLow;HEAP32[exceptfds+4>>>2>>>0]=dstExceptHigh}return total}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall__newselect.sig="iipppp";var SOCKFS={mount(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family,type,protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr,port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer(sock,addr,port){return sock.peers[addr+":"+port]},addPeer(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>>2>>>0]=bytes;return 0;default:return 28}},close(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i{var socket=SOCKFS.getSocket(fd);if(!socket)throw new FS.ErrnoError(8);return socket};var Sockets={BUFFER_SIZE:10240,MAX_BUFFER_SIZE:10485760,nextFd:1,fds:{},nextport:1,maxport:65535,peer:null,connections:{},portmap:{},localAddr:4261412874,addrPool:[33554442,50331658,67108874,83886090,100663306,117440522,134217738,150994954,167772170,184549386,201326602,218103818,234881034]};var inetPton4=str=>{var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0};var jstoi_q=str=>parseInt(str);var inetPton6=str=>{var words;var w,offset,z,i;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\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;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w{switch(family){case 2:addr=inetPton4(addr);zeroMemory(sa,16);if(addrlen){HEAP32[addrlen>>>2>>>0]=16}HEAP16[sa>>>1>>>0]=family;HEAP32[sa+4>>>2>>>0]=addr;HEAP16[sa+2>>>1>>>0]=_htons(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>>2>>>0]=28}HEAP32[sa>>>2>>>0]=family;HEAP32[sa+8>>>2>>>0]=addr[0];HEAP32[sa+12>>>2>>>0]=addr[1];HEAP32[sa+16>>>2>>>0]=addr[2];HEAP32[sa+20>>>2>>>0]=addr[3];HEAP16[sa+2>>>1>>>0]=_htons(port);break;default:return 5}return 0};var DNS={address_map:{id:1,addrs:{},names:{}},lookup_name(name){var res=inetPton4(name);if(res!==null){return name}res=inetPton6(name);if(res!==null){return name}var addr;if(DNS.address_map.addrs[name]){addr=DNS.address_map.addrs[name]}else{var id=DNS.address_map.id++;assert(id<65535,"exceeded max address mappings of 65535");addr="172.29."+(id&255)+"."+(id&65280);DNS.address_map.names[addr]=name;DNS.address_map.addrs[name]=addr}return addr},lookup_addr(addr){if(DNS.address_map.names[addr]){return DNS.address_map.names[addr]}return null}};function ___syscall_accept4(fd,addr,addrlen,flags,d1,d2){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var newsock=sock.sock_ops.accept(sock);if(addr){var errno=writeSockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_accept4.sig="iippiii";var inetNtop4=addr=>(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255);var inetNtop6=ints=>{var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word{var family=HEAP16[sa>>>1>>>0];var port=_ntohs(HEAPU16[sa+2>>>1>>>0]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>>2>>>0];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>>2>>>0],HEAP32[sa+12>>>2>>>0],HEAP32[sa+16>>>2>>>0],HEAP32[sa+20>>>2>>>0]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family,addr,port}};var getSocketAddress=(addrp,addrlen,allowNull)=>{if(allowNull&&addrp===0)return null;var info=readSockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info};function ___syscall_bind(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.bind(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_bind.sig="iippiii";function ___syscall_chdir(path){path>>>=0;try{path=SYSCALLS.getStr(path);FS.chdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_chdir.sig="ip";function ___syscall_chmod(path,mode){path>>>=0;try{path=SYSCALLS.getStr(path);FS.chmod(path,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_chmod.sig="ipi";function ___syscall_connect(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_connect.sig="iippiii";function ___syscall_dup(fd){try{var old=SYSCALLS.getStreamFromFD(fd);return FS.dupStream(old).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_dup.sig="ii";function ___syscall_dup3(fd,newfd,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===newfd)return-28;if(newfd<0||newfd>=FS.MAX_OPEN_FDS)return-8;var existing=FS.getStream(newfd);if(existing)FS.close(existing);return FS.dupStream(old,newfd).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_dup3.sig="iiii";function ___syscall_faccessat(dirfd,path,amode,flags){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_faccessat.sig="iipii";var ___syscall_fadvise64=(fd,offset,len,advice)=>0;___syscall_fadvise64.sig="iiiiiii";function ___syscall_fallocate(fd,mode,offset_low,offset_high,len_low,len_high){var offset=convertI32PairToI53Checked(offset_low,offset_high);var len=convertI32PairToI53Checked(len_low,len_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.allocate(stream,offset,len);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fallocate.sig="iiiiiii";function ___syscall_fchdir(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.chdir(stream.path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchdir.sig="ii";function ___syscall_fchmod(fd,mode){try{FS.fchmod(fd,mode);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchmod.sig="iii";function ___syscall_fchmodat2(dirfd,path,mode,flags){path>>>=0;try{var nofollow=flags&256;path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);FS.chmod(path,mode,nofollow);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchmodat2.sig="iipii";function ___syscall_fchown32(fd,owner,group){try{FS.fchown(fd,owner,group);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchown32.sig="iiii";function ___syscall_fchownat(dirfd,path,owner,group,flags){path>>>=0;try{path=SYSCALLS.getStr(path);var nofollow=flags&256;flags=flags&~256;path=SYSCALLS.calculateAt(dirfd,path);(nofollow?FS.lchown:FS.chown)(path,owner,group);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fchownat.sig="iipiii";function syscallGetVarargI(){var ret=HEAP32[+SYSCALLS.varargs>>>2>>>0];SYSCALLS.varargs+=4;return ret}var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(fd,cmd,varargs){varargs>>>=0;SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=syscallGetVarargI();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.dupStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=syscallGetVarargI();stream.flags|=arg;return 0}case 12:{var arg=syscallGetVarargP();var offset=0;HEAP16[arg+offset>>>1>>>0]=2;return 0}case 13:case 14:return 0}return-28}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fcntl64.sig="iiip";function ___syscall_fdatasync(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fdatasync.sig="ii";function ___syscall_fstat64(fd,buf){buf>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fstat64.sig="iip";function ___syscall_statfs64(path,size,buf){path>>>=0;size>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);HEAP32[buf+4>>>2>>>0]=4096;HEAP32[buf+40>>>2>>>0]=4096;HEAP32[buf+8>>>2>>>0]=1e6;HEAP32[buf+12>>>2>>>0]=5e5;HEAP32[buf+16>>>2>>>0]=5e5;HEAP32[buf+20>>>2>>>0]=FS.nextInode;HEAP32[buf+24>>>2>>>0]=1e6;HEAP32[buf+28>>>2>>>0]=42;HEAP32[buf+44>>>2>>>0]=2;HEAP32[buf+36>>>2>>>0]=255;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_statfs64.sig="ippp";function ___syscall_fstatfs64(fd,size,buf){size>>>=0;buf>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);return ___syscall_statfs64(0,size,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_fstatfs64.sig="iipp";function ___syscall_ftruncate64(fd,length_low,length_high){var length=convertI32PairToI53Checked(length_low,length_high);try{if(isNaN(length))return 61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_ftruncate64.sig="iiii";var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);function ___syscall_getcwd(buf,size){buf>>>=0;size>>>=0;try{if(size===0)return-28;var cwd=FS.cwd();var cwdLengthInBytes=lengthBytesUTF8(cwd)+1;if(size>>=0;count>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);stream.getdents||=FS.readdir(stream.path);var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var idx=Math.floor(off/struct_size);while(idx>>0,(tempDouble=id,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos>>>2>>>0]=tempI64[0],HEAP32[dirp+pos+4>>>2>>>0]=tempI64[1];tempI64=[(idx+1)*struct_size>>>0,(tempDouble=(idx+1)*struct_size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[dirp+pos+8>>>2>>>0]=tempI64[0],HEAP32[dirp+pos+12>>>2>>>0]=tempI64[1];HEAP16[dirp+pos+16>>>1>>>0]=280;HEAP8[dirp+pos+18>>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getdents64.sig="iipp";function ___syscall_getpeername(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);if(!sock.daddr){return-53}var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getpeername.sig="iippiii";function ___syscall_getsockname(fd,addr,addrlen,d1,d2,d3){addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getsockname.sig="iippiii";function ___syscall_getsockopt(fd,level,optname,optval,optlen,d1){optval>>>=0;optlen>>>=0;try{var sock=getSocketFromFD(fd);if(level===1){if(optname===4){HEAP32[optval>>>2>>>0]=sock.error;HEAP32[optlen>>>2>>>0]=4;sock.error=null;return 0}}return-50}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_getsockopt.sig="iiiippi";function ___syscall_ioctl(fd,op,varargs){varargs>>>=0;SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:{if(!stream.tty)return-59;return 0}case 21505:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcgets){var termios=stream.tty.ops.ioctl_tcgets(stream);var argp=syscallGetVarargP();HEAP32[argp>>>2>>>0]=termios.c_iflag||0;HEAP32[argp+4>>>2>>>0]=termios.c_oflag||0;HEAP32[argp+8>>>2>>>0]=termios.c_cflag||0;HEAP32[argp+12>>>2>>>0]=termios.c_lflag||0;for(var i=0;i<32;i++){HEAP8[argp+i+17>>>0]=termios.c_cc[i]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!stream.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcsets){var argp=syscallGetVarargP();var c_iflag=HEAP32[argp>>>2>>>0];var c_oflag=HEAP32[argp+4>>>2>>>0];var c_cflag=HEAP32[argp+8>>>2>>>0];var c_lflag=HEAP32[argp+12>>>2>>>0];var c_cc=[];for(var i=0;i<32;i++){c_cc.push(HEAP8[argp+i+17>>>0])}return stream.tty.ops.ioctl_tcsets(stream.tty,op,{c_iflag,c_oflag,c_cflag,c_lflag,c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=syscallGetVarargP();HEAP32[argp>>>2>>>0]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=syscallGetVarargP();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tiocgwinsz){var winsize=stream.tty.ops.ioctl_tiocgwinsz(stream.tty);var argp=syscallGetVarargP();HEAP16[argp>>>1>>>0]=winsize[0];HEAP16[argp+2>>>1>>>0]=winsize[1]}return 0}case 21524:{if(!stream.tty)return-59;return 0}case 21515:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_ioctl.sig="iiip";function ___syscall_listen(fd,backlog){try{var sock=getSocketFromFD(fd);sock.sock_ops.listen(sock,backlog);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_listen.sig="iiiiiii";function ___syscall_lstat64(path,buf){path>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_lstat64.sig="ipp";function ___syscall_mkdirat(dirfd,path,mode){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_mkdirat.sig="iipi";function ___syscall_mknodat(dirfd,path,mode,dev){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_mknodat.sig="iipii";function ___syscall_newfstatat(dirfd,path,buf,flags){path>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_newfstatat.sig="iippi";function ___syscall_openat(dirfd,path,flags,varargs){path>>>=0;varargs>>>=0;SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?syscallGetVarargI():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_openat.sig="iipip";var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount(mount){return FS.createNode(null,"/",16384|511,0)},createPipe(){var pipe={buckets:[],refcnt:2};pipe.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var rName=PIPEFS.nextname();var wName=PIPEFS.nextname();var rNode=FS.createNode(PIPEFS.root,rName,4096,0);var wNode=FS.createNode(PIPEFS.root,wName,4096,0);rNode.pipe=pipe;wNode.pipe=pipe;var readableStream=FS.createStream({path:rName,node:rNode,flags:0,seekable:false,stream_ops:PIPEFS.stream_ops});rNode.stream=readableStream;var writableStream=FS.createStream({path:wName,node:wNode,flags:1,seekable:false,stream_ops:PIPEFS.stream_ops});wNode.stream=writableStream;return{readable_fd:readableStream.fd,writable_fd:writableStream.fd}},stream_ops:{poll(stream){var pipe=stream.node.pipe;if((stream.flags&2097155)===1){return 256|4}if(pipe.buckets.length>0){for(var i=0;i0){return 64|1}}}return 0},ioctl(stream,request,varargs){return 28},fsync(stream){return 28},read(stream,buffer,offset,length,position){var pipe=stream.node.pipe;var currentLength=0;for(var i=0;i=dataLen){currBucket.buffer.set(data,currBucket.offset);currBucket.offset+=dataLen;return dataLen}else if(freeBytesInCurrBuffer>0){currBucket.buffer.set(data.subarray(0,freeBytesInCurrBuffer),currBucket.offset);currBucket.offset+=freeBytesInCurrBuffer;data=data.subarray(freeBytesInCurrBuffer,data.byteLength)}var numBuckets=data.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0;var remElements=data.byteLength%PIPEFS.BUCKET_BUFFER_SIZE;for(var i=0;i0){var newBucket={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:data.byteLength,roffset:0};pipe.buckets.push(newBucket);newBucket.buffer.set(data)}return dataLen},close(stream){var pipe=stream.node.pipe;pipe.refcnt--;if(pipe.refcnt===0){pipe.buckets=null}}},nextname(){if(!PIPEFS.nextname.current){PIPEFS.nextname.current=0}return"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall_pipe(fdPtr){fdPtr>>>=0;try{if(fdPtr==0){throw new FS.ErrnoError(21)}var res=PIPEFS.createPipe();HEAP32[fdPtr>>>2>>>0]=res.readable_fd;HEAP32[fdPtr+4>>>2>>>0]=res.writable_fd;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_pipe.sig="ip";function ___syscall_poll(fds,nfds,timeout){fds>>>=0;try{var nonzero=0;for(var i=0;i>>2>>>0];var events=HEAP16[pollfd+4>>>1>>>0];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream,-1)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>>1>>>0]=mask}return nonzero}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_poll.sig="ipii";function ___syscall_readlinkat(dirfd,path,buf,bufsize){path>>>=0;buf>>>=0;bufsize>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len>>>0];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len>>>0]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_readlinkat.sig="iippp";function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){buf>>>=0;len>>>=0;addr>>>=0;addrlen>>>=0;try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf>>>0);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_recvfrom.sig="iippipp";function ___syscall_recvmsg(fd,message,flags,d1,d2,d3){message>>>=0;try{var sock=getSocketFromFD(fd);var iov=HEAPU32[message+8>>>2>>>0];var num=HEAP32[message+12>>>2>>>0];var total=0;for(var i=0;i>>2>>>0]}var msg=sock.sock_ops.recvmsg(sock,total);if(!msg)return 0;var name=HEAPU32[message>>>2>>>0];if(name){var errno=writeSockaddr(name,sock.family,DNS.lookup_name(msg.addr),msg.port)}var bytesRead=0;var bytesRemaining=msg.buffer.byteLength;for(var i=0;bytesRemaining>0&&i>>2>>>0];var iovlen=HEAP32[iov+(8*i+4)>>>2>>>0];if(!iovlen){continue}var length=Math.min(iovlen,bytesRemaining);var buf=msg.buffer.subarray(bytesRead,bytesRead+length);HEAPU8.set(buf,iovbase+bytesRead>>>0);bytesRead+=length;bytesRemaining-=length}return bytesRead}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_recvmsg.sig="iipiiii";function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){oldpath>>>=0;newpath>>>=0;try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_renameat.sig="iipip";function ___syscall_rmdir(path){path>>>=0;try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_rmdir.sig="ip";function ___syscall_sendmsg(fd,message,flags,d1,d2,d3){message>>>=0;d1>>>=0;d2>>>=0;try{var sock=getSocketFromFD(fd);var iov=HEAPU32[message+8>>>2>>>0];var num=HEAP32[message+12>>>2>>>0];var addr,port;var name=HEAPU32[message>>>2>>>0];var namelen=HEAP32[message+4>>>2>>>0];if(name){var info=readSockaddr(name,namelen);if(info.errno)return-info.errno;port=info.port;addr=DNS.lookup_addr(info.addr)||info.addr}var total=0;for(var i=0;i>>2>>>0]}var view=new Uint8Array(total);var offset=0;for(var i=0;i>>2>>>0];var iovlen=HEAP32[iov+(8*i+4)>>>2>>>0];for(var j=0;j>>0]}}return sock.sock_ops.sendmsg(sock,view,0,total,addr,port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_sendmsg.sig="iipippi";function ___syscall_sendto(fd,message,length,flags,addr,addr_len){message>>>=0;length>>>=0;addr>>>=0;addr_len>>>=0;try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_sendto.sig="iippipp";function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_socket.sig="iiiiiii";function ___syscall_stat64(path,buf){path>>>=0;buf>>>=0;try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_stat64.sig="ipp";function ___syscall_symlink(target,linkpath){target>>>=0;linkpath>>>=0;try{target=SYSCALLS.getStr(target);linkpath=SYSCALLS.getStr(linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_symlink.sig="ipp";function ___syscall_symlinkat(target,newdirfd,linkpath){target>>>=0;linkpath>>>=0;try{linkpath=SYSCALLS.calculateAt(newdirfd,linkpath);FS.symlink(target,linkpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_symlinkat.sig="ipip";function ___syscall_truncate64(path,length_low,length_high){path>>>=0;var length=convertI32PairToI53Checked(length_low,length_high);try{if(isNaN(length))return 61;path=SYSCALLS.getStr(path);FS.truncate(path,length);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_truncate64.sig="ipii";function ___syscall_unlinkat(dirfd,path,flags){path>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_unlinkat.sig="iipi";var readI53FromI64=ptr=>HEAPU32[ptr>>>2>>>0]+HEAP32[ptr+4>>>2>>>0]*4294967296;function ___syscall_utimensat(dirfd,path,times,flags){path>>>=0;times>>>=0;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path,true);var now=Date.now(),atime,mtime;if(!times){atime=now;mtime=now}else{var seconds=readI53FromI64(times);var nanoseconds=HEAP32[times+8>>>2>>>0];if(nanoseconds==1073741823){atime=now}else if(nanoseconds==1073741822){atime=-1}else{atime=seconds*1e3+nanoseconds/(1e3*1e3)}times+=16;seconds=readI53FromI64(times);nanoseconds=HEAP32[times+8>>>2>>>0];if(nanoseconds==1073741823){mtime=now}else if(nanoseconds==1073741822){mtime=-1}else{mtime=seconds*1e3+nanoseconds/(1e3*1e3)}}if(mtime!=-1||atime!=-1){FS.utime(path,atime,mtime)}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}___syscall_utimensat.sig="iippi";var ___table_base=new WebAssembly.Global({value:"i32",mutable:false},1);function ___xmlOutputBufferCreateFilename(...args){return asyncifyStubs["__xmlOutputBufferCreateFilename"](...args)}___xmlOutputBufferCreateFilename.stub=true;asyncifyStubs["__xmlOutputBufferCreateFilename"]=undefined;function ___xmlParserInputBufferCreateFilename(...args){return asyncifyStubs["__xmlParserInputBufferCreateFilename"](...args)}___xmlParserInputBufferCreateFilename.stub=true;asyncifyStubs["__xmlParserInputBufferCreateFilename"]=undefined;function ___xmlRegisterCallbacks(...args){return asyncifyStubs["__xmlRegisterCallbacks"](...args)}___xmlRegisterCallbacks.stub=true;asyncifyStubs["__xmlRegisterCallbacks"]=undefined;var __abort_js=()=>{abort("")};__abort_js.sig="v";var ENV={};var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var dlSetError=msg=>{var sp=stackSave();var cmsg=stringToUTF8OnStack(msg);___dl_seterr(cmsg,0);stackRestore(sp)};var dlopenInternal=(handle,jsflags)=>{var filename=UTF8ToString(handle+36);var flags=HEAP32[handle+4>>>2>>>0];filename=PATH.normalize(filename);var searchpaths=[];var global=Boolean(flags&256);var localScope=global?null:{};var combinedFlags={global,nodelete:Boolean(flags&4096),loadAsync:jsflags.loadAsync};if(jsflags.loadAsync){return loadDynamicLibrary(filename,combinedFlags,localScope,handle)}try{return loadDynamicLibrary(filename,combinedFlags,localScope,handle)}catch(e){dlSetError(`Could not load dynamic lib: ${filename}\n${e}`);return 0}};var __dlopen_js=function(handle){handle>>>=0;return Asyncify.handleSleep(wakeUp=>{dlopenInternal(handle,{loadAsync:true}).then(wakeUp).catch(()=>wakeUp(0))})};__dlopen_js.sig="pp";__dlopen_js.isAsync=true;function __dlsym_js(handle,symbol,symbolIndex){handle>>>=0;symbol>>>=0;symbolIndex>>>=0;symbol=UTF8ToString(symbol);var result;var newSymIndex;var lib=LDSO.loadedLibsByHandle[handle];if(!lib.exports.hasOwnProperty(symbol)||lib.exports[symbol].stub){dlSetError(`Tried to lookup unknown symbol "${symbol}" in dynamic lib: ${lib.name}`);return 0}newSymIndex=Object.keys(lib.exports).indexOf(symbol);var origSym="orig$"+symbol;result=lib.exports[origSym];if(result){newSymIndex=Object.keys(lib.exports).indexOf(origSym)}else result=lib.exports[symbol];if(typeof result=="function"){if("orig"in result){result=result.orig}var addr=getFunctionAddress(result);if(addr){result=addr}else{result=addFunction(result,result.sig);HEAPU32[symbolIndex>>>2>>>0]=newSymIndex}}return result}__dlsym_js.sig="pppp";var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};_proc_exit.sig="vi";var exitJS=(status,implicit)=>{EXITSTATUS=status;if(!keepRuntimeAlive()){exitRuntime()}_proc_exit(status)};var _exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(runtimeExited){return}if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(runtimeExited||ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};runtimeKeepalivePush.sig="v";var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};runtimeKeepalivePop.sig="v";function __emscripten_dlopen_js(handle,onsuccess,onerror,user_data){handle>>>=0;onsuccess>>>=0;onerror>>>=0;user_data>>>=0;function errorCallback(e){var filename=UTF8ToString(handle+36);dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`);runtimeKeepalivePop();callUserCallback(()=>((a1,a2)=>{})(handle,user_data))}function successCallback(){runtimeKeepalivePop();callUserCallback(()=>((a1,a2)=>{})(handle,user_data))}runtimeKeepalivePush();var promise=dlopenInternal(handle,{loadAsync:true});if(promise){promise.then(successCallback,errorCallback)}else{errorCallback()}}__emscripten_dlopen_js.sig="vpppp";var nowIsMonotonic=1;var __emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var getExecutableName=()=>thisProgram||"./this.program";function __emscripten_get_progname(str,len){str>>>=0;stringToUTF8(getExecutableName(),str,len)}__emscripten_get_progname.sig="vpi";function __emscripten_lookup_name(name){name>>>=0;var nameString=UTF8ToString(name);return inetPton4(DNS.lookup_name(nameString))}__emscripten_lookup_name.sig="ip";function __emscripten_memcpy_js(dest,src,num){dest>>>=0;src>>>=0;num>>>=0;return HEAPU8.copyWithin(dest>>>0,src>>>0,src+num>>>0)}__emscripten_memcpy_js.sig="vppp";var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";function __emscripten_system(command){command>>>=0;if(!command)return 0;return-52}__emscripten_system.sig="ip";var __emscripten_throw_longjmp=()=>{throw Infinity};__emscripten_throw_longjmp.sig="v";function __gmtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);tmPtr>>>=0;var date=new Date(time*1e3);HEAP32[tmPtr>>>2>>>0]=date.getUTCSeconds();HEAP32[tmPtr+4>>>2>>>0]=date.getUTCMinutes();HEAP32[tmPtr+8>>>2>>>0]=date.getUTCHours();HEAP32[tmPtr+12>>>2>>>0]=date.getUTCDate();HEAP32[tmPtr+16>>>2>>>0]=date.getUTCMonth();HEAP32[tmPtr+20>>>2>>>0]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>>2>>>0]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>>2>>>0]=yday}__gmtime_js.sig="viip";var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);tmPtr>>>=0;var date=new Date(time*1e3);HEAP32[tmPtr>>>2>>>0]=date.getSeconds();HEAP32[tmPtr+4>>>2>>>0]=date.getMinutes();HEAP32[tmPtr+8>>>2>>>0]=date.getHours();HEAP32[tmPtr+12>>>2>>>0]=date.getDate();HEAP32[tmPtr+16>>>2>>>0]=date.getMonth();HEAP32[tmPtr+20>>>2>>>0]=date.getFullYear()-1900;HEAP32[tmPtr+24>>>2>>>0]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>>2>>>0]=yday;HEAP32[tmPtr+36>>>2>>>0]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>>2>>>0]=dst}__localtime_js.sig="viip";var __mktime_js=function(tmPtr){tmPtr>>>=0;var ret=(()=>{var date=new Date(HEAP32[tmPtr+20>>>2>>>0]+1900,HEAP32[tmPtr+16>>>2>>>0],HEAP32[tmPtr+12>>>2>>>0],HEAP32[tmPtr+8>>>2>>>0],HEAP32[tmPtr+4>>>2>>>0],HEAP32[tmPtr>>>2>>>0],0);var dst=HEAP32[tmPtr+32>>>2>>>0];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>>2>>>0]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>>2>>>0]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>>2>>>0]=yday;HEAP32[tmPtr>>>2>>>0]=date.getSeconds();HEAP32[tmPtr+4>>>2>>>0]=date.getMinutes();HEAP32[tmPtr+8>>>2>>>0]=date.getHours();HEAP32[tmPtr+12>>>2>>>0]=date.getDate();HEAP32[tmPtr+16>>>2>>>0]=date.getMonth();HEAP32[tmPtr+20>>>2>>>0]=date.getYear();var timeMs=date.getTime();if(isNaN(timeMs)){return-1}return timeMs/1e3})();return setTempRet0((tempDouble=ret,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),ret>>>0};__mktime_js.sig="ip";function __mmap_js(len,prot,flags,fd,offset_low,offset_high,allocated,addr){len>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);allocated>>>=0;addr>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var res=FS.mmap(stream,len,offset,prot,flags);var ptr=res.ptr;HEAP32[allocated>>>2>>>0]=res.allocated;HEAPU32[addr>>>2>>>0]=ptr;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}__mmap_js.sig="ipiiiiipp";function __msync_js(addr,len,prot,flags,fd,offset_low,offset_high){addr>>>=0;len>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;SYSCALLS.doMsync(addr,SYSCALLS.getStreamFromFD(fd),len,flags,offset);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}__msync_js.sig="ippiiiii";function __munmap_js(addr,len,prot,flags,fd,offset_low,offset_high){addr>>>=0;len>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);try{var stream=SYSCALLS.getStreamFromFD(fd);if(prot&2){SYSCALLS.doMsync(addr,stream,len,flags,offset)}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}__munmap_js.sig="ippiiiii";var timers={};var _emscripten_get_now=()=>performance.now();_emscripten_get_now.sig="d";var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};__setitimer_js.sig="iid";var __timegm_js=function(tmPtr){tmPtr>>>=0;var ret=(()=>{var time=Date.UTC(HEAP32[tmPtr+20>>>2>>>0]+1900,HEAP32[tmPtr+16>>>2>>>0],HEAP32[tmPtr+12>>>2>>>0],HEAP32[tmPtr+8>>>2>>>0],HEAP32[tmPtr+4>>>2>>>0],HEAP32[tmPtr>>>2>>>0],0);var date=new Date(time);HEAP32[tmPtr+24>>>2>>>0]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>>2>>>0]=yday;return date.getTime()/1e3})();return setTempRet0((tempDouble=ret,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),ret>>>0};__timegm_js.sig="ip";var __tzset_js=function(timezone,daylight,std_name,dst_name){timezone>>>=0;daylight>>>=0;std_name>>>=0;dst_name>>>=0;var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>>2>>>0]=stdTimezoneOffset*60;HEAP32[daylight>>>2>>>0]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset{readEmAsmArgsArray.length=0;var ch;while(ch=HEAPU8[sigPtr++>>>0]){var wide=ch!=105;wide&=ch!=112;buf+=wide&&buf%8?4:0;readEmAsmArgsArray.push(ch==112?HEAPU32[buf>>>2>>>0]:ch==105?HEAP32[buf>>>2>>>0]:HEAPF64[buf>>>3>>>0]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=(code,sigPtr,argbuf)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code](...args)};function _emscripten_asm_const_int(code,sigPtr,argbuf){code>>>=0;sigPtr>>>=0;argbuf>>>=0;return runEmAsmFunction(code,sigPtr,argbuf)}_emscripten_asm_const_int.sig="ippp";function _emscripten_asm_const_ptr(code,sigPtr,argbuf){code>>>=0;sigPtr>>>=0;argbuf>>>=0;return runEmAsmFunction(code,sigPtr,argbuf)}_emscripten_asm_const_ptr.sig="pppp";function _emscripten_console_error(str){str>>>=0;console.error(UTF8ToString(str))}_emscripten_console_error.sig="vp";function _emscripten_console_log(str){str>>>=0;console.log(UTF8ToString(str))}_emscripten_console_log.sig="vp";function _emscripten_console_trace(str){str>>>=0;console.trace(UTF8ToString(str))}_emscripten_console_trace.sig="vp";function _emscripten_console_warn(str){str>>>=0;console.warn(UTF8ToString(str))}_emscripten_console_warn.sig="vp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";function _emscripten_err(str){str>>>=0;return err(UTF8ToString(str))}_emscripten_err.sig="vp";var getHeapMax=()=>4294901760;function _emscripten_get_heap_max(){return getHeapMax()}_emscripten_get_heap_max.sig="p";var _emscripten_get_now_res=()=>1e3;_emscripten_get_now_res.sig="d";function _emscripten_out(str){str>>>=0;return out(UTF8ToString(str))}_emscripten_out.sig="vp";class HandleAllocator{constructor(){this.allocated=[undefined];this.freelist=[]}get(id){return this.allocated[id]}has(id){return this.allocated[id]!==undefined}allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id}free(id){this.allocated[id]=undefined;this.freelist.push(id)}}var promiseMap=new HandleAllocator;var makePromise=()=>{var promiseInfo={};promiseInfo.promise=new Promise((resolve,reject)=>{promiseInfo.reject=reject;promiseInfo.resolve=resolve});promiseInfo.id=promiseMap.allocate(promiseInfo);return promiseInfo};function _emscripten_promise_create(){return makePromise().id}_emscripten_promise_create.sig="p";function _emscripten_promise_destroy(id){id>>>=0;promiseMap.free(id)}_emscripten_promise_destroy.sig="vp";var getPromise=id=>promiseMap.get(id).promise;function _emscripten_promise_resolve(id,result,value){id>>>=0;value>>>=0;var info=promiseMap.get(id);switch(result){case 0:info.resolve(value);return;case 1:info.resolve(getPromise(value));return;case 2:info.resolve(getPromise(value));_emscripten_promise_destroy(value);return;case 3:info.reject(value);return}}_emscripten_promise_resolve.sig="vpip";var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};function _emscripten_resize_heap(requestedSize){requestedSize>>>=0;var oldSize=HEAPU8.length;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false}_emscripten_resize_heap.sig="ip";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>>0]=str.charCodeAt(i)}HEAP8[buffer>>>0]=0};var _environ_get=function(__environ,environ_buf){__environ>>>=0;environ_buf>>>=0;var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>>2>>>0]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};_environ_get.sig="ipp";var _environ_sizes_get=function(penviron_count,penviron_buf_size){penviron_count>>>=0;penviron_buf_size>>>=0;var strings=getEnvStrings();HEAPU32[penviron_count>>>2>>>0]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>>2>>>0]=bufSize;return 0};_environ_sizes_get.sig="ipp";function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_close.sig="ii";function _fd_fdstat_get(fd,pbuf){pbuf>>>=0;try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf>>>0]=type;HEAP16[pbuf+2>>>1>>>0]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+8>>>2>>>0]=tempI64[0],HEAP32[pbuf+12>>>2>>>0]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+16>>>2>>>0]=tempI64[0],HEAP32[pbuf+20>>>2>>>0]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_fdstat_get.sig="iip";var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>>2>>>0];var len=HEAPU32[iov+4>>>2>>>0];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>=0;iovcnt>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);pnum>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt,offset);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_pread.sig="iippiip";var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>>2>>>0];var len=HEAPU32[iov+4>>>2>>>0];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>=0;iovcnt>>>=0;var offset=convertI32PairToI53Checked(offset_low,offset_high);pnum>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt,offset);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_pwrite.sig="iippiip";function _fd_read(fd,iov,iovcnt,pnum){iov>>>=0;iovcnt>>>=0;pnum>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doReadv(stream,iov,iovcnt);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_read.sig="iippp";function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);newOffset>>>=0;try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>>2>>>0]=tempI64[0],HEAP32[newOffset+4>>>2>>>0]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_seek.sig="iiiiip";var _fd_sync=function(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);return Asyncify.handleSleep(wakeUp=>{var mount=stream.node.mount;if(!mount.type.syncfs){wakeUp(0);return}mount.type.syncfs(mount,false,err=>{if(err){wakeUp(29);return}wakeUp(0)})})}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}};_fd_sync.sig="ii";_fd_sync.isAsync=true;function _fd_write(fd,iov,iovcnt,pnum){iov>>>=0;iovcnt>>>=0;pnum>>>=0;try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>>2>>>0]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_fd_write.sig="iippp";function _getaddrinfo(node,service,hint,out){node>>>=0;service>>>=0;hint>>>=0;out>>>=0;var addrs=[];var canon=null;var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai,last;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?inetNtop6(addr):inetNtop4(addr);sa=_malloc(salen);errno=writeSockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>>2>>>0]=family;HEAP32[ai+8>>>2>>>0]=type;HEAP32[ai+12>>>2>>>0]=proto;HEAPU32[ai+24>>>2>>>0]=canon;HEAPU32[ai+20>>>2>>>0]=sa;if(family===10){HEAP32[ai+16>>>2>>>0]=28}else{HEAP32[ai+16>>>2>>>0]=16}HEAP32[ai+28>>>2>>>0]=0;return ai}if(hint){flags=HEAP32[hint>>>2>>>0];family=HEAP32[hint+4>>>2>>>0];type=HEAP32[hint+8>>>2>>>0];proto=HEAP32[hint+12>>>2>>>0]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>>2>>>0]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>>2>>>0]=ai;return 0}node=UTF8ToString(node);addr=inetPton4(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=inetPton6(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAPU32[out>>>2>>>0]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=inetPton4(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>>2>>>0]=ai;return 0}_getaddrinfo.sig="ipppp";function _getcontext(...args){return asyncifyStubs["getcontext"](...args)}_getcontext.stub=true;asyncifyStubs["getcontext"]=undefined;function _getdtablesize(...args){return asyncifyStubs["getdtablesize"](...args)}_getdtablesize.stub=true;asyncifyStubs["getdtablesize"]=undefined;function _getentropy(buffer,size){buffer>>>=0;size>>>=0;randomFill(HEAPU8.subarray(buffer>>>0,buffer+size>>>0));return 0}_getentropy.sig="ipp";function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){sa>>>=0;node>>>=0;serv>>>=0;var info=readSockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}_getnameinfo.sig="ipipipii";var Protocols={list:[],map:{}};var _setprotoent=stayopen=>{function allocprotoent(name,proto,aliases){var nameBuf=_malloc(name.length+1);stringToAscii(name,nameBuf);var j=0;var length=aliases.length;var aliasListBuf=_malloc((length+1)*4);for(var i=0;i>>2>>>0]=aliasBuf}HEAPU32[aliasListBuf+j>>>2>>>0]=0;var pe=_malloc(12);HEAPU32[pe>>>2>>>0]=nameBuf;HEAPU32[pe+4>>>2>>>0]=aliasListBuf;HEAP32[pe+8>>>2>>>0]=proto;return pe}var list=Protocols.list;var map=Protocols.map;if(list.length===0){var entry=allocprotoent("tcp",6,["TCP"]);list.push(entry);map["tcp"]=map["6"]=entry;entry=allocprotoent("udp",17,["UDP"]);list.push(entry);map["udp"]=map["17"]=entry}_setprotoent.index=0};_setprotoent.sig="vi";function _getprotobyname(name){name>>>=0;name=UTF8ToString(name);_setprotoent(true);var result=Protocols.map[name];return result}_getprotobyname.sig="pp";function _getprotobynumber(number){_setprotoent(true);var result=Protocols.map[number];return result}_getprotobynumber.sig="pi";function _htmlDefaultSAXHandler(...args){return asyncifyStubs["htmlDefaultSAXHandler"](...args)}_htmlDefaultSAXHandler.stub=true;asyncifyStubs["htmlDefaultSAXHandler"]=undefined;function _isolat1ToUTF8(...args){return asyncifyStubs["isolat1ToUTF8"](...args)}_isolat1ToUTF8.stub=true;asyncifyStubs["isolat1ToUTF8"]=undefined;function _makecontext(...args){return asyncifyStubs["makecontext"](...args)}_makecontext.stub=true;asyncifyStubs["makecontext"]=undefined;function _oldXMLWDcompatibility(...args){return asyncifyStubs["oldXMLWDcompatibility"](...args)}_oldXMLWDcompatibility.stub=true;asyncifyStubs["oldXMLWDcompatibility"]=undefined;function _posix_spawnp(...args){return asyncifyStubs["posix_spawnp"](...args)}_posix_spawnp.stub=true;asyncifyStubs["posix_spawnp"]=undefined;var arraySum=(array,index)=>{var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum};var MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];var addDays=(date,days)=>{var newDate=new Date(date.getTime());while(days>0){var leap=isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate};function _strptime(buf,format,tm){buf>>>=0;format>>>=0;tm>>>=0;var pattern=UTF8ToString(format);var SPECIAL_CHARS="\\!@#$^&*()+=-[]/{}|:<>?,.";for(var i=0,ii=SPECIAL_CHARS.length;iEQUIVALENT_MATCHERS[c]||m).replace(/%(.)/g,(_,c)=>{let pat=DATE_PATTERNS[c];if(pat){capture.push(c);return`(${pat})`}else{return c}}).replace(/\s+/g,"\\s*");var matches=new RegExp("^"+pattern_out,"i").exec(UTF8ToString(buf));function initDate(){function fixup(value,min,max){return typeof value!="number"||isNaN(value)?min:value>=min?value<=max?value:max:min}return{year:fixup(HEAP32[tm+20>>>2>>>0]+1900,1970,9999),month:fixup(HEAP32[tm+16>>>2>>>0],0,11),day:fixup(HEAP32[tm+12>>>2>>>0],1,31),hour:fixup(HEAP32[tm+8>>>2>>>0],0,23),min:fixup(HEAP32[tm+4>>>2>>>0],0,59),sec:fixup(HEAP32[tm>>>2>>>0],0,59),gmtoff:0}}if(matches){var date=initDate();var value;var getMatch=symbol=>{var pos=capture.indexOf(symbol);if(pos>=0){return matches[pos+1]}return};if(value=getMatch("S")){date.sec=jstoi_q(value)}if(value=getMatch("M")){date.min=jstoi_q(value)}if(value=getMatch("H")){date.hour=jstoi_q(value)}else if(value=getMatch("I")){var hour=jstoi_q(value);if(value=getMatch("p")){hour+=value.toUpperCase()[0]==="P"?12:0}date.hour=hour}if(value=getMatch("Y")){date.year=jstoi_q(value)}else if(value=getMatch("y")){var year=jstoi_q(value);if(value=getMatch("C")){year+=jstoi_q(value)*100}else{year+=year<69?2e3:1900}date.year=year}if(value=getMatch("m")){date.month=jstoi_q(value)-1}else if(value=getMatch("b")){date.month=MONTH_NUMBERS[value.substring(0,3).toUpperCase()]||0}if(value=getMatch("d")){date.day=jstoi_q(value)}else if(value=getMatch("j")){var day=jstoi_q(value);var leapYear=isLeapYear(date.year);for(var month=0;month<12;++month){var daysUntilMonth=arraySum(leapYear?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,month-1);if(day<=daysUntilMonth+(leapYear?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[month]){date.day=day-daysUntilMonth}}}else if(value=getMatch("a")){var weekDay=value.substring(0,3).toUpperCase();if(value=getMatch("U")){var weekDayNumber=DAY_NUMBERS_SUN_FIRST[weekDay];var weekNumber=jstoi_q(value);var janFirst=new Date(date.year,0,1);var endDate;if(janFirst.getDay()===0){endDate=addDays(janFirst,weekDayNumber+7*(weekNumber-1))}else{endDate=addDays(janFirst,7-janFirst.getDay()+weekDayNumber+7*(weekNumber-1))}date.day=endDate.getDate();date.month=endDate.getMonth()}else if(value=getMatch("W")){var weekDayNumber=DAY_NUMBERS_MON_FIRST[weekDay];var weekNumber=jstoi_q(value);var janFirst=new Date(date.year,0,1);var endDate;if(janFirst.getDay()===1){endDate=addDays(janFirst,weekDayNumber+7*(weekNumber-1))}else{endDate=addDays(janFirst,7-janFirst.getDay()+1+weekDayNumber+7*(weekNumber-1))}date.day=endDate.getDate();date.month=endDate.getMonth()}}if(value=getMatch("z")){if(value.toLowerCase()==="z"){date.gmtoff=0}else{var match=value.match(/^((?:\-|\+)\d\d):?(\d\d)?/);date.gmtoff=match[1]*3600;if(match[2]){date.gmtoff+=date.gmtoff>0?match[2]*60:-match[2]*60}}}var fullDate=new Date(date.year,date.month,date.day,date.hour,date.min,date.sec,0);HEAP32[tm>>>2>>>0]=fullDate.getSeconds();HEAP32[tm+4>>>2>>>0]=fullDate.getMinutes();HEAP32[tm+8>>>2>>>0]=fullDate.getHours();HEAP32[tm+12>>>2>>>0]=fullDate.getDate();HEAP32[tm+16>>>2>>>0]=fullDate.getMonth();HEAP32[tm+20>>>2>>>0]=fullDate.getFullYear()-1900;HEAP32[tm+24>>>2>>>0]=fullDate.getDay();HEAP32[tm+28>>>2>>>0]=arraySum(isLeapYear(fullDate.getFullYear())?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,fullDate.getMonth()-1)+fullDate.getDate()-1;HEAP32[tm+32>>>2>>>0]=0;HEAP32[tm+36>>>2>>>0]=date.gmtoff;return buf+intArrayFromString(matches[0]).length-1}return 0}_strptime.sig="pppp";function _swapcontext(...args){return asyncifyStubs["swapcontext"](...args)}_swapcontext.stub=true;asyncifyStubs["swapcontext"]=undefined;function _xmlAllocOutputBuffer(...args){return asyncifyStubs["xmlAllocOutputBuffer"](...args)}_xmlAllocOutputBuffer.stub=true;asyncifyStubs["xmlAllocOutputBuffer"]=undefined;function _xmlAllocParserInputBuffer(...args){return asyncifyStubs["xmlAllocParserInputBuffer"](...args)}_xmlAllocParserInputBuffer.stub=true;asyncifyStubs["xmlAllocParserInputBuffer"]=undefined;function _xmlBufferAllocScheme(...args){return asyncifyStubs["xmlBufferAllocScheme"](...args)}_xmlBufferAllocScheme.stub=true;asyncifyStubs["xmlBufferAllocScheme"]=undefined;function _xmlCopyError(...args){return asyncifyStubs["xmlCopyError"](...args)}_xmlCopyError.stub=true;asyncifyStubs["xmlCopyError"]=undefined;function _xmlDefaultBufferSize(...args){return asyncifyStubs["xmlDefaultBufferSize"](...args)}_xmlDefaultBufferSize.stub=true;asyncifyStubs["xmlDefaultBufferSize"]=undefined;function _xmlDefaultSAXHandler(...args){return asyncifyStubs["xmlDefaultSAXHandler"](...args)}_xmlDefaultSAXHandler.stub=true;asyncifyStubs["xmlDefaultSAXHandler"]=undefined;function _xmlDefaultSAXLocator(...args){return asyncifyStubs["xmlDefaultSAXLocator"](...args)}_xmlDefaultSAXLocator.stub=true;asyncifyStubs["xmlDefaultSAXLocator"]=undefined;function _xmlDeregisterNodeDefaultValue(...args){return asyncifyStubs["xmlDeregisterNodeDefaultValue"](...args)}_xmlDeregisterNodeDefaultValue.stub=true;asyncifyStubs["xmlDeregisterNodeDefaultValue"]=undefined;function _xmlDictOwns(...args){return asyncifyStubs["xmlDictOwns"](...args)}_xmlDictOwns.stub=true;asyncifyStubs["xmlDictOwns"]=undefined;function _xmlDoValidityCheckingDefaultValue(...args){return asyncifyStubs["xmlDoValidityCheckingDefaultValue"](...args)}_xmlDoValidityCheckingDefaultValue.stub=true;asyncifyStubs["xmlDoValidityCheckingDefaultValue"]=undefined;function _xmlFileClose(...args){return asyncifyStubs["xmlFileClose"](...args)}_xmlFileClose.stub=true;asyncifyStubs["xmlFileClose"]=undefined;function _xmlFileMatch(...args){return asyncifyStubs["xmlFileMatch"](...args)}_xmlFileMatch.stub=true;asyncifyStubs["xmlFileMatch"]=undefined;function _xmlFileOpen(...args){return asyncifyStubs["xmlFileOpen"](...args)}_xmlFileOpen.stub=true;asyncifyStubs["xmlFileOpen"]=undefined;function _xmlFileRead(...args){return asyncifyStubs["xmlFileRead"](...args)}_xmlFileRead.stub=true;asyncifyStubs["xmlFileRead"]=undefined;function _xmlFree(...args){return asyncifyStubs["xmlFree"](...args)}_xmlFree.stub=true;asyncifyStubs["xmlFree"]=undefined;function _xmlFreeDoc(...args){return asyncifyStubs["xmlFreeDoc"](...args)}_xmlFreeDoc.stub=true;asyncifyStubs["xmlFreeDoc"]=undefined;function _xmlFreeNode(...args){return asyncifyStubs["xmlFreeNode"](...args)}_xmlFreeNode.stub=true;asyncifyStubs["xmlFreeNode"]=undefined;function _xmlFreeNodeList(...args){return asyncifyStubs["xmlFreeNodeList"](...args)}_xmlFreeNodeList.stub=true;asyncifyStubs["xmlFreeNodeList"]=undefined;function _xmlFreeNs(...args){return asyncifyStubs["xmlFreeNs"](...args)}_xmlFreeNs.stub=true;asyncifyStubs["xmlFreeNs"]=undefined;function _xmlFreeParserInputBuffer(...args){return asyncifyStubs["xmlFreeParserInputBuffer"](...args)}_xmlFreeParserInputBuffer.stub=true;asyncifyStubs["xmlFreeParserInputBuffer"]=undefined;function _xmlFreeProp(...args){return asyncifyStubs["xmlFreeProp"](...args)}_xmlFreeProp.stub=true;asyncifyStubs["xmlFreeProp"]=undefined;function _xmlFreeURI(...args){return asyncifyStubs["xmlFreeURI"](...args)}_xmlFreeURI.stub=true;asyncifyStubs["xmlFreeURI"]=undefined;function _xmlGenericError(...args){return asyncifyStubs["xmlGenericError"](...args)}_xmlGenericError.stub=true;asyncifyStubs["xmlGenericError"]=undefined;function _xmlGenericErrorContext(...args){return asyncifyStubs["xmlGenericErrorContext"](...args)}_xmlGenericErrorContext.stub=true;asyncifyStubs["xmlGenericErrorContext"]=undefined;function _xmlGenericErrorDefaultFunc(...args){return asyncifyStubs["xmlGenericErrorDefaultFunc"](...args)}_xmlGenericErrorDefaultFunc.stub=true;asyncifyStubs["xmlGenericErrorDefaultFunc"]=undefined;function _xmlGetExternalEntityLoader(...args){return asyncifyStubs["xmlGetExternalEntityLoader"](...args)}_xmlGetExternalEntityLoader.stub=true;asyncifyStubs["xmlGetExternalEntityLoader"]=undefined;function _xmlGetLastError(...args){return asyncifyStubs["xmlGetLastError"](...args)}_xmlGetLastError.stub=true;asyncifyStubs["xmlGetLastError"]=undefined;function _xmlGetWarningsDefaultValue(...args){return asyncifyStubs["xmlGetWarningsDefaultValue"](...args)}_xmlGetWarningsDefaultValue.stub=true;asyncifyStubs["xmlGetWarningsDefaultValue"]=undefined;function _xmlHashDefaultDeallocator(...args){return asyncifyStubs["xmlHashDefaultDeallocator"](...args)}_xmlHashDefaultDeallocator.stub=true;asyncifyStubs["xmlHashDefaultDeallocator"]=undefined;function _xmlHashLookup(...args){return asyncifyStubs["xmlHashLookup"](...args)}_xmlHashLookup.stub=true;asyncifyStubs["xmlHashLookup"]=undefined;function _xmlHashRemoveEntry(...args){return asyncifyStubs["xmlHashRemoveEntry"](...args)}_xmlHashRemoveEntry.stub=true;asyncifyStubs["xmlHashRemoveEntry"]=undefined;function _xmlHashScan(...args){return asyncifyStubs["xmlHashScan"](...args)}_xmlHashScan.stub=true;asyncifyStubs["xmlHashScan"]=undefined;function _xmlIndentTreeOutput(...args){return asyncifyStubs["xmlIndentTreeOutput"](...args)}_xmlIndentTreeOutput.stub=true;asyncifyStubs["xmlIndentTreeOutput"]=undefined;function _xmlInitParser(...args){return asyncifyStubs["xmlInitParser"](...args)}_xmlInitParser.stub=true;asyncifyStubs["xmlInitParser"]=undefined;function _xmlInputReadCallbackNop(...args){return asyncifyStubs["xmlInputReadCallbackNop"](...args)}_xmlInputReadCallbackNop.stub=true;asyncifyStubs["xmlInputReadCallbackNop"]=undefined;function _xmlIsBaseCharGroup(...args){return asyncifyStubs["xmlIsBaseCharGroup"](...args)}_xmlIsBaseCharGroup.stub=true;asyncifyStubs["xmlIsBaseCharGroup"]=undefined;function _xmlIsCombiningGroup(...args){return asyncifyStubs["xmlIsCombiningGroup"](...args)}_xmlIsCombiningGroup.stub=true;asyncifyStubs["xmlIsCombiningGroup"]=undefined;function _xmlIsDigitGroup(...args){return asyncifyStubs["xmlIsDigitGroup"](...args)}_xmlIsDigitGroup.stub=true;asyncifyStubs["xmlIsDigitGroup"]=undefined;function _xmlIsExtenderGroup(...args){return asyncifyStubs["xmlIsExtenderGroup"](...args)}_xmlIsExtenderGroup.stub=true;asyncifyStubs["xmlIsExtenderGroup"]=undefined;function _xmlIsPubidChar_tab(...args){return asyncifyStubs["xmlIsPubidChar_tab"](...args)}_xmlIsPubidChar_tab.stub=true;asyncifyStubs["xmlIsPubidChar_tab"]=undefined;function _xmlKeepBlanksDefaultValue(...args){return asyncifyStubs["xmlKeepBlanksDefaultValue"](...args)}_xmlKeepBlanksDefaultValue.stub=true;asyncifyStubs["xmlKeepBlanksDefaultValue"]=undefined;function _xmlLastError(...args){return asyncifyStubs["xmlLastError"](...args)}_xmlLastError.stub=true;asyncifyStubs["xmlLastError"]=undefined;function _xmlLineNumbersDefaultValue(...args){return asyncifyStubs["xmlLineNumbersDefaultValue"](...args)}_xmlLineNumbersDefaultValue.stub=true;asyncifyStubs["xmlLineNumbersDefaultValue"]=undefined;function _xmlLoadExtDtdDefaultValue(...args){return asyncifyStubs["xmlLoadExtDtdDefaultValue"](...args)}_xmlLoadExtDtdDefaultValue.stub=true;asyncifyStubs["xmlLoadExtDtdDefaultValue"]=undefined;function _xmlMalloc(...args){return asyncifyStubs["xmlMalloc"](...args)}_xmlMalloc.stub=true;asyncifyStubs["xmlMalloc"]=undefined;function _xmlMallocAtomic(...args){return asyncifyStubs["xmlMallocAtomic"](...args)}_xmlMallocAtomic.stub=true;asyncifyStubs["xmlMallocAtomic"]=undefined;function _xmlMemStrdup(...args){return asyncifyStubs["xmlMemStrdup"](...args)}_xmlMemStrdup.stub=true;asyncifyStubs["xmlMemStrdup"]=undefined;function _xmlNewIOInputStream(...args){return asyncifyStubs["xmlNewIOInputStream"](...args)}_xmlNewIOInputStream.stub=true;asyncifyStubs["xmlNewIOInputStream"]=undefined;function _xmlNewInputFromFile(...args){return asyncifyStubs["xmlNewInputFromFile"](...args)}_xmlNewInputFromFile.stub=true;asyncifyStubs["xmlNewInputFromFile"]=undefined;function _xmlOutputBufferCreateFilenameDefault(...args){return asyncifyStubs["xmlOutputBufferCreateFilenameDefault"](...args)}_xmlOutputBufferCreateFilenameDefault.stub=true;asyncifyStubs["xmlOutputBufferCreateFilenameDefault"]=undefined;function _xmlOutputBufferCreateFilenameValue(...args){return asyncifyStubs["xmlOutputBufferCreateFilenameValue"](...args)}_xmlOutputBufferCreateFilenameValue.stub=true;asyncifyStubs["xmlOutputBufferCreateFilenameValue"]=undefined;function _xmlParseCharEncoding(...args){return asyncifyStubs["xmlParseCharEncoding"](...args)}_xmlParseCharEncoding.stub=true;asyncifyStubs["xmlParseCharEncoding"]=undefined;function _xmlParseURI(...args){return asyncifyStubs["xmlParseURI"](...args)}_xmlParseURI.stub=true;asyncifyStubs["xmlParseURI"]=undefined;function _xmlParserDebugEntities(...args){return asyncifyStubs["xmlParserDebugEntities"](...args)}_xmlParserDebugEntities.stub=true;asyncifyStubs["xmlParserDebugEntities"]=undefined;function _xmlParserError(...args){return asyncifyStubs["xmlParserError"](...args)}_xmlParserError.stub=true;asyncifyStubs["xmlParserError"]=undefined;function _xmlParserInputBufferCreateFilenameDefault(...args){return asyncifyStubs["xmlParserInputBufferCreateFilenameDefault"](...args)}_xmlParserInputBufferCreateFilenameDefault.stub=true;asyncifyStubs["xmlParserInputBufferCreateFilenameDefault"]=undefined;function _xmlParserInputBufferCreateFilenameValue(...args){return asyncifyStubs["xmlParserInputBufferCreateFilenameValue"](...args)}_xmlParserInputBufferCreateFilenameValue.stub=true;asyncifyStubs["xmlParserInputBufferCreateFilenameValue"]=undefined;function _xmlParserMaxDepth(...args){return asyncifyStubs["xmlParserMaxDepth"](...args)}_xmlParserMaxDepth.stub=true;asyncifyStubs["xmlParserMaxDepth"]=undefined;function _xmlParserValidityError(...args){return asyncifyStubs["xmlParserValidityError"](...args)}_xmlParserValidityError.stub=true;asyncifyStubs["xmlParserValidityError"]=undefined;function _xmlParserValidityWarning(...args){return asyncifyStubs["xmlParserValidityWarning"](...args)}_xmlParserValidityWarning.stub=true;asyncifyStubs["xmlParserValidityWarning"]=undefined;function _xmlParserVersion(...args){return asyncifyStubs["xmlParserVersion"](...args)}_xmlParserVersion.stub=true;asyncifyStubs["xmlParserVersion"]=undefined;function _xmlParserWarning(...args){return asyncifyStubs["xmlParserWarning"](...args)}_xmlParserWarning.stub=true;asyncifyStubs["xmlParserWarning"]=undefined;function _xmlPedanticParserDefaultValue(...args){return asyncifyStubs["xmlPedanticParserDefaultValue"](...args)}_xmlPedanticParserDefaultValue.stub=true;asyncifyStubs["xmlPedanticParserDefaultValue"]=undefined;function _xmlRealloc(...args){return asyncifyStubs["xmlRealloc"](...args)}_xmlRealloc.stub=true;asyncifyStubs["xmlRealloc"]=undefined;function _xmlReconciliateNs(...args){return asyncifyStubs["xmlReconciliateNs"](...args)}_xmlReconciliateNs.stub=true;asyncifyStubs["xmlReconciliateNs"]=undefined;function _xmlRegisterNodeDefaultValue(...args){return asyncifyStubs["xmlRegisterNodeDefaultValue"](...args)}_xmlRegisterNodeDefaultValue.stub=true;asyncifyStubs["xmlRegisterNodeDefaultValue"]=undefined;function _xmlRelaxNGCleanupTypes(...args){return asyncifyStubs["xmlRelaxNGCleanupTypes"](...args)}_xmlRelaxNGCleanupTypes.stub=true;asyncifyStubs["xmlRelaxNGCleanupTypes"]=undefined;function _xmlRemoveID(...args){return asyncifyStubs["xmlRemoveID"](...args)}_xmlRemoveID.stub=true;asyncifyStubs["xmlRemoveID"]=undefined;function _xmlResetError(...args){return asyncifyStubs["xmlResetError"](...args)}_xmlResetError.stub=true;asyncifyStubs["xmlResetError"]=undefined;function _xmlResetLastError(...args){return asyncifyStubs["xmlResetLastError"](...args)}_xmlResetLastError.stub=true;asyncifyStubs["xmlResetLastError"]=undefined;function _xmlSAX2AttributeDecl(...args){return asyncifyStubs["xmlSAX2AttributeDecl"](...args)}_xmlSAX2AttributeDecl.stub=true;asyncifyStubs["xmlSAX2AttributeDecl"]=undefined;function _xmlSAX2CDataBlock(...args){return asyncifyStubs["xmlSAX2CDataBlock"](...args)}_xmlSAX2CDataBlock.stub=true;asyncifyStubs["xmlSAX2CDataBlock"]=undefined;function _xmlSAX2Characters(...args){return asyncifyStubs["xmlSAX2Characters"](...args)}_xmlSAX2Characters.stub=true;asyncifyStubs["xmlSAX2Characters"]=undefined;function _xmlSAX2Comment(...args){return asyncifyStubs["xmlSAX2Comment"](...args)}_xmlSAX2Comment.stub=true;asyncifyStubs["xmlSAX2Comment"]=undefined;function _xmlSAX2ElementDecl(...args){return asyncifyStubs["xmlSAX2ElementDecl"](...args)}_xmlSAX2ElementDecl.stub=true;asyncifyStubs["xmlSAX2ElementDecl"]=undefined;function _xmlSAX2EndDocument(...args){return asyncifyStubs["xmlSAX2EndDocument"](...args)}_xmlSAX2EndDocument.stub=true;asyncifyStubs["xmlSAX2EndDocument"]=undefined;function _xmlSAX2EndElement(...args){return asyncifyStubs["xmlSAX2EndElement"](...args)}_xmlSAX2EndElement.stub=true;asyncifyStubs["xmlSAX2EndElement"]=undefined;function _xmlSAX2EndElementNs(...args){return asyncifyStubs["xmlSAX2EndElementNs"](...args)}_xmlSAX2EndElementNs.stub=true;asyncifyStubs["xmlSAX2EndElementNs"]=undefined;function _xmlSAX2EntityDecl(...args){return asyncifyStubs["xmlSAX2EntityDecl"](...args)}_xmlSAX2EntityDecl.stub=true;asyncifyStubs["xmlSAX2EntityDecl"]=undefined;function _xmlSAX2ExternalSubset(...args){return asyncifyStubs["xmlSAX2ExternalSubset"](...args)}_xmlSAX2ExternalSubset.stub=true;asyncifyStubs["xmlSAX2ExternalSubset"]=undefined;function _xmlSAX2GetColumnNumber(...args){return asyncifyStubs["xmlSAX2GetColumnNumber"](...args)}_xmlSAX2GetColumnNumber.stub=true;asyncifyStubs["xmlSAX2GetColumnNumber"]=undefined;function _xmlSAX2GetEntity(...args){return asyncifyStubs["xmlSAX2GetEntity"](...args)}_xmlSAX2GetEntity.stub=true;asyncifyStubs["xmlSAX2GetEntity"]=undefined;function _xmlSAX2GetLineNumber(...args){return asyncifyStubs["xmlSAX2GetLineNumber"](...args)}_xmlSAX2GetLineNumber.stub=true;asyncifyStubs["xmlSAX2GetLineNumber"]=undefined;function _xmlSAX2GetParameterEntity(...args){return asyncifyStubs["xmlSAX2GetParameterEntity"](...args)}_xmlSAX2GetParameterEntity.stub=true;asyncifyStubs["xmlSAX2GetParameterEntity"]=undefined;function _xmlSAX2GetPublicId(...args){return asyncifyStubs["xmlSAX2GetPublicId"](...args)}_xmlSAX2GetPublicId.stub=true;asyncifyStubs["xmlSAX2GetPublicId"]=undefined;function _xmlSAX2GetSystemId(...args){return asyncifyStubs["xmlSAX2GetSystemId"](...args)}_xmlSAX2GetSystemId.stub=true;asyncifyStubs["xmlSAX2GetSystemId"]=undefined;function _xmlSAX2HasExternalSubset(...args){return asyncifyStubs["xmlSAX2HasExternalSubset"](...args)}_xmlSAX2HasExternalSubset.stub=true;asyncifyStubs["xmlSAX2HasExternalSubset"]=undefined;function _xmlSAX2HasInternalSubset(...args){return asyncifyStubs["xmlSAX2HasInternalSubset"](...args)}_xmlSAX2HasInternalSubset.stub=true;asyncifyStubs["xmlSAX2HasInternalSubset"]=undefined;function _xmlSAX2IgnorableWhitespace(...args){return asyncifyStubs["xmlSAX2IgnorableWhitespace"](...args)}_xmlSAX2IgnorableWhitespace.stub=true;asyncifyStubs["xmlSAX2IgnorableWhitespace"]=undefined;function _xmlSAX2InternalSubset(...args){return asyncifyStubs["xmlSAX2InternalSubset"](...args)}_xmlSAX2InternalSubset.stub=true;asyncifyStubs["xmlSAX2InternalSubset"]=undefined;function _xmlSAX2IsStandalone(...args){return asyncifyStubs["xmlSAX2IsStandalone"](...args)}_xmlSAX2IsStandalone.stub=true;asyncifyStubs["xmlSAX2IsStandalone"]=undefined;function _xmlSAX2NotationDecl(...args){return asyncifyStubs["xmlSAX2NotationDecl"](...args)}_xmlSAX2NotationDecl.stub=true;asyncifyStubs["xmlSAX2NotationDecl"]=undefined;function _xmlSAX2ProcessingInstruction(...args){return asyncifyStubs["xmlSAX2ProcessingInstruction"](...args)}_xmlSAX2ProcessingInstruction.stub=true;asyncifyStubs["xmlSAX2ProcessingInstruction"]=undefined;function _xmlSAX2Reference(...args){return asyncifyStubs["xmlSAX2Reference"](...args)}_xmlSAX2Reference.stub=true;asyncifyStubs["xmlSAX2Reference"]=undefined;function _xmlSAX2ResolveEntity(...args){return asyncifyStubs["xmlSAX2ResolveEntity"](...args)}_xmlSAX2ResolveEntity.stub=true;asyncifyStubs["xmlSAX2ResolveEntity"]=undefined;function _xmlSAX2SetDocumentLocator(...args){return asyncifyStubs["xmlSAX2SetDocumentLocator"](...args)}_xmlSAX2SetDocumentLocator.stub=true;asyncifyStubs["xmlSAX2SetDocumentLocator"]=undefined;function _xmlSAX2StartDocument(...args){return asyncifyStubs["xmlSAX2StartDocument"](...args)}_xmlSAX2StartDocument.stub=true;asyncifyStubs["xmlSAX2StartDocument"]=undefined;function _xmlSAX2StartElement(...args){return asyncifyStubs["xmlSAX2StartElement"](...args)}_xmlSAX2StartElement.stub=true;asyncifyStubs["xmlSAX2StartElement"]=undefined;function _xmlSAX2StartElementNs(...args){return asyncifyStubs["xmlSAX2StartElementNs"](...args)}_xmlSAX2StartElementNs.stub=true;asyncifyStubs["xmlSAX2StartElementNs"]=undefined;function _xmlSAX2UnparsedEntityDecl(...args){return asyncifyStubs["xmlSAX2UnparsedEntityDecl"](...args)}_xmlSAX2UnparsedEntityDecl.stub=true;asyncifyStubs["xmlSAX2UnparsedEntityDecl"]=undefined;function _xmlSaveNoEmptyTags(...args){return asyncifyStubs["xmlSaveNoEmptyTags"](...args)}_xmlSaveNoEmptyTags.stub=true;asyncifyStubs["xmlSaveNoEmptyTags"]=undefined;function _xmlSetExternalEntityLoader(...args){return asyncifyStubs["xmlSetExternalEntityLoader"](...args)}_xmlSetExternalEntityLoader.stub=true;asyncifyStubs["xmlSetExternalEntityLoader"]=undefined;function _xmlSetGenericErrorFunc(...args){return asyncifyStubs["xmlSetGenericErrorFunc"](...args)}_xmlSetGenericErrorFunc.stub=true;asyncifyStubs["xmlSetGenericErrorFunc"]=undefined;function _xmlSetStructuredErrorFunc(...args){return asyncifyStubs["xmlSetStructuredErrorFunc"](...args)}_xmlSetStructuredErrorFunc.stub=true;asyncifyStubs["xmlSetStructuredErrorFunc"]=undefined;function _xmlStrdup(...args){return asyncifyStubs["xmlStrdup"](...args)}_xmlStrdup.stub=true;asyncifyStubs["xmlStrdup"]=undefined;function _xmlStringComment(...args){return asyncifyStubs["xmlStringComment"](...args)}_xmlStringComment.stub=true;asyncifyStubs["xmlStringComment"]=undefined;function _xmlStringText(...args){return asyncifyStubs["xmlStringText"](...args)}_xmlStringText.stub=true;asyncifyStubs["xmlStringText"]=undefined;function _xmlStringTextNoenc(...args){return asyncifyStubs["xmlStringTextNoenc"](...args)}_xmlStringTextNoenc.stub=true;asyncifyStubs["xmlStringTextNoenc"]=undefined;function _xmlStrncmp(...args){return asyncifyStubs["xmlStrncmp"](...args)}_xmlStrncmp.stub=true;asyncifyStubs["xmlStrncmp"]=undefined;function _xmlStructuredError(...args){return asyncifyStubs["xmlStructuredError"](...args)}_xmlStructuredError.stub=true;asyncifyStubs["xmlStructuredError"]=undefined;function _xmlStructuredErrorContext(...args){return asyncifyStubs["xmlStructuredErrorContext"](...args)}_xmlStructuredErrorContext.stub=true;asyncifyStubs["xmlStructuredErrorContext"]=undefined;function _xmlSubstituteEntitiesDefaultValue(...args){return asyncifyStubs["xmlSubstituteEntitiesDefaultValue"](...args)}_xmlSubstituteEntitiesDefaultValue.stub=true;asyncifyStubs["xmlSubstituteEntitiesDefaultValue"]=undefined;function _xmlTreeIndentString(...args){return asyncifyStubs["xmlTreeIndentString"](...args)}_xmlTreeIndentString.stub=true;asyncifyStubs["xmlTreeIndentString"]=undefined;function _xmlUCSIsAegeanNumbers(...args){return asyncifyStubs["xmlUCSIsAegeanNumbers"](...args)}_xmlUCSIsAegeanNumbers.stub=true;asyncifyStubs["xmlUCSIsAegeanNumbers"]=undefined;function _xmlUCSIsAlphabeticPresentationForms(...args){return asyncifyStubs["xmlUCSIsAlphabeticPresentationForms"](...args)}_xmlUCSIsAlphabeticPresentationForms.stub=true;asyncifyStubs["xmlUCSIsAlphabeticPresentationForms"]=undefined;function _xmlUCSIsArabic(...args){return asyncifyStubs["xmlUCSIsArabic"](...args)}_xmlUCSIsArabic.stub=true;asyncifyStubs["xmlUCSIsArabic"]=undefined;function _xmlUCSIsArabicPresentationFormsA(...args){return asyncifyStubs["xmlUCSIsArabicPresentationFormsA"](...args)}_xmlUCSIsArabicPresentationFormsA.stub=true;asyncifyStubs["xmlUCSIsArabicPresentationFormsA"]=undefined;function _xmlUCSIsArabicPresentationFormsB(...args){return asyncifyStubs["xmlUCSIsArabicPresentationFormsB"](...args)}_xmlUCSIsArabicPresentationFormsB.stub=true;asyncifyStubs["xmlUCSIsArabicPresentationFormsB"]=undefined;function _xmlUCSIsArmenian(...args){return asyncifyStubs["xmlUCSIsArmenian"](...args)}_xmlUCSIsArmenian.stub=true;asyncifyStubs["xmlUCSIsArmenian"]=undefined;function _xmlUCSIsArrows(...args){return asyncifyStubs["xmlUCSIsArrows"](...args)}_xmlUCSIsArrows.stub=true;asyncifyStubs["xmlUCSIsArrows"]=undefined;function _xmlUCSIsBasicLatin(...args){return asyncifyStubs["xmlUCSIsBasicLatin"](...args)}_xmlUCSIsBasicLatin.stub=true;asyncifyStubs["xmlUCSIsBasicLatin"]=undefined;function _xmlUCSIsBengali(...args){return asyncifyStubs["xmlUCSIsBengali"](...args)}_xmlUCSIsBengali.stub=true;asyncifyStubs["xmlUCSIsBengali"]=undefined;function _xmlUCSIsBlockElements(...args){return asyncifyStubs["xmlUCSIsBlockElements"](...args)}_xmlUCSIsBlockElements.stub=true;asyncifyStubs["xmlUCSIsBlockElements"]=undefined;function _xmlUCSIsBopomofo(...args){return asyncifyStubs["xmlUCSIsBopomofo"](...args)}_xmlUCSIsBopomofo.stub=true;asyncifyStubs["xmlUCSIsBopomofo"]=undefined;function _xmlUCSIsBopomofoExtended(...args){return asyncifyStubs["xmlUCSIsBopomofoExtended"](...args)}_xmlUCSIsBopomofoExtended.stub=true;asyncifyStubs["xmlUCSIsBopomofoExtended"]=undefined;function _xmlUCSIsBoxDrawing(...args){return asyncifyStubs["xmlUCSIsBoxDrawing"](...args)}_xmlUCSIsBoxDrawing.stub=true;asyncifyStubs["xmlUCSIsBoxDrawing"]=undefined;function _xmlUCSIsBraillePatterns(...args){return asyncifyStubs["xmlUCSIsBraillePatterns"](...args)}_xmlUCSIsBraillePatterns.stub=true;asyncifyStubs["xmlUCSIsBraillePatterns"]=undefined;function _xmlUCSIsBuhid(...args){return asyncifyStubs["xmlUCSIsBuhid"](...args)}_xmlUCSIsBuhid.stub=true;asyncifyStubs["xmlUCSIsBuhid"]=undefined;function _xmlUCSIsByzantineMusicalSymbols(...args){return asyncifyStubs["xmlUCSIsByzantineMusicalSymbols"](...args)}_xmlUCSIsByzantineMusicalSymbols.stub=true;asyncifyStubs["xmlUCSIsByzantineMusicalSymbols"]=undefined;function _xmlUCSIsCJKCompatibility(...args){return asyncifyStubs["xmlUCSIsCJKCompatibility"](...args)}_xmlUCSIsCJKCompatibility.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibility"]=undefined;function _xmlUCSIsCJKCompatibilityForms(...args){return asyncifyStubs["xmlUCSIsCJKCompatibilityForms"](...args)}_xmlUCSIsCJKCompatibilityForms.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibilityForms"]=undefined;function _xmlUCSIsCJKCompatibilityIdeographs(...args){return asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographs"](...args)}_xmlUCSIsCJKCompatibilityIdeographs.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographs"]=undefined;function _xmlUCSIsCJKCompatibilityIdeographsSupplement(...args){return asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographsSupplement"](...args)}_xmlUCSIsCJKCompatibilityIdeographsSupplement.stub=true;asyncifyStubs["xmlUCSIsCJKCompatibilityIdeographsSupplement"]=undefined;function _xmlUCSIsCJKRadicalsSupplement(...args){return asyncifyStubs["xmlUCSIsCJKRadicalsSupplement"](...args)}_xmlUCSIsCJKRadicalsSupplement.stub=true;asyncifyStubs["xmlUCSIsCJKRadicalsSupplement"]=undefined;function _xmlUCSIsCJKSymbolsandPunctuation(...args){return asyncifyStubs["xmlUCSIsCJKSymbolsandPunctuation"](...args)}_xmlUCSIsCJKSymbolsandPunctuation.stub=true;asyncifyStubs["xmlUCSIsCJKSymbolsandPunctuation"]=undefined;function _xmlUCSIsCJKUnifiedIdeographs(...args){return asyncifyStubs["xmlUCSIsCJKUnifiedIdeographs"](...args)}_xmlUCSIsCJKUnifiedIdeographs.stub=true;asyncifyStubs["xmlUCSIsCJKUnifiedIdeographs"]=undefined;function _xmlUCSIsCJKUnifiedIdeographsExtensionA(...args){return asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionA"](...args)}_xmlUCSIsCJKUnifiedIdeographsExtensionA.stub=true;asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionA"]=undefined;function _xmlUCSIsCJKUnifiedIdeographsExtensionB(...args){return asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionB"](...args)}_xmlUCSIsCJKUnifiedIdeographsExtensionB.stub=true;asyncifyStubs["xmlUCSIsCJKUnifiedIdeographsExtensionB"]=undefined;function _xmlUCSIsCatC(...args){return asyncifyStubs["xmlUCSIsCatC"](...args)}_xmlUCSIsCatC.stub=true;asyncifyStubs["xmlUCSIsCatC"]=undefined;function _xmlUCSIsCatCc(...args){return asyncifyStubs["xmlUCSIsCatCc"](...args)}_xmlUCSIsCatCc.stub=true;asyncifyStubs["xmlUCSIsCatCc"]=undefined;function _xmlUCSIsCatCf(...args){return asyncifyStubs["xmlUCSIsCatCf"](...args)}_xmlUCSIsCatCf.stub=true;asyncifyStubs["xmlUCSIsCatCf"]=undefined;function _xmlUCSIsCatCo(...args){return asyncifyStubs["xmlUCSIsCatCo"](...args)}_xmlUCSIsCatCo.stub=true;asyncifyStubs["xmlUCSIsCatCo"]=undefined;function _xmlUCSIsCatCs(...args){return asyncifyStubs["xmlUCSIsCatCs"](...args)}_xmlUCSIsCatCs.stub=true;asyncifyStubs["xmlUCSIsCatCs"]=undefined;function _xmlUCSIsCatL(...args){return asyncifyStubs["xmlUCSIsCatL"](...args)}_xmlUCSIsCatL.stub=true;asyncifyStubs["xmlUCSIsCatL"]=undefined;function _xmlUCSIsCatLl(...args){return asyncifyStubs["xmlUCSIsCatLl"](...args)}_xmlUCSIsCatLl.stub=true;asyncifyStubs["xmlUCSIsCatLl"]=undefined;function _xmlUCSIsCatLm(...args){return asyncifyStubs["xmlUCSIsCatLm"](...args)}_xmlUCSIsCatLm.stub=true;asyncifyStubs["xmlUCSIsCatLm"]=undefined;function _xmlUCSIsCatLo(...args){return asyncifyStubs["xmlUCSIsCatLo"](...args)}_xmlUCSIsCatLo.stub=true;asyncifyStubs["xmlUCSIsCatLo"]=undefined;function _xmlUCSIsCatLt(...args){return asyncifyStubs["xmlUCSIsCatLt"](...args)}_xmlUCSIsCatLt.stub=true;asyncifyStubs["xmlUCSIsCatLt"]=undefined;function _xmlUCSIsCatLu(...args){return asyncifyStubs["xmlUCSIsCatLu"](...args)}_xmlUCSIsCatLu.stub=true;asyncifyStubs["xmlUCSIsCatLu"]=undefined;function _xmlUCSIsCatM(...args){return asyncifyStubs["xmlUCSIsCatM"](...args)}_xmlUCSIsCatM.stub=true;asyncifyStubs["xmlUCSIsCatM"]=undefined;function _xmlUCSIsCatMc(...args){return asyncifyStubs["xmlUCSIsCatMc"](...args)}_xmlUCSIsCatMc.stub=true;asyncifyStubs["xmlUCSIsCatMc"]=undefined;function _xmlUCSIsCatMe(...args){return asyncifyStubs["xmlUCSIsCatMe"](...args)}_xmlUCSIsCatMe.stub=true;asyncifyStubs["xmlUCSIsCatMe"]=undefined;function _xmlUCSIsCatMn(...args){return asyncifyStubs["xmlUCSIsCatMn"](...args)}_xmlUCSIsCatMn.stub=true;asyncifyStubs["xmlUCSIsCatMn"]=undefined;function _xmlUCSIsCatN(...args){return asyncifyStubs["xmlUCSIsCatN"](...args)}_xmlUCSIsCatN.stub=true;asyncifyStubs["xmlUCSIsCatN"]=undefined;function _xmlUCSIsCatNd(...args){return asyncifyStubs["xmlUCSIsCatNd"](...args)}_xmlUCSIsCatNd.stub=true;asyncifyStubs["xmlUCSIsCatNd"]=undefined;function _xmlUCSIsCatNl(...args){return asyncifyStubs["xmlUCSIsCatNl"](...args)}_xmlUCSIsCatNl.stub=true;asyncifyStubs["xmlUCSIsCatNl"]=undefined;function _xmlUCSIsCatNo(...args){return asyncifyStubs["xmlUCSIsCatNo"](...args)}_xmlUCSIsCatNo.stub=true;asyncifyStubs["xmlUCSIsCatNo"]=undefined;function _xmlUCSIsCatP(...args){return asyncifyStubs["xmlUCSIsCatP"](...args)}_xmlUCSIsCatP.stub=true;asyncifyStubs["xmlUCSIsCatP"]=undefined;function _xmlUCSIsCatPc(...args){return asyncifyStubs["xmlUCSIsCatPc"](...args)}_xmlUCSIsCatPc.stub=true;asyncifyStubs["xmlUCSIsCatPc"]=undefined;function _xmlUCSIsCatPd(...args){return asyncifyStubs["xmlUCSIsCatPd"](...args)}_xmlUCSIsCatPd.stub=true;asyncifyStubs["xmlUCSIsCatPd"]=undefined;function _xmlUCSIsCatPe(...args){return asyncifyStubs["xmlUCSIsCatPe"](...args)}_xmlUCSIsCatPe.stub=true;asyncifyStubs["xmlUCSIsCatPe"]=undefined;function _xmlUCSIsCatPf(...args){return asyncifyStubs["xmlUCSIsCatPf"](...args)}_xmlUCSIsCatPf.stub=true;asyncifyStubs["xmlUCSIsCatPf"]=undefined;function _xmlUCSIsCatPi(...args){return asyncifyStubs["xmlUCSIsCatPi"](...args)}_xmlUCSIsCatPi.stub=true;asyncifyStubs["xmlUCSIsCatPi"]=undefined;function _xmlUCSIsCatPo(...args){return asyncifyStubs["xmlUCSIsCatPo"](...args)}_xmlUCSIsCatPo.stub=true;asyncifyStubs["xmlUCSIsCatPo"]=undefined;function _xmlUCSIsCatPs(...args){return asyncifyStubs["xmlUCSIsCatPs"](...args)}_xmlUCSIsCatPs.stub=true;asyncifyStubs["xmlUCSIsCatPs"]=undefined;function _xmlUCSIsCatS(...args){return asyncifyStubs["xmlUCSIsCatS"](...args)}_xmlUCSIsCatS.stub=true;asyncifyStubs["xmlUCSIsCatS"]=undefined;function _xmlUCSIsCatSc(...args){return asyncifyStubs["xmlUCSIsCatSc"](...args)}_xmlUCSIsCatSc.stub=true;asyncifyStubs["xmlUCSIsCatSc"]=undefined;function _xmlUCSIsCatSk(...args){return asyncifyStubs["xmlUCSIsCatSk"](...args)}_xmlUCSIsCatSk.stub=true;asyncifyStubs["xmlUCSIsCatSk"]=undefined;function _xmlUCSIsCatSm(...args){return asyncifyStubs["xmlUCSIsCatSm"](...args)}_xmlUCSIsCatSm.stub=true;asyncifyStubs["xmlUCSIsCatSm"]=undefined;function _xmlUCSIsCatSo(...args){return asyncifyStubs["xmlUCSIsCatSo"](...args)}_xmlUCSIsCatSo.stub=true;asyncifyStubs["xmlUCSIsCatSo"]=undefined;function _xmlUCSIsCatZ(...args){return asyncifyStubs["xmlUCSIsCatZ"](...args)}_xmlUCSIsCatZ.stub=true;asyncifyStubs["xmlUCSIsCatZ"]=undefined;function _xmlUCSIsCatZl(...args){return asyncifyStubs["xmlUCSIsCatZl"](...args)}_xmlUCSIsCatZl.stub=true;asyncifyStubs["xmlUCSIsCatZl"]=undefined;function _xmlUCSIsCatZp(...args){return asyncifyStubs["xmlUCSIsCatZp"](...args)}_xmlUCSIsCatZp.stub=true;asyncifyStubs["xmlUCSIsCatZp"]=undefined;function _xmlUCSIsCatZs(...args){return asyncifyStubs["xmlUCSIsCatZs"](...args)}_xmlUCSIsCatZs.stub=true;asyncifyStubs["xmlUCSIsCatZs"]=undefined;function _xmlUCSIsCherokee(...args){return asyncifyStubs["xmlUCSIsCherokee"](...args)}_xmlUCSIsCherokee.stub=true;asyncifyStubs["xmlUCSIsCherokee"]=undefined;function _xmlUCSIsCombiningDiacriticalMarks(...args){return asyncifyStubs["xmlUCSIsCombiningDiacriticalMarks"](...args)}_xmlUCSIsCombiningDiacriticalMarks.stub=true;asyncifyStubs["xmlUCSIsCombiningDiacriticalMarks"]=undefined;function _xmlUCSIsCombiningDiacriticalMarksforSymbols(...args){return asyncifyStubs["xmlUCSIsCombiningDiacriticalMarksforSymbols"](...args)}_xmlUCSIsCombiningDiacriticalMarksforSymbols.stub=true;asyncifyStubs["xmlUCSIsCombiningDiacriticalMarksforSymbols"]=undefined;function _xmlUCSIsCombiningHalfMarks(...args){return asyncifyStubs["xmlUCSIsCombiningHalfMarks"](...args)}_xmlUCSIsCombiningHalfMarks.stub=true;asyncifyStubs["xmlUCSIsCombiningHalfMarks"]=undefined;function _xmlUCSIsCombiningMarksforSymbols(...args){return asyncifyStubs["xmlUCSIsCombiningMarksforSymbols"](...args)}_xmlUCSIsCombiningMarksforSymbols.stub=true;asyncifyStubs["xmlUCSIsCombiningMarksforSymbols"]=undefined;function _xmlUCSIsControlPictures(...args){return asyncifyStubs["xmlUCSIsControlPictures"](...args)}_xmlUCSIsControlPictures.stub=true;asyncifyStubs["xmlUCSIsControlPictures"]=undefined;function _xmlUCSIsCurrencySymbols(...args){return asyncifyStubs["xmlUCSIsCurrencySymbols"](...args)}_xmlUCSIsCurrencySymbols.stub=true;asyncifyStubs["xmlUCSIsCurrencySymbols"]=undefined;function _xmlUCSIsCypriotSyllabary(...args){return asyncifyStubs["xmlUCSIsCypriotSyllabary"](...args)}_xmlUCSIsCypriotSyllabary.stub=true;asyncifyStubs["xmlUCSIsCypriotSyllabary"]=undefined;function _xmlUCSIsCyrillic(...args){return asyncifyStubs["xmlUCSIsCyrillic"](...args)}_xmlUCSIsCyrillic.stub=true;asyncifyStubs["xmlUCSIsCyrillic"]=undefined;function _xmlUCSIsCyrillicSupplement(...args){return asyncifyStubs["xmlUCSIsCyrillicSupplement"](...args)}_xmlUCSIsCyrillicSupplement.stub=true;asyncifyStubs["xmlUCSIsCyrillicSupplement"]=undefined;function _xmlUCSIsDeseret(...args){return asyncifyStubs["xmlUCSIsDeseret"](...args)}_xmlUCSIsDeseret.stub=true;asyncifyStubs["xmlUCSIsDeseret"]=undefined;function _xmlUCSIsDevanagari(...args){return asyncifyStubs["xmlUCSIsDevanagari"](...args)}_xmlUCSIsDevanagari.stub=true;asyncifyStubs["xmlUCSIsDevanagari"]=undefined;function _xmlUCSIsDingbats(...args){return asyncifyStubs["xmlUCSIsDingbats"](...args)}_xmlUCSIsDingbats.stub=true;asyncifyStubs["xmlUCSIsDingbats"]=undefined;function _xmlUCSIsEnclosedAlphanumerics(...args){return asyncifyStubs["xmlUCSIsEnclosedAlphanumerics"](...args)}_xmlUCSIsEnclosedAlphanumerics.stub=true;asyncifyStubs["xmlUCSIsEnclosedAlphanumerics"]=undefined;function _xmlUCSIsEnclosedCJKLettersandMonths(...args){return asyncifyStubs["xmlUCSIsEnclosedCJKLettersandMonths"](...args)}_xmlUCSIsEnclosedCJKLettersandMonths.stub=true;asyncifyStubs["xmlUCSIsEnclosedCJKLettersandMonths"]=undefined;function _xmlUCSIsEthiopic(...args){return asyncifyStubs["xmlUCSIsEthiopic"](...args)}_xmlUCSIsEthiopic.stub=true;asyncifyStubs["xmlUCSIsEthiopic"]=undefined;function _xmlUCSIsGeneralPunctuation(...args){return asyncifyStubs["xmlUCSIsGeneralPunctuation"](...args)}_xmlUCSIsGeneralPunctuation.stub=true;asyncifyStubs["xmlUCSIsGeneralPunctuation"]=undefined;function _xmlUCSIsGeometricShapes(...args){return asyncifyStubs["xmlUCSIsGeometricShapes"](...args)}_xmlUCSIsGeometricShapes.stub=true;asyncifyStubs["xmlUCSIsGeometricShapes"]=undefined;function _xmlUCSIsGeorgian(...args){return asyncifyStubs["xmlUCSIsGeorgian"](...args)}_xmlUCSIsGeorgian.stub=true;asyncifyStubs["xmlUCSIsGeorgian"]=undefined;function _xmlUCSIsGothic(...args){return asyncifyStubs["xmlUCSIsGothic"](...args)}_xmlUCSIsGothic.stub=true;asyncifyStubs["xmlUCSIsGothic"]=undefined;function _xmlUCSIsGreek(...args){return asyncifyStubs["xmlUCSIsGreek"](...args)}_xmlUCSIsGreek.stub=true;asyncifyStubs["xmlUCSIsGreek"]=undefined;function _xmlUCSIsGreekExtended(...args){return asyncifyStubs["xmlUCSIsGreekExtended"](...args)}_xmlUCSIsGreekExtended.stub=true;asyncifyStubs["xmlUCSIsGreekExtended"]=undefined;function _xmlUCSIsGreekandCoptic(...args){return asyncifyStubs["xmlUCSIsGreekandCoptic"](...args)}_xmlUCSIsGreekandCoptic.stub=true;asyncifyStubs["xmlUCSIsGreekandCoptic"]=undefined;function _xmlUCSIsGujarati(...args){return asyncifyStubs["xmlUCSIsGujarati"](...args)}_xmlUCSIsGujarati.stub=true;asyncifyStubs["xmlUCSIsGujarati"]=undefined;function _xmlUCSIsGurmukhi(...args){return asyncifyStubs["xmlUCSIsGurmukhi"](...args)}_xmlUCSIsGurmukhi.stub=true;asyncifyStubs["xmlUCSIsGurmukhi"]=undefined;function _xmlUCSIsHalfwidthandFullwidthForms(...args){return asyncifyStubs["xmlUCSIsHalfwidthandFullwidthForms"](...args)}_xmlUCSIsHalfwidthandFullwidthForms.stub=true;asyncifyStubs["xmlUCSIsHalfwidthandFullwidthForms"]=undefined;function _xmlUCSIsHangulCompatibilityJamo(...args){return asyncifyStubs["xmlUCSIsHangulCompatibilityJamo"](...args)}_xmlUCSIsHangulCompatibilityJamo.stub=true;asyncifyStubs["xmlUCSIsHangulCompatibilityJamo"]=undefined;function _xmlUCSIsHangulJamo(...args){return asyncifyStubs["xmlUCSIsHangulJamo"](...args)}_xmlUCSIsHangulJamo.stub=true;asyncifyStubs["xmlUCSIsHangulJamo"]=undefined;function _xmlUCSIsHangulSyllables(...args){return asyncifyStubs["xmlUCSIsHangulSyllables"](...args)}_xmlUCSIsHangulSyllables.stub=true;asyncifyStubs["xmlUCSIsHangulSyllables"]=undefined;function _xmlUCSIsHanunoo(...args){return asyncifyStubs["xmlUCSIsHanunoo"](...args)}_xmlUCSIsHanunoo.stub=true;asyncifyStubs["xmlUCSIsHanunoo"]=undefined;function _xmlUCSIsHebrew(...args){return asyncifyStubs["xmlUCSIsHebrew"](...args)}_xmlUCSIsHebrew.stub=true;asyncifyStubs["xmlUCSIsHebrew"]=undefined;function _xmlUCSIsHighPrivateUseSurrogates(...args){return asyncifyStubs["xmlUCSIsHighPrivateUseSurrogates"](...args)}_xmlUCSIsHighPrivateUseSurrogates.stub=true;asyncifyStubs["xmlUCSIsHighPrivateUseSurrogates"]=undefined;function _xmlUCSIsHighSurrogates(...args){return asyncifyStubs["xmlUCSIsHighSurrogates"](...args)}_xmlUCSIsHighSurrogates.stub=true;asyncifyStubs["xmlUCSIsHighSurrogates"]=undefined;function _xmlUCSIsHiragana(...args){return asyncifyStubs["xmlUCSIsHiragana"](...args)}_xmlUCSIsHiragana.stub=true;asyncifyStubs["xmlUCSIsHiragana"]=undefined;function _xmlUCSIsIPAExtensions(...args){return asyncifyStubs["xmlUCSIsIPAExtensions"](...args)}_xmlUCSIsIPAExtensions.stub=true;asyncifyStubs["xmlUCSIsIPAExtensions"]=undefined;function _xmlUCSIsIdeographicDescriptionCharacters(...args){return asyncifyStubs["xmlUCSIsIdeographicDescriptionCharacters"](...args)}_xmlUCSIsIdeographicDescriptionCharacters.stub=true;asyncifyStubs["xmlUCSIsIdeographicDescriptionCharacters"]=undefined;function _xmlUCSIsKanbun(...args){return asyncifyStubs["xmlUCSIsKanbun"](...args)}_xmlUCSIsKanbun.stub=true;asyncifyStubs["xmlUCSIsKanbun"]=undefined;function _xmlUCSIsKangxiRadicals(...args){return asyncifyStubs["xmlUCSIsKangxiRadicals"](...args)}_xmlUCSIsKangxiRadicals.stub=true;asyncifyStubs["xmlUCSIsKangxiRadicals"]=undefined;function _xmlUCSIsKannada(...args){return asyncifyStubs["xmlUCSIsKannada"](...args)}_xmlUCSIsKannada.stub=true;asyncifyStubs["xmlUCSIsKannada"]=undefined;function _xmlUCSIsKatakana(...args){return asyncifyStubs["xmlUCSIsKatakana"](...args)}_xmlUCSIsKatakana.stub=true;asyncifyStubs["xmlUCSIsKatakana"]=undefined;function _xmlUCSIsKatakanaPhoneticExtensions(...args){return asyncifyStubs["xmlUCSIsKatakanaPhoneticExtensions"](...args)}_xmlUCSIsKatakanaPhoneticExtensions.stub=true;asyncifyStubs["xmlUCSIsKatakanaPhoneticExtensions"]=undefined;function _xmlUCSIsKhmer(...args){return asyncifyStubs["xmlUCSIsKhmer"](...args)}_xmlUCSIsKhmer.stub=true;asyncifyStubs["xmlUCSIsKhmer"]=undefined;function _xmlUCSIsKhmerSymbols(...args){return asyncifyStubs["xmlUCSIsKhmerSymbols"](...args)}_xmlUCSIsKhmerSymbols.stub=true;asyncifyStubs["xmlUCSIsKhmerSymbols"]=undefined;function _xmlUCSIsLao(...args){return asyncifyStubs["xmlUCSIsLao"](...args)}_xmlUCSIsLao.stub=true;asyncifyStubs["xmlUCSIsLao"]=undefined;function _xmlUCSIsLatin1Supplement(...args){return asyncifyStubs["xmlUCSIsLatin1Supplement"](...args)}_xmlUCSIsLatin1Supplement.stub=true;asyncifyStubs["xmlUCSIsLatin1Supplement"]=undefined;function _xmlUCSIsLatinExtendedA(...args){return asyncifyStubs["xmlUCSIsLatinExtendedA"](...args)}_xmlUCSIsLatinExtendedA.stub=true;asyncifyStubs["xmlUCSIsLatinExtendedA"]=undefined;function _xmlUCSIsLatinExtendedAdditional(...args){return asyncifyStubs["xmlUCSIsLatinExtendedAdditional"](...args)}_xmlUCSIsLatinExtendedAdditional.stub=true;asyncifyStubs["xmlUCSIsLatinExtendedAdditional"]=undefined;function _xmlUCSIsLatinExtendedB(...args){return asyncifyStubs["xmlUCSIsLatinExtendedB"](...args)}_xmlUCSIsLatinExtendedB.stub=true;asyncifyStubs["xmlUCSIsLatinExtendedB"]=undefined;function _xmlUCSIsLetterlikeSymbols(...args){return asyncifyStubs["xmlUCSIsLetterlikeSymbols"](...args)}_xmlUCSIsLetterlikeSymbols.stub=true;asyncifyStubs["xmlUCSIsLetterlikeSymbols"]=undefined;function _xmlUCSIsLimbu(...args){return asyncifyStubs["xmlUCSIsLimbu"](...args)}_xmlUCSIsLimbu.stub=true;asyncifyStubs["xmlUCSIsLimbu"]=undefined;function _xmlUCSIsLinearBIdeograms(...args){return asyncifyStubs["xmlUCSIsLinearBIdeograms"](...args)}_xmlUCSIsLinearBIdeograms.stub=true;asyncifyStubs["xmlUCSIsLinearBIdeograms"]=undefined;function _xmlUCSIsLinearBSyllabary(...args){return asyncifyStubs["xmlUCSIsLinearBSyllabary"](...args)}_xmlUCSIsLinearBSyllabary.stub=true;asyncifyStubs["xmlUCSIsLinearBSyllabary"]=undefined;function _xmlUCSIsLowSurrogates(...args){return asyncifyStubs["xmlUCSIsLowSurrogates"](...args)}_xmlUCSIsLowSurrogates.stub=true;asyncifyStubs["xmlUCSIsLowSurrogates"]=undefined;function _xmlUCSIsMalayalam(...args){return asyncifyStubs["xmlUCSIsMalayalam"](...args)}_xmlUCSIsMalayalam.stub=true;asyncifyStubs["xmlUCSIsMalayalam"]=undefined;function _xmlUCSIsMathematicalAlphanumericSymbols(...args){return asyncifyStubs["xmlUCSIsMathematicalAlphanumericSymbols"](...args)}_xmlUCSIsMathematicalAlphanumericSymbols.stub=true;asyncifyStubs["xmlUCSIsMathematicalAlphanumericSymbols"]=undefined;function _xmlUCSIsMathematicalOperators(...args){return asyncifyStubs["xmlUCSIsMathematicalOperators"](...args)}_xmlUCSIsMathematicalOperators.stub=true;asyncifyStubs["xmlUCSIsMathematicalOperators"]=undefined;function _xmlUCSIsMiscellaneousMathematicalSymbolsA(...args){return asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsA"](...args)}_xmlUCSIsMiscellaneousMathematicalSymbolsA.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsA"]=undefined;function _xmlUCSIsMiscellaneousMathematicalSymbolsB(...args){return asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsB"](...args)}_xmlUCSIsMiscellaneousMathematicalSymbolsB.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousMathematicalSymbolsB"]=undefined;function _xmlUCSIsMiscellaneousSymbols(...args){return asyncifyStubs["xmlUCSIsMiscellaneousSymbols"](...args)}_xmlUCSIsMiscellaneousSymbols.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousSymbols"]=undefined;function _xmlUCSIsMiscellaneousSymbolsandArrows(...args){return asyncifyStubs["xmlUCSIsMiscellaneousSymbolsandArrows"](...args)}_xmlUCSIsMiscellaneousSymbolsandArrows.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousSymbolsandArrows"]=undefined;function _xmlUCSIsMiscellaneousTechnical(...args){return asyncifyStubs["xmlUCSIsMiscellaneousTechnical"](...args)}_xmlUCSIsMiscellaneousTechnical.stub=true;asyncifyStubs["xmlUCSIsMiscellaneousTechnical"]=undefined;function _xmlUCSIsMongolian(...args){return asyncifyStubs["xmlUCSIsMongolian"](...args)}_xmlUCSIsMongolian.stub=true;asyncifyStubs["xmlUCSIsMongolian"]=undefined;function _xmlUCSIsMusicalSymbols(...args){return asyncifyStubs["xmlUCSIsMusicalSymbols"](...args)}_xmlUCSIsMusicalSymbols.stub=true;asyncifyStubs["xmlUCSIsMusicalSymbols"]=undefined;function _xmlUCSIsMyanmar(...args){return asyncifyStubs["xmlUCSIsMyanmar"](...args)}_xmlUCSIsMyanmar.stub=true;asyncifyStubs["xmlUCSIsMyanmar"]=undefined;function _xmlUCSIsNumberForms(...args){return asyncifyStubs["xmlUCSIsNumberForms"](...args)}_xmlUCSIsNumberForms.stub=true;asyncifyStubs["xmlUCSIsNumberForms"]=undefined;function _xmlUCSIsOgham(...args){return asyncifyStubs["xmlUCSIsOgham"](...args)}_xmlUCSIsOgham.stub=true;asyncifyStubs["xmlUCSIsOgham"]=undefined;function _xmlUCSIsOldItalic(...args){return asyncifyStubs["xmlUCSIsOldItalic"](...args)}_xmlUCSIsOldItalic.stub=true;asyncifyStubs["xmlUCSIsOldItalic"]=undefined;function _xmlUCSIsOpticalCharacterRecognition(...args){return asyncifyStubs["xmlUCSIsOpticalCharacterRecognition"](...args)}_xmlUCSIsOpticalCharacterRecognition.stub=true;asyncifyStubs["xmlUCSIsOpticalCharacterRecognition"]=undefined;function _xmlUCSIsOriya(...args){return asyncifyStubs["xmlUCSIsOriya"](...args)}_xmlUCSIsOriya.stub=true;asyncifyStubs["xmlUCSIsOriya"]=undefined;function _xmlUCSIsOsmanya(...args){return asyncifyStubs["xmlUCSIsOsmanya"](...args)}_xmlUCSIsOsmanya.stub=true;asyncifyStubs["xmlUCSIsOsmanya"]=undefined;function _xmlUCSIsPhoneticExtensions(...args){return asyncifyStubs["xmlUCSIsPhoneticExtensions"](...args)}_xmlUCSIsPhoneticExtensions.stub=true;asyncifyStubs["xmlUCSIsPhoneticExtensions"]=undefined;function _xmlUCSIsPrivateUse(...args){return asyncifyStubs["xmlUCSIsPrivateUse"](...args)}_xmlUCSIsPrivateUse.stub=true;asyncifyStubs["xmlUCSIsPrivateUse"]=undefined;function _xmlUCSIsPrivateUseArea(...args){return asyncifyStubs["xmlUCSIsPrivateUseArea"](...args)}_xmlUCSIsPrivateUseArea.stub=true;asyncifyStubs["xmlUCSIsPrivateUseArea"]=undefined;function _xmlUCSIsRunic(...args){return asyncifyStubs["xmlUCSIsRunic"](...args)}_xmlUCSIsRunic.stub=true;asyncifyStubs["xmlUCSIsRunic"]=undefined;function _xmlUCSIsShavian(...args){return asyncifyStubs["xmlUCSIsShavian"](...args)}_xmlUCSIsShavian.stub=true;asyncifyStubs["xmlUCSIsShavian"]=undefined;function _xmlUCSIsSinhala(...args){return asyncifyStubs["xmlUCSIsSinhala"](...args)}_xmlUCSIsSinhala.stub=true;asyncifyStubs["xmlUCSIsSinhala"]=undefined;function _xmlUCSIsSmallFormVariants(...args){return asyncifyStubs["xmlUCSIsSmallFormVariants"](...args)}_xmlUCSIsSmallFormVariants.stub=true;asyncifyStubs["xmlUCSIsSmallFormVariants"]=undefined;function _xmlUCSIsSpacingModifierLetters(...args){return asyncifyStubs["xmlUCSIsSpacingModifierLetters"](...args)}_xmlUCSIsSpacingModifierLetters.stub=true;asyncifyStubs["xmlUCSIsSpacingModifierLetters"]=undefined;function _xmlUCSIsSpecials(...args){return asyncifyStubs["xmlUCSIsSpecials"](...args)}_xmlUCSIsSpecials.stub=true;asyncifyStubs["xmlUCSIsSpecials"]=undefined;function _xmlUCSIsSuperscriptsandSubscripts(...args){return asyncifyStubs["xmlUCSIsSuperscriptsandSubscripts"](...args)}_xmlUCSIsSuperscriptsandSubscripts.stub=true;asyncifyStubs["xmlUCSIsSuperscriptsandSubscripts"]=undefined;function _xmlUCSIsSupplementalArrowsA(...args){return asyncifyStubs["xmlUCSIsSupplementalArrowsA"](...args)}_xmlUCSIsSupplementalArrowsA.stub=true;asyncifyStubs["xmlUCSIsSupplementalArrowsA"]=undefined;function _xmlUCSIsSupplementalArrowsB(...args){return asyncifyStubs["xmlUCSIsSupplementalArrowsB"](...args)}_xmlUCSIsSupplementalArrowsB.stub=true;asyncifyStubs["xmlUCSIsSupplementalArrowsB"]=undefined;function _xmlUCSIsSupplementalMathematicalOperators(...args){return asyncifyStubs["xmlUCSIsSupplementalMathematicalOperators"](...args)}_xmlUCSIsSupplementalMathematicalOperators.stub=true;asyncifyStubs["xmlUCSIsSupplementalMathematicalOperators"]=undefined;function _xmlUCSIsSupplementaryPrivateUseAreaA(...args){return asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaA"](...args)}_xmlUCSIsSupplementaryPrivateUseAreaA.stub=true;asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaA"]=undefined;function _xmlUCSIsSupplementaryPrivateUseAreaB(...args){return asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaB"](...args)}_xmlUCSIsSupplementaryPrivateUseAreaB.stub=true;asyncifyStubs["xmlUCSIsSupplementaryPrivateUseAreaB"]=undefined;function _xmlUCSIsSyriac(...args){return asyncifyStubs["xmlUCSIsSyriac"](...args)}_xmlUCSIsSyriac.stub=true;asyncifyStubs["xmlUCSIsSyriac"]=undefined;function _xmlUCSIsTagalog(...args){return asyncifyStubs["xmlUCSIsTagalog"](...args)}_xmlUCSIsTagalog.stub=true;asyncifyStubs["xmlUCSIsTagalog"]=undefined;function _xmlUCSIsTagbanwa(...args){return asyncifyStubs["xmlUCSIsTagbanwa"](...args)}_xmlUCSIsTagbanwa.stub=true;asyncifyStubs["xmlUCSIsTagbanwa"]=undefined;function _xmlUCSIsTags(...args){return asyncifyStubs["xmlUCSIsTags"](...args)}_xmlUCSIsTags.stub=true;asyncifyStubs["xmlUCSIsTags"]=undefined;function _xmlUCSIsTaiLe(...args){return asyncifyStubs["xmlUCSIsTaiLe"](...args)}_xmlUCSIsTaiLe.stub=true;asyncifyStubs["xmlUCSIsTaiLe"]=undefined;function _xmlUCSIsTaiXuanJingSymbols(...args){return asyncifyStubs["xmlUCSIsTaiXuanJingSymbols"](...args)}_xmlUCSIsTaiXuanJingSymbols.stub=true;asyncifyStubs["xmlUCSIsTaiXuanJingSymbols"]=undefined;function _xmlUCSIsTamil(...args){return asyncifyStubs["xmlUCSIsTamil"](...args)}_xmlUCSIsTamil.stub=true;asyncifyStubs["xmlUCSIsTamil"]=undefined;function _xmlUCSIsTelugu(...args){return asyncifyStubs["xmlUCSIsTelugu"](...args)}_xmlUCSIsTelugu.stub=true;asyncifyStubs["xmlUCSIsTelugu"]=undefined;function _xmlUCSIsThaana(...args){return asyncifyStubs["xmlUCSIsThaana"](...args)}_xmlUCSIsThaana.stub=true;asyncifyStubs["xmlUCSIsThaana"]=undefined;function _xmlUCSIsThai(...args){return asyncifyStubs["xmlUCSIsThai"](...args)}_xmlUCSIsThai.stub=true;asyncifyStubs["xmlUCSIsThai"]=undefined;function _xmlUCSIsTibetan(...args){return asyncifyStubs["xmlUCSIsTibetan"](...args)}_xmlUCSIsTibetan.stub=true;asyncifyStubs["xmlUCSIsTibetan"]=undefined;function _xmlUCSIsUgaritic(...args){return asyncifyStubs["xmlUCSIsUgaritic"](...args)}_xmlUCSIsUgaritic.stub=true;asyncifyStubs["xmlUCSIsUgaritic"]=undefined;function _xmlUCSIsUnifiedCanadianAboriginalSyllabics(...args){return asyncifyStubs["xmlUCSIsUnifiedCanadianAboriginalSyllabics"](...args)}_xmlUCSIsUnifiedCanadianAboriginalSyllabics.stub=true;asyncifyStubs["xmlUCSIsUnifiedCanadianAboriginalSyllabics"]=undefined;function _xmlUCSIsVariationSelectors(...args){return asyncifyStubs["xmlUCSIsVariationSelectors"](...args)}_xmlUCSIsVariationSelectors.stub=true;asyncifyStubs["xmlUCSIsVariationSelectors"]=undefined;function _xmlUCSIsVariationSelectorsSupplement(...args){return asyncifyStubs["xmlUCSIsVariationSelectorsSupplement"](...args)}_xmlUCSIsVariationSelectorsSupplement.stub=true;asyncifyStubs["xmlUCSIsVariationSelectorsSupplement"]=undefined;function _xmlUCSIsYiRadicals(...args){return asyncifyStubs["xmlUCSIsYiRadicals"](...args)}_xmlUCSIsYiRadicals.stub=true;asyncifyStubs["xmlUCSIsYiRadicals"]=undefined;function _xmlUCSIsYiSyllables(...args){return asyncifyStubs["xmlUCSIsYiSyllables"](...args)}_xmlUCSIsYiSyllables.stub=true;asyncifyStubs["xmlUCSIsYiSyllables"]=undefined;function _xmlUCSIsYijingHexagramSymbols(...args){return asyncifyStubs["xmlUCSIsYijingHexagramSymbols"](...args)}_xmlUCSIsYijingHexagramSymbols.stub=true;asyncifyStubs["xmlUCSIsYijingHexagramSymbols"]=undefined;function _xmlURIUnescapeString(...args){return asyncifyStubs["xmlURIUnescapeString"](...args)}_xmlURIUnescapeString.stub=true;asyncifyStubs["xmlURIUnescapeString"]=undefined;function _xmlUnlinkNode(...args){return asyncifyStubs["xmlUnlinkNode"](...args)}_xmlUnlinkNode.stub=true;asyncifyStubs["xmlUnlinkNode"]=undefined;function _xmlXPathBooleanFunction(...args){return asyncifyStubs["xmlXPathBooleanFunction"](...args)}_xmlXPathBooleanFunction.stub=true;asyncifyStubs["xmlXPathBooleanFunction"]=undefined;function _xmlXPathCeilingFunction(...args){return asyncifyStubs["xmlXPathCeilingFunction"](...args)}_xmlXPathCeilingFunction.stub=true;asyncifyStubs["xmlXPathCeilingFunction"]=undefined;function _xmlXPathConcatFunction(...args){return asyncifyStubs["xmlXPathConcatFunction"](...args)}_xmlXPathConcatFunction.stub=true;asyncifyStubs["xmlXPathConcatFunction"]=undefined;function _xmlXPathContainsFunction(...args){return asyncifyStubs["xmlXPathContainsFunction"](...args)}_xmlXPathContainsFunction.stub=true;asyncifyStubs["xmlXPathContainsFunction"]=undefined;function _xmlXPathCountFunction(...args){return asyncifyStubs["xmlXPathCountFunction"](...args)}_xmlXPathCountFunction.stub=true;asyncifyStubs["xmlXPathCountFunction"]=undefined;function _xmlXPathFalseFunction(...args){return asyncifyStubs["xmlXPathFalseFunction"](...args)}_xmlXPathFalseFunction.stub=true;asyncifyStubs["xmlXPathFalseFunction"]=undefined;function _xmlXPathFloorFunction(...args){return asyncifyStubs["xmlXPathFloorFunction"](...args)}_xmlXPathFloorFunction.stub=true;asyncifyStubs["xmlXPathFloorFunction"]=undefined;function _xmlXPathIdFunction(...args){return asyncifyStubs["xmlXPathIdFunction"](...args)}_xmlXPathIdFunction.stub=true;asyncifyStubs["xmlXPathIdFunction"]=undefined;function _xmlXPathLangFunction(...args){return asyncifyStubs["xmlXPathLangFunction"](...args)}_xmlXPathLangFunction.stub=true;asyncifyStubs["xmlXPathLangFunction"]=undefined;function _xmlXPathLastFunction(...args){return asyncifyStubs["xmlXPathLastFunction"](...args)}_xmlXPathLastFunction.stub=true;asyncifyStubs["xmlXPathLastFunction"]=undefined;function _xmlXPathLocalNameFunction(...args){return asyncifyStubs["xmlXPathLocalNameFunction"](...args)}_xmlXPathLocalNameFunction.stub=true;asyncifyStubs["xmlXPathLocalNameFunction"]=undefined;function _xmlXPathNAN(...args){return asyncifyStubs["xmlXPathNAN"](...args)}_xmlXPathNAN.stub=true;asyncifyStubs["xmlXPathNAN"]=undefined;function _xmlXPathNINF(...args){return asyncifyStubs["xmlXPathNINF"](...args)}_xmlXPathNINF.stub=true;asyncifyStubs["xmlXPathNINF"]=undefined;function _xmlXPathNamespaceURIFunction(...args){return asyncifyStubs["xmlXPathNamespaceURIFunction"](...args)}_xmlXPathNamespaceURIFunction.stub=true;asyncifyStubs["xmlXPathNamespaceURIFunction"]=undefined;function _xmlXPathNextAncestor(...args){return asyncifyStubs["xmlXPathNextAncestor"](...args)}_xmlXPathNextAncestor.stub=true;asyncifyStubs["xmlXPathNextAncestor"]=undefined;function _xmlXPathNextAncestorOrSelf(...args){return asyncifyStubs["xmlXPathNextAncestorOrSelf"](...args)}_xmlXPathNextAncestorOrSelf.stub=true;asyncifyStubs["xmlXPathNextAncestorOrSelf"]=undefined;function _xmlXPathNextAttribute(...args){return asyncifyStubs["xmlXPathNextAttribute"](...args)}_xmlXPathNextAttribute.stub=true;asyncifyStubs["xmlXPathNextAttribute"]=undefined;function _xmlXPathNextChild(...args){return asyncifyStubs["xmlXPathNextChild"](...args)}_xmlXPathNextChild.stub=true;asyncifyStubs["xmlXPathNextChild"]=undefined;function _xmlXPathNextDescendant(...args){return asyncifyStubs["xmlXPathNextDescendant"](...args)}_xmlXPathNextDescendant.stub=true;asyncifyStubs["xmlXPathNextDescendant"]=undefined;function _xmlXPathNextDescendantOrSelf(...args){return asyncifyStubs["xmlXPathNextDescendantOrSelf"](...args)}_xmlXPathNextDescendantOrSelf.stub=true;asyncifyStubs["xmlXPathNextDescendantOrSelf"]=undefined;function _xmlXPathNextFollowing(...args){return asyncifyStubs["xmlXPathNextFollowing"](...args)}_xmlXPathNextFollowing.stub=true;asyncifyStubs["xmlXPathNextFollowing"]=undefined;function _xmlXPathNextFollowingSibling(...args){return asyncifyStubs["xmlXPathNextFollowingSibling"](...args)}_xmlXPathNextFollowingSibling.stub=true;asyncifyStubs["xmlXPathNextFollowingSibling"]=undefined;function _xmlXPathNextNamespace(...args){return asyncifyStubs["xmlXPathNextNamespace"](...args)}_xmlXPathNextNamespace.stub=true;asyncifyStubs["xmlXPathNextNamespace"]=undefined;function _xmlXPathNextParent(...args){return asyncifyStubs["xmlXPathNextParent"](...args)}_xmlXPathNextParent.stub=true;asyncifyStubs["xmlXPathNextParent"]=undefined;function _xmlXPathNextPrecedingSibling(...args){return asyncifyStubs["xmlXPathNextPrecedingSibling"](...args)}_xmlXPathNextPrecedingSibling.stub=true;asyncifyStubs["xmlXPathNextPrecedingSibling"]=undefined;function _xmlXPathNextSelf(...args){return asyncifyStubs["xmlXPathNextSelf"](...args)}_xmlXPathNextSelf.stub=true;asyncifyStubs["xmlXPathNextSelf"]=undefined;function _xmlXPathNormalizeFunction(...args){return asyncifyStubs["xmlXPathNormalizeFunction"](...args)}_xmlXPathNormalizeFunction.stub=true;asyncifyStubs["xmlXPathNormalizeFunction"]=undefined;function _xmlXPathNotFunction(...args){return asyncifyStubs["xmlXPathNotFunction"](...args)}_xmlXPathNotFunction.stub=true;asyncifyStubs["xmlXPathNotFunction"]=undefined;function _xmlXPathNumberFunction(...args){return asyncifyStubs["xmlXPathNumberFunction"](...args)}_xmlXPathNumberFunction.stub=true;asyncifyStubs["xmlXPathNumberFunction"]=undefined;function _xmlXPathPINF(...args){return asyncifyStubs["xmlXPathPINF"](...args)}_xmlXPathPINF.stub=true;asyncifyStubs["xmlXPathPINF"]=undefined;function _xmlXPathPositionFunction(...args){return asyncifyStubs["xmlXPathPositionFunction"](...args)}_xmlXPathPositionFunction.stub=true;asyncifyStubs["xmlXPathPositionFunction"]=undefined;function _xmlXPathRoundFunction(...args){return asyncifyStubs["xmlXPathRoundFunction"](...args)}_xmlXPathRoundFunction.stub=true;asyncifyStubs["xmlXPathRoundFunction"]=undefined;function _xmlXPathStartsWithFunction(...args){return asyncifyStubs["xmlXPathStartsWithFunction"](...args)}_xmlXPathStartsWithFunction.stub=true;asyncifyStubs["xmlXPathStartsWithFunction"]=undefined;function _xmlXPathStringFunction(...args){return asyncifyStubs["xmlXPathStringFunction"](...args)}_xmlXPathStringFunction.stub=true;asyncifyStubs["xmlXPathStringFunction"]=undefined;function _xmlXPathStringLengthFunction(...args){return asyncifyStubs["xmlXPathStringLengthFunction"](...args)}_xmlXPathStringLengthFunction.stub=true;asyncifyStubs["xmlXPathStringLengthFunction"]=undefined;function _xmlXPathSubstringAfterFunction(...args){return asyncifyStubs["xmlXPathSubstringAfterFunction"](...args)}_xmlXPathSubstringAfterFunction.stub=true;asyncifyStubs["xmlXPathSubstringAfterFunction"]=undefined;function _xmlXPathSubstringBeforeFunction(...args){return asyncifyStubs["xmlXPathSubstringBeforeFunction"](...args)}_xmlXPathSubstringBeforeFunction.stub=true;asyncifyStubs["xmlXPathSubstringBeforeFunction"]=undefined;function _xmlXPathSubstringFunction(...args){return asyncifyStubs["xmlXPathSubstringFunction"](...args)}_xmlXPathSubstringFunction.stub=true;asyncifyStubs["xmlXPathSubstringFunction"]=undefined;function _xmlXPathSumFunction(...args){return asyncifyStubs["xmlXPathSumFunction"](...args)}_xmlXPathSumFunction.stub=true;asyncifyStubs["xmlXPathSumFunction"]=undefined;function _xmlXPathTranslateFunction(...args){return asyncifyStubs["xmlXPathTranslateFunction"](...args)}_xmlXPathTranslateFunction.stub=true;asyncifyStubs["xmlXPathTranslateFunction"]=undefined;function _xmlXPathTrueFunction(...args){return asyncifyStubs["xmlXPathTrueFunction"](...args)}_xmlXPathTrueFunction.stub=true;asyncifyStubs["xmlXPathTrueFunction"]=undefined;var runAndAbortIfError=func=>{try{return func()}catch(e){abort(e)}};var Asyncify={instrumentWasmImports(imports){var importPattern=/^(invoke_.*|__asyncjs__.*)$/;for(let[x,original]of Object.entries(imports)){if(typeof original=="function"){let isAsyncifyImport=original.isAsync||importPattern.test(x)}}},instrumentWasmExports(exports){var ret={};for(let[x,original]of Object.entries(exports)){if(typeof original=="function"){ret[x]=(...args)=>{Asyncify.exportCallStack.push(x);try{return original(...args)}finally{if(!ABORT){var y=Asyncify.exportCallStack.pop();Asyncify.maybeStopUnwind()}}};ret[x].orig=original}else{ret[x]=original}}return ret},State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId(funcName){var id=Asyncify.callStackNameToId[funcName];if(id===undefined){id=Asyncify.callStackId++;Asyncify.callStackNameToId[funcName]=id;Asyncify.callStackIdToName[id]=funcName}return id},maybeStopUnwind(){if(Asyncify.currData&&Asyncify.state===Asyncify.State.Unwinding&&Asyncify.exportCallStack.length===0){Asyncify.state=Asyncify.State.Normal;runtimeKeepalivePush();runAndAbortIfError(_asyncify_stop_unwind);if(typeof Fibers!="undefined"){Fibers.trampoline()}}},whenDone(){return new Promise((resolve,reject)=>{Asyncify.asyncPromiseHandlers={resolve,reject}})},allocateData(){var ptr=_malloc(12+Asyncify.StackSize);Asyncify.setDataHeader(ptr,ptr+12,Asyncify.StackSize);Asyncify.setDataRewindFunc(ptr);return ptr},setDataHeader(ptr,stack,stackSize){HEAPU32[ptr>>>2>>>0]=stack;HEAPU32[ptr+4>>>2>>>0]=stack+stackSize},setDataRewindFunc(ptr){var bottomOfCallStack=Asyncify.exportCallStack[0];var rewindId=Asyncify.getCallStackId(bottomOfCallStack);HEAP32[ptr+8>>>2>>>0]=rewindId},getDataRewindFuncName(ptr){var id=HEAP32[ptr+8>>>2>>>0];var name=Asyncify.callStackIdToName[id];return name},getDataRewindFunc__deps:["$resolveGlobalSymbol"],getDataRewindFunc(name){var func=wasmExports[name];if(!func){func=resolveGlobalSymbol(name,false).sym}return func},doRewind(ptr){var name=Asyncify.getDataRewindFuncName(ptr);var func=Asyncify.getDataRewindFunc(name);runtimeKeepalivePop();return func()},handleSleep(startAsync){if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){var reachedCallback=false;var reachedAfterCallback=false;startAsync((handleSleepReturnValue=0)=>{if(ABORT)return;Asyncify.handleSleepReturnValue=handleSleepReturnValue;reachedCallback=true;if(!reachedAfterCallback){return}Asyncify.state=Asyncify.State.Rewinding;runAndAbortIfError(()=>_asyncify_start_rewind(Asyncify.currData));if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.resume()}var asyncWasmReturnValue,isError=false;try{asyncWasmReturnValue=Asyncify.doRewind(Asyncify.currData)}catch(err){asyncWasmReturnValue=err;isError=true}var handled=false;if(!Asyncify.currData){var asyncPromiseHandlers=Asyncify.asyncPromiseHandlers;if(asyncPromiseHandlers){Asyncify.asyncPromiseHandlers=null;(isError?asyncPromiseHandlers.reject:asyncPromiseHandlers.resolve)(asyncWasmReturnValue);handled=true}}if(isError&&!handled){throw asyncWasmReturnValue}});reachedAfterCallback=true;if(!reachedCallback){Asyncify.state=Asyncify.State.Unwinding;Asyncify.currData=Asyncify.allocateData();if(typeof Browser!="undefined"&&Browser.mainLoop.func){Browser.mainLoop.pause()}runAndAbortIfError(()=>_asyncify_start_unwind(Asyncify.currData))}}else if(Asyncify.state===Asyncify.State.Rewinding){Asyncify.state=Asyncify.State.Normal;runAndAbortIfError(_asyncify_stop_rewind);_free(Asyncify.currData);Asyncify.currData=null;Asyncify.sleepCallbacks.forEach(callUserCallback)}else{abort(`invalid state: ${Asyncify.state}`)}return Asyncify.handleSleepReturnValue},handleAsync(startAsync){return Asyncify.handleSleep(wakeUp=>{startAsync().then(wakeUp)})}};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer>>>0)};var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={string:str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;iFS.unlink(path);var FS_createLazyFile=FS.createLazyFile;var FS_createDevice=FS.createDevice;var writeI53ToI64=(ptr,num)=>{HEAPU32[ptr>>>2>>>0]=num;var lower=HEAPU32[ptr>>>2>>>0];HEAPU32[ptr+4>>>2>>>0]=(num-lower)/4294967296};var writeI53ToI64Clamped=(ptr,num)=>{if(num>0x8000000000000000){HEAPU32[ptr>>>2>>>0]=4294967295;HEAPU32[ptr+4>>>2>>>0]=2147483647}else if(num<-0x8000000000000000){HEAPU32[ptr>>>2>>>0]=0;HEAPU32[ptr+4>>>2>>>0]=2147483648}else{writeI53ToI64(ptr,num)}};var writeI53ToI64Signaling=(ptr,num)=>{if(num>0x8000000000000000||num<-0x8000000000000000){throw`RangeError: ${num}`}writeI53ToI64(ptr,num)};var writeI53ToU64Clamped=(ptr,num)=>{if(num>0x10000000000000000){HEAPU32[ptr>>>2>>>0]=4294967295;HEAPU32[ptr+4>>>2>>>0]=4294967295}else if(num<0){HEAPU32[ptr>>>2>>>0]=0;HEAPU32[ptr+4>>>2>>>0]=0}else{writeI53ToI64(ptr,num)}};var writeI53ToU64Signaling=(ptr,num)=>{if(num<0||num>0x10000000000000000){throw`RangeError: ${num}`}writeI53ToI64(ptr,num)};var readI53FromU64=ptr=>HEAPU32[ptr>>>2>>>0]+HEAPU32[ptr+4>>>2>>>0]*4294967296;var convertI32PairToI53=(lo,hi)=>(lo>>>0)+hi*4294967296;var convertU32PairToI53=(lo,hi)=>(lo>>>0)+(hi>>>0)*4294967296;var getTempRet0=val=>__emscripten_tempret_get();var _stackAlloc=stackAlloc;var _stackSave=stackSave;var _stackRestore=stackSave;var ptrToString=ptr=>"0x"+ptr.toString(16).padStart(8,"0");function _emscripten_notify_memory_growth(memoryIndex){memoryIndex>>>=0;updateMemoryViews()}_emscripten_notify_memory_growth.sig="vp";var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var strError=errno=>UTF8ToString(_strerror(errno));var _endprotoent=()=>{};_endprotoent.sig="v";function _getprotoent(number){if(_setprotoent.index===Protocols.list.length){return 0}var result=Protocols.list[_setprotoent.index++];return result}_getprotoent.sig="p";function _emscripten_run_script(ptr){ptr>>>=0;eval(UTF8ToString(ptr))}_emscripten_run_script.sig="vp";function _emscripten_run_script_int(ptr){ptr>>>=0;return eval(UTF8ToString(ptr))|0}_emscripten_run_script_int.sig="ip";function _emscripten_run_script_string(ptr){ptr>>>=0;var s=eval(UTF8ToString(ptr));if(s==null){return 0}s+="";var me=_emscripten_run_script_string;var len=lengthBytesUTF8(s);if(!me.bufferSize||me.bufferSizeMath.random();_emscripten_random.sig="f";var warnOnce=text=>{warnOnce.shown||={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}};function jsStackTrace(){return(new Error).stack.toString()}function getCallstack(flags){var callstack=jsStackTrace();var iThisFunc=callstack.lastIndexOf("_emscripten_log");var iThisFunc2=callstack.lastIndexOf("_emscripten_get_callstack");var iNextLine=callstack.indexOf("\n",Math.max(iThisFunc,iThisFunc2))+1;callstack=callstack.slice(iNextLine);if(flags&8&&typeof emscripten_source_map=="undefined"){warnOnce('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.');flags^=8;flags|=16}var lines=callstack.split("\n");callstack="";var newFirefoxRe=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)");var firefoxRe=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?");var chromeRe=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var l in lines){var line=lines[l];var symbolName="";var file="";var lineno=0;var column=0;var parts=chromeRe.exec(line);if(parts&&parts.length==5){symbolName=parts[1];file=parts[2];lineno=parts[3];column=parts[4]}else{parts=newFirefoxRe.exec(line)||firefoxRe.exec(line);if(parts&&parts.length>=4){symbolName=parts[1];file=parts[2];lineno=parts[3];column=parts[4]|0}else{callstack+=line+"\n";continue}}var haveSourceMap=false;if(flags&8){var orig=emscripten_source_map.originalPositionFor({line:lineno,column});haveSourceMap=orig?.source;if(haveSourceMap){if(flags&64){orig.source=orig.source.substring(orig.source.replace(/\\/g,"/").lastIndexOf("/")+1)}callstack+=` at ${symbolName} (${orig.source}:${orig.line}:${orig.column})\n`}}if(flags&16||!haveSourceMap){if(flags&64){file=file.substring(file.replace(/\\/g,"/").lastIndexOf("/")+1)}callstack+=(haveSourceMap?` = ${symbolName}`:` at ${symbolName}`)+` (${file}:${lineno}:${column})\n`}}callstack=callstack.replace(/\s+$/,"");return callstack}var emscriptenLog=(flags,str)=>{if(flags&24){str=str.replace(/\s+$/,"");str+=(str.length>0?"\n":"")+getCallstack(flags)}if(flags&1){if(flags&4){console.error(str)}else if(flags&2){console.warn(str)}else if(flags&512){console.info(str)}else if(flags&256){console.debug(str)}else{console.log(str)}}else if(flags&6){err(str)}else{out(str)}};var reallyNegative=x=>x<0||x===0&&1/x===-Infinity;var reSign=(value,bits)=>{if(value<=0){return value}var half=bits<=32?Math.abs(1<=half&&(bits<=32||value>half)){value=-2*half+value}return value};var unSign=(value,bits)=>{if(value>=0){return value}return bits<=32?2*Math.abs(1<{var end=ptr;while(HEAPU8[end>>>0])++end;return end-ptr};var formatString=(format,varargs)=>{var textIndex=format;var argIndex=varargs;function prepVararg(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){ptr+=4}}else{}return ptr}function getNextArg(type){var ret;argIndex=prepVararg(argIndex,type);if(type==="double"){ret=HEAPF64[argIndex>>>3>>>0];argIndex+=8}else if(type=="i64"){ret=[HEAP32[argIndex>>>2>>>0],HEAP32[argIndex+4>>>2>>>0]];argIndex+=8}else{type="i32";ret=HEAP32[argIndex>>>2>>>0];argIndex+=4}return ret}var ret=[];var curr,next,currArg;while(1){var startTextIndex=textIndex;curr=HEAP8[textIndex>>>0];if(curr===0)break;next=HEAP8[textIndex+1>>>0];if(curr==37){var flagAlwaysSigned=false;var flagLeftAlign=false;var flagAlternative=false;var flagZeroPad=false;var flagPadSign=false;flagsLoop:while(1){switch(next){case 43:flagAlwaysSigned=true;break;case 45:flagLeftAlign=true;break;case 35:flagAlternative=true;break;case 48:if(flagZeroPad){break flagsLoop}else{flagZeroPad=true;break}case 32:flagPadSign=true;break;default:break flagsLoop}textIndex++;next=HEAP8[textIndex+1>>>0]}var width=0;if(next==42){width=getNextArg("i32");textIndex++;next=HEAP8[textIndex+1>>>0]}else{while(next>=48&&next<=57){width=width*10+(next-48);textIndex++;next=HEAP8[textIndex+1>>>0]}}var precisionSet=false,precision=-1;if(next==46){precision=0;precisionSet=true;textIndex++;next=HEAP8[textIndex+1>>>0];if(next==42){precision=getNextArg("i32");textIndex++}else{while(1){var precisionChr=HEAP8[textIndex+1>>>0];if(precisionChr<48||precisionChr>57)break;precision=precision*10+(precisionChr-48);textIndex++}}next=HEAP8[textIndex+1>>>0]}if(precision<0){precision=6;precisionSet=false}var argSize;switch(String.fromCharCode(next)){case"h":var nextNext=HEAP8[textIndex+2>>>0];if(nextNext==104){textIndex++;argSize=1}else{argSize=2}break;case"l":var nextNext=HEAP8[textIndex+2>>>0];if(nextNext==108){textIndex++;argSize=8}else{argSize=4}break;case"L":case"q":case"j":argSize=8;break;case"z":case"t":case"I":argSize=4;break;default:argSize=null}if(argSize)textIndex++;next=HEAP8[textIndex+1>>>0];switch(String.fromCharCode(next)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var signed=next==100||next==105;argSize=argSize||4;currArg=getNextArg("i"+argSize*8);var argText;if(argSize==8){currArg=next==117?convertU32PairToI53(currArg[0],currArg[1]):convertI32PairToI53(currArg[0],currArg[1])}if(argSize<=4){var limit=Math.pow(256,argSize)-1;currArg=(signed?reSign:unSign)(currArg&limit,argSize*8)}var currAbsArg=Math.abs(currArg);var prefix="";if(next==100||next==105){argText=reSign(currArg,8*argSize).toString(10)}else if(next==117){argText=unSign(currArg,8*argSize).toString(10);currArg=Math.abs(currArg)}else if(next==111){argText=(flagAlternative?"0":"")+currAbsArg.toString(8)}else if(next==120||next==88){prefix=flagAlternative&&currArg!=0?"0x":"";if(currArg<0){currArg=-currArg;argText=(currAbsArg-1).toString(16);var buffer=[];for(var i=0;i=0){if(flagAlwaysSigned){prefix="+"+prefix}else if(flagPadSign){prefix=" "+prefix}}if(argText.charAt(0)=="-"){prefix="-"+prefix;argText=argText.substr(1)}while(prefix.length+argText.lengthret.push(chr.charCodeAt(0)));break}case"f":case"F":case"e":case"E":case"g":case"G":{currArg=getNextArg("double");var argText;if(isNaN(currArg)){argText="nan";flagZeroPad=false}else if(!isFinite(currArg)){argText=(currArg<0?"-":"")+"inf";flagZeroPad=false}else{var isGeneral=false;var effectivePrecision=Math.min(precision,20);if(next==103||next==71){isGeneral=true;precision=precision||1;var exponent=parseInt(currArg.toExponential(effectivePrecision).split("e")[1],10);if(precision>exponent&&exponent>=-4){next=(next==103?"f":"F").charCodeAt(0);precision-=exponent+1}else{next=(next==103?"e":"E").charCodeAt(0);precision--}effectivePrecision=Math.min(precision,20)}if(next==101||next==69){argText=currArg.toExponential(effectivePrecision);if(/[eE][-+]\d$/.test(argText)){argText=argText.slice(0,-1)+"0"+argText.slice(-1)}}else if(next==102||next==70){argText=currArg.toFixed(effectivePrecision);if(currArg===0&&reallyNegative(currArg)){argText="-"+argText}}var parts=argText.split("e");if(isGeneral&&!flagAlternative){while(parts[0].length>1&&parts[0].includes(".")&&(parts[0].slice(-1)=="0"||parts[0].slice(-1)==".")){parts[0]=parts[0].slice(0,-1)}}else{if(flagAlternative&&argText.indexOf(".")==-1)parts[0]+=".";while(precision>effectivePrecision++)parts[0]+="0"}argText=parts[0]+(parts.length>1?"e"+parts[1]:"");if(next==69)argText=argText.toUpperCase();if(currArg>=0){if(flagAlwaysSigned){argText="+"+argText}else if(flagPadSign){argText=" "+argText}}}while(argText.lengthret.push(chr.charCodeAt(0)));break}case"s":{var arg=getNextArg("i8*");var argLength=arg?strLen(arg):"(null)".length;if(precisionSet)argLength=Math.min(argLength,precision);if(!flagLeftAlign){while(argLength>>0])}}else{ret=ret.concat(intArrayFromString("(null)".substr(0,argLength),true))}if(flagLeftAlign){while(argLength0){ret.push(32)}if(!flagLeftAlign)ret.push(getNextArg("i8"));break}case"n":{var ptr=getNextArg("i32*");HEAP32[ptr>>>2>>>0]=ret.length;break}case"%":{ret.push(curr);break}default:{for(var i=startTextIndex;i>>0])}}}textIndex+=2}else{ret.push(curr);textIndex+=1}}return ret};function _emscripten_log(flags,format,varargs){format>>>=0;varargs>>>=0;var result=formatString(format,varargs);var str=UTF8ArrayToString(result,0);emscriptenLog(flags,str)}_emscripten_log.sig="vipp";function _emscripten_get_compiler_setting(name){name>>>=0;throw"You must build with -sRETAIN_COMPILER_SETTINGS for getCompilerSetting or emscripten_get_compiler_setting to work"}_emscripten_get_compiler_setting.sig="pp";var _emscripten_has_asyncify=()=>1;_emscripten_has_asyncify.sig="i";function _emscripten_debugger(){debugger}_emscripten_debugger.sig="v";function _emscripten_print_double(x,to,max){to>>>=0;var str=x+"";if(to)return stringToUTF8(str,to,max);else return lengthBytesUTF8(str)}_emscripten_print_double.sig="idpi";function _emscripten_asm_const_double(code,sigPtr,argbuf){code>>>=0;sigPtr>>>=0;argbuf>>>=0;return runEmAsmFunction(code,sigPtr,argbuf)}_emscripten_asm_const_double.sig="dppp";var runMainThreadEmAsm=(emAsmAddr,sigPtr,argbuf,sync)=>{var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[emAsmAddr](...args)};function _emscripten_asm_const_int_sync_on_main_thread(emAsmAddr,sigPtr,argbuf){emAsmAddr>>>=0;sigPtr>>>=0;argbuf>>>=0;return runMainThreadEmAsm(emAsmAddr,sigPtr,argbuf,1)}_emscripten_asm_const_int_sync_on_main_thread.sig="ippp";function _emscripten_asm_const_ptr_sync_on_main_thread(emAsmAddr,sigPtr,argbuf){emAsmAddr>>>=0;sigPtr>>>=0;argbuf>>>=0;return runMainThreadEmAsm(emAsmAddr,sigPtr,argbuf,1)}_emscripten_asm_const_ptr_sync_on_main_thread.sig="pppp";var _emscripten_asm_const_double_sync_on_main_thread=_emscripten_asm_const_int_sync_on_main_thread;_emscripten_asm_const_double_sync_on_main_thread.sig="dppp";function _emscripten_asm_const_async_on_main_thread(emAsmAddr,sigPtr,argbuf){emAsmAddr>>>=0;sigPtr>>>=0;argbuf>>>=0;return runMainThreadEmAsm(emAsmAddr,sigPtr,argbuf,0)}_emscripten_asm_const_async_on_main_thread.sig="vppp";var jstoi_s=Number;var __Unwind_Backtrace=function(func,arg){func>>>=0;arg>>>=0;var trace=getCallstack();var parts=trace.split("\n");for(var i=0;i{})(0,arg);if(ret!==0)return}};__Unwind_Backtrace.sig="ipp";function __Unwind_GetIPInfo(context,ipBefore){context>>>=0;ipBefore>>>=0;return abort("Unwind_GetIPInfo")}__Unwind_GetIPInfo.sig="ppp";function __Unwind_FindEnclosingFunction(ip){ip>>>=0;return 0}__Unwind_FindEnclosingFunction.sig="pp";class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>>2>>>0]=type}get_type(){return HEAPU32[this.ptr+4>>>2>>>0]}set_destructor(destructor){HEAPU32[this.ptr+8>>>2>>>0]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>>2>>>0]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12>>>0]=caught}get_caught(){return HEAP8[this.ptr+12>>>0]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>>0]=rethrown}get_rethrown(){return HEAP8[this.ptr+13>>>0]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>>2>>>0]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>>2>>>0]}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){ptr>>>=0;type>>>=0;destructor>>>=0;var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast}___cxa_throw.sig="vppp";function __Unwind_RaiseException(ex){ex>>>=0;err("Warning: _Unwind_RaiseException is not correctly implemented");return ___cxa_throw(ex,0,0)}__Unwind_RaiseException.sig="ip";function __Unwind_DeleteException(ex){ex>>>=0;err("TODO: Unwind_DeleteException")}__Unwind_DeleteException.sig="vp";var listenOnce=(object,event,func)=>{object.addEventListener(event,func,{once:true})};var autoResumeAudioContext=(ctx,elements)=>{if(!elements){elements=[document,document.getElementById("canvas")]}["keydown","mousedown","touchstart"].forEach(event=>{elements.forEach(element=>{if(element){listenOnce(element,event,()=>{if(ctx.state==="suspended")ctx.resume()})}})})};var getDynCaller=(sig,ptr)=>(...args)=>dynCall(sig,ptr,args);var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};_emscripten_exit_with_live_runtime.sig="v";var _emscripten_force_exit=status=>{__emscripten_runtime_keepalive_clear();_exit(status)};_emscripten_force_exit.sig="vi";function _emscripten_outn(str,len){str>>>=0;len>>>=0;return out(UTF8ToString(str,len))}_emscripten_outn.sig="vpp";function _emscripten_errn(str,len){str>>>=0;len>>>=0;return err(UTF8ToString(str,len))}_emscripten_errn.sig="vpp";var _emscripten_throw_number=number=>{throw number};_emscripten_throw_number.sig="vd";function _emscripten_throw_string(str){str>>>=0;throw UTF8ToString(str)}_emscripten_throw_string.sig="vp";var _emscripten_runtime_keepalive_push=runtimeKeepalivePush;_emscripten_runtime_keepalive_push.sig="v";var _emscripten_runtime_keepalive_pop=runtimeKeepalivePop;_emscripten_runtime_keepalive_pop.sig="v";var _emscripten_runtime_keepalive_check=keepRuntimeAlive;_emscripten_runtime_keepalive_check.sig="i";var asmjsMangle=x=>{if(x=="__main_argc_argv"){x="main"}return x.startsWith("dynCall_")?x:"_"+x};var ___global_base=1024;function __emscripten_fs_load_embedded_files(ptr){ptr>>>=0;do{var name_addr=HEAPU32[ptr>>>2>>>0];ptr+=4;var len=HEAPU32[ptr>>>2>>>0];ptr+=4;var content=HEAPU32[ptr>>>2>>>0];ptr+=4;var name=UTF8ToString(name_addr);FS.createPath("/",PATH.dirname(name),true,true);FS.createDataFile(name,null,HEAP8.subarray(content>>>0,content+len>>>0),true,true,true)}while(HEAPU32[ptr>>>2>>>0])}__emscripten_fs_load_embedded_files.sig="vp";var POINTER_SIZE=4;function getNativeTypeSize(type){switch(type){case"i1":case"i8":case"u8":return 1;case"i16":case"u16":return 2;case"i32":case"u32":return 4;case"i64":case"u64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return POINTER_SIZE}if(type[0]==="i"){const bits=Number(type.substr(1));assert(bits%8===0,`getNativeTypeSize invalid bits ${bits}, ${type} type`);return bits/8}return 0}}}var STACK_SIZE=33554432;var STACK_ALIGN=16;var ASSERTIONS=0;var cwrap=(ident,returnType,argTypes,opts)=>{var numericArgs=!argTypes||argTypes.every(type=>type==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return(...args)=>ccall(ident,returnType,argTypes,args,opts)};var removeFunction=index=>{functionsInTableMap.delete(getWasmTableEntry(index));setWasmTableEntry(index,null);freeTableIndexes.push(index)};var _emscripten_math_cbrt=Math.cbrt;_emscripten_math_cbrt.sig="dd";var _emscripten_math_pow=Math.pow;_emscripten_math_pow.sig="ddd";var _emscripten_math_random=Math.random;_emscripten_math_random.sig="d";var _emscripten_math_sign=Math.sign;_emscripten_math_sign.sig="dd";var _emscripten_math_sqrt=Math.sqrt;_emscripten_math_sqrt.sig="dd";var _emscripten_math_exp=Math.exp;_emscripten_math_exp.sig="dd";var _emscripten_math_expm1=Math.expm1;_emscripten_math_expm1.sig="dd";var _emscripten_math_fmod=(x,y)=>x%y;_emscripten_math_fmod.sig="ddd";var _emscripten_math_log=Math.log;_emscripten_math_log.sig="dd";var _emscripten_math_log1p=Math.log1p;_emscripten_math_log1p.sig="dd";var _emscripten_math_log10=Math.log10;_emscripten_math_log10.sig="dd";var _emscripten_math_log2=Math.log2;_emscripten_math_log2.sig="dd";var _emscripten_math_round=Math.round;_emscripten_math_round.sig="dd";var _emscripten_math_acos=Math.acos;_emscripten_math_acos.sig="dd";var _emscripten_math_acosh=Math.acosh;_emscripten_math_acosh.sig="dd";var _emscripten_math_asin=Math.asin;_emscripten_math_asin.sig="dd";var _emscripten_math_asinh=Math.asinh;_emscripten_math_asinh.sig="dd";var _emscripten_math_atan=Math.atan;_emscripten_math_atan.sig="dd";var _emscripten_math_atanh=Math.atanh;_emscripten_math_atanh.sig="dd";var _emscripten_math_atan2=Math.atan2;_emscripten_math_atan2.sig="ddd";var _emscripten_math_cos=Math.cos;_emscripten_math_cos.sig="dd";var _emscripten_math_cosh=Math.cosh;_emscripten_math_cosh.sig="dd";function _emscripten_math_hypot(count,varargs){varargs>>>=0;var args=[];for(var i=0;i>>3>>>0])}return Math.hypot(...args)}_emscripten_math_hypot.sig="dip";var _emscripten_math_sin=Math.sin;_emscripten_math_sin.sig="dd";var _emscripten_math_sinh=Math.sinh;_emscripten_math_sinh.sig="dd";var _emscripten_math_tan=Math.tan;_emscripten_math_tan.sig="dd";var _emscripten_math_tanh=Math.tanh;_emscripten_math_tanh.sig="dd";function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var AsciiToString=ptr=>{ptr>>>=0;var str="";while(1){var ch=HEAPU8[ptr++>>>0];if(!ch)return str;str+=String.fromCharCode(ch)}};var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):undefined;var UTF16ToString=(ptr,maxBytesToRead)=>{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx>>>0])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr>>>0,endPtr>>>0));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>>1>>>0];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>>1>>>0]=codeUnit;outPtr+=2}HEAP16[outPtr>>>1>>>0]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>>2>>>0];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{outPtr>>>=0;maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>>2>>>0]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>>2>>>0]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var JSEvents={removeAllEventListeners(){while(JSEvents.eventHandlers.length){JSEvents._removeHandler(JSEvents.eventHandlers.length-1)}JSEvents.deferredCalls=[]},registerRemoveEventListeners(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},inEventHandler:0,deferredCalls:[],deferCall(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var call of JSEvents.deferredCalls){if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction,precedence,argsList});JSEvents.deferredCalls.sort((x,y)=>x.precedencecall.targetFunction!=targetFunction)},canPerformEventHandlerRequests(){if(navigator.userActivation){return navigator.userActivation.isActive}return JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls(){if(!JSEvents.canPerformEventHandlerRequests()){return}var deferredCalls=JSEvents.deferredCalls;JSEvents.deferredCalls=[];for(var call of deferredCalls){call.targetFunction(...call.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(target,eventTypeString)=>{for(var i=0;icString>2?UTF8ToString(cString):cString;var specialHTMLTargets=[0,document,window];var findEventTarget=target=>{target=maybeCStringToJsString(target);var domElement=specialHTMLTargets[target]||document.querySelector(target);return domElement};var registerKeyEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.keyEvent||=_malloc(160);var keyEventHandlerFunc=e=>{var keyEventData=JSEvents.keyEvent;HEAPF64[keyEventData>>>3>>>0]=e.timeStamp;var idx=keyEventData>>>2;HEAP32[idx+2>>>0]=e.location;HEAP8[keyEventData+12>>>0]=e.ctrlKey;HEAP8[keyEventData+13>>>0]=e.shiftKey;HEAP8[keyEventData+14>>>0]=e.altKey;HEAP8[keyEventData+15>>>0]=e.metaKey;HEAP8[keyEventData+16>>>0]=e.repeat;HEAP32[idx+5>>>0]=e.charCode;HEAP32[idx+6>>>0]=e.keyCode;HEAP32[idx+7>>>0]=e.which;stringToUTF8(e.key||"",keyEventData+32,32);stringToUTF8(e.code||"",keyEventData+64,32);stringToUTF8(e.char||"",keyEventData+96,32);stringToUTF8(e.locale||"",keyEventData+128,32);if(((a1,a2,a3)=>{})(eventTypeId,keyEventData,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:keyEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};var findCanvasEventTarget=findEventTarget;function _emscripten_set_keypress_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerKeyEventCallback(target,userData,useCapture,callbackfunc,1,"keypress",targetThread)}_emscripten_set_keypress_callback_on_thread.sig="ippipp";function _emscripten_set_keydown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerKeyEventCallback(target,userData,useCapture,callbackfunc,2,"keydown",targetThread)}_emscripten_set_keydown_callback_on_thread.sig="ippipp";function _emscripten_set_keyup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerKeyEventCallback(target,userData,useCapture,callbackfunc,3,"keyup",targetThread)}_emscripten_set_keyup_callback_on_thread.sig="ippipp";var getBoundingClientRect=e=>specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0};var fillMouseEventData=(eventStruct,e,target)=>{HEAPF64[eventStruct>>>3>>>0]=e.timeStamp;var idx=eventStruct>>>2;HEAP32[idx+2>>>0]=e.screenX;HEAP32[idx+3>>>0]=e.screenY;HEAP32[idx+4>>>0]=e.clientX;HEAP32[idx+5>>>0]=e.clientY;HEAP8[eventStruct+24>>>0]=e.ctrlKey;HEAP8[eventStruct+25>>>0]=e.shiftKey;HEAP8[eventStruct+26>>>0]=e.altKey;HEAP8[eventStruct+27>>>0]=e.metaKey;HEAP16[idx*2+14>>>0]=e.button;HEAP16[idx*2+15>>>0]=e.buttons;HEAP32[idx+8>>>0]=e["movementX"];HEAP32[idx+9>>>0]=e["movementY"];var rect=getBoundingClientRect(target);HEAP32[idx+10>>>0]=e.clientX-(rect.left|0);HEAP32[idx+11>>>0]=e.clientY-(rect.top|0)};var registerMouseEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.mouseEvent||=_malloc(64);target=findEventTarget(target);var mouseEventHandlerFunc=(e=event)=>{fillMouseEventData(JSEvents.mouseEvent,e,target);if(((a1,a2,a3)=>{})(eventTypeId,JSEvents.mouseEvent,userData))e.preventDefault()};var eventHandler={target,allowsDeferredCalls:eventTypeString!="mousemove"&&eventTypeString!="mouseenter"&&eventTypeString!="mouseleave",eventTypeString,callbackfunc,handlerFunc:mouseEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_click_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,4,"click",targetThread)}_emscripten_set_click_callback_on_thread.sig="ippipp";function _emscripten_set_mousedown_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,5,"mousedown",targetThread)}_emscripten_set_mousedown_callback_on_thread.sig="ippipp";function _emscripten_set_mouseup_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,6,"mouseup",targetThread)}_emscripten_set_mouseup_callback_on_thread.sig="ippipp";function _emscripten_set_dblclick_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,7,"dblclick",targetThread)}_emscripten_set_dblclick_callback_on_thread.sig="ippipp";function _emscripten_set_mousemove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,8,"mousemove",targetThread)}_emscripten_set_mousemove_callback_on_thread.sig="ippipp";function _emscripten_set_mouseenter_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,33,"mouseenter",targetThread)}_emscripten_set_mouseenter_callback_on_thread.sig="ippipp";function _emscripten_set_mouseleave_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,34,"mouseleave",targetThread)}_emscripten_set_mouseleave_callback_on_thread.sig="ippipp";function _emscripten_set_mouseover_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,35,"mouseover",targetThread)}_emscripten_set_mouseover_callback_on_thread.sig="ippipp";function _emscripten_set_mouseout_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerMouseEventCallback(target,userData,useCapture,callbackfunc,36,"mouseout",targetThread)}_emscripten_set_mouseout_callback_on_thread.sig="ippipp";function _emscripten_get_mouse_status(mouseState){mouseState>>>=0;if(!JSEvents.mouseEvent)return-7;HEAP8.set(HEAP8.subarray(JSEvents.mouseEvent>>>0,JSEvents.mouseEvent+64>>>0),mouseState>>>0);return 0}_emscripten_get_mouse_status.sig="ip";var registerWheelEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.wheelEvent||=_malloc(96);var wheelHandlerFunc=(e=event)=>{var wheelEvent=JSEvents.wheelEvent;fillMouseEventData(wheelEvent,e,target);HEAPF64[wheelEvent+64>>>3>>>0]=e["deltaX"];HEAPF64[wheelEvent+72>>>3>>>0]=e["deltaY"];HEAPF64[wheelEvent+80>>>3>>>0]=e["deltaZ"];HEAP32[wheelEvent+88>>>2>>>0]=e["deltaMode"];if(((a1,a2,a3)=>{})(eventTypeId,wheelEvent,userData))e.preventDefault()};var eventHandler={target,allowsDeferredCalls:true,eventTypeString,callbackfunc,handlerFunc:wheelHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_wheel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;target=findEventTarget(target);if(!target)return-4;if(typeof target.onwheel!="undefined"){return registerWheelEventCallback(target,userData,useCapture,callbackfunc,9,"wheel",targetThread)}else{return-1}}_emscripten_set_wheel_callback_on_thread.sig="ippipp";var registerUiEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.uiEvent||=_malloc(36);target=findEventTarget(target);var uiEventHandlerFunc=(e=event)=>{if(e.target!=target){return}var b=document.body;if(!b){return}var uiEvent=JSEvents.uiEvent;HEAP32[uiEvent>>>2>>>0]=0;HEAP32[uiEvent+4>>>2>>>0]=b.clientWidth;HEAP32[uiEvent+8>>>2>>>0]=b.clientHeight;HEAP32[uiEvent+12>>>2>>>0]=innerWidth;HEAP32[uiEvent+16>>>2>>>0]=innerHeight;HEAP32[uiEvent+20>>>2>>>0]=outerWidth;HEAP32[uiEvent+24>>>2>>>0]=outerHeight;HEAP32[uiEvent+28>>>2>>>0]=pageXOffset|0;HEAP32[uiEvent+32>>>2>>>0]=pageYOffset|0;if(((a1,a2,a3)=>{})(eventTypeId,uiEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:uiEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_resize_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerUiEventCallback(target,userData,useCapture,callbackfunc,10,"resize",targetThread)}_emscripten_set_resize_callback_on_thread.sig="ippipp";function _emscripten_set_scroll_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerUiEventCallback(target,userData,useCapture,callbackfunc,11,"scroll",targetThread)}_emscripten_set_scroll_callback_on_thread.sig="ippipp";var registerFocusEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.focusEvent||=_malloc(256);var focusEventHandlerFunc=(e=event)=>{var nodeName=JSEvents.getNodeNameForTarget(e.target);var id=e.target.id?e.target.id:"";var focusEvent=JSEvents.focusEvent;stringToUTF8(nodeName,focusEvent+0,128);stringToUTF8(id,focusEvent+128,128);if(((a1,a2,a3)=>{})(eventTypeId,focusEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:focusEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_blur_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,12,"blur",targetThread)}_emscripten_set_blur_callback_on_thread.sig="ippipp";function _emscripten_set_focus_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,13,"focus",targetThread)}_emscripten_set_focus_callback_on_thread.sig="ippipp";function _emscripten_set_focusin_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,14,"focusin",targetThread)}_emscripten_set_focusin_callback_on_thread.sig="ippipp";function _emscripten_set_focusout_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerFocusEventCallback(target,userData,useCapture,callbackfunc,15,"focusout",targetThread)}_emscripten_set_focusout_callback_on_thread.sig="ippipp";var fillDeviceOrientationEventData=(eventStruct,e,target)=>{HEAPF64[eventStruct>>>3>>>0]=e.alpha;HEAPF64[eventStruct+8>>>3>>>0]=e.beta;HEAPF64[eventStruct+16>>>3>>>0]=e.gamma;HEAP8[eventStruct+24>>>0]=e.absolute};var registerDeviceOrientationEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.deviceOrientationEvent||=_malloc(32);var deviceOrientationEventHandlerFunc=(e=event)=>{fillDeviceOrientationEventData(JSEvents.deviceOrientationEvent,e,target);if(((a1,a2,a3)=>{})(eventTypeId,JSEvents.deviceOrientationEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:deviceOrientationEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_deviceorientation_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerDeviceOrientationEventCallback(2,userData,useCapture,callbackfunc,16,"deviceorientation",targetThread)}_emscripten_set_deviceorientation_callback_on_thread.sig="ipipp";function _emscripten_get_deviceorientation_status(orientationState){orientationState>>>=0;if(!JSEvents.deviceOrientationEvent)return-7;HEAP32.set(HEAP32.subarray(JSEvents.deviceOrientationEvent>>>0,32>>>0),orientationState>>>0);return 0}_emscripten_get_deviceorientation_status.sig="ip";var fillDeviceMotionEventData=(eventStruct,e,target)=>{var supportedFields=0;var a=e["acceleration"];supportedFields|=a&&1;var ag=e["accelerationIncludingGravity"];supportedFields|=ag&&2;var rr=e["rotationRate"];supportedFields|=rr&&4;a=a||{};ag=ag||{};rr=rr||{};HEAPF64[eventStruct>>>3>>>0]=a["x"];HEAPF64[eventStruct+8>>>3>>>0]=a["y"];HEAPF64[eventStruct+16>>>3>>>0]=a["z"];HEAPF64[eventStruct+24>>>3>>>0]=ag["x"];HEAPF64[eventStruct+32>>>3>>>0]=ag["y"];HEAPF64[eventStruct+40>>>3>>>0]=ag["z"];HEAPF64[eventStruct+48>>>3>>>0]=rr["alpha"];HEAPF64[eventStruct+56>>>3>>>0]=rr["beta"];HEAPF64[eventStruct+64>>>3>>>0]=rr["gamma"]};var registerDeviceMotionEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.deviceMotionEvent||=_malloc(80);var deviceMotionEventHandlerFunc=(e=event)=>{fillDeviceMotionEventData(JSEvents.deviceMotionEvent,e,target);if(((a1,a2,a3)=>{})(eventTypeId,JSEvents.deviceMotionEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:deviceMotionEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_devicemotion_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerDeviceMotionEventCallback(2,userData,useCapture,callbackfunc,17,"devicemotion",targetThread)}_emscripten_set_devicemotion_callback_on_thread.sig="ipipp";function _emscripten_get_devicemotion_status(motionState){motionState>>>=0;if(!JSEvents.deviceMotionEvent)return-7;HEAP32.set(HEAP32.subarray(JSEvents.deviceMotionEvent>>>0,80>>>0),motionState>>>0);return 0}_emscripten_get_devicemotion_status.sig="ip";var screenOrientation=()=>{if(!window.screen)return undefined;return screen.orientation||screen["mozOrientation"]||screen["webkitOrientation"]};var fillOrientationChangeEventData=eventStruct=>{var orientationsType1=["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];var orientationsType2=["portrait","portrait","landscape","landscape"];var orientationIndex=0;var orientationAngle=0;var screenOrientObj=screenOrientation();if(typeof screenOrientObj==="object"){orientationIndex=orientationsType1.indexOf(screenOrientObj.type);if(orientationIndex<0){orientationIndex=orientationsType2.indexOf(screenOrientObj.type)}if(orientationIndex>=0){orientationIndex=1<>>2>>>0]=orientationIndex;HEAP32[eventStruct+4>>>2>>>0]=orientationAngle};var registerOrientationChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.orientationChangeEvent||=_malloc(8);var orientationChangeEventHandlerFunc=(e=event)=>{var orientationChangeEvent=JSEvents.orientationChangeEvent;fillOrientationChangeEventData(orientationChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,orientationChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:orientationChangeEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_orientationchange_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!window.screen||!screen.orientation)return-1;return registerOrientationChangeEventCallback(screen.orientation,userData,useCapture,callbackfunc,18,"change",targetThread)}_emscripten_set_orientationchange_callback_on_thread.sig="ipipp";function _emscripten_get_orientation_status(orientationChangeEvent){orientationChangeEvent>>>=0;if(!screenOrientation()&&typeof orientation=="undefined")return-1;fillOrientationChangeEventData(orientationChangeEvent);return 0}_emscripten_get_orientation_status.sig="ip";var _emscripten_lock_orientation=allowedOrientations=>{var orientations=[];if(allowedOrientations&1)orientations.push("portrait-primary");if(allowedOrientations&2)orientations.push("portrait-secondary");if(allowedOrientations&4)orientations.push("landscape-primary");if(allowedOrientations&8)orientations.push("landscape-secondary");var succeeded;if(screen.lockOrientation){succeeded=screen.lockOrientation(orientations)}else if(screen.mozLockOrientation){succeeded=screen.mozLockOrientation(orientations)}else if(screen.webkitLockOrientation){succeeded=screen.webkitLockOrientation(orientations)}else{return-1}if(succeeded){return 0}return-6};_emscripten_lock_orientation.sig="ii";var _emscripten_unlock_orientation=()=>{if(screen.unlockOrientation){screen.unlockOrientation()}else if(screen.mozUnlockOrientation){screen.mozUnlockOrientation()}else if(screen.webkitUnlockOrientation){screen.webkitUnlockOrientation()}else{return-1}return 0};_emscripten_unlock_orientation.sig="i";var fillFullscreenChangeEventData=eventStruct=>{var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;var isFullscreen=!!fullscreenElement;HEAP8[eventStruct>>>0]=isFullscreen;HEAP8[eventStruct+1>>>0]=JSEvents.fullscreenEnabled();var reportedElement=isFullscreen?fullscreenElement:JSEvents.previousFullscreenElement;var nodeName=JSEvents.getNodeNameForTarget(reportedElement);var id=reportedElement?.id||"";stringToUTF8(nodeName,eventStruct+2,128);stringToUTF8(id,eventStruct+130,128);HEAP32[eventStruct+260>>>2>>>0]=reportedElement?reportedElement.clientWidth:0;HEAP32[eventStruct+264>>>2>>>0]=reportedElement?reportedElement.clientHeight:0;HEAP32[eventStruct+268>>>2>>>0]=screen.width;HEAP32[eventStruct+272>>>2>>>0]=screen.height;if(isFullscreen){JSEvents.previousFullscreenElement=fullscreenElement}};var registerFullscreenChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.fullscreenChangeEvent||=_malloc(276);var fullscreenChangeEventhandlerFunc=(e=event)=>{var fullscreenChangeEvent=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(fullscreenChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,fullscreenChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:fullscreenChangeEventhandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_fullscreenchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!JSEvents.fullscreenEnabled())return-1;target=findEventTarget(target);if(!target)return-4;registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"webkitfullscreenchange",targetThread);return registerFullscreenChangeEventCallback(target,userData,useCapture,callbackfunc,19,"fullscreenchange",targetThread)}_emscripten_set_fullscreenchange_callback_on_thread.sig="ippipp";function _emscripten_get_fullscreen_status(fullscreenStatus){fullscreenStatus>>>=0;if(!JSEvents.fullscreenEnabled())return-1;fillFullscreenChangeEventData(fullscreenStatus);return 0}_emscripten_get_fullscreen_status.sig="ip";function _emscripten_get_canvas_element_size(target,width,height){target>>>=0;width>>>=0;height>>>=0;var canvas=findCanvasEventTarget(target);if(!canvas)return-4;HEAP32[width>>>2>>>0]=canvas.width;HEAP32[height>>>2>>>0]=canvas.height}_emscripten_get_canvas_element_size.sig="ippp";var getCanvasElementSize=target=>{var sp=stackSave();var w=stackAlloc(8);var h=w+4;var targetInt=stringToUTF8OnStack(target.id);var ret=_emscripten_get_canvas_element_size(targetInt,w,h);var size=[HEAP32[w>>>2>>>0],HEAP32[h>>>2>>>0]];stackRestore(sp);return size};function _emscripten_set_canvas_element_size(target,width,height){target>>>=0;var canvas=findCanvasEventTarget(target);if(!canvas)return-4;canvas.width=width;canvas.height=height;return 0}_emscripten_set_canvas_element_size.sig="ipii";var setCanvasElementSize=(target,width,height)=>{if(!target.controlTransferredOffscreen){target.width=width;target.height=height}else{var sp=stackSave();var targetInt=stringToUTF8OnStack(target.id);_emscripten_set_canvas_element_size(targetInt,width,height);stackRestore(sp)}};var registerRestoreOldStyle=canvas=>{var canvasSize=getCanvasElementSize(canvas);var oldWidth=canvasSize[0];var oldHeight=canvasSize[1];var oldCssWidth=canvas.style.width;var oldCssHeight=canvas.style.height;var oldBackgroundColor=canvas.style.backgroundColor;var oldDocumentBackgroundColor=document.body.style.backgroundColor;var oldPaddingLeft=canvas.style.paddingLeft;var oldPaddingRight=canvas.style.paddingRight;var oldPaddingTop=canvas.style.paddingTop;var oldPaddingBottom=canvas.style.paddingBottom;var oldMarginLeft=canvas.style.marginLeft;var oldMarginRight=canvas.style.marginRight;var oldMarginTop=canvas.style.marginTop;var oldMarginBottom=canvas.style.marginBottom;var oldDocumentBodyMargin=document.body.style.margin;var oldDocumentOverflow=document.documentElement.style.overflow;var oldDocumentScroll=document.body.scroll;var oldImageRendering=canvas.style.imageRendering;function restoreOldStyle(){var fullscreenElement=document.fullscreenElement||document.webkitFullscreenElement;if(!fullscreenElement){document.removeEventListener("fullscreenchange",restoreOldStyle);document.removeEventListener("webkitfullscreenchange",restoreOldStyle);setCanvasElementSize(canvas,oldWidth,oldHeight);canvas.style.width=oldCssWidth;canvas.style.height=oldCssHeight;canvas.style.backgroundColor=oldBackgroundColor;if(!oldDocumentBackgroundColor)document.body.style.backgroundColor="white";document.body.style.backgroundColor=oldDocumentBackgroundColor;canvas.style.paddingLeft=oldPaddingLeft;canvas.style.paddingRight=oldPaddingRight;canvas.style.paddingTop=oldPaddingTop;canvas.style.paddingBottom=oldPaddingBottom;canvas.style.marginLeft=oldMarginLeft;canvas.style.marginRight=oldMarginRight;canvas.style.marginTop=oldMarginTop;canvas.style.marginBottom=oldMarginBottom;document.body.style.margin=oldDocumentBodyMargin;document.documentElement.style.overflow=oldDocumentOverflow;document.body.scroll=oldDocumentScroll;canvas.style.imageRendering=oldImageRendering;if(canvas.GLctxObject)canvas.GLctxObject.GLctx.viewport(0,0,oldWidth,oldHeight);if(currentFullscreenStrategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)}}}document.addEventListener("fullscreenchange",restoreOldStyle);document.addEventListener("webkitfullscreenchange",restoreOldStyle);return restoreOldStyle};var setLetterbox=(element,topBottom,leftRight)=>{element.style.paddingLeft=element.style.paddingRight=leftRight+"px";element.style.paddingTop=element.style.paddingBottom=topBottom+"px"};var JSEvents_resizeCanvasForFullscreen=(target,strategy)=>{var restoreOldStyle=registerRestoreOldStyle(target);var cssWidth=strategy.softFullscreen?innerWidth:screen.width;var cssHeight=strategy.softFullscreen?innerHeight:screen.height;var rect=getBoundingClientRect(target);var windowedCssWidth=rect.width;var windowedCssHeight=rect.height;var canvasSize=getCanvasElementSize(target);var windowedRttWidth=canvasSize[0];var windowedRttHeight=canvasSize[1];if(strategy.scaleMode==3){setLetterbox(target,(cssHeight-windowedCssHeight)/2,(cssWidth-windowedCssWidth)/2);cssWidth=windowedCssWidth;cssHeight=windowedCssHeight}else if(strategy.scaleMode==2){if(cssWidth*windowedRttHeight{if(strategy.scaleMode!=0||strategy.canvasResolutionScaleMode!=0){JSEvents_resizeCanvasForFullscreen(target,strategy)}if(target.requestFullscreen){target.requestFullscreen()}else if(target.webkitRequestFullscreen){target.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}else{return JSEvents.fullscreenEnabled()?-3:-1}currentFullscreenStrategy=strategy;if(strategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,strategy.canvasResizedCallbackUserData)}return 0};var hideEverythingExceptGivenElement=onlyVisibleElement=>{var child=onlyVisibleElement;var parent=child.parentNode;var hiddenElements=[];while(child!=document.body){var children=parent.children;for(var i=0;i{for(var elem of hiddenElements){elem.node.style.display=elem.displayState}};var currentFullscreenStrategy={};var restoreOldWindowedStyle=null;var softFullscreenResizeWebGLRenderTarget=()=>{var dpr=devicePixelRatio;var inHiDPIFullscreenMode=currentFullscreenStrategy.canvasResolutionScaleMode==2;var inAspectRatioFixedFullscreenMode=currentFullscreenStrategy.scaleMode==2;var inPixelPerfectFullscreenMode=currentFullscreenStrategy.canvasResolutionScaleMode!=0;var inCenteredWithoutScalingFullscreenMode=currentFullscreenStrategy.scaleMode==3;var screenWidth=inHiDPIFullscreenMode?Math.round(innerWidth*dpr):innerWidth;var screenHeight=inHiDPIFullscreenMode?Math.round(innerHeight*dpr):innerHeight;var w=screenWidth;var h=screenHeight;var canvas=currentFullscreenStrategy.target;var canvasSize=getCanvasElementSize(canvas);var x=canvasSize[0];var y=canvasSize[1];var topMargin;if(inAspectRatioFixedFullscreenMode){if(w*yx*h)w=h*x/y|0;topMargin=(screenHeight-h)/2|0}if(inPixelPerfectFullscreenMode){setCanvasElementSize(canvas,w,h);if(canvas.GLctxObject)canvas.GLctxObject.GLctx.viewport(0,0,w,h)}if(inHiDPIFullscreenMode){topMargin/=dpr;w/=dpr;h/=dpr;w=Math.round(w*1e4)/1e4;h=Math.round(h*1e4)/1e4;topMargin=Math.round(topMargin*1e4)/1e4}if(inCenteredWithoutScalingFullscreenMode){var t=(innerHeight-jstoi_q(canvas.style.height))/2;var b=(innerWidth-jstoi_q(canvas.style.width))/2;setLetterbox(canvas,t,b)}else{canvas.style.width=w+"px";canvas.style.height=h+"px";var b=(innerWidth-w)/2;setLetterbox(canvas,topMargin,b)}if(!inCenteredWithoutScalingFullscreenMode&¤tFullscreenStrategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)}};var doRequestFullscreen=(target,strategy)=>{if(!JSEvents.fullscreenEnabled())return-1;target=findEventTarget(target);if(!target)return-4;if(!target.requestFullscreen&&!target.webkitRequestFullscreen){return-3}if(!JSEvents.canPerformEventHandlerRequests()){if(strategy.deferUntilInEventHandler){JSEvents.deferCall(JSEvents_requestFullscreen,1,[target,strategy]);return 1}return-2}return JSEvents_requestFullscreen(target,strategy)};function _emscripten_request_fullscreen(target,deferUntilInEventHandler){target>>>=0;var strategy={scaleMode:0,canvasResolutionScaleMode:0,filteringMode:0,deferUntilInEventHandler,canvasResizedCallbackTargetThread:2};return doRequestFullscreen(target,strategy)}_emscripten_request_fullscreen.sig="ipi";function _emscripten_request_fullscreen_strategy(target,deferUntilInEventHandler,fullscreenStrategy){target>>>=0;fullscreenStrategy>>>=0;var strategy={scaleMode:HEAP32[fullscreenStrategy>>>2>>>0],canvasResolutionScaleMode:HEAP32[fullscreenStrategy+4>>>2>>>0],filteringMode:HEAP32[fullscreenStrategy+8>>>2>>>0],deferUntilInEventHandler,canvasResizedCallback:HEAP32[fullscreenStrategy+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[fullscreenStrategy+16>>>2>>>0]};return doRequestFullscreen(target,strategy)}_emscripten_request_fullscreen_strategy.sig="ipip";function _emscripten_enter_soft_fullscreen(target,fullscreenStrategy){target>>>=0;fullscreenStrategy>>>=0;target=findEventTarget(target);if(!target)return-4;var strategy={scaleMode:HEAP32[fullscreenStrategy>>>2>>>0],canvasResolutionScaleMode:HEAP32[fullscreenStrategy+4>>>2>>>0],filteringMode:HEAP32[fullscreenStrategy+8>>>2>>>0],canvasResizedCallback:HEAP32[fullscreenStrategy+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[fullscreenStrategy+16>>>2>>>0],target,softFullscreen:true};var restoreOldStyle=JSEvents_resizeCanvasForFullscreen(target,strategy);document.documentElement.style.overflow="hidden";document.body.scroll="no";document.body.style.margin="0px";var hiddenElements=hideEverythingExceptGivenElement(target);function restoreWindowedState(){restoreOldStyle();restoreHiddenElements(hiddenElements);removeEventListener("resize",softFullscreenResizeWebGLRenderTarget);if(strategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,strategy.canvasResizedCallbackUserData)}currentFullscreenStrategy=0}restoreOldWindowedStyle=restoreWindowedState;currentFullscreenStrategy=strategy;addEventListener("resize",softFullscreenResizeWebGLRenderTarget);if(strategy.canvasResizedCallback){((a1,a2,a3)=>{})(37,0,strategy.canvasResizedCallbackUserData)}return 0}_emscripten_enter_soft_fullscreen.sig="ipp";var _emscripten_exit_soft_fullscreen=()=>{restoreOldWindowedStyle?.();restoreOldWindowedStyle=null;return 0};_emscripten_exit_soft_fullscreen.sig="i";var _emscripten_exit_fullscreen=()=>{if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var d=specialHTMLTargets[1];if(d.exitFullscreen){d.fullscreenElement&&d.exitFullscreen()}else if(d.webkitExitFullscreen){d.webkitFullscreenElement&&d.webkitExitFullscreen()}else{return-1}return 0};_emscripten_exit_fullscreen.sig="i";var fillPointerlockChangeEventData=eventStruct=>{var pointerLockElement=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement;var isPointerlocked=!!pointerLockElement;HEAP8[eventStruct>>>0]=isPointerlocked;var nodeName=JSEvents.getNodeNameForTarget(pointerLockElement);var id=pointerLockElement?.id||"";stringToUTF8(nodeName,eventStruct+1,128);stringToUTF8(id,eventStruct+129,128)};var registerPointerlockChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.pointerlockChangeEvent||=_malloc(257);var pointerlockChangeEventHandlerFunc=(e=event)=>{var pointerlockChangeEvent=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(pointerlockChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,pointerlockChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:pointerlockChangeEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_pointerlockchange_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!document||!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}target=findEventTarget(target);if(!target)return-4;registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"mozpointerlockchange",targetThread);registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"webkitpointerlockchange",targetThread);registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"mspointerlockchange",targetThread);return registerPointerlockChangeEventCallback(target,userData,useCapture,callbackfunc,20,"pointerlockchange",targetThread)}_emscripten_set_pointerlockchange_callback_on_thread.sig="ippipp";var registerPointerlockErrorEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{var pointerlockErrorEventHandlerFunc=(e=event)=>{if(((a1,a2,a3)=>{})(eventTypeId,0,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:pointerlockErrorEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_pointerlockerror_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!document||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}target=findEventTarget(target);if(!target)return-4;registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"mozpointerlockerror",targetThread);registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"webkitpointerlockerror",targetThread);registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"mspointerlockerror",targetThread);return registerPointerlockErrorEventCallback(target,userData,useCapture,callbackfunc,38,"pointerlockerror",targetThread)}_emscripten_set_pointerlockerror_callback_on_thread.sig="ippipp";function _emscripten_get_pointerlock_status(pointerlockStatus){pointerlockStatus>>>=0;if(pointerlockStatus)fillPointerlockChangeEventData(pointerlockStatus);if(!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock){return-1}return 0}_emscripten_get_pointerlock_status.sig="ip";var requestPointerLock=target=>{if(target.requestPointerLock){target.requestPointerLock()}else{if(document.body.requestPointerLock){return-3}return-1}return 0};function _emscripten_request_pointerlock(target,deferUntilInEventHandler){target>>>=0;target=findEventTarget(target);if(!target)return-4;if(!target.requestPointerLock){return-1}if(!JSEvents.canPerformEventHandlerRequests()){if(deferUntilInEventHandler){JSEvents.deferCall(requestPointerLock,2,[target]);return 1}return-2}return requestPointerLock(target)}_emscripten_request_pointerlock.sig="ipi";var _emscripten_exit_pointerlock=()=>{JSEvents.removeDeferredCalls(requestPointerLock);if(document.exitPointerLock){document.exitPointerLock()}else{return-1}return 0};_emscripten_exit_pointerlock.sig="i";var _emscripten_vibrate=msecs=>{if(!navigator.vibrate)return-1;navigator.vibrate(msecs);return 0};_emscripten_vibrate.sig="ii";function _emscripten_vibrate_pattern(msecsArray,numEntries){msecsArray>>>=0;if(!navigator.vibrate)return-1;var vibrateList=[];for(var i=0;i>>2>>>0];vibrateList.push(msecs)}navigator.vibrate(vibrateList);return 0}_emscripten_vibrate_pattern.sig="ipi";var fillVisibilityChangeEventData=eventStruct=>{var visibilityStates=["hidden","visible","prerender","unloaded"];var visibilityState=visibilityStates.indexOf(document.visibilityState);HEAP8[eventStruct>>>0]=document.hidden;HEAP32[eventStruct+4>>>2>>>0]=visibilityState};var registerVisibilityChangeEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.visibilityChangeEvent||=_malloc(8);var visibilityChangeEventHandlerFunc=(e=event)=>{var visibilityChangeEvent=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(visibilityChangeEvent);if(((a1,a2,a3)=>{})(eventTypeId,visibilityChangeEvent,userData))e.preventDefault()};var eventHandler={target,eventTypeString,callbackfunc,handlerFunc:visibilityChangeEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_visibilitychange_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerVisibilityChangeEventCallback(specialHTMLTargets[1],userData,useCapture,callbackfunc,21,"visibilitychange",targetThread)}_emscripten_set_visibilitychange_callback_on_thread.sig="ipipp";function _emscripten_get_visibility_status(visibilityStatus){visibilityStatus>>>=0;if(typeof document.visibilityState=="undefined"&&typeof document.hidden=="undefined"){return-1}fillVisibilityChangeEventData(visibilityStatus);return 0}_emscripten_get_visibility_status.sig="ip";var registerTouchEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.touchEvent||=_malloc(1552);target=findEventTarget(target);var touchEventHandlerFunc=e=>{var t,touches={},et=e.touches;for(let t of et){t.isChanged=t.onTarget=0;touches[t.identifier]=t}for(let t of e.changedTouches){t.isChanged=1;touches[t.identifier]=t}for(let t of e.targetTouches){touches[t.identifier].onTarget=1}var touchEvent=JSEvents.touchEvent;HEAPF64[touchEvent>>>3>>>0]=e.timeStamp;HEAP8[touchEvent+12>>>0]=e.ctrlKey;HEAP8[touchEvent+13>>>0]=e.shiftKey;HEAP8[touchEvent+14>>>0]=e.altKey;HEAP8[touchEvent+15>>>0]=e.metaKey;var idx=touchEvent+16;var targetRect=getBoundingClientRect(target);var numTouches=0;for(let t of Object.values(touches)){var idx32=idx>>>2;HEAP32[idx32+0>>>0]=t.identifier;HEAP32[idx32+1>>>0]=t.screenX;HEAP32[idx32+2>>>0]=t.screenY;HEAP32[idx32+3>>>0]=t.clientX;HEAP32[idx32+4>>>0]=t.clientY;HEAP32[idx32+5>>>0]=t.pageX;HEAP32[idx32+6>>>0]=t.pageY;HEAP8[idx+28>>>0]=t.isChanged;HEAP8[idx+29>>>0]=t.onTarget;HEAP32[idx32+8>>>0]=t.clientX-(targetRect.left|0);HEAP32[idx32+9>>>0]=t.clientY-(targetRect.top|0);idx+=48;if(++numTouches>31){break}}HEAP32[touchEvent+8>>>2>>>0]=numTouches;if(((a1,a2,a3)=>{})(eventTypeId,touchEvent,userData))e.preventDefault()};var eventHandler={target,allowsDeferredCalls:eventTypeString=="touchstart"||eventTypeString=="touchend",eventTypeString,callbackfunc,handlerFunc:touchEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_touchstart_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,22,"touchstart",targetThread)}_emscripten_set_touchstart_callback_on_thread.sig="ippipp";function _emscripten_set_touchend_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,23,"touchend",targetThread)}_emscripten_set_touchend_callback_on_thread.sig="ippipp";function _emscripten_set_touchmove_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,24,"touchmove",targetThread)}_emscripten_set_touchmove_callback_on_thread.sig="ippipp";function _emscripten_set_touchcancel_callback_on_thread(target,userData,useCapture,callbackfunc,targetThread){target>>>=0;userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;return registerTouchEventCallback(target,userData,useCapture,callbackfunc,25,"touchcancel",targetThread)}_emscripten_set_touchcancel_callback_on_thread.sig="ippipp";var fillGamepadEventData=(eventStruct,e)=>{HEAPF64[eventStruct>>>3>>>0]=e.timestamp;for(var i=0;i>>3>>>0]=e.axes[i]}for(var i=0;i>>3>>>0]=e.buttons[i].value}else{HEAPF64[eventStruct+i*8+528>>>3>>>0]=e.buttons[i]}}for(var i=0;i>>0]=e.buttons[i].pressed}else{HEAP8[eventStruct+i+1040>>>0]=e.buttons[i]==1}}HEAP8[eventStruct+1104>>>0]=e.connected;HEAP32[eventStruct+1108>>>2>>>0]=e.index;HEAP32[eventStruct+8>>>2>>>0]=e.axes.length;HEAP32[eventStruct+12>>>2>>>0]=e.buttons.length;stringToUTF8(e.id,eventStruct+1112,64);stringToUTF8(e.mapping,eventStruct+1176,64)};var registerGamepadEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.gamepadEvent||=_malloc(1240);var gamepadEventHandlerFunc=(e=event)=>{var gamepadEvent=JSEvents.gamepadEvent;fillGamepadEventData(gamepadEvent,e["gamepad"]);if(((a1,a2,a3)=>{})(eventTypeId,gamepadEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),allowsDeferredCalls:true,eventTypeString,callbackfunc,handlerFunc:gamepadEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};var _emscripten_sample_gamepad_data=()=>{try{if(navigator.getGamepads)return(JSEvents.lastGamepadState=navigator.getGamepads())?0:-1}catch(e){navigator.getGamepads=null}return-1};_emscripten_sample_gamepad_data.sig="i";function _emscripten_set_gamepadconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(_emscripten_sample_gamepad_data())return-1;return registerGamepadEventCallback(2,userData,useCapture,callbackfunc,26,"gamepadconnected",targetThread)}_emscripten_set_gamepadconnected_callback_on_thread.sig="ipipp";function _emscripten_set_gamepaddisconnected_callback_on_thread(userData,useCapture,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(_emscripten_sample_gamepad_data())return-1;return registerGamepadEventCallback(2,userData,useCapture,callbackfunc,27,"gamepaddisconnected",targetThread)}_emscripten_set_gamepaddisconnected_callback_on_thread.sig="ipipp";var _emscripten_get_num_gamepads=()=>JSEvents.lastGamepadState.length;_emscripten_get_num_gamepads.sig="i";function _emscripten_get_gamepad_status(index,gamepadState){gamepadState>>>=0;if(index<0||index>=JSEvents.lastGamepadState.length)return-5;if(!JSEvents.lastGamepadState[index])return-7;fillGamepadEventData(gamepadState,JSEvents.lastGamepadState[index]);return 0}_emscripten_get_gamepad_status.sig="iip";var registerBeforeUnloadEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString)=>{var beforeUnloadEventHandlerFunc=(e=event)=>{var confirmationMessage=((a1,a2,a3)=>{})(eventTypeId,0,userData);if(confirmationMessage){confirmationMessage=UTF8ToString(confirmationMessage)}if(confirmationMessage){e.preventDefault();e.returnValue=confirmationMessage;return confirmationMessage}};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:beforeUnloadEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_beforeunload_callback_on_thread(userData,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(typeof onbeforeunload=="undefined")return-1;if(targetThread!==1)return-5;return registerBeforeUnloadEventCallback(2,userData,true,callbackfunc,28,"beforeunload")}_emscripten_set_beforeunload_callback_on_thread.sig="ippp";var fillBatteryEventData=(eventStruct,e)=>{HEAPF64[eventStruct>>>3>>>0]=e.chargingTime;HEAPF64[eventStruct+8>>>3>>>0]=e.dischargingTime;HEAPF64[eventStruct+16>>>3>>>0]=e.level;HEAP8[eventStruct+24>>>0]=e.charging};var battery=()=>navigator.battery||navigator.mozBattery||navigator.webkitBattery;var registerBatteryEventCallback=(target,userData,useCapture,callbackfunc,eventTypeId,eventTypeString,targetThread)=>{JSEvents.batteryEvent||=_malloc(32);var batteryEventHandlerFunc=(e=event)=>{var batteryEvent=JSEvents.batteryEvent;fillBatteryEventData(batteryEvent,battery());if(((a1,a2,a3)=>{})(eventTypeId,batteryEvent,userData))e.preventDefault()};var eventHandler={target:findEventTarget(target),eventTypeString,callbackfunc,handlerFunc:batteryEventHandlerFunc,useCapture};return JSEvents.registerOrRemoveHandler(eventHandler)};function _emscripten_set_batterychargingchange_callback_on_thread(userData,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!battery())return-1;return registerBatteryEventCallback(battery(),userData,true,callbackfunc,29,"chargingchange",targetThread)}_emscripten_set_batterychargingchange_callback_on_thread.sig="ippp";function _emscripten_set_batterylevelchange_callback_on_thread(userData,callbackfunc,targetThread){userData>>>=0;callbackfunc>>>=0;targetThread>>>=0;if(!battery())return-1;return registerBatteryEventCallback(battery(),userData,true,callbackfunc,30,"levelchange",targetThread)}_emscripten_set_batterylevelchange_callback_on_thread.sig="ippp";function _emscripten_get_battery_status(batteryState){batteryState>>>=0;if(!battery())return-1;fillBatteryEventData(batteryState,battery());return 0}_emscripten_get_battery_status.sig="ip";function __emscripten_set_offscreencanvas_size(target,width,height){target>>>=0;return-1}__emscripten_set_offscreencanvas_size.sig="ipii";function _emscripten_set_element_css_size(target,width,height){target>>>=0;target=findEventTarget(target);if(!target)return-4;target.style.width=width+"px";target.style.height=height+"px";return 0}_emscripten_set_element_css_size.sig="ipdd";function _emscripten_get_element_css_size(target,width,height){target>>>=0;width>>>=0;height>>>=0;target=findEventTarget(target);if(!target)return-4;var rect=getBoundingClientRect(target);HEAPF64[width>>>3>>>0]=rect.width;HEAPF64[height>>>3>>>0]=rect.height;return 0}_emscripten_get_element_css_size.sig="ippp";var _emscripten_html5_remove_all_event_listeners=()=>JSEvents.removeAllEventListeners();_emscripten_html5_remove_all_event_listeners.sig="v";var _emscripten_request_animation_frame=function(cb,userData){cb>>>=0;userData>>>=0;return requestAnimationFrame(timeStamp=>((a1,a2)=>{})(timeStamp,userData))};_emscripten_request_animation_frame.sig="ipp";var _emscripten_cancel_animation_frame=id=>cancelAnimationFrame(id);_emscripten_cancel_animation_frame.sig="vi";var _emscripten_request_animation_frame_loop=function(cb,userData){cb>>>=0;userData>>>=0;function tick(timeStamp){if(((a1,a2)=>{})(timeStamp,userData)){requestAnimationFrame(tick)}}return requestAnimationFrame(tick)};_emscripten_request_animation_frame_loop.sig="vpp";var _emscripten_performance_now=()=>performance.now();_emscripten_performance_now.sig="d";var _emscripten_get_device_pixel_ratio=()=>devicePixelRatio;_emscripten_get_device_pixel_ratio.sig="d";function _emscripten_get_callstack(flags,str,maxbytes){str>>>=0;var callstack=getCallstack(flags);if(!str||maxbytes<=0){return lengthBytesUTF8(callstack)+1}var bytesWrittenExcludingNull=stringToUTF8(callstack,str,maxbytes);return bytesWrittenExcludingNull+1}_emscripten_get_callstack.sig="iipi";var convertFrameToPC=frame=>{abort("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER");return 0};function _emscripten_return_address(level){var callstack=jsStackTrace().split("\n");if(callstack[0]=="Error"){callstack.shift()}var caller=callstack[level+3];return convertFrameToPC(caller)}_emscripten_return_address.sig="pi";var UNWIND_CACHE={};var saveInUnwindCache=callstack=>{callstack.forEach(frame=>{var pc=convertFrameToPC(frame);if(pc){UNWIND_CACHE[pc]=frame}})};function _emscripten_stack_snapshot(){var callstack=jsStackTrace().split("\n");if(callstack[0]=="Error"){callstack.shift()}saveInUnwindCache(callstack);UNWIND_CACHE.last_addr=convertFrameToPC(callstack[3]);UNWIND_CACHE.last_stack=callstack;return UNWIND_CACHE.last_addr}_emscripten_stack_snapshot.sig="p";function _emscripten_stack_unwind_buffer(addr,buffer,count){addr>>>=0;buffer>>>=0;var stack;if(UNWIND_CACHE.last_addr==addr){stack=UNWIND_CACHE.last_stack}else{stack=jsStackTrace().split("\n");if(stack[0]=="Error"){stack.shift()}saveInUnwindCache(stack)}var offset=3;while(stack[offset]&&convertFrameToPC(stack[offset])!=addr){++offset}for(var i=0;i>>2>>>0]=convertFrameToPC(stack[i+offset])}return i}_emscripten_stack_unwind_buffer.sig="ippi";function _emscripten_pc_get_function(pc){pc>>>=0;abort("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER");return 0}_emscripten_pc_get_function.sig="pp";var convertPCtoSourceLocation=pc=>{if(UNWIND_CACHE.last_get_source_pc==pc)return UNWIND_CACHE.last_source;var match;var source;if(!source){var frame=UNWIND_CACHE[pc];if(!frame)return null;if(match=/\((.*):(\d+):(\d+)\)$/.exec(frame)){source={file:match[1],line:match[2],column:match[3]}}else if(match=/@(.*):(\d+):(\d+)/.exec(frame)){source={file:match[1],line:match[2],column:match[3]}}}UNWIND_CACHE.last_get_source_pc=pc;UNWIND_CACHE.last_source=source;return source};function _emscripten_pc_get_file(pc){pc>>>=0;var result=convertPCtoSourceLocation(pc);if(!result)return 0;if(_emscripten_pc_get_file.ret)_free(_emscripten_pc_get_file.ret);_emscripten_pc_get_file.ret=stringToNewUTF8(result.file);return _emscripten_pc_get_file.ret}_emscripten_pc_get_file.sig="pp";function _emscripten_pc_get_line(pc){pc>>>=0;var result=convertPCtoSourceLocation(pc);return result?result.line:0}_emscripten_pc_get_line.sig="ip";function _emscripten_pc_get_column(pc){pc>>>=0;var result=convertPCtoSourceLocation(pc);return result?result.column||0:0}_emscripten_pc_get_column.sig="ip";var _sched_yield=()=>0;Module["_sched_yield"]=_sched_yield;_sched_yield.sig="i";function _random_get(buf,buf_len){buf>>>=0;buf_len>>>=0;try{_getentropy(buf,buf_len);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}_random_get.sig="ipp";var checkWasiClock=clock_id=>clock_id==0||clock_id==1||clock_id==2||clock_id==3;function _clock_time_get(clk_id,ignored_precision_low,ignored_precision_high,ptime){var ignored_precision=convertI32PairToI53Checked(ignored_precision_low,ignored_precision_high);ptime>>>=0;if(!checkWasiClock(clk_id)){return 28}var now;if(clk_id===0){now=Date.now()}else if(nowIsMonotonic){now=_emscripten_get_now()}else{return 52}var nsec=Math.round(now*1e3*1e3);HEAP32[ptime>>>2>>>0]=nsec>>>0;HEAP32[ptime+4>>>2>>>0]=nsec/Math.pow(2,32)>>>0;return 0}_clock_time_get.sig="iiiip";function _clock_res_get(clk_id,pres){pres>>>=0;if(!checkWasiClock(clk_id)){return 28}var nsec;if(clk_id===0){nsec=1e3*1e3}else if(nowIsMonotonic){nsec=_emscripten_get_now_res()}else{return 52}HEAP32[pres>>>2>>>0]=nsec>>>0;HEAP32[pres+4>>>2>>>0]=nsec/Math.pow(2,32)>>>0;return 0}_clock_res_get.sig="iip";var wasiRightsToMuslOFlags=rights=>{if(rights&2&&rights&64){return 2}if(rights&2){return 0}if(rights&64){return 1}throw new FS.ErrnoError(28)};var wasiOFlagsToMuslOFlags=oflags=>{var musl_oflags=0;if(oflags&1){musl_oflags|=64}if(oflags&8){musl_oflags|=512}if(oflags&2){musl_oflags|=65536}if(oflags&4){musl_oflags|=128}return musl_oflags};var _emscripten_unwind_to_js_event_loop=()=>{throw"unwind"};_emscripten_unwind_to_js_event_loop.sig="v";var safeSetTimeout=(func,timeout)=>{runtimeKeepalivePush();return setTimeout(()=>{runtimeKeepalivePop();callUserCallback(func)},timeout)};var setImmediateWrapped=func=>{setImmediateWrapped.mapping||=[];var id=setImmediateWrapped.mapping.length;setImmediateWrapped.mapping[id]=setImmediate(()=>{setImmediateWrapped.mapping[id]=undefined;func()});return id};var clearImmediateWrapped=id=>{clearImmediate(setImmediateWrapped.mapping[id]);setImmediateWrapped.mapping[id]=undefined};var polyfillSetImmediate=()=>{};var _emscripten_set_immediate=function(cb,userData){cb>>>=0;userData>>>=0;runtimeKeepalivePush();return emSetImmediate(()=>{runtimeKeepalivePop();callUserCallback(()=>(a1=>{})(userData))})};_emscripten_set_immediate.sig="ipp";var _emscripten_clear_immediate=id=>{runtimeKeepalivePop();emClearImmediate(id)};_emscripten_clear_immediate.sig="vi";var _emscripten_set_immediate_loop=function(cb,userData){cb>>>=0;userData>>>=0;function tick(){callUserCallback(()=>{if((a1=>{})(userData)){emSetImmediate(tick)}else{runtimeKeepalivePop()}})}runtimeKeepalivePush();emSetImmediate(tick)};_emscripten_set_immediate_loop.sig="vpp";var _emscripten_set_timeout=function(cb,msecs,userData){cb>>>=0;userData>>>=0;return safeSetTimeout(()=>(a1=>{})(userData),msecs)};_emscripten_set_timeout.sig="ipdp";var _emscripten_clear_timeout=clearTimeout;_emscripten_clear_timeout.sig="vi";var _emscripten_set_timeout_loop=function(cb,msecs,userData){cb>>>=0;userData>>>=0;function tick(){var t=_emscripten_get_now();var n=t+msecs;runtimeKeepalivePop();callUserCallback(()=>{if(((a1,a2)=>{})(t,userData)){runtimeKeepalivePush();setTimeout(tick,n-_emscripten_get_now())}})}runtimeKeepalivePush();return setTimeout(tick,0)};_emscripten_set_timeout_loop.sig="vpdp";var _emscripten_set_interval=function(cb,msecs,userData){cb>>>=0;userData>>>=0;runtimeKeepalivePush();return setInterval(()=>{callUserCallback(()=>(a1=>{})(userData))},msecs)};_emscripten_set_interval.sig="ipdp";var _emscripten_clear_interval=id=>{runtimeKeepalivePop();clearInterval(id)};_emscripten_clear_interval.sig="vi";var idsToPromises=(idBuf,size)=>{var promises=[];for(var i=0;i>>2>>>0];promises[i]=getPromise(id)}return promises};var makePromiseCallback=(callback,userData)=>value=>{runtimeKeepalivePop();var stack=stackSave();var resultPtr=stackAlloc(POINTER_SIZE);HEAPU32[resultPtr>>>2>>>0]=0;try{var result=((a1,a2,a3)=>{})(resultPtr,userData,value);var resultVal=HEAPU32[resultPtr>>>2>>>0]}catch(e){if(typeof e!="number"){throw 0}throw e}finally{stackRestore(stack)}switch(result){case 0:return resultVal;case 1:return getPromise(resultVal);case 2:var ret=getPromise(resultVal);_emscripten_promise_destroy(resultVal);return ret;case 3:throw resultVal}};function _emscripten_promise_then(id,onFulfilled,onRejected,userData){id>>>=0;onFulfilled>>>=0;onRejected>>>=0;userData>>>=0;runtimeKeepalivePush();var promise=getPromise(id);var newId=promiseMap.allocate({promise:promise.then(makePromiseCallback(onFulfilled,userData),makePromiseCallback(onRejected,userData))});return newId}_emscripten_promise_then.sig="ppppp";var _emscripten_promise_all=function(idBuf,resultBuf,size){idBuf>>>=0;resultBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.all(promises).then(results=>{if(resultBuf){for(var i=0;i>>2>>>0]=result}}return resultBuf})});return id};_emscripten_promise_all.sig="pppp";var setPromiseResult=(ptr,fulfill,value)=>{var result=fulfill?0:3;HEAP32[ptr>>>2>>>0]=result;HEAPU32[ptr+4>>>2>>>0]=value};var _emscripten_promise_all_settled=function(idBuf,resultBuf,size){idBuf>>>=0;resultBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.allSettled(promises).then(results=>{if(resultBuf){var offset=resultBuf;for(var i=0;i>>=0;errorBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.any(promises).catch(err=>{if(errorBuf){for(var i=0;i>>2>>>0]=err.errors[i]}}throw errorBuf})});return id};_emscripten_promise_any.sig="pppp";function _emscripten_promise_race(idBuf,size){idBuf>>>=0;size>>>=0;var promises=idsToPromises(idBuf,size);var id=promiseMap.allocate({promise:Promise.race(promises)});return id}_emscripten_promise_race.sig="ppp";var _emscripten_promise_await=function(returnValuePtr,id){returnValuePtr>>>=0;id>>>=0;return Asyncify.handleSleep(wakeUp=>{getPromise(id).then(value=>{setPromiseResult(returnValuePtr,true,value);wakeUp()},value=>{setPromiseResult(returnValuePtr,false,value);wakeUp()})})};_emscripten_promise_await.sig="vpp";_emscripten_promise_await.isAsync=true;function ___resumeException(ptr){ptr>>>=0;if(!exceptionLast){exceptionLast=ptr}throw exceptionLast}___resumeException.sig="vp";var findMatchingCatch=args=>{var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var caughtType of args){if(caughtType===0||caughtType===thrownType){break}var adjusted_ptr_addr=info.ptr+16;if(___cxa_can_catch(caughtType,thrownType,adjusted_ptr_addr)){setTempRet0(caughtType);return thrown}}setTempRet0(thrownType);return thrown};function ___cxa_find_matching_catch_2(){return findMatchingCatch([])}___cxa_find_matching_catch_2.sig="p";function ___cxa_find_matching_catch_3(arg0){arg0>>>=0;return findMatchingCatch([arg0])}___cxa_find_matching_catch_3.sig="pp";function ___cxa_find_matching_catch_4(arg0,arg1){arg0>>>=0;arg1>>>=0;return findMatchingCatch([arg0,arg1])}___cxa_find_matching_catch_4.sig="ppp";var exceptionCaught=[];var ___cxa_rethrow=()=>{var info=exceptionCaught.pop();if(!info){abort("no exception to throw")}var ptr=info.excPtr;if(!info.get_rethrown()){exceptionCaught.push(info);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}exceptionLast=ptr;throw exceptionLast};___cxa_rethrow.sig="v";function _llvm_eh_typeid_for(type){type>>>=0;return type}_llvm_eh_typeid_for.sig="vp";function ___cxa_begin_catch(ptr){ptr>>>=0;var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);___cxa_increment_exception_refcount(ptr);return ___cxa_get_exception_ptr(ptr)}___cxa_begin_catch.sig="pp";var ___cxa_end_catch=()=>{_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=0};___cxa_end_catch.sig="v";var ___cxa_uncaught_exceptions=()=>uncaughtExceptionCount;Module["___cxa_uncaught_exceptions"]=___cxa_uncaught_exceptions;___cxa_uncaught_exceptions.sig="i";function ___cxa_call_unexpected(exception){exception>>>=0;return abort("Unexpected exception thrown, this is not properly supported - aborting")}___cxa_call_unexpected.sig="vp";function ___cxa_current_primary_exception(){if(!exceptionCaught.length){return 0}var info=exceptionCaught[exceptionCaught.length-1];___cxa_increment_exception_refcount(info.excPtr);return info.excPtr}Module["___cxa_current_primary_exception"]=___cxa_current_primary_exception;___cxa_current_primary_exception.sig="p";function ___cxa_rethrow_primary_exception(ptr){ptr>>>=0;if(!ptr)return;var info=new ExceptionInfo(ptr);exceptionCaught.push(info);info.set_rethrown(true);___cxa_rethrow()}Module["___cxa_rethrow_primary_exception"]=___cxa_rethrow_primary_exception;___cxa_rethrow_primary_exception.sig="vp";var _emscripten_set_main_loop_timing=(mode,value)=>{Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(!Browser.mainLoop.running){runtimeKeepalivePush();Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof Browser.setImmediate=="undefined"){if(typeof setImmediate=="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=event=>{if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);Browser.setImmediate=func=>{setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){Module["setImmediates"]??=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}else{Browser.setImmediate=setImmediate}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){Browser.setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0};_emscripten_set_main_loop_timing.sig="iii";var setMainLoop=(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming)=>{Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(!checkIsRunning())return;if(typeof SDL=="object")SDL.audio?.queueNewAudioData?.();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0){_emscripten_set_main_loop_timing(0,1e3/fps)}else{_emscripten_set_main_loop_timing(1,1)}Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}};var Browser={mainLoop:{running:false,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining{var canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);preloadedImages[name]=canvas;URL.revokeObjectURL(url);onload?.(byteArray)};img.onerror=event=>{err(`Image ${url} could not be decoded`);onerror?.()};img.src=url};preloadPlugins.push(imagePlugin);var audioPlugin={};audioPlugin["canHandle"]=function audioPlugin_canHandle(name){return!Module["noAudioDecoding"]&&name.substr(-4)in{".ogg":1,".wav":1,".mp3":1}};audioPlugin["handle"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;preloadedAudios[name]=audio;onload?.(byteArray)}function fail(){if(done)return;done=true;preloadedAudios[name]=new Audio;onerror?.()}var b=new Blob([byteArray],{type:Browser.getMimetype(name)});var url=URL.createObjectURL(b);var audio=new Audio;audio.addEventListener("canplaythrough",()=>finish(audio),false);audio.onerror=function audio_onerror(event){if(done)return;err(`warning: browser could not fully decode audio ${name}, trying slower base64 approach`);function encode64(data){var BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD="=";var ret="";var leftchar=0;var leftbits=0;for(var i=0;i=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;safeSetTimeout(()=>{finish(audio)},1e4)};preloadPlugins.push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(()=>{});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(()=>{});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",ev=>{if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Browser.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(callback=>callback());Browser.init()}return ctx},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer=="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas=="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}Module["onFullScreen"]?.(Browser.isFullscreen);Module["onFullscreen"]?.(Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?()=>canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]):null)||(canvasContainer["webkitRequestFullScreen"]?()=>canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]):null);canvasContainer.requestFullscreen()},exitFullscreen(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||(()=>{});CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame(func){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeSetTimeout(func,timeout){return safeSetTimeout(func,timeout)},safeRequestAnimationFrame(func){runtimeKeepalivePush();return Browser.requestAnimationFrame(()=>{runtimeKeepalivePop();callUserCallback(func)})},getMimetype(name){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia(func){window.getUserMedia||=navigator["getUserMedia"]||navigator["mozGetUserMedia"];window.getUserMedia(func)},getMovementX(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(pageX,pageY){var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;var adjustedX=pageX-(scrollX+rect.left);var adjustedY=pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);return{x:adjustedX,y:adjustedY}},setMouseCoords(pageX,pageY){const{x,y}=Browser.calculateMouseCoords(pageX,pageY);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y},calculateMouseEvent(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}else{if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var coords=Browser.calculateMouseCoords(touch.pageX,touch.pageY);if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];last||=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}Browser.setMouseCoords(event.pageX,event.pageY)}},resizeListeners:[],updateResizeListeners(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(listener=>listener(canvas.width,canvas.height))},setCanvasSize(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>>2>>>0];flags=flags|8388608;HEAP32[SDL.screen>>>2>>>0]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>>2>>>0];flags=flags&~8388608;HEAP32[SDL.screen>>>2>>>0]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();var _file=UTF8ToString(file);var data=FS.analyzePath(_file);if(!data.exists)return-1;FS.createPreloadedFile(PATH.dirname(_file),PATH.basename(_file),new Uint8Array(data.object.contents),true,true,()=>{runtimeKeepalivePop();if(onload)(a1=>{})(file)},()=>{runtimeKeepalivePop();if(onerror)(a1=>{})(file)},true);return 0};_emscripten_run_preload_plugins.sig="ippp";var Browser_asyncPrepareDataCounter=0;var _emscripten_run_preload_plugins_data=function(data,size,suffix,arg,onload,onerror){data>>>=0;suffix>>>=0;arg>>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();var _suffix=UTF8ToString(suffix);var name="prepare_data_"+Browser_asyncPrepareDataCounter+++"."+_suffix;var cname=stringToNewUTF8(name);FS.createPreloadedFile("/",name,HEAPU8.subarray(data>>>0,data+size>>>0),true,true,()=>{runtimeKeepalivePop();if(onload)((a1,a2)=>{})(arg,cname)},()=>{runtimeKeepalivePop();if(onerror)(a1=>{})(arg)},true)};_emscripten_run_preload_plugins_data.sig="vpipppp";var _emscripten_async_run_script=function(script,millis){script>>>=0;safeSetTimeout(()=>_emscripten_run_script(script),millis)};_emscripten_async_run_script.sig="vpi";var _emscripten_async_load_script=function(url,onload,onerror){url>>>=0;onload>>>=0;onerror>>>=0;url=UTF8ToString(url);runtimeKeepalivePush();var loadDone=()=>{runtimeKeepalivePop();if(onload){var onloadCallback=()=>callUserCallback(()=>{});if(runDependencies>0){dependenciesFulfilled=onloadCallback}else{onloadCallback()}}};var loadError=()=>{runtimeKeepalivePop();if(onerror){callUserCallback(()=>{})}};var script=document.createElement("script");script.onload=loadDone;script.onerror=loadError;script.src=url;document.body.appendChild(script)};_emscripten_async_load_script.sig="vppp";function _emscripten_get_main_loop_timing(mode,value){mode>>>=0;value>>>=0;if(mode)HEAP32[mode>>>2>>>0]=Browser.mainLoop.timingMode;if(value)HEAP32[value>>>2>>>0]=Browser.mainLoop.timingValue}_emscripten_get_main_loop_timing.sig="vpp";var _emscripten_set_main_loop=function(func,fps,simulateInfiniteLoop){func>>>=0;var browserIterationFunc=()=>{};setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop)};_emscripten_set_main_loop.sig="vpii";var _emscripten_set_main_loop_arg=function(func,arg,fps,simulateInfiniteLoop){func>>>=0;arg>>>=0;var browserIterationFunc=()=>(a1=>{})(arg);setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg)};_emscripten_set_main_loop_arg.sig="vppii";var _emscripten_cancel_main_loop=()=>{Browser.mainLoop.pause();Browser.mainLoop.func=null};_emscripten_cancel_main_loop.sig="v";var _emscripten_pause_main_loop=()=>{Browser.mainLoop.pause()};_emscripten_pause_main_loop.sig="v";var _emscripten_resume_main_loop=()=>{Browser.mainLoop.resume()};_emscripten_resume_main_loop.sig="v";var __emscripten_push_main_loop_blocker=function(func,arg,name){func>>>=0;arg>>>=0;name>>>=0;Browser.mainLoop.queue.push({func:()=>{(a1=>{})(arg)},name:UTF8ToString(name),counted:true});Browser.mainLoop.updateStatus()};__emscripten_push_main_loop_blocker.sig="vppp";var __emscripten_push_uncounted_main_loop_blocker=function(func,arg,name){func>>>=0;arg>>>=0;name>>>=0;Browser.mainLoop.queue.push({func:()=>{(a1=>{})(arg)},name:UTF8ToString(name),counted:false});Browser.mainLoop.updateStatus()};__emscripten_push_uncounted_main_loop_blocker.sig="vppp";var _emscripten_set_main_loop_expected_blockers=num=>{Browser.mainLoop.expectedBlockers=num;Browser.mainLoop.remainingBlockers=num;Browser.mainLoop.updateStatus()};_emscripten_set_main_loop_expected_blockers.sig="vi";var _emscripten_async_call=function(func,arg,millis){func>>>=0;arg>>>=0;function wrapper(){(a1=>{})(arg)}if(millis>=0){safeSetTimeout(wrapper,millis)}else{Browser.safeRequestAnimationFrame(wrapper)}};_emscripten_async_call.sig="vppi";function _emscripten_get_window_title(){var buflen=256;if(!_emscripten_get_window_title.buffer){_emscripten_get_window_title.buffer=_malloc(buflen)}stringToUTF8(document.title,_emscripten_get_window_title.buffer,buflen);return _emscripten_get_window_title.buffer}_emscripten_get_window_title.sig="p";function _emscripten_set_window_title(title){title>>>=0;return document.title=UTF8ToString(title)}_emscripten_set_window_title.sig="vp";function _emscripten_get_screen_size(width,height){width>>>=0;height>>>=0;HEAP32[width>>>2>>>0]=screen.width;HEAP32[height>>>2>>>0]=screen.height}_emscripten_get_screen_size.sig="vpp";var _emscripten_hide_mouse=()=>{var styleSheet=document.styleSheets[0];var rules=styleSheet.cssRules;for(var i=0;i{Browser.setCanvasSize(width,height)};_emscripten_set_canvas_size.sig="vii";function _emscripten_get_canvas_size(width,height,isFullscreen){width>>>=0;height>>>=0;isFullscreen>>>=0;var canvas=Module["canvas"];HEAP32[width>>>2>>>0]=canvas.width;HEAP32[height>>>2>>>0]=canvas.height;HEAP32[isFullscreen>>>2>>>0]=Browser.isFullscreen?1:0}_emscripten_get_canvas_size.sig="vppp";function _emscripten_create_worker(url){url>>>=0;url=UTF8ToString(url);var id=Browser.workers.length;var info={worker:new Worker(url),callbacks:[],awaited:0,buffer:0,bufferSize:0};info.worker.onmessage=function info_worker_onmessage(msg){if(ABORT)return;var info=Browser.workers[id];if(!info)return;var callbackId=msg.data["callbackId"];var callbackInfo=info.callbacks[callbackId];if(!callbackInfo)return;if(msg.data["finalResponse"]){info.awaited--;info.callbacks[callbackId]=null;runtimeKeepalivePop()}var data=msg.data["data"];if(data){if(!data.byteLength)data=new Uint8Array(data);if(!info.buffer||info.bufferSize>>0);callbackInfo.func(info.buffer,data.length,callbackInfo.arg)}else{callbackInfo.func(0,0,callbackInfo.arg)}};Browser.workers.push(info);return id}_emscripten_create_worker.sig="ip";var _emscripten_destroy_worker=id=>{var info=Browser.workers[id];info.worker.terminate();if(info.buffer)_free(info.buffer);Browser.workers[id]=null};_emscripten_destroy_worker.sig="vi";var _emscripten_call_worker=function(id,funcName,data,size,callback,arg){funcName>>>=0;data>>>=0;callback>>>=0;arg>>>=0;funcName=UTF8ToString(funcName);var info=Browser.workers[id];var callbackId=-1;if(callback){runtimeKeepalivePush();callbackId=info.callbacks.length;info.callbacks.push({func:(a1,a2,a3)=>{},arg});info.awaited++}var transferObject={funcName,callbackId,data:data?new Uint8Array(HEAPU8.subarray(data>>>0,data+size>>>0)):0};if(data){info.worker.postMessage(transferObject,[transferObject.data.buffer])}else{info.worker.postMessage(transferObject)}};_emscripten_call_worker.sig="vippipp";var _emscripten_get_worker_queue_size=id=>{var info=Browser.workers[id];if(!info)return-1;return info.awaited};_emscripten_get_worker_queue_size.sig="ii";var getPreloadedImageData=(path,w,h)=>{path=PATH_FS.resolve(path);var canvas=preloadedImages[path];if(!canvas)return 0;var ctx=canvas.getContext("2d");var image=ctx.getImageData(0,0,canvas.width,canvas.height);var buf=_malloc(canvas.width*canvas.height*4);HEAPU8.set(image.data,buf>>>0);HEAP32[w>>>2>>>0]=canvas.width;HEAP32[h>>>2>>>0]=canvas.height;return buf};function _emscripten_get_preloaded_image_data(path,w,h){path>>>=0;w>>>=0;h>>>=0;return getPreloadedImageData(UTF8ToString(path),w,h)}_emscripten_get_preloaded_image_data.sig="pppp";var getPreloadedImageData__data=["$PATH_FS","malloc"];function _emscripten_get_preloaded_image_data_from_FILE(file,w,h){file>>>=0;w>>>=0;h>>>=0;var fd=_fileno(file);var stream=FS.getStream(fd);if(stream){return getPreloadedImageData(stream.path,w,h)}return 0}_emscripten_get_preloaded_image_data_from_FILE.sig="pppp";var wget={wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle(){var handle=wget.nextWgetRequestHandle;wget.nextWgetRequestHandle++;return handle}};var FS_mkdirTree=(path,mode)=>FS.mkdirTree(path,mode);var _emscripten_async_wget=function(url,file,onload,onerror){url>>>=0;file>>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();var _url=UTF8ToString(url);var _file=UTF8ToString(file);_file=PATH_FS.resolve(_file);function doCallback(callback){if(callback){runtimeKeepalivePop();callUserCallback(()=>{var sp=stackSave();(a1=>{})(stringToUTF8OnStack(_file));stackRestore(sp)})}}var destinationDirectory=PATH.dirname(_file);FS_createPreloadedFile(destinationDirectory,PATH.basename(_file),_url,true,true,()=>doCallback(onload),()=>doCallback(onerror),false,false,()=>{try{FS_unlink(_file)}catch(e){}FS_mkdirTree(destinationDirectory)})};_emscripten_async_wget.sig="vpppp";var _emscripten_async_wget_data=function(url,userdata,onload,onerror){url>>>=0;userdata>>>=0;onload>>>=0;onerror>>>=0;runtimeKeepalivePush();asyncLoad(UTF8ToString(url),byteArray=>{runtimeKeepalivePop();callUserCallback(()=>{var buffer=_malloc(byteArray.length);HEAPU8.set(byteArray,buffer>>>0);((a1,a2,a3)=>{})(userdata,buffer,byteArray.length);_free(buffer)})},()=>{if(onerror){runtimeKeepalivePop();callUserCallback(()=>{(a1=>{})(userdata)})}},true)};_emscripten_async_wget_data.sig="vpppp";var _emscripten_async_wget2=function(url,file,request,param,userdata,onload,onerror,onprogress){url>>>=0;file>>>=0;request>>>=0;param>>>=0;userdata>>>=0;onload>>>=0;onerror>>>=0;onprogress>>>=0;runtimeKeepalivePush();var _url=UTF8ToString(url);var _file=UTF8ToString(file);_file=PATH_FS.resolve(_file);var _request=UTF8ToString(request);var _param=UTF8ToString(param);var index=_file.lastIndexOf("/");var http=new XMLHttpRequest;http.open(_request,_url,true);http.responseType="arraybuffer";var handle=wget.getNextWgetRequestHandle();var destinationDirectory=PATH.dirname(_file);http.onload=e=>{runtimeKeepalivePop();if(http.status>=200&&http.status<300){try{FS.unlink(_file)}catch(e){}FS.mkdirTree(destinationDirectory);FS.createDataFile(_file.substr(0,index),_file.substr(index+1),new Uint8Array(http.response),true,true,false);if(onload){var sp=stackSave();((a1,a2,a3)=>{})(handle,userdata,stringToUTF8OnStack(_file));stackRestore(sp)}}else{if(onerror)((a1,a2,a3)=>{})(handle,userdata,http.status)}delete wget.wgetRequests[handle]};http.onerror=e=>{runtimeKeepalivePop();if(onerror)((a1,a2,a3)=>{})(handle,userdata,http.status);delete wget.wgetRequests[handle]};http.onprogress=e=>{if(e.lengthComputable||e.lengthComputable===undefined&&e.total!=0){var percentComplete=e.loaded/e.total*100;if(onprogress)((a1,a2,a3)=>{})(handle,userdata,percentComplete)}};http.onabort=e=>{runtimeKeepalivePop();delete wget.wgetRequests[handle]};if(_request=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.send(_param)}else{http.send(null)}wget.wgetRequests[handle]=http;return handle};_emscripten_async_wget2.sig="ipppppppp";function _emscripten_async_wget2_data(url,request,param,userdata,free,onload,onerror,onprogress){url>>>=0;request>>>=0;param>>>=0;userdata>>>=0;onload>>>=0;onerror>>>=0;onprogress>>>=0;var _url=UTF8ToString(url);var _request=UTF8ToString(request);var _param=UTF8ToString(param);var http=new XMLHttpRequest;http.open(_request,_url,true);http.responseType="arraybuffer";var handle=wget.getNextWgetRequestHandle();function onerrorjs(){if(onerror){var sp=stackSave();var statusText=0;if(http.statusText){statusText=stringToUTF8OnStack(http.statusText)}((a1,a2,a3,a4)=>{})(handle,userdata,http.status,statusText);stackRestore(sp)}}http.onload=e=>{if(http.status>=200&&http.status<300||http.status===0&&_url.substr(0,4).toLowerCase()!="http"){var byteArray=new Uint8Array(http.response);var buffer=_malloc(byteArray.length);HEAPU8.set(byteArray,buffer>>>0);if(onload)((a1,a2,a3,a4)=>{})(handle,userdata,buffer,byteArray.length);if(free)_free(buffer)}else{onerrorjs()}delete wget.wgetRequests[handle]};http.onerror=e=>{onerrorjs();delete wget.wgetRequests[handle]};http.onprogress=e=>{if(onprogress)((a1,a2,a3,a4)=>{})(handle,userdata,e.loaded,e.lengthComputable||e.lengthComputable===undefined?e.total:0)};http.onabort=e=>{delete wget.wgetRequests[handle]};if(_request=="POST"){http.setRequestHeader("Content-type","application/x-www-form-urlencoded");http.send(_param)}else{http.send(null)}wget.wgetRequests[handle]=http;return handle}_emscripten_async_wget2_data.sig="ippppippp";var _emscripten_async_wget2_abort=handle=>{var http=wget.wgetRequests[handle];http?.abort()};_emscripten_async_wget2_abort.sig="vi";function ___asctime_r(tmPtr,buf){tmPtr>>>=0;buf>>>=0;var date={tm_sec:HEAP32[tmPtr>>>2>>>0],tm_min:HEAP32[tmPtr+4>>>2>>>0],tm_hour:HEAP32[tmPtr+8>>>2>>>0],tm_mday:HEAP32[tmPtr+12>>>2>>>0],tm_mon:HEAP32[tmPtr+16>>>2>>>0],tm_year:HEAP32[tmPtr+20>>>2>>>0],tm_wday:HEAP32[tmPtr+24>>>2>>>0]};var days=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var s=days[date.tm_wday]+" "+months[date.tm_mon]+(date.tm_mday<10?" ":" ")+date.tm_mday+(date.tm_hour<10?" 0":" ")+date.tm_hour+(date.tm_min<10?":0":":")+date.tm_min+(date.tm_sec<10?":0":":")+date.tm_sec+" "+(1900+date.tm_year)+"\n";stringToUTF8(s,buf,26);return buf}___asctime_r.sig="ppp";function _strptime_l(buf,format,tm,locale){buf>>>=0;format>>>=0;tm>>>=0;locale>>>=0;return _strptime(buf,format,tm)}_strptime_l.sig="ppppp";function ___syscall_shutdown(fd,how){try{getSocketFromFD(fd);return-52}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}Module["___syscall_shutdown"]=___syscall_shutdown;___syscall_shutdown.sig="iiiiiii";function __dlsym_catchup_js(handle,symbolIndex){handle>>>=0;var lib=LDSO.loadedLibsByHandle[handle];var symDict=lib.exports;var symName=Object.keys(symDict)[symbolIndex];var sym=symDict[symName];var result=addFunction(sym,sym.sig);return result}__dlsym_catchup_js.sig="ppi";var FS_readFile=FS.readFile;var _setNetworkCallback=(event,userData,callback)=>{function _callback(data){try{if(event==="error"){var sp=stackSave();var msg=stringToUTF8OnStack(data[2]);((a1,a2,a3,a4)=>{})(data[0],data[1],msg,userData);stackRestore(sp)}else{((a1,a2)=>{})(data,userData)}}catch(e){if(!(e instanceof ExitStatus)){if(e&&typeof e=="object"&&e.stack)err("exception thrown: "+[e,e.stack]);throw e}}}runtimeKeepalivePush();Module["websocket"]["on"](event,callback?_callback:null)};function _emscripten_set_socket_error_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("error",userData,callback)}_emscripten_set_socket_error_callback.sig="vpp";function _emscripten_set_socket_open_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("open",userData,callback)}_emscripten_set_socket_open_callback.sig="vpp";function _emscripten_set_socket_listen_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("listen",userData,callback)}_emscripten_set_socket_listen_callback.sig="vpp";function _emscripten_set_socket_connection_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("connection",userData,callback)}_emscripten_set_socket_connection_callback.sig="vpp";function _emscripten_set_socket_message_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("message",userData,callback)}_emscripten_set_socket_message_callback.sig="vpp";function _emscripten_set_socket_close_callback(userData,callback){userData>>>=0;callback>>>=0;_setNetworkCallback("close",userData,callback)}_emscripten_set_socket_close_callback.sig="vpp";var _emscripten_sleep=ms=>Asyncify.handleSleep(wakeUp=>safeSetTimeout(wakeUp,ms));_emscripten_sleep.sig="vi";_emscripten_sleep.isAsync=true;var _emscripten_wget_data=function(url,pbuffer,pnum,perror){url>>>=0;pbuffer>>>=0;pnum>>>=0;perror>>>=0;return Asyncify.handleSleep(wakeUp=>{asyncLoad(UTF8ToString(url),byteArray=>{var buffer=_malloc(byteArray.length);HEAPU8.set(byteArray,buffer>>>0);HEAPU32[pbuffer>>>2>>>0]=buffer;HEAP32[pnum>>>2>>>0]=byteArray.length;HEAP32[perror>>>2>>>0]=0;wakeUp()},()=>{HEAP32[perror>>>2>>>0]=1;wakeUp()},true)})};_emscripten_wget_data.sig="vpppp";_emscripten_wget_data.isAsync=true;var _emscripten_scan_registers=function(func){func>>>=0;return Asyncify.handleSleep(wakeUp=>{safeSetTimeout(()=>{var stackBegin=Asyncify.currData+12;var stackEnd=HEAPU32[Asyncify.currData>>>2>>>0];((a1,a2)=>{})(stackBegin,stackEnd);wakeUp()},0)})};_emscripten_scan_registers.sig="vp";_emscripten_scan_registers.isAsync=true;var _emscripten_lazy_load_code=()=>Asyncify.handleSleep(wakeUp=>{wasmBinaryFile+=".lazy.wasm";dependenciesFulfilled=wakeUp;createWasm()});_emscripten_lazy_load_code.sig="v";_emscripten_lazy_load_code.isAsync=true;async function __load_secondary_module(){wasmExports["load_secondary_module_status"].value=1;var imports={primary:wasmExports};var deferred=wasmBinaryFile.slice(0,-5)+".deferred.wasm";await new Promise(resolve=>{instantiateAsync(null,deferred,imports,resolve)})}__load_secondary_module.sig="v";__load_secondary_module.isAsync=true;var Fibers={nextFiber:0,trampolineRunning:false,trampoline(){if(!Fibers.trampolineRunning&&Fibers.nextFiber){Fibers.trampolineRunning=true;do{var fiber=Fibers.nextFiber;Fibers.nextFiber=0;Fibers.finishContextSwitch(fiber)}while(Fibers.nextFiber);Fibers.trampolineRunning=false}},finishContextSwitch(newFiber){var stack_base=HEAPU32[newFiber>>>2>>>0];var stack_max=HEAPU32[newFiber+4>>>2>>>0];_emscripten_stack_set_limits(stack_base,stack_max);stackRestore(HEAPU32[newFiber+8>>>2>>>0]);var entryPoint=HEAPU32[newFiber+12>>>2>>>0];if(entryPoint!==0){Asyncify.currData=null;HEAPU32[newFiber+12>>>2>>>0]=0;var userData=HEAPU32[newFiber+16>>>2>>>0];(a1=>{})(userData)}else{var asyncifyData=newFiber+20;Asyncify.currData=asyncifyData;Asyncify.state=Asyncify.State.Rewinding;_asyncify_start_rewind(asyncifyData);Asyncify.doRewind(asyncifyData)}}};function _emscripten_fiber_swap(oldFiber,newFiber){oldFiber>>>=0;newFiber>>>=0;if(ABORT)return;if(Asyncify.state===Asyncify.State.Normal){Asyncify.state=Asyncify.State.Unwinding;var asyncifyData=oldFiber+20;Asyncify.setDataRewindFunc(asyncifyData);Asyncify.currData=asyncifyData;_asyncify_start_unwind(asyncifyData);var stackTop=stackSave();HEAPU32[oldFiber+8>>>2>>>0]=stackTop;Fibers.nextFiber=newFiber}else{Asyncify.state=Asyncify.State.Normal;_asyncify_stop_rewind();Asyncify.currData=null}}_emscripten_fiber_swap.sig="vpp";_emscripten_fiber_swap.isAsync=true;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var allocate=(slab,allocator)=>{var ret;if(allocator==ALLOC_STACK){ret=stackAlloc(slab.length)}else{ret=_malloc(slab.length)}if(!slab.subarray&&!slab.slice){slab=new Uint8Array(slab)}HEAPU8.set(slab,ret>>>0);return ret};var writeStringToMemory=(string,buffer,dontAddNull)=>{warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end>>>0]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end>>>0]=lastChar};var writeAsciiToMemory=(str,buffer,dontAddNull)=>{for(var i=0;i>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>>0]=0};var allocateUTF8=stringToNewUTF8;var allocateUTF8OnStack=stringToUTF8OnStack;var setErrNo=value=>{HEAP32[___errno_location()>>>2>>>0]=value;return value};var demangle=func=>{demangle.recursionGuard=(demangle.recursionGuard|0)+1;if(demangle.recursionGuard>1)return func;return withStackSave(()=>{try{var s=func;if(s.startsWith("__Z"))s=s.substr(1);var buf=stringToUTF8OnStack(s);var status=stackAlloc(4);var ret=___cxa_demangle(buf,0,0,status);if(HEAP32[status>>>2>>>0]===0&&ret){return UTF8ToString(ret)}}catch(e){}finally{_free(ret);if(demangle.recursionGuard<2)--demangle.recursionGuard}return func})};function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return js}var print=out;var printErr=err;var _emscripten_is_main_browser_thread=()=>!ENVIRONMENT_IS_WORKER;registerWasmPlugin();FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_unlink"]=FS.unlink;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createDevice"]=FS.createDevice;var emSetImmediate;var emClearImmediate;if(typeof setImmediate!="undefined"){emSetImmediate=setImmediateWrapped;emClearImmediate=clearImmediateWrapped}else if(typeof addEventListener=="function"){var __setImmediate_id_counter=0;var __setImmediate_queue=[];var __setImmediate_message_id="_si";var __setImmediate_cb=e=>{if(e.data===__setImmediate_message_id){e.stopPropagation();__setImmediate_queue.shift()();++__setImmediate_id_counter}};addEventListener("message",__setImmediate_cb,true);emSetImmediate=func=>{postMessage(__setImmediate_message_id,"*");return __setImmediate_id_counter+__setImmediate_queue.push(func)-1};emClearImmediate=id=>{var index=id-__setImmediate_id_counter;if(index>=0&&index<__setImmediate_queue.length)__setImmediate_queue[index]=()=>{}}}Module["requestFullscreen"]=Browser.requestFullscreen;Module["requestAnimationFrame"]=Browser.requestAnimationFrame;Module["setCanvasSize"]=Browser.setCanvasSize;Module["pauseMainLoop"]=Browser.mainLoop.pause;Module["resumeMainLoop"]=Browser.mainLoop.resume;Module["getUserMedia"]=Browser.getUserMedia;Module["createContext"]=Browser.createContext;var preloadedImages={};var preloadedAudios={};var wasmImports={UTF8ToHtml:_UTF8ToHtml,UTF8Toisolat1:_UTF8Toisolat1,_Unwind_Backtrace:__Unwind_Backtrace,_Unwind_DeleteException:__Unwind_DeleteException,_Unwind_FindEnclosingFunction:__Unwind_FindEnclosingFunction,_Unwind_GetIPInfo:__Unwind_GetIPInfo,_Unwind_RaiseException:__Unwind_RaiseException,__asctime_r:___asctime_r,__assert_fail:___assert_fail,__asyncify_data:___asyncify_data,__asyncify_state:___asyncify_state,__asyncjs__pdo_pglite_real_db_handle_factory,__asyncjs__pdo_pglite_real_handle_begin,__asyncjs__pdo_pglite_real_handle_commit,__asyncjs__pdo_pglite_real_handle_rollback,__asyncjs__pdo_pglite_real_last_insert_id,__asyncjs__pdo_pglite_real_stmt_execute,__asyncjs__php_stream_fetch_real_open,__asyncjs__vrzno_await_internal,__call_sighandler:___call_sighandler,__cxa_begin_catch:___cxa_begin_catch,__cxa_call_unexpected:___cxa_call_unexpected,__cxa_end_catch:___cxa_end_catch,__cxa_find_matching_catch_2:___cxa_find_matching_catch_2,__cxa_find_matching_catch_3:___cxa_find_matching_catch_3,__cxa_find_matching_catch_4:___cxa_find_matching_catch_4,__cxa_rethrow:___cxa_rethrow,__cxa_throw:___cxa_throw,__global_base:___global_base,__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__resumeException:___resumeException,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__syscall__newselect:___syscall__newselect,__syscall_accept4:___syscall_accept4,__syscall_bind:___syscall_bind,__syscall_chdir:___syscall_chdir,__syscall_chmod:___syscall_chmod,__syscall_connect:___syscall_connect,__syscall_dup:___syscall_dup,__syscall_dup3:___syscall_dup3,__syscall_faccessat:___syscall_faccessat,__syscall_fadvise64:___syscall_fadvise64,__syscall_fallocate:___syscall_fallocate,__syscall_fchdir:___syscall_fchdir,__syscall_fchmod:___syscall_fchmod,__syscall_fchmodat2:___syscall_fchmodat2,__syscall_fchown32:___syscall_fchown32,__syscall_fchownat:___syscall_fchownat,__syscall_fcntl64:___syscall_fcntl64,__syscall_fdatasync:___syscall_fdatasync,__syscall_fstat64:___syscall_fstat64,__syscall_fstatfs64:___syscall_fstatfs64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getcwd:___syscall_getcwd,__syscall_getdents64:___syscall_getdents64,__syscall_getpeername:___syscall_getpeername,__syscall_getsockname:___syscall_getsockname,__syscall_getsockopt:___syscall_getsockopt,__syscall_ioctl:___syscall_ioctl,__syscall_listen:___syscall_listen,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_mknodat:___syscall_mknodat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_pipe:___syscall_pipe,__syscall_poll:___syscall_poll,__syscall_readlinkat:___syscall_readlinkat,__syscall_recvfrom:___syscall_recvfrom,__syscall_recvmsg:___syscall_recvmsg,__syscall_renameat:___syscall_renameat,__syscall_rmdir:___syscall_rmdir,__syscall_sendmsg:___syscall_sendmsg,__syscall_sendto:___syscall_sendto,__syscall_socket:___syscall_socket,__syscall_stat64:___syscall_stat64,__syscall_statfs64:___syscall_statfs64,__syscall_symlink:___syscall_symlink,__syscall_symlinkat:___syscall_symlinkat,__syscall_truncate64:___syscall_truncate64,__syscall_unlinkat:___syscall_unlinkat,__syscall_utimensat:___syscall_utimensat,__table_base:___table_base,__xmlOutputBufferCreateFilename:___xmlOutputBufferCreateFilename,__xmlParserInputBufferCreateFilename:___xmlParserInputBufferCreateFilename,__xmlRegisterCallbacks:___xmlRegisterCallbacks,_abort_js:__abort_js,_dlopen_js:__dlopen_js,_dlsym_catchup_js:__dlsym_catchup_js,_dlsym_js:__dlsym_js,_emscripten_dlopen_js:__emscripten_dlopen_js,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_get_progname:__emscripten_get_progname,_emscripten_lookup_name:__emscripten_lookup_name,_emscripten_memcpy_js:__emscripten_memcpy_js,_emscripten_push_main_loop_blocker:__emscripten_push_main_loop_blocker,_emscripten_push_uncounted_main_loop_blocker:__emscripten_push_uncounted_main_loop_blocker,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_set_offscreencanvas_size:__emscripten_set_offscreencanvas_size,_emscripten_system:__emscripten_system,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_gmtime_js:__gmtime_js,_load_secondary_module:__load_secondary_module,_localtime_js:__localtime_js,_mktime_js:__mktime_js,_mmap_js:__mmap_js,_msync_js:__msync_js,_munmap_js:__munmap_js,_setitimer_js:__setitimer_js,_timegm_js:__timegm_js,_tzset_js:__tzset_js,clock_res_get:_clock_res_get,clock_time_get:_clock_time_get,docbDefaultSAXHandler:_docbDefaultSAXHandler,emscripten_asm_const_async_on_main_thread:_emscripten_asm_const_async_on_main_thread,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_double_sync_on_main_thread:_emscripten_asm_const_double_sync_on_main_thread,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_asm_const_int_sync_on_main_thread:_emscripten_asm_const_int_sync_on_main_thread,emscripten_asm_const_ptr:_emscripten_asm_const_ptr,emscripten_asm_const_ptr_sync_on_main_thread:_emscripten_asm_const_ptr_sync_on_main_thread,emscripten_async_call:_emscripten_async_call,emscripten_async_load_script:_emscripten_async_load_script,emscripten_async_run_script:_emscripten_async_run_script,emscripten_async_wget:_emscripten_async_wget,emscripten_async_wget2:_emscripten_async_wget2,emscripten_async_wget2_abort:_emscripten_async_wget2_abort,emscripten_async_wget2_data:_emscripten_async_wget2_data,emscripten_async_wget_data:_emscripten_async_wget_data,emscripten_call_worker:_emscripten_call_worker,emscripten_cancel_animation_frame:_emscripten_cancel_animation_frame,emscripten_cancel_main_loop:_emscripten_cancel_main_loop,emscripten_clear_immediate:_emscripten_clear_immediate,emscripten_clear_interval:_emscripten_clear_interval,emscripten_clear_timeout:_emscripten_clear_timeout,emscripten_console_error:_emscripten_console_error,emscripten_console_log:_emscripten_console_log,emscripten_console_trace:_emscripten_console_trace,emscripten_console_warn:_emscripten_console_warn,emscripten_create_worker:_emscripten_create_worker,emscripten_date_now:_emscripten_date_now,emscripten_debugger:_emscripten_debugger,emscripten_destroy_worker:_emscripten_destroy_worker,emscripten_enter_soft_fullscreen:_emscripten_enter_soft_fullscreen,emscripten_err:_emscripten_err,emscripten_errn:_emscripten_errn,emscripten_exit_fullscreen:_emscripten_exit_fullscreen,emscripten_exit_pointerlock:_emscripten_exit_pointerlock,emscripten_exit_soft_fullscreen:_emscripten_exit_soft_fullscreen,emscripten_exit_with_live_runtime:_emscripten_exit_with_live_runtime,emscripten_fiber_swap:_emscripten_fiber_swap,emscripten_force_exit:_emscripten_force_exit,emscripten_get_battery_status:_emscripten_get_battery_status,emscripten_get_callstack:_emscripten_get_callstack,emscripten_get_canvas_element_size:_emscripten_get_canvas_element_size,emscripten_get_canvas_size:_emscripten_get_canvas_size,emscripten_get_compiler_setting:_emscripten_get_compiler_setting,emscripten_get_device_pixel_ratio:_emscripten_get_device_pixel_ratio,emscripten_get_devicemotion_status:_emscripten_get_devicemotion_status,emscripten_get_deviceorientation_status:_emscripten_get_deviceorientation_status,emscripten_get_element_css_size:_emscripten_get_element_css_size,emscripten_get_fullscreen_status:_emscripten_get_fullscreen_status,emscripten_get_gamepad_status:_emscripten_get_gamepad_status,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_main_loop_timing:_emscripten_get_main_loop_timing,emscripten_get_mouse_status:_emscripten_get_mouse_status,emscripten_get_now:_emscripten_get_now,emscripten_get_now_res:_emscripten_get_now_res,emscripten_get_num_gamepads:_emscripten_get_num_gamepads,emscripten_get_orientation_status:_emscripten_get_orientation_status,emscripten_get_pointerlock_status:_emscripten_get_pointerlock_status,emscripten_get_preloaded_image_data:_emscripten_get_preloaded_image_data,emscripten_get_preloaded_image_data_from_FILE:_emscripten_get_preloaded_image_data_from_FILE,emscripten_get_screen_size:_emscripten_get_screen_size,emscripten_get_visibility_status:_emscripten_get_visibility_status,emscripten_get_window_title:_emscripten_get_window_title,emscripten_get_worker_queue_size:_emscripten_get_worker_queue_size,emscripten_has_asyncify:_emscripten_has_asyncify,emscripten_hide_mouse:_emscripten_hide_mouse,emscripten_html5_remove_all_event_listeners:_emscripten_html5_remove_all_event_listeners,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_lazy_load_code:_emscripten_lazy_load_code,emscripten_lock_orientation:_emscripten_lock_orientation,emscripten_log:_emscripten_log,emscripten_math_acos:_emscripten_math_acos,emscripten_math_acosh:_emscripten_math_acosh,emscripten_math_asin:_emscripten_math_asin,emscripten_math_asinh:_emscripten_math_asinh,emscripten_math_atan:_emscripten_math_atan,emscripten_math_atan2:_emscripten_math_atan2,emscripten_math_atanh:_emscripten_math_atanh,emscripten_math_cbrt:_emscripten_math_cbrt,emscripten_math_cos:_emscripten_math_cos,emscripten_math_cosh:_emscripten_math_cosh,emscripten_math_exp:_emscripten_math_exp,emscripten_math_expm1:_emscripten_math_expm1,emscripten_math_fmod:_emscripten_math_fmod,emscripten_math_hypot:_emscripten_math_hypot,emscripten_math_log:_emscripten_math_log,emscripten_math_log10:_emscripten_math_log10,emscripten_math_log1p:_emscripten_math_log1p,emscripten_math_log2:_emscripten_math_log2,emscripten_math_pow:_emscripten_math_pow,emscripten_math_random:_emscripten_math_random,emscripten_math_round:_emscripten_math_round,emscripten_math_sign:_emscripten_math_sign,emscripten_math_sin:_emscripten_math_sin,emscripten_math_sinh:_emscripten_math_sinh,emscripten_math_sqrt:_emscripten_math_sqrt,emscripten_math_tan:_emscripten_math_tan,emscripten_math_tanh:_emscripten_math_tanh,emscripten_notify_memory_growth:_emscripten_notify_memory_growth,emscripten_out:_emscripten_out,emscripten_outn:_emscripten_outn,emscripten_pause_main_loop:_emscripten_pause_main_loop,emscripten_pc_get_column:_emscripten_pc_get_column,emscripten_pc_get_file:_emscripten_pc_get_file,emscripten_pc_get_function:_emscripten_pc_get_function,emscripten_pc_get_line:_emscripten_pc_get_line,emscripten_performance_now:_emscripten_performance_now,emscripten_print_double:_emscripten_print_double,emscripten_promise_all:_emscripten_promise_all,emscripten_promise_all_settled:_emscripten_promise_all_settled,emscripten_promise_any:_emscripten_promise_any,emscripten_promise_await:_emscripten_promise_await,emscripten_promise_create:_emscripten_promise_create,emscripten_promise_destroy:_emscripten_promise_destroy,emscripten_promise_race:_emscripten_promise_race,emscripten_promise_resolve:_emscripten_promise_resolve,emscripten_promise_then:_emscripten_promise_then,emscripten_random:_emscripten_random,emscripten_request_animation_frame:_emscripten_request_animation_frame,emscripten_request_animation_frame_loop:_emscripten_request_animation_frame_loop,emscripten_request_fullscreen:_emscripten_request_fullscreen,emscripten_request_fullscreen_strategy:_emscripten_request_fullscreen_strategy,emscripten_request_pointerlock:_emscripten_request_pointerlock,emscripten_resize_heap:_emscripten_resize_heap,emscripten_resume_main_loop:_emscripten_resume_main_loop,emscripten_return_address:_emscripten_return_address,emscripten_run_preload_plugins:_emscripten_run_preload_plugins,emscripten_run_preload_plugins_data:_emscripten_run_preload_plugins_data,emscripten_run_script:_emscripten_run_script,emscripten_run_script_int:_emscripten_run_script_int,emscripten_run_script_string:_emscripten_run_script_string,emscripten_runtime_keepalive_check:_emscripten_runtime_keepalive_check,emscripten_runtime_keepalive_pop:_emscripten_runtime_keepalive_pop,emscripten_runtime_keepalive_push:_emscripten_runtime_keepalive_push,emscripten_sample_gamepad_data:_emscripten_sample_gamepad_data,emscripten_scan_registers:_emscripten_scan_registers,emscripten_set_batterychargingchange_callback_on_thread:_emscripten_set_batterychargingchange_callback_on_thread,emscripten_set_batterylevelchange_callback_on_thread:_emscripten_set_batterylevelchange_callback_on_thread,emscripten_set_beforeunload_callback_on_thread:_emscripten_set_beforeunload_callback_on_thread,emscripten_set_blur_callback_on_thread:_emscripten_set_blur_callback_on_thread,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_canvas_size:_emscripten_set_canvas_size,emscripten_set_click_callback_on_thread:_emscripten_set_click_callback_on_thread,emscripten_set_dblclick_callback_on_thread:_emscripten_set_dblclick_callback_on_thread,emscripten_set_devicemotion_callback_on_thread:_emscripten_set_devicemotion_callback_on_thread,emscripten_set_deviceorientation_callback_on_thread:_emscripten_set_deviceorientation_callback_on_thread,emscripten_set_element_css_size:_emscripten_set_element_css_size,emscripten_set_focus_callback_on_thread:_emscripten_set_focus_callback_on_thread,emscripten_set_focusin_callback_on_thread:_emscripten_set_focusin_callback_on_thread,emscripten_set_focusout_callback_on_thread:_emscripten_set_focusout_callback_on_thread,emscripten_set_fullscreenchange_callback_on_thread:_emscripten_set_fullscreenchange_callback_on_thread,emscripten_set_gamepadconnected_callback_on_thread:_emscripten_set_gamepadconnected_callback_on_thread,emscripten_set_gamepaddisconnected_callback_on_thread:_emscripten_set_gamepaddisconnected_callback_on_thread,emscripten_set_immediate:_emscripten_set_immediate,emscripten_set_immediate_loop:_emscripten_set_immediate_loop,emscripten_set_interval:_emscripten_set_interval,emscripten_set_keydown_callback_on_thread:_emscripten_set_keydown_callback_on_thread,emscripten_set_keypress_callback_on_thread:_emscripten_set_keypress_callback_on_thread,emscripten_set_keyup_callback_on_thread:_emscripten_set_keyup_callback_on_thread,emscripten_set_main_loop:_emscripten_set_main_loop,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_main_loop_expected_blockers:_emscripten_set_main_loop_expected_blockers,emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,emscripten_set_mousedown_callback_on_thread:_emscripten_set_mousedown_callback_on_thread,emscripten_set_mouseenter_callback_on_thread:_emscripten_set_mouseenter_callback_on_thread,emscripten_set_mouseleave_callback_on_thread:_emscripten_set_mouseleave_callback_on_thread,emscripten_set_mousemove_callback_on_thread:_emscripten_set_mousemove_callback_on_thread,emscripten_set_mouseout_callback_on_thread:_emscripten_set_mouseout_callback_on_thread,emscripten_set_mouseover_callback_on_thread:_emscripten_set_mouseover_callback_on_thread,emscripten_set_mouseup_callback_on_thread:_emscripten_set_mouseup_callback_on_thread,emscripten_set_orientationchange_callback_on_thread:_emscripten_set_orientationchange_callback_on_thread,emscripten_set_pointerlockchange_callback_on_thread:_emscripten_set_pointerlockchange_callback_on_thread,emscripten_set_pointerlockerror_callback_on_thread:_emscripten_set_pointerlockerror_callback_on_thread,emscripten_set_resize_callback_on_thread:_emscripten_set_resize_callback_on_thread,emscripten_set_scroll_callback_on_thread:_emscripten_set_scroll_callback_on_thread,emscripten_set_socket_close_callback:_emscripten_set_socket_close_callback,emscripten_set_socket_connection_callback:_emscripten_set_socket_connection_callback,emscripten_set_socket_error_callback:_emscripten_set_socket_error_callback,emscripten_set_socket_listen_callback:_emscripten_set_socket_listen_callback,emscripten_set_socket_message_callback:_emscripten_set_socket_message_callback,emscripten_set_socket_open_callback:_emscripten_set_socket_open_callback,emscripten_set_timeout:_emscripten_set_timeout,emscripten_set_timeout_loop:_emscripten_set_timeout_loop,emscripten_set_touchcancel_callback_on_thread:_emscripten_set_touchcancel_callback_on_thread,emscripten_set_touchend_callback_on_thread:_emscripten_set_touchend_callback_on_thread,emscripten_set_touchmove_callback_on_thread:_emscripten_set_touchmove_callback_on_thread,emscripten_set_touchstart_callback_on_thread:_emscripten_set_touchstart_callback_on_thread,emscripten_set_visibilitychange_callback_on_thread:_emscripten_set_visibilitychange_callback_on_thread,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_sleep:_emscripten_sleep,emscripten_stack_snapshot:_emscripten_stack_snapshot,emscripten_stack_unwind_buffer:_emscripten_stack_unwind_buffer,emscripten_throw_number:_emscripten_throw_number,emscripten_throw_string:_emscripten_throw_string,emscripten_unlock_orientation:_emscripten_unlock_orientation,emscripten_unwind_to_js_event_loop:_emscripten_unwind_to_js_event_loop,emscripten_vibrate:_emscripten_vibrate,emscripten_vibrate_pattern:_emscripten_vibrate_pattern,emscripten_wget_data:_emscripten_wget_data,endprotoent:_endprotoent,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_pread:_fd_pread,fd_pwrite:_fd_pwrite,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,getaddrinfo:_getaddrinfo,getcontext:_getcontext,getdtablesize:_getdtablesize,getentropy:_getentropy,getnameinfo:_getnameinfo,getprotobyname:_getprotobyname,getprotobynumber:_getprotobynumber,getprotoent:_getprotoent,htmlDefaultSAXHandler:_htmlDefaultSAXHandler,invoke_i,invoke_ii,invoke_iii,invoke_iiii,invoke_iiiii,invoke_iiiiii,invoke_iiiiiii,invoke_iiiiiiii,invoke_iiiiiiiiii,invoke_v,invoke_vi,invoke_vii,invoke_viii,invoke_viiii,invoke_viiiiii,isolat1ToUTF8:_isolat1ToUTF8,llvm_eh_typeid_for:_llvm_eh_typeid_for,makecontext:_makecontext,memory:wasmMemory,oldXMLWDcompatibility:_oldXMLWDcompatibility,posix_spawnp:_posix_spawnp,proc_exit:_proc_exit,random_get:_random_get,setNetworkCallback:_setNetworkCallback,setprotoent:_setprotoent,stackAlloc:_stackAlloc,stackRestore:_stackRestore,stackSave:_stackSave,strptime:_strptime,strptime_l:_strptime_l,swapcontext:_swapcontext,xmlAllocOutputBuffer:_xmlAllocOutputBuffer,xmlAllocParserInputBuffer:_xmlAllocParserInputBuffer,xmlBufferAllocScheme:_xmlBufferAllocScheme,xmlCopyError:_xmlCopyError,xmlDefaultBufferSize:_xmlDefaultBufferSize,xmlDefaultSAXHandler:_xmlDefaultSAXHandler,xmlDefaultSAXLocator:_xmlDefaultSAXLocator,xmlDeregisterNodeDefaultValue:_xmlDeregisterNodeDefaultValue,xmlDictOwns:_xmlDictOwns,xmlDoValidityCheckingDefaultValue:_xmlDoValidityCheckingDefaultValue,xmlFileClose:_xmlFileClose,xmlFileMatch:_xmlFileMatch,xmlFileOpen:_xmlFileOpen,xmlFileRead:_xmlFileRead,xmlFree:_xmlFree,xmlFreeDoc:_xmlFreeDoc,xmlFreeNode:_xmlFreeNode,xmlFreeNodeList:_xmlFreeNodeList,xmlFreeNs:_xmlFreeNs,xmlFreeParserInputBuffer:_xmlFreeParserInputBuffer,xmlFreeProp:_xmlFreeProp,xmlFreeURI:_xmlFreeURI,xmlGenericError:_xmlGenericError,xmlGenericErrorContext:_xmlGenericErrorContext,xmlGenericErrorDefaultFunc:_xmlGenericErrorDefaultFunc,xmlGetExternalEntityLoader:_xmlGetExternalEntityLoader,xmlGetLastError:_xmlGetLastError,xmlGetWarningsDefaultValue:_xmlGetWarningsDefaultValue,xmlHashDefaultDeallocator:_xmlHashDefaultDeallocator,xmlHashLookup:_xmlHashLookup,xmlHashRemoveEntry:_xmlHashRemoveEntry,xmlHashScan:_xmlHashScan,xmlIndentTreeOutput:_xmlIndentTreeOutput,xmlInitParser:_xmlInitParser,xmlInputReadCallbackNop:_xmlInputReadCallbackNop,xmlIsBaseCharGroup:_xmlIsBaseCharGroup,xmlIsCombiningGroup:_xmlIsCombiningGroup,xmlIsDigitGroup:_xmlIsDigitGroup,xmlIsExtenderGroup:_xmlIsExtenderGroup,xmlIsPubidChar_tab:_xmlIsPubidChar_tab,xmlKeepBlanksDefaultValue:_xmlKeepBlanksDefaultValue,xmlLastError:_xmlLastError,xmlLineNumbersDefaultValue:_xmlLineNumbersDefaultValue,xmlLoadExtDtdDefaultValue:_xmlLoadExtDtdDefaultValue,xmlMalloc:_xmlMalloc,xmlMallocAtomic:_xmlMallocAtomic,xmlMemStrdup:_xmlMemStrdup,xmlNewIOInputStream:_xmlNewIOInputStream,xmlNewInputFromFile:_xmlNewInputFromFile,xmlOutputBufferCreateFilenameDefault:_xmlOutputBufferCreateFilenameDefault,xmlOutputBufferCreateFilenameValue:_xmlOutputBufferCreateFilenameValue,xmlParseCharEncoding:_xmlParseCharEncoding,xmlParseURI:_xmlParseURI,xmlParserDebugEntities:_xmlParserDebugEntities,xmlParserError:_xmlParserError,xmlParserInputBufferCreateFilenameDefault:_xmlParserInputBufferCreateFilenameDefault,xmlParserInputBufferCreateFilenameValue:_xmlParserInputBufferCreateFilenameValue,xmlParserMaxDepth:_xmlParserMaxDepth,xmlParserValidityError:_xmlParserValidityError,xmlParserValidityWarning:_xmlParserValidityWarning,xmlParserVersion:_xmlParserVersion,xmlParserWarning:_xmlParserWarning,xmlPedanticParserDefaultValue:_xmlPedanticParserDefaultValue,xmlRealloc:_xmlRealloc,xmlReconciliateNs:_xmlReconciliateNs,xmlRegisterNodeDefaultValue:_xmlRegisterNodeDefaultValue,xmlRelaxNGCleanupTypes:_xmlRelaxNGCleanupTypes,xmlRemoveID:_xmlRemoveID,xmlResetError:_xmlResetError,xmlResetLastError:_xmlResetLastError,xmlSAX2AttributeDecl:_xmlSAX2AttributeDecl,xmlSAX2CDataBlock:_xmlSAX2CDataBlock,xmlSAX2Characters:_xmlSAX2Characters,xmlSAX2Comment:_xmlSAX2Comment,xmlSAX2ElementDecl:_xmlSAX2ElementDecl,xmlSAX2EndDocument:_xmlSAX2EndDocument,xmlSAX2EndElement:_xmlSAX2EndElement,xmlSAX2EndElementNs:_xmlSAX2EndElementNs,xmlSAX2EntityDecl:_xmlSAX2EntityDecl,xmlSAX2ExternalSubset:_xmlSAX2ExternalSubset,xmlSAX2GetColumnNumber:_xmlSAX2GetColumnNumber,xmlSAX2GetEntity:_xmlSAX2GetEntity,xmlSAX2GetLineNumber:_xmlSAX2GetLineNumber,xmlSAX2GetParameterEntity:_xmlSAX2GetParameterEntity,xmlSAX2GetPublicId:_xmlSAX2GetPublicId,xmlSAX2GetSystemId:_xmlSAX2GetSystemId,xmlSAX2HasExternalSubset:_xmlSAX2HasExternalSubset,xmlSAX2HasInternalSubset:_xmlSAX2HasInternalSubset,xmlSAX2IgnorableWhitespace:_xmlSAX2IgnorableWhitespace,xmlSAX2InternalSubset:_xmlSAX2InternalSubset,xmlSAX2IsStandalone:_xmlSAX2IsStandalone,xmlSAX2NotationDecl:_xmlSAX2NotationDecl,xmlSAX2ProcessingInstruction:_xmlSAX2ProcessingInstruction,xmlSAX2Reference:_xmlSAX2Reference,xmlSAX2ResolveEntity:_xmlSAX2ResolveEntity,xmlSAX2SetDocumentLocator:_xmlSAX2SetDocumentLocator,xmlSAX2StartDocument:_xmlSAX2StartDocument,xmlSAX2StartElement:_xmlSAX2StartElement,xmlSAX2StartElementNs:_xmlSAX2StartElementNs,xmlSAX2UnparsedEntityDecl:_xmlSAX2UnparsedEntityDecl,xmlSaveNoEmptyTags:_xmlSaveNoEmptyTags,xmlSetExternalEntityLoader:_xmlSetExternalEntityLoader,xmlSetGenericErrorFunc:_xmlSetGenericErrorFunc,xmlSetStructuredErrorFunc:_xmlSetStructuredErrorFunc,xmlStrdup:_xmlStrdup,xmlStringComment:_xmlStringComment,xmlStringText:_xmlStringText,xmlStringTextNoenc:_xmlStringTextNoenc,xmlStrncmp:_xmlStrncmp,xmlStructuredError:_xmlStructuredError,xmlStructuredErrorContext:_xmlStructuredErrorContext,xmlSubstituteEntitiesDefaultValue:_xmlSubstituteEntitiesDefaultValue,xmlTreeIndentString:_xmlTreeIndentString,xmlUCSIsAegeanNumbers:_xmlUCSIsAegeanNumbers,xmlUCSIsAlphabeticPresentationForms:_xmlUCSIsAlphabeticPresentationForms,xmlUCSIsArabic:_xmlUCSIsArabic,xmlUCSIsArabicPresentationFormsA:_xmlUCSIsArabicPresentationFormsA,xmlUCSIsArabicPresentationFormsB:_xmlUCSIsArabicPresentationFormsB,xmlUCSIsArmenian:_xmlUCSIsArmenian,xmlUCSIsArrows:_xmlUCSIsArrows,xmlUCSIsBasicLatin:_xmlUCSIsBasicLatin,xmlUCSIsBengali:_xmlUCSIsBengali,xmlUCSIsBlockElements:_xmlUCSIsBlockElements,xmlUCSIsBopomofo:_xmlUCSIsBopomofo,xmlUCSIsBopomofoExtended:_xmlUCSIsBopomofoExtended,xmlUCSIsBoxDrawing:_xmlUCSIsBoxDrawing,xmlUCSIsBraillePatterns:_xmlUCSIsBraillePatterns,xmlUCSIsBuhid:_xmlUCSIsBuhid,xmlUCSIsByzantineMusicalSymbols:_xmlUCSIsByzantineMusicalSymbols,xmlUCSIsCJKCompatibility:_xmlUCSIsCJKCompatibility,xmlUCSIsCJKCompatibilityForms:_xmlUCSIsCJKCompatibilityForms,xmlUCSIsCJKCompatibilityIdeographs:_xmlUCSIsCJKCompatibilityIdeographs,xmlUCSIsCJKCompatibilityIdeographsSupplement:_xmlUCSIsCJKCompatibilityIdeographsSupplement,xmlUCSIsCJKRadicalsSupplement:_xmlUCSIsCJKRadicalsSupplement,xmlUCSIsCJKSymbolsandPunctuation:_xmlUCSIsCJKSymbolsandPunctuation,xmlUCSIsCJKUnifiedIdeographs:_xmlUCSIsCJKUnifiedIdeographs,xmlUCSIsCJKUnifiedIdeographsExtensionA:_xmlUCSIsCJKUnifiedIdeographsExtensionA,xmlUCSIsCJKUnifiedIdeographsExtensionB:_xmlUCSIsCJKUnifiedIdeographsExtensionB,xmlUCSIsCatC:_xmlUCSIsCatC,xmlUCSIsCatCc:_xmlUCSIsCatCc,xmlUCSIsCatCf:_xmlUCSIsCatCf,xmlUCSIsCatCo:_xmlUCSIsCatCo,xmlUCSIsCatCs:_xmlUCSIsCatCs,xmlUCSIsCatL:_xmlUCSIsCatL,xmlUCSIsCatLl:_xmlUCSIsCatLl,xmlUCSIsCatLm:_xmlUCSIsCatLm,xmlUCSIsCatLo:_xmlUCSIsCatLo,xmlUCSIsCatLt:_xmlUCSIsCatLt,xmlUCSIsCatLu:_xmlUCSIsCatLu,xmlUCSIsCatM:_xmlUCSIsCatM,xmlUCSIsCatMc:_xmlUCSIsCatMc,xmlUCSIsCatMe:_xmlUCSIsCatMe,xmlUCSIsCatMn:_xmlUCSIsCatMn,xmlUCSIsCatN:_xmlUCSIsCatN,xmlUCSIsCatNd:_xmlUCSIsCatNd,xmlUCSIsCatNl:_xmlUCSIsCatNl,xmlUCSIsCatNo:_xmlUCSIsCatNo,xmlUCSIsCatP:_xmlUCSIsCatP,xmlUCSIsCatPc:_xmlUCSIsCatPc,xmlUCSIsCatPd:_xmlUCSIsCatPd,xmlUCSIsCatPe:_xmlUCSIsCatPe,xmlUCSIsCatPf:_xmlUCSIsCatPf,xmlUCSIsCatPi:_xmlUCSIsCatPi,xmlUCSIsCatPo:_xmlUCSIsCatPo,xmlUCSIsCatPs:_xmlUCSIsCatPs,xmlUCSIsCatS:_xmlUCSIsCatS,xmlUCSIsCatSc:_xmlUCSIsCatSc,xmlUCSIsCatSk:_xmlUCSIsCatSk,xmlUCSIsCatSm:_xmlUCSIsCatSm,xmlUCSIsCatSo:_xmlUCSIsCatSo,xmlUCSIsCatZ:_xmlUCSIsCatZ,xmlUCSIsCatZl:_xmlUCSIsCatZl,xmlUCSIsCatZp:_xmlUCSIsCatZp,xmlUCSIsCatZs:_xmlUCSIsCatZs,xmlUCSIsCherokee:_xmlUCSIsCherokee,xmlUCSIsCombiningDiacriticalMarks:_xmlUCSIsCombiningDiacriticalMarks,xmlUCSIsCombiningDiacriticalMarksforSymbols:_xmlUCSIsCombiningDiacriticalMarksforSymbols,xmlUCSIsCombiningHalfMarks:_xmlUCSIsCombiningHalfMarks,xmlUCSIsCombiningMarksforSymbols:_xmlUCSIsCombiningMarksforSymbols,xmlUCSIsControlPictures:_xmlUCSIsControlPictures,xmlUCSIsCurrencySymbols:_xmlUCSIsCurrencySymbols,xmlUCSIsCypriotSyllabary:_xmlUCSIsCypriotSyllabary,xmlUCSIsCyrillic:_xmlUCSIsCyrillic,xmlUCSIsCyrillicSupplement:_xmlUCSIsCyrillicSupplement,xmlUCSIsDeseret:_xmlUCSIsDeseret,xmlUCSIsDevanagari:_xmlUCSIsDevanagari,xmlUCSIsDingbats:_xmlUCSIsDingbats,xmlUCSIsEnclosedAlphanumerics:_xmlUCSIsEnclosedAlphanumerics,xmlUCSIsEnclosedCJKLettersandMonths:_xmlUCSIsEnclosedCJKLettersandMonths,xmlUCSIsEthiopic:_xmlUCSIsEthiopic,xmlUCSIsGeneralPunctuation:_xmlUCSIsGeneralPunctuation,xmlUCSIsGeometricShapes:_xmlUCSIsGeometricShapes,xmlUCSIsGeorgian:_xmlUCSIsGeorgian,xmlUCSIsGothic:_xmlUCSIsGothic,xmlUCSIsGreek:_xmlUCSIsGreek,xmlUCSIsGreekExtended:_xmlUCSIsGreekExtended,xmlUCSIsGreekandCoptic:_xmlUCSIsGreekandCoptic,xmlUCSIsGujarati:_xmlUCSIsGujarati,xmlUCSIsGurmukhi:_xmlUCSIsGurmukhi,xmlUCSIsHalfwidthandFullwidthForms:_xmlUCSIsHalfwidthandFullwidthForms,xmlUCSIsHangulCompatibilityJamo:_xmlUCSIsHangulCompatibilityJamo,xmlUCSIsHangulJamo:_xmlUCSIsHangulJamo,xmlUCSIsHangulSyllables:_xmlUCSIsHangulSyllables,xmlUCSIsHanunoo:_xmlUCSIsHanunoo,xmlUCSIsHebrew:_xmlUCSIsHebrew,xmlUCSIsHighPrivateUseSurrogates:_xmlUCSIsHighPrivateUseSurrogates,xmlUCSIsHighSurrogates:_xmlUCSIsHighSurrogates,xmlUCSIsHiragana:_xmlUCSIsHiragana,xmlUCSIsIPAExtensions:_xmlUCSIsIPAExtensions,xmlUCSIsIdeographicDescriptionCharacters:_xmlUCSIsIdeographicDescriptionCharacters,xmlUCSIsKanbun:_xmlUCSIsKanbun,xmlUCSIsKangxiRadicals:_xmlUCSIsKangxiRadicals,xmlUCSIsKannada:_xmlUCSIsKannada,xmlUCSIsKatakana:_xmlUCSIsKatakana,xmlUCSIsKatakanaPhoneticExtensions:_xmlUCSIsKatakanaPhoneticExtensions,xmlUCSIsKhmer:_xmlUCSIsKhmer,xmlUCSIsKhmerSymbols:_xmlUCSIsKhmerSymbols,xmlUCSIsLao:_xmlUCSIsLao,xmlUCSIsLatin1Supplement:_xmlUCSIsLatin1Supplement,xmlUCSIsLatinExtendedA:_xmlUCSIsLatinExtendedA,xmlUCSIsLatinExtendedAdditional:_xmlUCSIsLatinExtendedAdditional,xmlUCSIsLatinExtendedB:_xmlUCSIsLatinExtendedB,xmlUCSIsLetterlikeSymbols:_xmlUCSIsLetterlikeSymbols,xmlUCSIsLimbu:_xmlUCSIsLimbu,xmlUCSIsLinearBIdeograms:_xmlUCSIsLinearBIdeograms,xmlUCSIsLinearBSyllabary:_xmlUCSIsLinearBSyllabary,xmlUCSIsLowSurrogates:_xmlUCSIsLowSurrogates,xmlUCSIsMalayalam:_xmlUCSIsMalayalam,xmlUCSIsMathematicalAlphanumericSymbols:_xmlUCSIsMathematicalAlphanumericSymbols,xmlUCSIsMathematicalOperators:_xmlUCSIsMathematicalOperators,xmlUCSIsMiscellaneousMathematicalSymbolsA:_xmlUCSIsMiscellaneousMathematicalSymbolsA,xmlUCSIsMiscellaneousMathematicalSymbolsB:_xmlUCSIsMiscellaneousMathematicalSymbolsB,xmlUCSIsMiscellaneousSymbols:_xmlUCSIsMiscellaneousSymbols,xmlUCSIsMiscellaneousSymbolsandArrows:_xmlUCSIsMiscellaneousSymbolsandArrows,xmlUCSIsMiscellaneousTechnical:_xmlUCSIsMiscellaneousTechnical,xmlUCSIsMongolian:_xmlUCSIsMongolian,xmlUCSIsMusicalSymbols:_xmlUCSIsMusicalSymbols,xmlUCSIsMyanmar:_xmlUCSIsMyanmar,xmlUCSIsNumberForms:_xmlUCSIsNumberForms,xmlUCSIsOgham:_xmlUCSIsOgham,xmlUCSIsOldItalic:_xmlUCSIsOldItalic,xmlUCSIsOpticalCharacterRecognition:_xmlUCSIsOpticalCharacterRecognition,xmlUCSIsOriya:_xmlUCSIsOriya,xmlUCSIsOsmanya:_xmlUCSIsOsmanya,xmlUCSIsPhoneticExtensions:_xmlUCSIsPhoneticExtensions,xmlUCSIsPrivateUse:_xmlUCSIsPrivateUse,xmlUCSIsPrivateUseArea:_xmlUCSIsPrivateUseArea,xmlUCSIsRunic:_xmlUCSIsRunic,xmlUCSIsShavian:_xmlUCSIsShavian,xmlUCSIsSinhala:_xmlUCSIsSinhala,xmlUCSIsSmallFormVariants:_xmlUCSIsSmallFormVariants,xmlUCSIsSpacingModifierLetters:_xmlUCSIsSpacingModifierLetters,xmlUCSIsSpecials:_xmlUCSIsSpecials,xmlUCSIsSuperscriptsandSubscripts:_xmlUCSIsSuperscriptsandSubscripts,xmlUCSIsSupplementalArrowsA:_xmlUCSIsSupplementalArrowsA,xmlUCSIsSupplementalArrowsB:_xmlUCSIsSupplementalArrowsB,xmlUCSIsSupplementalMathematicalOperators:_xmlUCSIsSupplementalMathematicalOperators,xmlUCSIsSupplementaryPrivateUseAreaA:_xmlUCSIsSupplementaryPrivateUseAreaA,xmlUCSIsSupplementaryPrivateUseAreaB:_xmlUCSIsSupplementaryPrivateUseAreaB,xmlUCSIsSyriac:_xmlUCSIsSyriac,xmlUCSIsTagalog:_xmlUCSIsTagalog,xmlUCSIsTagbanwa:_xmlUCSIsTagbanwa,xmlUCSIsTags:_xmlUCSIsTags,xmlUCSIsTaiLe:_xmlUCSIsTaiLe,xmlUCSIsTaiXuanJingSymbols:_xmlUCSIsTaiXuanJingSymbols,xmlUCSIsTamil:_xmlUCSIsTamil,xmlUCSIsTelugu:_xmlUCSIsTelugu,xmlUCSIsThaana:_xmlUCSIsThaana,xmlUCSIsThai:_xmlUCSIsThai,xmlUCSIsTibetan:_xmlUCSIsTibetan,xmlUCSIsUgaritic:_xmlUCSIsUgaritic,xmlUCSIsUnifiedCanadianAboriginalSyllabics:_xmlUCSIsUnifiedCanadianAboriginalSyllabics,xmlUCSIsVariationSelectors:_xmlUCSIsVariationSelectors,xmlUCSIsVariationSelectorsSupplement:_xmlUCSIsVariationSelectorsSupplement,xmlUCSIsYiRadicals:_xmlUCSIsYiRadicals,xmlUCSIsYiSyllables:_xmlUCSIsYiSyllables,xmlUCSIsYijingHexagramSymbols:_xmlUCSIsYijingHexagramSymbols,xmlURIUnescapeString:_xmlURIUnescapeString,xmlUnlinkNode:_xmlUnlinkNode,xmlXPathBooleanFunction:_xmlXPathBooleanFunction,xmlXPathCeilingFunction:_xmlXPathCeilingFunction,xmlXPathConcatFunction:_xmlXPathConcatFunction,xmlXPathContainsFunction:_xmlXPathContainsFunction,xmlXPathCountFunction:_xmlXPathCountFunction,xmlXPathFalseFunction:_xmlXPathFalseFunction,xmlXPathFloorFunction:_xmlXPathFloorFunction,xmlXPathIdFunction:_xmlXPathIdFunction,xmlXPathLangFunction:_xmlXPathLangFunction,xmlXPathLastFunction:_xmlXPathLastFunction,xmlXPathLocalNameFunction:_xmlXPathLocalNameFunction,xmlXPathNAN:_xmlXPathNAN,xmlXPathNINF:_xmlXPathNINF,xmlXPathNamespaceURIFunction:_xmlXPathNamespaceURIFunction,xmlXPathNextAncestor:_xmlXPathNextAncestor,xmlXPathNextAncestorOrSelf:_xmlXPathNextAncestorOrSelf,xmlXPathNextAttribute:_xmlXPathNextAttribute,xmlXPathNextChild:_xmlXPathNextChild,xmlXPathNextDescendant:_xmlXPathNextDescendant,xmlXPathNextDescendantOrSelf:_xmlXPathNextDescendantOrSelf,xmlXPathNextFollowing:_xmlXPathNextFollowing,xmlXPathNextFollowingSibling:_xmlXPathNextFollowingSibling,xmlXPathNextNamespace:_xmlXPathNextNamespace,xmlXPathNextParent:_xmlXPathNextParent,xmlXPathNextPrecedingSibling:_xmlXPathNextPrecedingSibling,xmlXPathNextSelf:_xmlXPathNextSelf,xmlXPathNormalizeFunction:_xmlXPathNormalizeFunction,xmlXPathNotFunction:_xmlXPathNotFunction,xmlXPathNumberFunction:_xmlXPathNumberFunction,xmlXPathPINF:_xmlXPathPINF,xmlXPathPositionFunction:_xmlXPathPositionFunction,xmlXPathRoundFunction:_xmlXPathRoundFunction,xmlXPathStartsWithFunction:_xmlXPathStartsWithFunction,xmlXPathStringFunction:_xmlXPathStringFunction,xmlXPathStringLengthFunction:_xmlXPathStringLengthFunction,xmlXPathSubstringAfterFunction:_xmlXPathSubstringAfterFunction,xmlXPathSubstringBeforeFunction:_xmlXPathSubstringBeforeFunction,xmlXPathSubstringFunction:_xmlXPathSubstringFunction,xmlXPathSumFunction:_xmlXPathSumFunction,xmlXPathTranslateFunction:_xmlXPathTranslateFunction,xmlXPathTrueFunction:_xmlXPathTrueFunction};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["__wasm_call_ctors"])();var ___wasm_apply_data_relocs=()=>(___wasm_apply_data_relocs=wasmExports["__wasm_apply_data_relocs"])();var _time=a0=>(_time=wasmExports["time"])(a0);var _strlen=a0=>(_strlen=wasmExports["strlen"])(a0);var _memcmp=(a0,a1,a2)=>(_memcmp=wasmExports["memcmp"])(a0,a1,a2);var _strcmp=(a0,a1)=>(_strcmp=wasmExports["strcmp"])(a0,a1);var _free=a0=>(_free=wasmExports["free"])(a0);var _strchr=(a0,a1)=>(_strchr=wasmExports["strchr"])(a0,a1);var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var _snprintf=(a0,a1,a2,a3)=>(_snprintf=wasmExports["snprintf"])(a0,a1,a2,a3);var _toupper=a0=>(_toupper=wasmExports["toupper"])(a0);var _malloc=a0=>(_malloc=wasmExports["malloc"])(a0);var _memchr=(a0,a1,a2)=>(_memchr=wasmExports["memchr"])(a0,a1,a2);var _strcpy=(a0,a1)=>(_strcpy=wasmExports["strcpy"])(a0,a1);var _stat=(a0,a1)=>(_stat=wasmExports["stat"])(a0,a1);var _strncmp=(a0,a1,a2)=>(_strncmp=wasmExports["strncmp"])(a0,a1,a2);var _strncpy=(a0,a1,a2)=>(_strncpy=wasmExports["strncpy"])(a0,a1,a2);var _main=Module["_main"]=(a0,a1)=>(_main=Module["_main"]=wasmExports["main"])(a0,a1);var _pib_init=Module["_pib_init"]=()=>(_pib_init=Module["_pib_init"]=wasmExports["pib_init"])();var _pib_storage_init=Module["_pib_storage_init"]=()=>(_pib_storage_init=Module["_pib_storage_init"]=wasmExports["pib_storage_init"])();var _pib_refresh=Module["_pib_refresh"]=()=>(_pib_refresh=Module["_pib_refresh"]=wasmExports["pib_refresh"])();var _pib_flush=Module["_pib_flush"]=()=>(_pib_flush=Module["_pib_flush"]=wasmExports["pib_flush"])();var _pib_exec=Module["_pib_exec"]=a0=>(_pib_exec=Module["_pib_exec"]=wasmExports["pib_exec"])(a0);var _pib_run=Module["_pib_run"]=a0=>(_pib_run=Module["_pib_run"]=wasmExports["pib_run"])(a0);var _pib_php_version=Module["_pib_php_version"]=()=>(_pib_php_version=Module["_pib_php_version"]=wasmExports["pib_php_version"])();var _pib_php_ext_api_version=Module["_pib_php_ext_api_version"]=()=>(_pib_php_ext_api_version=Module["_pib_php_ext_api_version"]=wasmExports["pib_php_ext_api_version"])();var _pib_tokenize=Module["_pib_tokenize"]=a0=>(_pib_tokenize=Module["_pib_tokenize"]=wasmExports["pib_tokenize"])(a0);var _close=a0=>(_close=wasmExports["close"])(a0);var _open=(a0,a1,a2)=>(_open=wasmExports["open"])(a0,a1,a2);var _strerror=a0=>(_strerror=wasmExports["strerror"])(a0);var _read=(a0,a1,a2)=>(_read=wasmExports["read"])(a0,a1,a2);var _write=(a0,a1,a2)=>(_write=wasmExports["write"])(a0,a1,a2);var _realloc=(a0,a1)=>(_realloc=wasmExports["realloc"])(a0,a1);var _strcat=(a0,a1)=>(_strcat=wasmExports["strcat"])(a0,a1);var _htonl=a0=>(_htonl=wasmExports["htonl"])(a0);var _getenv=a0=>(_getenv=wasmExports["getenv"])(a0);var _ntohs=a0=>(_ntohs=wasmExports["ntohs"])(a0);var _htons=a0=>(_htons=wasmExports["htons"])(a0);var _fopen=(a0,a1)=>(_fopen=wasmExports["fopen"])(a0,a1);var _getcwd=(a0,a1)=>(_getcwd=wasmExports["getcwd"])(a0,a1);var _dlopen=(a0,a1)=>(_dlopen=wasmExports["dlopen"])(a0,a1);var _dlerror=()=>(_dlerror=wasmExports["dlerror"])();var _dlsym=(a0,a1)=>(_dlsym=wasmExports["dlsym"])(a0,a1);var _dlclose=a0=>(_dlclose=wasmExports["dlclose"])(a0);var _fclose=a0=>(_fclose=wasmExports["fclose"])(a0);var _sscanf=(a0,a1,a2)=>(_sscanf=wasmExports["sscanf"])(a0,a1,a2);var _fileno=a0=>(_fileno=wasmExports["fileno"])(a0);var _fprintf=(a0,a1,a2)=>(_fprintf=wasmExports["fprintf"])(a0,a1,a2);var _vrzno_expose_inc_refcount=Module["_vrzno_expose_inc_refcount"]=a0=>(_vrzno_expose_inc_refcount=Module["_vrzno_expose_inc_refcount"]=wasmExports["vrzno_expose_inc_refcount"])(a0);var _vrzno_expose_dec_refcount=Module["_vrzno_expose_dec_refcount"]=a0=>(_vrzno_expose_dec_refcount=Module["_vrzno_expose_dec_refcount"]=wasmExports["vrzno_expose_dec_refcount"])(a0);var _vrzno_expose_zrefcount=Module["_vrzno_expose_zrefcount"]=a0=>(_vrzno_expose_zrefcount=Module["_vrzno_expose_zrefcount"]=wasmExports["vrzno_expose_zrefcount"])(a0);var _vrzno_expose_inc_crefcount=Module["_vrzno_expose_inc_crefcount"]=a0=>(_vrzno_expose_inc_crefcount=Module["_vrzno_expose_inc_crefcount"]=wasmExports["vrzno_expose_inc_crefcount"])(a0);var _vrzno_expose_dec_crefcount=Module["_vrzno_expose_dec_crefcount"]=a0=>(_vrzno_expose_dec_crefcount=Module["_vrzno_expose_dec_crefcount"]=wasmExports["vrzno_expose_dec_crefcount"])(a0);var _vrzno_expose_efree=Module["_vrzno_expose_efree"]=a0=>(_vrzno_expose_efree=Module["_vrzno_expose_efree"]=wasmExports["vrzno_expose_efree"])(a0);var _vrzno_expose_create_bool=Module["_vrzno_expose_create_bool"]=(a0,a1)=>(_vrzno_expose_create_bool=Module["_vrzno_expose_create_bool"]=wasmExports["vrzno_expose_create_bool"])(a0,a1);var _vrzno_expose_create_null=Module["_vrzno_expose_create_null"]=a0=>(_vrzno_expose_create_null=Module["_vrzno_expose_create_null"]=wasmExports["vrzno_expose_create_null"])(a0);var _vrzno_expose_create_undef=Module["_vrzno_expose_create_undef"]=a0=>(_vrzno_expose_create_undef=Module["_vrzno_expose_create_undef"]=wasmExports["vrzno_expose_create_undef"])(a0);var _vrzno_expose_create_long=Module["_vrzno_expose_create_long"]=(a0,a1)=>(_vrzno_expose_create_long=Module["_vrzno_expose_create_long"]=wasmExports["vrzno_expose_create_long"])(a0,a1);var _vrzno_expose_create_double=Module["_vrzno_expose_create_double"]=(a0,a1)=>(_vrzno_expose_create_double=Module["_vrzno_expose_create_double"]=wasmExports["vrzno_expose_create_double"])(a0,a1);var _vrzno_expose_create_string=Module["_vrzno_expose_create_string"]=(a0,a1)=>(_vrzno_expose_create_string=Module["_vrzno_expose_create_string"]=wasmExports["vrzno_expose_create_string"])(a0,a1);var _vrzno_expose_create_object_for_target=Module["_vrzno_expose_create_object_for_target"]=(a0,a1,a2,a3)=>(_vrzno_expose_create_object_for_target=Module["_vrzno_expose_create_object_for_target"]=wasmExports["vrzno_expose_create_object_for_target"])(a0,a1,a2,a3);var _vrzno_expose_create_params=Module["_vrzno_expose_create_params"]=a0=>(_vrzno_expose_create_params=Module["_vrzno_expose_create_params"]=wasmExports["vrzno_expose_create_params"])(a0);var _vrzno_expose_object_keys=Module["_vrzno_expose_object_keys"]=a0=>(_vrzno_expose_object_keys=Module["_vrzno_expose_object_keys"]=wasmExports["vrzno_expose_object_keys"])(a0);var _vrzno_expose_array_keys=Module["_vrzno_expose_array_keys"]=a0=>(_vrzno_expose_array_keys=Module["_vrzno_expose_array_keys"]=wasmExports["vrzno_expose_array_keys"])(a0);var _vrzno_expose_zval_deref=Module["_vrzno_expose_zval_deref"]=a0=>(_vrzno_expose_zval_deref=Module["_vrzno_expose_zval_deref"]=wasmExports["vrzno_expose_zval_deref"])(a0);var _vrzno_expose_zval_dump=Module["_vrzno_expose_zval_dump"]=(a0,a1)=>(_vrzno_expose_zval_dump=Module["_vrzno_expose_zval_dump"]=wasmExports["vrzno_expose_zval_dump"])(a0,a1);var _vrzno_expose_type=Module["_vrzno_expose_type"]=a0=>(_vrzno_expose_type=Module["_vrzno_expose_type"]=wasmExports["vrzno_expose_type"])(a0);var _vrzno_expose_array_length=Module["_vrzno_expose_array_length"]=a0=>(_vrzno_expose_array_length=Module["_vrzno_expose_array_length"]=wasmExports["vrzno_expose_array_length"])(a0);var _vrzno_expose_target=Module["_vrzno_expose_target"]=a0=>(_vrzno_expose_target=Module["_vrzno_expose_target"]=wasmExports["vrzno_expose_target"])(a0);var _vrzno_expose_callable=Module["_vrzno_expose_callable"]=a0=>(_vrzno_expose_callable=Module["_vrzno_expose_callable"]=wasmExports["vrzno_expose_callable"])(a0);var _vrzno_expose_long=Module["_vrzno_expose_long"]=a0=>(_vrzno_expose_long=Module["_vrzno_expose_long"]=wasmExports["vrzno_expose_long"])(a0);var _vrzno_expose_double=Module["_vrzno_expose_double"]=a0=>(_vrzno_expose_double=Module["_vrzno_expose_double"]=wasmExports["vrzno_expose_double"])(a0);var _vrzno_expose_string=Module["_vrzno_expose_string"]=a0=>(_vrzno_expose_string=Module["_vrzno_expose_string"]=wasmExports["vrzno_expose_string"])(a0);var _vrzno_expose_key_pointer=Module["_vrzno_expose_key_pointer"]=(a0,a1)=>(_vrzno_expose_key_pointer=Module["_vrzno_expose_key_pointer"]=wasmExports["vrzno_expose_key_pointer"])(a0,a1);var _vrzno_expose_property_pointer=Module["_vrzno_expose_property_pointer"]=(a0,a1)=>(_vrzno_expose_property_pointer=Module["_vrzno_expose_property_pointer"]=wasmExports["vrzno_expose_property_pointer"])(a0,a1);var _vrzno_expose_dimension_pointer=Module["_vrzno_expose_dimension_pointer"]=(a0,a1)=>(_vrzno_expose_dimension_pointer=Module["_vrzno_expose_dimension_pointer"]=wasmExports["vrzno_expose_dimension_pointer"])(a0,a1);var _vrzno_expose_method_pointer=Module["_vrzno_expose_method_pointer"]=(a0,a1)=>(_vrzno_expose_method_pointer=Module["_vrzno_expose_method_pointer"]=wasmExports["vrzno_expose_method_pointer"])(a0,a1);var _vrzno_exec_callback=Module["_vrzno_exec_callback"]=(a0,a1,a2,a3)=>(_vrzno_exec_callback=Module["_vrzno_exec_callback"]=wasmExports["vrzno_exec_callback"])(a0,a1,a2,a3);var _vrzno_del_callback=Module["_vrzno_del_callback"]=a0=>(_vrzno_del_callback=Module["_vrzno_del_callback"]=wasmExports["vrzno_del_callback"])(a0);var _fwrite=(a0,a1,a2,a3)=>(_fwrite=wasmExports["fwrite"])(a0,a1,a2,a3);var _fflush=a0=>(_fflush=wasmExports["fflush"])(a0);var _fread=(a0,a1,a2,a3)=>(_fread=wasmExports["fread"])(a0,a1,a2,a3);var _memset=(a0,a1,a2)=>(_memset=wasmExports["memset"])(a0,a1,a2);var ___funcs_on_exit=()=>(___funcs_on_exit=wasmExports["__funcs_on_exit"])();var _vsnprintf=(a0,a1,a2,a3)=>(_vsnprintf=wasmExports["vsnprintf"])(a0,a1,a2,a3);var ___dl_seterr=(a0,a1)=>(___dl_seterr=wasmExports["__dl_seterr"])(a0,a1);var _calloc=(a0,a1)=>(_calloc=wasmExports["calloc"])(a0,a1);var _memcpy=(a0,a1,a2)=>(_memcpy=wasmExports["memcpy"])(a0,a1,a2);var _memmove=(a0,a1,a2)=>(_memmove=wasmExports["memmove"])(a0,a1,a2);var _ferror=a0=>(_ferror=wasmExports["ferror"])(a0);var _fmod=(a0,a1)=>(_fmod=wasmExports["fmod"])(a0,a1);var _vfprintf=(a0,a1,a2)=>(_vfprintf=wasmExports["vfprintf"])(a0,a1,a2);var _fiprintf=(a0,a1,a2)=>(_fiprintf=wasmExports["fiprintf"])(a0,a1,a2);var ___small_fprintf=(a0,a1,a2)=>(___small_fprintf=wasmExports["__small_fprintf"])(a0,a1,a2);var _fputc=(a0,a1)=>(_fputc=wasmExports["fputc"])(a0,a1);var _fputs=(a0,a1)=>(_fputs=wasmExports["fputs"])(a0,a1);var _iconv_open=(a0,a1)=>(_iconv_open=wasmExports["iconv_open"])(a0,a1);var _iconv=(a0,a1,a2,a3,a4)=>(_iconv=wasmExports["iconv"])(a0,a1,a2,a3,a4);var _iconv_close=a0=>(_iconv_close=wasmExports["iconv_close"])(a0);var _log10=a0=>(_log10=wasmExports["log10"])(a0);var _emscripten_builtin_memalign=(a0,a1)=>(_emscripten_builtin_memalign=wasmExports["emscripten_builtin_memalign"])(a0,a1);var _pow=(a0,a1)=>(_pow=wasmExports["pow"])(a0,a1);var _puts=a0=>(_puts=wasmExports["puts"])(a0);var _rand_r=a0=>(_rand_r=wasmExports["rand_r"])(a0);var __emscripten_timeout=(a0,a1)=>(__emscripten_timeout=wasmExports["_emscripten_timeout"])(a0,a1);var _setThrew=(a0,a1)=>(_setThrew=wasmExports["setThrew"])(a0,a1);var __emscripten_tempret_set=a0=>(__emscripten_tempret_set=wasmExports["_emscripten_tempret_set"])(a0);var __emscripten_tempret_get=()=>(__emscripten_tempret_get=wasmExports["_emscripten_tempret_get"])();var ___get_temp_ret=()=>(___get_temp_ret=wasmExports["__get_temp_ret"])();var ___set_temp_ret=a0=>(___set_temp_ret=wasmExports["__set_temp_ret"])(a0);var _getTempRet0=()=>(_getTempRet0=wasmExports["getTempRet0"])();var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["emscripten_stack_set_limits"])(a0,a1);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["_emscripten_stack_restore"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["_emscripten_stack_alloc"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"])();var ___cxa_demangle=(a0,a1,a2,a3)=>(___cxa_demangle=wasmExports["__cxa_demangle"])(a0,a1,a2,a3);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"])(a0);var ___cxa_decrement_exception_refcount=a0=>(___cxa_decrement_exception_refcount=wasmExports["__cxa_decrement_exception_refcount"])(a0);var ___cxa_can_catch=(a0,a1,a2)=>(___cxa_can_catch=wasmExports["__cxa_can_catch"])(a0,a1,a2);var ___cxa_get_exception_ptr=a0=>(___cxa_get_exception_ptr=wasmExports["__cxa_get_exception_ptr"])(a0);var _asyncify_start_unwind=a0=>(_asyncify_start_unwind=wasmExports["asyncify_start_unwind"])(a0);var _asyncify_stop_unwind=()=>(_asyncify_stop_unwind=wasmExports["asyncify_stop_unwind"])();var _asyncify_start_rewind=a0=>(_asyncify_start_rewind=wasmExports["asyncify_start_rewind"])(a0);var _asyncify_stop_rewind=()=>(_asyncify_stop_rewind=wasmExports["asyncify_stop_rewind"])();var _stdin=Module["_stdin"]=1316048;var _stdout=Module["_stdout"]=1316200;var _stderr=Module["_stderr"]=1315896;function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{Module["dynCall_vi"](index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{Module["dynCall_v"](index)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return Module["dynCall_i"](index)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return Module["dynCall_iii"](index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{Module["dynCall_vii"](index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return Module["dynCall_ii"](index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return Module["dynCall_iiiii"](index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return Module["dynCall_iiiiii"](index,a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return Module["dynCall_iiiiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return Module["dynCall_iiiiiiii"](index,a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return Module["dynCall_iiiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function applySignatureConversions(wasmExports){wasmExports=Object.assign({},wasmExports);var makeWrapper_p=f=>()=>f()>>>0;var makeWrapper_pp=f=>a0=>f(a0)>>>0;var makeWrapper_p_=f=>a0=>f(a0)>>>0;var makeWrapper_pppp=f=>(a0,a1,a2)=>f(a0,a1,a2)>>>0;var makeWrapper_ppp=f=>(a0,a1)=>f(a0,a1)>>>0;var makeWrapper_pP=f=>a0=>f(a0)>>>0;wasmExports["__errno_location"]=makeWrapper_p(wasmExports["__errno_location"]);wasmExports["malloc"]=makeWrapper_pp(wasmExports["malloc"]);wasmExports["strerror"]=makeWrapper_p_(wasmExports["strerror"]);wasmExports["emscripten_builtin_malloc"]=makeWrapper_pp(wasmExports["emscripten_builtin_malloc"]);wasmExports["memcpy"]=makeWrapper_pppp(wasmExports["memcpy"]);wasmExports["calloc"]=makeWrapper_ppp(wasmExports["calloc"]);wasmExports["emscripten_stack_get_base"]=makeWrapper_p(wasmExports["emscripten_stack_get_base"]);wasmExports["emscripten_stack_get_end"]=makeWrapper_p(wasmExports["emscripten_stack_get_end"]);wasmExports["emscripten_builtin_memalign"]=makeWrapper_ppp(wasmExports["emscripten_builtin_memalign"]);wasmExports["emscripten_stack_get_current"]=makeWrapper_p(wasmExports["emscripten_stack_get_current"]);wasmExports["pthread_self"]=makeWrapper_p(wasmExports["pthread_self"]);wasmExports["emscripten_main_runtime_thread_id"]=makeWrapper_p(wasmExports["emscripten_main_runtime_thread_id"]);wasmExports["sbrk"]=makeWrapper_pP(wasmExports["sbrk"]);wasmExports["memalign"]=makeWrapper_ppp(wasmExports["memalign"]);wasmExports["emscripten_builtin_calloc"]=makeWrapper_ppp(wasmExports["emscripten_builtin_calloc"]);wasmExports["_emscripten_stack_alloc"]=makeWrapper_pp(wasmExports["_emscripten_stack_alloc"]);wasmExports["__cxa_get_exception_ptr"]=makeWrapper_pp(wasmExports["__cxa_get_exception_ptr"]);return wasmExports}Module["addRunDependency"]=addRunDependency;Module["removeRunDependency"]=removeRunDependency;Module["ENV"]=ENV;Module["ccall"]=ccall;Module["getValue"]=getValue;Module["UTF8ToString"]=UTF8ToString;Module["lengthBytesUTF8"]=lengthBytesUTF8;Module["FS_createPreloadedFile"]=FS_createPreloadedFile;Module["FS_unlink"]=FS_unlink;Module["FS_createPath"]=FS_createPath;Module["FS_createDevice"]=FS_createDevice;Module["FS"]=FS;Module["FS_createDataFile"]=FS_createDataFile;Module["FS_createLazyFile"]=FS_createLazyFile;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args=[]){var entryFunction=resolveGlobalSymbol("main").sym;if(!entryFunction)return;args.unshift(thisProgram);var argc=args.length;var argv=stackAlloc((argc+1)*4);var argv_ptr=argv;args.forEach(arg=>{HEAPU32[argv_ptr>>>2>>>0]=stringToUTF8OnStack(arg);argv_ptr+=4});HEAPU32[argv_ptr>>>2>>>0]=0;try{var ret=entryFunction(argc,argv);exitJS(ret,true);return ret}catch(e){return handleException(e)}}function run(args=arguments_){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();readyPromiseResolve(Module);Module["onRuntimeInitialized"]?.();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=false;if(Module["noInitialRun"])shouldRunNow=false;run();moduleRtn=readyPromise; - - - return moduleRtn; -} -); -})(); -export default PHP; diff --git a/docs/static/php-web.mjs.wasm b/docs/static/php-web.mjs.wasm deleted file mode 100755 index bc2b560a..00000000 Binary files a/docs/static/php-web.mjs.wasm and /dev/null differ diff --git a/docs/static/phpinfo.html b/docs/static/phpinfo.html index ac0a071b..621eb453 100644 --- a/docs/static/phpinfo.html +++ b/docs/static/phpinfo.html @@ -1,22 +1,55 @@ - - - + - - + +

php-wasm & pglite in html

+

https://github.com/seanmorris/php-wasm

+

+		
diff --git a/docs/static/resolveDependencies.mjs b/docs/static/resolveDependencies.mjs deleted file mode 100644 index 8910d554..00000000 --- a/docs/static/resolveDependencies.mjs +++ /dev/null @@ -1,80 +0,0 @@ -/** - * An object representing files, libs and urlLibs for a shared library. - * @typedef {object} ResolvedDependencies - * @property {FileDef[]} files - * @property {LibDef[]} libs - * @property {Object} urlLibs mapping of resource names to URLs - */ - -/** - * Resolves dependencies related to dynamically loaded shared libs. - * Normalizes LibDefs & FileDefs, and extracts URLs to specified resources. - * @param {LibDef[]} sharedLibs List of LibDefs to resolve dependencies for. - * @param {object} wrapper PHP Object to resolve depencencies for. - * @returns {ResolvedDependencies} Normalized LibDefs, FileDefs, and their URLs. - */ -export const resolveDependencies = (sharedLibs, wrapper) => { - const _files = []; - const _libs = []; - - (sharedLibs || []).forEach(libDef => { - if(typeof libDef === 'object') - { - if(typeof libDef.getLibs === 'function') - { - _libs.push(...libDef.getLibs(wrapper.constructor)); - } - else - { - _libs.push(libDef); - } - - if(typeof libDef.getFiles === 'function') - { - _files.push(...libDef.getFiles(wrapper.constructor)); - } - } - else - { - _libs.push(libDef); - } - }); - - const files = _files.map(fileDef => { - const url = String(fileDef.url); - const path = fileDef.path; - const name = fileDef.name || path.split('/').pop(); - const parent = path.substr(0, path.length - name.length); - return {parent, name, url}; - }); - - const urlLibs = {}; - - const libs = _libs.map(libDef => { - if(typeof libDef === 'string' || libDef instanceof URL) - { - if(libDef.substr(0, 1) == '/' - || libDef.substr(0, 2) == './' - || libDef.substr(0, 8) == 'https://' - || libDef.substr(0, 7) == 'http://' - ){ - const name = String(libDef).split('/').pop(); - const url = libDef - urlLibs[name] = url; - - return {name, url, ini: true}; - } - - return libDef; - } - else if(typeof libDef === 'object') - { - const name = libDef.name ?? String(libDef.url).split('/').pop(); - urlLibs[ name ] = libDef.url; - - return libDef; - } - }); - - return {files, libs, urlLibs}; -}; diff --git a/docs/static/webTransactions.mjs b/docs/static/webTransactions.mjs deleted file mode 100644 index 7f648824..00000000 --- a/docs/static/webTransactions.mjs +++ /dev/null @@ -1,52 +0,0 @@ -export async function startTransaction(wrapper) -{ - const php = await wrapper.binary; - - if(wrapper.transactionStarted || !php.persist) - { - return; - } - - return await new Promise((accept, reject) => { - return php.FS.syncfs(true, error => { - if(error) - { - reject(error); - } - else - { - wrapper.transactionStarted = true; - accept(); - } - }); - }); -} - -export async function commitTransaction(wrapper) -{ - const php = await wrapper.binary; - - if(!php.persist) - { - return; - } - - if(!wrapper.transactionStarted) - { - throw new Error('No transaction initialized.'); - } - - return await new Promise((accept, reject) => { - return php.FS.syncfs(false, error => { - if(error) - { - reject(error); - } - else - { - wrapper.transactionStarted = false; - accept(); - } - } - )}); -}