From bc08d9a9c4b1f5088281d6ee86335478b2429af0 Mon Sep 17 00:00:00 2001
From: Kirigaya <1193466151@qq.com>
Date: Tue, 21 Nov 2023 22:50:07 +0800
Subject: [PATCH] update
---
CHANGELOG.md | 4 +-
package.json | 1994 ++++++++++++++--------------
package.nls.json | 7 +-
resources/hdlParser/parser.js | 10 +-
resources/hdlParser/parser.wasm | Bin 2002984 -> 2599478 bytes
src/function/lsp/linter/base.ts | 15 +
src/function/lsp/linter/default.ts | 165 +++
src/function/lsp/linter/index.ts | 7 +-
src/function/lsp/linter/vhdl.ts | 18 +
src/function/lsp/linter/vivado.ts | 242 +++-
src/function/lsp/linter/vlog.ts | 82 +-
src/global/index.ts | 3 +-
src/global/outputChannel.ts | 2 +
src/global/util.ts | 29 +-
14 files changed, 1489 insertions(+), 1089 deletions(-)
create mode 100644 src/function/lsp/linter/base.ts
create mode 100644 src/function/lsp/linter/default.ts
create mode 100644 src/function/lsp/linter/vhdl.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec0d5ac..0b8fb88 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,8 +14,8 @@ Bug 修复
Feat
- 增加对 XDC,TCL 等脚本的 LSP 支持
- 增加 verilog, vhdl, xdc, tcl 等语言的图标
-- 增加对于 vivado 的支持,用户可以通过添加 vivado 路径的方式来使用 vivado 的仿真和自动纠错
-
+- 增加对于 vivado 的支持,用户可以通过添加 vivado 路径的方式(或者将 bin 文件夹添加到环境变量,默认路径为 C:\Xilinx\Vivado\2018.3\bin)来使用 vivado 的仿真和自动纠错
+- 增加对于 modelsim 的支持,用户可以通过添加 modelsim 安装路径(或者将 bin 文件夹添加到环境变量,默认路径为 C:\modeltech64_10.4\win64)来使用 vivado 的仿真和自动纠错
## [0.1.23] - 2022-12-24
- Finish the css of documentation, see `./css/documentation.css` for detail.
diff --git a/package.json b/package.json
index abd70e1..015182c 100644
--- a/package.json
+++ b/package.json
@@ -1,67 +1,67 @@
{
- "name": "fpga-support",
- "displayName": "Digital IDE",
- "description": "all in one vscode plugin for Verilog/VHDL development",
- "publisher": "sterben",
- "homepage": "https://digital-eda.github.io/DIDE-doc-Cn",
- "version": "0.3.1",
- "main": "./out/extension",
- "icon": "images/icon.png",
- "engines": {
- "vscode": "^1.72.0"
- },
- "keywords": [
- "FPGA Develop Support",
- "FPGA",
- "ASIC",
- "IC",
- "Digital",
- "HDL",
- "Systemverilog",
- "Verilog",
- "VHDL",
- "Vivado",
- "Xilinx"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/Digital-EDA/Digital-IDE"
- },
- "categories": [
- "Extension Packs",
- "Programming Languages",
- "Snippets"
- ],
- "activationEvents": [
- "onLanguage:verilog",
- "onLanguage:vhdl",
- "onLanguage:systemverilog",
- "onCommand:digital-ide.property-json.generate",
- "onCommand:digital-ide.property-json.overwrite",
- "workspaceContains:.vscode/property.json"
- ],
- "contributes": {
- "configuration": {
- "title": "Digital-IDE",
- "properties": {
- "prj.lib.custom.path": {
- "scope": "window",
- "type": "string",
- "default": "",
- "description": "path of the dictionary of \"custom\" in library"
- },
- "prj.file.structure.notice": {
- "scope": "window",
- "type": "boolean",
- "default": true,
- "description": "notice when change file structure"
- },
- "prj.vivado.install.path": {
- "scope": "window",
- "type": "string",
- "default": "",
- "description": "set the xilinx install path. \n e.g. : D:/APP/vivado_18_3/Vivado/2018.3/bin \n This applies only to WIN For other systems, add it to environment variables"
- },
+ "name": "fpga-support",
+ "displayName": "Digital IDE",
+ "description": "all in one vscode plugin for Verilog/VHDL development",
+ "publisher": "sterben",
+ "homepage": "https://digital-eda.github.io/DIDE-doc-Cn",
+ "version": "0.3.1",
+ "main": "./out/extension",
+ "icon": "images/icon.png",
+ "engines": {
+ "vscode": "^1.72.0"
+ },
+ "keywords": [
+ "FPGA Develop Support",
+ "FPGA",
+ "ASIC",
+ "IC",
+ "Digital",
+ "HDL",
+ "Systemverilog",
+ "Verilog",
+ "VHDL",
+ "Vivado",
+ "Xilinx"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Digital-EDA/Digital-IDE"
+ },
+ "categories": [
+ "Extension Packs",
+ "Programming Languages",
+ "Snippets"
+ ],
+ "activationEvents": [
+ "onLanguage:verilog",
+ "onLanguage:vhdl",
+ "onLanguage:systemverilog",
+ "onCommand:digital-ide.property-json.generate",
+ "onCommand:digital-ide.property-json.overwrite",
+ "workspaceContains:.vscode/property.json"
+ ],
+ "contributes": {
+ "configuration": {
+ "title": "Digital-IDE",
+ "properties": {
+ "prj.lib.custom.path": {
+ "scope": "window",
+ "type": "string",
+ "default": "",
+ "description": "path of the dictionary of \"custom\" in library"
+ },
+ "prj.file.structure.notice": {
+ "scope": "window",
+ "type": "boolean",
+ "default": true,
+ "description": "notice when change file structure"
+ },
+ "prj.vivado.install.path": {
+ "scope": "window",
+ "type": "string",
+ "default": "",
+ "description": "set the xilinx install path. \n e.g. : D:/APP/vivado_18_3/Vivado/2018.3/bin \n Default path is C:/Xilinx/Vivado/2018.3/bin \n This applies only to WIN For other systems, add it to environment variables"
+ },
"prj.xilinx.IP.repo.path": {
"scope": "window",
"type": "string",
@@ -74,964 +74,976 @@
"default": "",
"description": "User-defined placement path for xilinx block design files"
},
- "prj.xsdk.install.path": {
+ "prj.xsdk.install.path": {
"scope": "window",
"type": "string",
"default": ""
},
- "function.doc.webview.backgroundImage": {
- "type": "string",
- "default": "",
- "description": "url of the background image"
- },
- "function.doc.pdf.scale": {
- "type": "number",
- "default": 1,
- "description": "scale of the exported pdf"
- },
- "function.doc.pdf.printBackground": {
- "type": "boolean",
- "default": true,
- "description": "whether print background"
- },
- "function.doc.pdf.landscape": {
- "type": "boolean",
- "default": false,
- "description": "whether export pdf as a landscape style"
- },
- "function.doc.pdf.format": {
- "type": "string",
- "default": "A4",
- "description": "format of pdf size"
- },
- "function.doc.pdf.displayHeaderFooter": {
- "type": "boolean",
- "default": false,
- "description": "display header and footer in the exported pdf"
- },
- "function.doc.pdf.browserPath": {
- "type": "string",
- "default": "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe",
- "description": "the absolute path of edge or chrome, we need browser to render pdf"
- },
- "function.doc.pdf.margin.top": {
- "type": "number",
- "default": 0.5,
- "description": "top margin of exported pdf, unit cm"
- },
- "function.doc.pdf.margin.right": {
- "type": "number",
- "default": 0.5,
- "description": "top margin of exported pdf, unit cm"
- },
- "function.doc.pdf.margin.bottom": {
- "type": "number",
- "default": 0.5,
- "description": "top margin of exported pdf, unit cm"
- },
- "function.doc.pdf.margin.left": {
- "type": "number",
- "default": 0.5,
- "description": "top margin of exported pdf, unit cm"
- },
- "function.doc.pdf.headerTemplate": {
- "type": "string",
- "default": "
",
- "description": "html template of header, if displayHeaderFooter is set to false, this setting will be ignored"
- },
- "function.doc.pdf.footerTemplate": {
- "type": "string",
- "default": "
",
- "description": "html template of footer, if displayHeaderFooter is set to false, this setting will be ignored"
- },
- "function.simulate.icarus.installPath": {
- "type": "string",
- "description": "Path of install path of iverilog components, if set to \"\", then iverilog and vvp in environment will be used for simulation. Otherwise, ones that in the install path will be used."
- },
- "function.simulate.simulationHome": {
- "type": "string",
- "description": "Path of simulation folder, .vvp and other file during simulation will be generated here"
- },
- "function.simulate.gtkwavePath": {
- "type": "string",
- "default": "gtkwave",
- "description": "Absolute path of launch path of gtkwave software"
- },
- "function.simulate.xilinxLibPath": {
- "type": "string",
- "description": "Path of Xilinx library for simulation"
- },
- "function.simulate.runInTerminal": {
- "type": "boolean",
- "default": false,
- "description": "run the simulation command in terminal instead of output"
- },
- "function.lsp.formatter.vlog.default.style": {
- "scope": "window",
- "type": "string",
- "enum": [
- "kr",
- "ansi",
- "gnu"
- ],
- "default": "kr",
- "description": "Select the verilog and systemverilog formatter style."
- },
- "function.lsp.formatter.vlog.default.args": {
- "scope": "window",
- "type": "string",
- "default": "",
- "description": "Add verilog formatter arguments here (like istyle)."
- },
- "function.lsp.formatter.vhdl.default.keyword-case": {
- "description": "Keyword case",
- "type": "string",
- "default": "LowerCase",
- "enum": [
- "LowerCase",
- "UpperCase"
- ]
- },
- "function.lsp.formatter.vhdl.default.align-comments": {
- "description": "Align comments",
- "type": "boolean",
- "default": false
- },
- "function.lsp.formatter.vhdl.default.type-name-case": {
- "description": "Type name case",
- "type": "string",
- "default": "LowerCase",
- "enum": [
- "LowerCase",
- "UpperCase"
- ]
- },
- "function.lsp.formatter.vhdl.default.indentation": {
- "description": "Indentation",
- "type": "number",
- "default": 4
- },
- "function.lsp.completion.vlog.autoAddInclude": {
- "description": "`include \"xxx.v\" will be added to the top of the file automatically",
- "type": "boolean",
- "default": true
- },
- "function.lsp.completion.vlog.completeWholeInstante": {
- "description": "complete everything invoking a module needs including paramters and ports",
- "type": "boolean",
- "default": true
- },
- "function.instantiation.addComment": {
- "description": "add comment like // ports, // input, // output when doing instantiation, including completion for module invoking",
- "type": "boolean",
- "default": true
- },
- "function.instantiation.autoNetOutputDeclaration": {
- "description": "auto declare output type nets in the scope when instantiation happens.",
- "type": "boolean",
- "default": true
- }
- }
- },
- "commands": [
- {
- "command": "digital-ide.property-json.generate",
- "title": "%digital-ide.property-json.generate.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.property-json.overwrite",
- "title": "%digital-ide.property-json.overwrite.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.hdlDoc.exportFile",
- "title": "%digital-ide.hdlDoc.exportFile.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.hdlDoc.exportProject",
- "title": "%digital-ide.hdlDoc.exportProject.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.hdlDoc.showWebview",
- "title": "%digital-ide.hdlDoc.showWebview.title%",
- "category": "Digital-IDE",
- "icon": {
- "light": "images/svg/light/documentation.svg",
- "dark": "images/svg/dark/documentation.svg"
- }
- },
- {
- "command": "digital-ide.tool.instance",
- "title": "%digital-ide.tool.instance.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.tool.testbench",
- "title": "%digital-ide.tool.testbench.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.tool.icarus.simulateFile",
- "title": "%digital-ide.tool.icarus.simulateFile.title%",
- "category": "Digital-IDE",
- "icon": {
- "light": "images/svg/light/debug.svg",
- "dark": "images/svg/dark/debug.svg"
- }
- },
- {
- "command": "digital-ide.pickLibrary",
- "title": "%digital-ide.pickLibrary.title%",
- "icon": {
- "light": "images/svg/light/library.svg",
- "dark": "images/svg/dark/library.svg"
- },
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.treeView.arch.expand",
- "category": "tool",
- "icon": "$(expand-all)",
- "title": "%digital-ide.treeView.arch.expand.title%"
- },
- {
- "command": "digital-ide.treeView.arch.collapse",
- "category": "tool",
- "icon": "$(collapse-all)",
- "title": "%digital-ide.treeView.arch.collapse.title%"
- },
- {
- "command": "digital-ide.treeView.arch.refresh",
- "category": "tool",
- "icon": "$(refresh)",
- "title": "%digital-ide.treeView.arch.refresh.title%"
- },
- {
- "command": "digital-ide.treeView.arch.openFile",
- "category": "tool",
- "title": "%digital-ide.treeView.arch.openFile.title%"
- },
- {
- "command": "digital-ide.tool.clean",
- "category": "tool",
- "title": "%digital-ide.tool.clean.title%"
- },
- {
- "command": "digital-ide.soft.launch",
- "category": "tool",
- "title": "%digital-ide.soft.launch.title%"
- },
- {
- "command": "digital-ide.soft.build",
- "category": "tool",
- "title": "%digital-ide.soft.build.title%"
- },
- {
- "command": "digital-ide.soft.download",
- "category": "tool",
- "title": "%digital-ide.soft.download.title%"
- },
- {
- "command": "digital-ide.hard.launch",
- "category": "tool",
- "title": "%digital-ide.hard.launch.title%"
- },
- {
- "command": "digital-ide.hard.simulate",
- "category": "tool",
- "title": "%digital-ide.hard.simulate.title%"
- },
- {
- "command": "digital-ide.hard.simulate.cli",
- "category": "tool",
- "title": "%digital-ide.hard.simulate.cli.title%"
- },
- {
- "command": "digital-ide.hard.simulate.gui",
- "category": "tool",
- "title": "%digital-ide.hard.simulate.gui.title%"
- },
- {
- "command": "digital-ide.hard.refresh",
- "category": "tool",
- "title": "%digital-ide.hard.refresh.title%"
- },
- {
- "command": "digital-ide.hard.build",
- "category": "tool",
- "title": "%digital-ide.hard.build.title%"
- },
- {
- "command": "digital-ide.hard.build.synth",
- "category": "tool",
- "title": "%digital-ide.hard.build.synth.title%"
- },
- {
- "command": "digital-ide.hard.build.impl",
- "category": "tool",
- "title": "%digital-ide.hard.build.impl.title%"
- },
- {
- "command": "digital-ide.hard.build.bitstream",
- "category": "tool",
- "title": "%digital-ide.hard.build.bitstream.title%"
- },
- {
- "command": "digital-ide.hard.program",
- "category": "tool",
- "title": "%digital-ide.hard.program.title%"
- },
- {
- "command": "digital-ide.hard.gui",
- "category": "tool",
- "title": "%digital-ide.hard.gui.title%"
- },
- {
- "command": "digital-ide.hard.exit",
- "category": "tool",
- "title": "%digital-ide.hard.exit.title%"
- },
- {
- "command": "digital-ide.pl.setSrcTop",
- "category": "pl",
- "title": "%digital-ide.pl.setSrcTop.title%"
- },
- {
- "command": "digital-ide.pl.setSimTop",
- "category": "pl",
- "title": "%digital-ide.pl.setSimTop.title%"
- },
- {
- "command": "digital-ide.pl.addDevice",
- "category": "pl",
- "title": "%digital-ide.pl.addDevice.title%"
- },
- {
- "command": "digital-ide.pl.delDevice",
- "category": "pl",
- "title": "%digital-ide.pl.delDevice.title%"
- },
- {
- "command": "digital-ide.pl.addFile",
- "category": "pl",
- "title": "%digital-ide.pl.addFile.title%"
- },
- {
- "command": "digital-ide.pl.delFile",
- "category": "pl",
- "title": "%digital-ide.pl.delFile.title%"
- },
- {
- "command": "digital-ide.netlist",
- "icon": {
- "light": "images/svg/light/netlist.svg",
- "dark": "images/svg/dark/netlist.svg"
- },
- "category": "Digital-IDE",
- "title": "%digital-ide.netlist.title%"
- },
- {
- "command": "digital-ide.fsm",
- "icon": {
- "light": "images/svg/light/fsm.svg",
- "dark": "images/svg/dark/fsm.svg"
- },
- "category": "Digital-IDE",
- "title": "%digital-ide.fsm.title%"
- },
- {
- "command": "digital-ide.lsp.tool.insertTextToUri",
- "title": "%digital-ide.lsp.tool.insertTextToUri.title%",
- "category": "Digital-IDE"
- },
- {
- "command": "digital-ide.lsp.tool.transformOldPropertyFile",
- "title": "%digital-ide.lsp.tool.transformOldPropertyFile.title%",
- "category": "Digital-IDE"
- },
+ "function.doc.webview.backgroundImage": {
+ "type": "string",
+ "default": "",
+ "description": "url of the background image"
+ },
+ "function.doc.pdf.scale": {
+ "type": "number",
+ "default": 1,
+ "description": "scale of the exported pdf"
+ },
+ "function.doc.pdf.printBackground": {
+ "type": "boolean",
+ "default": true,
+ "description": "whether print background"
+ },
+ "function.doc.pdf.landscape": {
+ "type": "boolean",
+ "default": false,
+ "description": "whether export pdf as a landscape style"
+ },
+ "function.doc.pdf.format": {
+ "type": "string",
+ "default": "A4",
+ "description": "format of pdf size"
+ },
+ "function.doc.pdf.displayHeaderFooter": {
+ "type": "boolean",
+ "default": false,
+ "description": "display header and footer in the exported pdf"
+ },
+ "function.doc.pdf.browserPath": {
+ "type": "string",
+ "default": "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe",
+ "description": "the absolute path of edge or chrome, we need browser to render pdf"
+ },
+ "function.doc.pdf.margin.top": {
+ "type": "number",
+ "default": 0.5,
+ "description": "top margin of exported pdf, unit cm"
+ },
+ "function.doc.pdf.margin.right": {
+ "type": "number",
+ "default": 0.5,
+ "description": "top margin of exported pdf, unit cm"
+ },
+ "function.doc.pdf.margin.bottom": {
+ "type": "number",
+ "default": 0.5,
+ "description": "top margin of exported pdf, unit cm"
+ },
+ "function.doc.pdf.margin.left": {
+ "type": "number",
+ "default": 0.5,
+ "description": "top margin of exported pdf, unit cm"
+ },
+ "function.doc.pdf.headerTemplate": {
+ "type": "string",
+ "default": "
",
+ "description": "html template of header, if displayHeaderFooter is set to false, this setting will be ignored"
+ },
+ "function.doc.pdf.footerTemplate": {
+ "type": "string",
+ "default": "
",
+ "description": "html template of footer, if displayHeaderFooter is set to false, this setting will be ignored"
+ },
+ "function.simulate.icarus.installPath": {
+ "type": "string",
+ "description": "Path of install path of iverilog components, if set to \"\", then iverilog and vvp in environment will be used for simulation. Otherwise, ones that in the install path will be used."
+ },
+ "function.simulate.simulationHome": {
+ "type": "string",
+ "description": "Path of simulation folder, .vvp and other file during simulation will be generated here"
+ },
+ "function.simulate.gtkwavePath": {
+ "type": "string",
+ "default": "gtkwave",
+ "description": "Absolute path of launch path of gtkwave software"
+ },
+ "function.simulate.xilinxLibPath": {
+ "type": "string",
+ "description": "Path of Xilinx library for simulation"
+ },
+ "function.simulate.runInTerminal": {
+ "type": "boolean",
+ "default": false,
+ "description": "run the simulation command in terminal instead of output"
+ },
+ "function.lsp.formatter.vlog.default.style": {
+ "scope": "window",
+ "type": "string",
+ "enum": [
+ "kr",
+ "ansi",
+ "gnu"
+ ],
+ "default": "kr",
+ "description": "Select the verilog and systemverilog formatter style."
+ },
+ "function.lsp.formatter.vlog.default.args": {
+ "scope": "window",
+ "type": "string",
+ "default": "",
+ "description": "Add verilog formatter arguments here (like istyle)."
+ },
+ "function.lsp.formatter.vhdl.default.keyword-case": {
+ "description": "Keyword case",
+ "type": "string",
+ "default": "LowerCase",
+ "enum": [
+ "LowerCase",
+ "UpperCase"
+ ]
+ },
+ "function.lsp.formatter.vhdl.default.align-comments": {
+ "description": "Align comments",
+ "type": "boolean",
+ "default": false
+ },
+ "function.lsp.formatter.vhdl.default.type-name-case": {
+ "description": "Type name case",
+ "type": "string",
+ "default": "LowerCase",
+ "enum": [
+ "LowerCase",
+ "UpperCase"
+ ]
+ },
+ "function.lsp.formatter.vhdl.default.indentation": {
+ "description": "Indentation",
+ "type": "number",
+ "default": 4
+ },
+ "function.lsp.completion.vlog.autoAddInclude": {
+ "description": "`include \"xxx.v\" will be added to the top of the file automatically",
+ "type": "boolean",
+ "default": true
+ },
+ "function.lsp.completion.vlog.completeWholeInstante": {
+ "description": "complete everything invoking a module needs including paramters and ports",
+ "type": "boolean",
+ "default": true
+ },
+ "function.lsp.linter.vlog.diagnostor": {
+ "type": "string",
+ "enumDescriptions": [
+ "use diagnostor in vivado",
+ "use diagnostor in modelsim",
+ "use our buildin diagnostor"
+ ],
+ "enum": [
+ "vivado",
+ "modelsim",
+ "default"
+ ],
+ "default": "default",
+ "description": "choose diagnostor to do linter in editing verilog"
+ },
+ "function.lsp.linter.vhdl.diagnostor": {
+ "type": "string",
+ "enumDescriptions": [
+ "use diagnostor in vivado",
+ "use diagnostor in modelsim",
+ "use our buildin diagnostor"
+ ],
+ "enum": [
+ "vivado",
+ "modelsim",
+ "default"
+ ],
+ "default": "default",
+ "description": "choose diagnostor to do linter in editing vhdl"
+ },
+ "function.lsp.linter.systemverilog.diagnostor": {
+ "type": "string",
+ "enumDescriptions": [
+ "use diagnostor in vivado",
+ "use diagnostor in modelsim",
+ "use our buildin diagnostor"
+ ],
+ "enum": [
+ "vivado",
+ "modelsim",
+ "default"
+ ],
+ "default": "default",
+ "description": "choose diagnostor to do linter in editing systemverilog"
+ },
+ "function.instantiation.addComment": {
+ "description": "add comment like // ports, // input, // output when doing instantiation, including completion for module invoking",
+ "type": "boolean",
+ "default": true
+ },
+ "function.instantiation.autoNetOutputDeclaration": {
+ "description": "auto declare output type nets in the scope when instantiation happens.",
+ "type": "boolean",
+ "default": true
+ }
+ }
+ },
+ "commands": [
{
- "command": "digital-ide.lsp.verilog.linter",
- "title": "%digital-ide.lsp.verilog.linter.title%",
- "type": "string",
- "enum": [
- "vivado",
- "modelsim",
- "default"
- ],
+ "command": "digital-ide.property-json.generate",
+ "title": "%digital-ide.property-json.generate.title%",
"category": "Digital-IDE"
},
{
- "command": "digital-ide.lsp.vhdl.linter",
- "title": "%digital-ide.lsp.vhdl.linter.title%",
- "type": "string",
- "enum": [
- "vivado",
- "modelsim",
- "default"
- ],
+ "command": "digital-ide.property-json.overwrite",
+ "title": "%digital-ide.property-json.overwrite.title%",
"category": "Digital-IDE"
},
{
- "command": "digital-ide.lsp.systemverilog.linter",
- "title": "%digital-ide.lsp.systemverilog.linter.title%",
- "type": "string",
- "enum": [
- "vivado",
- "modelsim",
- "default"
- ],
+ "command": "digital-ide.hdlDoc.exportFile",
+ "title": "%digital-ide.hdlDoc.exportFile.title%",
"category": "Digital-IDE"
- },
- {
- "command": "digital-ide.vhdl2vlog",
- "title": "%digital-ide.vhdl2vlog.title%",
- "category": "Digital-IDE",
- "icon": {
- "light": "images/svg/light/translate.svg",
- "dark": "images/svg/dark/translate.svg"
- }
- },
- {
- "command": "digital-ide.fsm.show",
- "icon": {
- "light": "images/svg/light/fsm.svg",
- "dark": "images/svg/dark/fsm.svg"
- },
- "category": "Digital-IDE",
- "title": "%digital-ide.fsm.show.title%"
- },
- {
- "command": "digital-ide.netlist.show",
- "icon": {
- "light": "images/svg/light/netlist.svg",
- "dark": "images/svg/dark/netlist.svg"
- },
- "category": "Digital-IDE",
- "title": "%digital-ide.netlist.show.title%"
- }
- ],
- "menus": {
- "view/title": [
- {
- "command": "digital-ide.treeView.arch.collapse",
- "group": "navigation",
- "when": "view == digital-ide-treeView-arch"
- },
- {
- "command": "digital-ide.pickLibrary",
- "group": "navigation",
- "when": "view == digital-ide-treeView-arch"
- },
- {
- "command": "digital-ide.treeView.arch.refresh",
- "group": "navigation",
- "when": "view == digital-ide-treeView-arch"
- }
- ],
- "view/item/context": [
- {
- "command": "digital-ide.tool.icarus.simulateFile",
- "group": "inline@1",
- "when": "view == digital-ide-treeView-arch && viewItem == file"
- },
- {
- "command": "digital-ide.netlist.show",
- "group": "inline@3",
- "when": "view == digital-ide-treeView-arch && viewItem == file"
- },
- {
- "command": "digital-ide.pl.setSrcTop",
- "group": "navigation@1",
- "when": "view == digital-ide-treeView-arch && viewItem == file"
- },
- {
- "command": "digital-ide.pl.setSimTop",
- "group": "navigation@2",
- "when": "view == digital-ide-treeView-arch && viewItem == file"
- },
- {
- "command": "digital-ide.tool.icarus.simulateFile",
- "group": "navigation@3",
- "when": "view == digital-ide-treeView-arch && viewItem == file"
- }
- ],
- "editor/title": [
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.tool.icarus.simulateFile",
- "group": "navigation@1"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.fsm.show",
- "group": "navigation@2"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.netlist.show",
- "group": "navigation@3"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.hdlDoc.showWebview",
- "group": "navigation@4"
- },
- {
- "when": "resourceLangId == vhdl",
- "command": "digital-ide.vhdl2vlog",
- "group": "navigation@5"
- }
- ],
- "editor/context": [
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.pl.setSrcTop",
- "group": "navigation@1"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.pl.setSimTop",
- "group": "navigation@2"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.tool.instance",
- "group": "navigation@3"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.tool.testbench",
- "group": "navigation@4"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.tool.icarus.simulateFile",
- "group": "navigation@5"
- },
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.netlist.show",
- "group": "navigation@6"
- },
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.fsm.show",
- "group": "navigation@7"
- },
- {
- "when": "resourceLangId == vhdl",
- "command": "digital-ide.vhdl2vlog",
- "group": "navigation@8"
- }
- ],
- "explorer/context": [
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.pl.setSrcTop",
- "group": "navigation@5"
- },
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.pl.setSimTop",
- "group": "navigation@6"
- },
- {
- "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
- "command": "digital-ide.tool.testbench",
- "group": "navigation@7"
- },
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.tool.instance",
- "group": "navigation@8"
- },
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.netlist.show",
- "group": "navigation@9"
- },
- {
- "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
- "command": "digital-ide.fsm.show",
- "group": "navigation@10"
- },
- {
- "when": "resourceLangId == vhdl",
- "command": "digital-ide.vhdl2vlog",
- "group": "navigation@11"
- }
- ]
- },
- "viewsContainers": {
- "activitybar": [
- {
- "id": "TreeView",
- "title": "Digital-IDE: TreeView",
- "icon": "images/svg/view.svg"
- }
- ]
- },
- "views": {
- "TreeView": [
- {
- "id": "digital-ide-treeView-arch",
- "name": "architecture"
- },
- {
- "id": "digital-ide-treeView-tool",
- "name": "TOOL Options"
- },
- {
- "id": "digital-ide-treeView-hardware",
- "name": "HARD Options"
- }
- ]
- },
- "keybindings": [
- {
- "command": "digital-ide.tool.instance",
- "key": "alt+i",
- "mac": "alt+i",
- "when": "editorTextFocus"
- },
- {
- "command": "digital-ide.tool.testbench",
- "key": "alt+t",
- "mac": "alt+t",
- "when": "editorTextFocus"
- }
- ],
- "languages": [
- {
- "id": "tcl",
- "aliases": [
- "TCL",
- "Xilinx Constraints File",
- "Synopsis Constraints File"
- ],
- "extensions": [
- ".tcl",
- ".sdc",
- ".xdc",
- ".fdc"
- ],
- "configuration": "./config/tcl.configuration.json",
+ },
+ {
+ "command": "digital-ide.hdlDoc.exportProject",
+ "title": "%digital-ide.hdlDoc.exportProject.title%",
+ "category": "Digital-IDE"
+ },
+ {
+ "command": "digital-ide.hdlDoc.showWebview",
+ "title": "%digital-ide.hdlDoc.showWebview.title%",
+ "category": "Digital-IDE",
+ "icon": {
+ "light": "images/svg/light/documentation.svg",
+ "dark": "images/svg/dark/documentation.svg"
+ }
+ },
+ {
+ "command": "digital-ide.tool.instance",
+ "title": "%digital-ide.tool.instance.title%",
+ "category": "Digital-IDE"
+ },
+ {
+ "command": "digital-ide.tool.testbench",
+ "title": "%digital-ide.tool.testbench.title%",
+ "category": "Digital-IDE"
+ },
+ {
+ "command": "digital-ide.tool.icarus.simulateFile",
+ "title": "%digital-ide.tool.icarus.simulateFile.title%",
+ "category": "Digital-IDE",
+ "icon": {
+ "light": "images/svg/light/debug.svg",
+ "dark": "images/svg/dark/debug.svg"
+ }
+ },
+ {
+ "command": "digital-ide.pickLibrary",
+ "title": "%digital-ide.pickLibrary.title%",
+ "icon": {
+ "light": "images/svg/light/library.svg",
+ "dark": "images/svg/dark/library.svg"
+ },
+ "category": "Digital-IDE"
+ },
+ {
+ "command": "digital-ide.treeView.arch.expand",
+ "category": "tool",
+ "icon": "$(expand-all)",
+ "title": "%digital-ide.treeView.arch.expand.title%"
+ },
+ {
+ "command": "digital-ide.treeView.arch.collapse",
+ "category": "tool",
+ "icon": "$(collapse-all)",
+ "title": "%digital-ide.treeView.arch.collapse.title%"
+ },
+ {
+ "command": "digital-ide.treeView.arch.refresh",
+ "category": "tool",
+ "icon": "$(refresh)",
+ "title": "%digital-ide.treeView.arch.refresh.title%"
+ },
+ {
+ "command": "digital-ide.treeView.arch.openFile",
+ "category": "tool",
+ "title": "%digital-ide.treeView.arch.openFile.title%"
+ },
+ {
+ "command": "digital-ide.tool.clean",
+ "category": "tool",
+ "title": "%digital-ide.tool.clean.title%"
+ },
+ {
+ "command": "digital-ide.soft.launch",
+ "category": "tool",
+ "title": "%digital-ide.soft.launch.title%"
+ },
+ {
+ "command": "digital-ide.soft.build",
+ "category": "tool",
+ "title": "%digital-ide.soft.build.title%"
+ },
+ {
+ "command": "digital-ide.soft.download",
+ "category": "tool",
+ "title": "%digital-ide.soft.download.title%"
+ },
+ {
+ "command": "digital-ide.hard.launch",
+ "category": "tool",
+ "title": "%digital-ide.hard.launch.title%"
+ },
+ {
+ "command": "digital-ide.hard.simulate",
+ "category": "tool",
+ "title": "%digital-ide.hard.simulate.title%"
+ },
+ {
+ "command": "digital-ide.hard.simulate.cli",
+ "category": "tool",
+ "title": "%digital-ide.hard.simulate.cli.title%"
+ },
+ {
+ "command": "digital-ide.hard.simulate.gui",
+ "category": "tool",
+ "title": "%digital-ide.hard.simulate.gui.title%"
+ },
+ {
+ "command": "digital-ide.hard.refresh",
+ "category": "tool",
+ "title": "%digital-ide.hard.refresh.title%"
+ },
+ {
+ "command": "digital-ide.hard.build",
+ "category": "tool",
+ "title": "%digital-ide.hard.build.title%"
+ },
+ {
+ "command": "digital-ide.hard.build.synth",
+ "category": "tool",
+ "title": "%digital-ide.hard.build.synth.title%"
+ },
+ {
+ "command": "digital-ide.hard.build.impl",
+ "category": "tool",
+ "title": "%digital-ide.hard.build.impl.title%"
+ },
+ {
+ "command": "digital-ide.hard.build.bitstream",
+ "category": "tool",
+ "title": "%digital-ide.hard.build.bitstream.title%"
+ },
+ {
+ "command": "digital-ide.hard.program",
+ "category": "tool",
+ "title": "%digital-ide.hard.program.title%"
+ },
+ {
+ "command": "digital-ide.hard.gui",
+ "category": "tool",
+ "title": "%digital-ide.hard.gui.title%"
+ },
+ {
+ "command": "digital-ide.hard.exit",
+ "category": "tool",
+ "title": "%digital-ide.hard.exit.title%"
+ },
+ {
+ "command": "digital-ide.pl.setSrcTop",
+ "category": "pl",
+ "title": "%digital-ide.pl.setSrcTop.title%"
+ },
+ {
+ "command": "digital-ide.pl.setSimTop",
+ "category": "pl",
+ "title": "%digital-ide.pl.setSimTop.title%"
+ },
+ {
+ "command": "digital-ide.pl.addDevice",
+ "category": "pl",
+ "title": "%digital-ide.pl.addDevice.title%"
+ },
+ {
+ "command": "digital-ide.pl.delDevice",
+ "category": "pl",
+ "title": "%digital-ide.pl.delDevice.title%"
+ },
+ {
+ "command": "digital-ide.pl.addFile",
+ "category": "pl",
+ "title": "%digital-ide.pl.addFile.title%"
+ },
+ {
+ "command": "digital-ide.pl.delFile",
+ "category": "pl",
+ "title": "%digital-ide.pl.delFile.title%"
+ },
+ {
+ "command": "digital-ide.netlist",
+ "icon": {
+ "light": "images/svg/light/netlist.svg",
+ "dark": "images/svg/dark/netlist.svg"
+ },
+ "category": "Digital-IDE",
+ "title": "%digital-ide.netlist.title%"
+ },
+ {
+ "command": "digital-ide.fsm",
+ "icon": {
+ "light": "images/svg/light/fsm.svg",
+ "dark": "images/svg/dark/fsm.svg"
+ },
+ "category": "Digital-IDE",
+ "title": "%digital-ide.fsm.title%"
+ },
+ {
+ "command": "digital-ide.lsp.tool.insertTextToUri",
+ "title": "%digital-ide.lsp.tool.insertTextToUri.title%",
+ "category": "Digital-IDE"
+ },
+ {
+ "command": "digital-ide.lsp.tool.transformOldPropertyFile",
+ "title": "%digital-ide.lsp.tool.transformOldPropertyFile.title%",
+ "category": "Digital-IDE"
+ },
+ {
+ "command": "digital-ide.vhdl2vlog",
+ "title": "%digital-ide.vhdl2vlog.title%",
+ "category": "Digital-IDE",
+ "icon": {
+ "light": "images/svg/light/translate.svg",
+ "dark": "images/svg/dark/translate.svg"
+ }
+ },
+ {
+ "command": "digital-ide.fsm.show",
+ "icon": {
+ "light": "images/svg/light/fsm.svg",
+ "dark": "images/svg/dark/fsm.svg"
+ },
+ "category": "Digital-IDE",
+ "title": "%digital-ide.fsm.show.title%"
+ },
+ {
+ "command": "digital-ide.netlist.show",
+ "icon": {
+ "light": "images/svg/light/netlist.svg",
+ "dark": "images/svg/dark/netlist.svg"
+ },
+ "category": "Digital-IDE",
+ "title": "%digital-ide.netlist.show.title%"
+ }
+ ],
+ "menus": {
+ "view/title": [
+ {
+ "command": "digital-ide.treeView.arch.collapse",
+ "group": "navigation",
+ "when": "view == digital-ide-treeView-arch"
+ },
+ {
+ "command": "digital-ide.pickLibrary",
+ "group": "navigation",
+ "when": "view == digital-ide-treeView-arch"
+ },
+ {
+ "command": "digital-ide.treeView.arch.refresh",
+ "group": "navigation",
+ "when": "view == digital-ide-treeView-arch"
+ }
+ ],
+ "view/item/context": [
+ {
+ "command": "digital-ide.tool.icarus.simulateFile",
+ "group": "inline@1",
+ "when": "view == digital-ide-treeView-arch && viewItem == file"
+ },
+ {
+ "command": "digital-ide.netlist.show",
+ "group": "inline@3",
+ "when": "view == digital-ide-treeView-arch && viewItem == file"
+ },
+ {
+ "command": "digital-ide.pl.setSrcTop",
+ "group": "navigation@1",
+ "when": "view == digital-ide-treeView-arch && viewItem == file"
+ },
+ {
+ "command": "digital-ide.pl.setSimTop",
+ "group": "navigation@2",
+ "when": "view == digital-ide-treeView-arch && viewItem == file"
+ },
+ {
+ "command": "digital-ide.tool.icarus.simulateFile",
+ "group": "navigation@3",
+ "when": "view == digital-ide-treeView-arch && viewItem == file"
+ }
+ ],
+ "editor/title": [
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.tool.icarus.simulateFile",
+ "group": "navigation@1"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.fsm.show",
+ "group": "navigation@2"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.netlist.show",
+ "group": "navigation@3"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.hdlDoc.showWebview",
+ "group": "navigation@4"
+ },
+ {
+ "when": "resourceLangId == vhdl",
+ "command": "digital-ide.vhdl2vlog",
+ "group": "navigation@5"
+ }
+ ],
+ "editor/context": [
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.pl.setSrcTop",
+ "group": "navigation@1"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.pl.setSimTop",
+ "group": "navigation@2"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.tool.instance",
+ "group": "navigation@3"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.tool.testbench",
+ "group": "navigation@4"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.tool.icarus.simulateFile",
+ "group": "navigation@5"
+ },
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.netlist.show",
+ "group": "navigation@6"
+ },
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.fsm.show",
+ "group": "navigation@7"
+ },
+ {
+ "when": "resourceLangId == vhdl",
+ "command": "digital-ide.vhdl2vlog",
+ "group": "navigation@8"
+ }
+ ],
+ "explorer/context": [
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.pl.setSrcTop",
+ "group": "navigation@5"
+ },
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.pl.setSimTop",
+ "group": "navigation@6"
+ },
+ {
+ "when": "editorLangId == verilog || editorLangId == systemverilog || editorLangId == vhdl",
+ "command": "digital-ide.tool.testbench",
+ "group": "navigation@7"
+ },
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.tool.instance",
+ "group": "navigation@8"
+ },
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.netlist.show",
+ "group": "navigation@9"
+ },
+ {
+ "when": "resourceLangId == verilog || resourceLangId == systemverilog || resourceLangId == vhdl",
+ "command": "digital-ide.fsm.show",
+ "group": "navigation@10"
+ },
+ {
+ "when": "resourceLangId == vhdl",
+ "command": "digital-ide.vhdl2vlog",
+ "group": "navigation@11"
+ }
+ ]
+ },
+ "viewsContainers": {
+ "activitybar": [
+ {
+ "id": "TreeView",
+ "title": "Digital-IDE: TreeView",
+ "icon": "images/svg/view.svg"
+ }
+ ]
+ },
+ "views": {
+ "TreeView": [
+ {
+ "id": "digital-ide-treeView-arch",
+ "name": "architecture"
+ },
+ {
+ "id": "digital-ide-treeView-tool",
+ "name": "TOOL Options"
+ },
+ {
+ "id": "digital-ide-treeView-hardware",
+ "name": "HARD Options"
+ }
+ ]
+ },
+ "keybindings": [
+ {
+ "command": "digital-ide.tool.instance",
+ "key": "alt+i",
+ "mac": "alt+i",
+ "when": "editorTextFocus"
+ },
+ {
+ "command": "digital-ide.tool.testbench",
+ "key": "alt+t",
+ "mac": "alt+t",
+ "when": "editorTextFocus"
+ }
+ ],
+ "languages": [
+ {
+ "id": "tcl",
+ "aliases": [
+ "TCL",
+ "Xilinx Constraints File",
+ "Synopsis Constraints File"
+ ],
+ "extensions": [
+ ".tcl",
+ ".sdc",
+ ".xdc",
+ ".fdc"
+ ],
+ "configuration": "./config/tcl.configuration.json",
"icon": {
"dark": "./images/svg/dark/tcl.svg",
"light": "./images/svg/light/tcl.svg"
}
- },
- {
- "id": "bd",
- "extensions": [
- ".bd"
- ],
+ },
+ {
+ "id": "bd",
+ "extensions": [
+ ".bd"
+ ],
"configuration": "./config/bd.configuration.json",
"icon": {
"dark": "./images/svg/dark/bd.svg",
"light": "./images/svg/light/bd.svg"
}
- },
- {
- "id": "vhdl",
- "aliases": [
- "VHDL",
- "vhdl"
- ],
- "extensions": [
- ".vhd",
- ".vhdl",
- ".vho",
- ".vht"
- ],
- "configuration": "./config/vhdl.configuration.json",
+ },
+ {
+ "id": "vhdl",
+ "aliases": [
+ "VHDL",
+ "vhdl"
+ ],
+ "extensions": [
+ ".vhd",
+ ".vhdl",
+ ".vho",
+ ".vht"
+ ],
+ "configuration": "./config/vhdl.configuration.json",
"icon": {
"dark": "./images/svg/dark/vhdl.svg",
"light": "./images/svg/light/vhdl.svg"
}
- },
- {
- "id": "verilog",
- "aliases": [
- "Verilog",
- "verilog"
- ],
- "extensions": [
- ".v",
- ".V",
- ".vh",
- ".vl"
- ],
- "configuration": "./config/verilog.configuration.json",
+ },
+ {
+ "id": "verilog",
+ "aliases": [
+ "Verilog",
+ "verilog"
+ ],
+ "extensions": [
+ ".v",
+ ".V",
+ ".vh",
+ ".vl"
+ ],
+ "configuration": "./config/verilog.configuration.json",
"icon": {
"dark": "./images/svg/dark/verilog.svg",
"light": "./images/svg/light/verilog.svg"
}
- },
- {
- "id": "systemverilog",
- "aliases": [
- "System Verilog",
- "systemverilog"
- ],
- "extensions": [
- ".sv",
- ".SV"
- ],
- "configuration": "./config/systemverilog.configuration.json",
+ },
+ {
+ "id": "systemverilog",
+ "aliases": [
+ "System Verilog",
+ "systemverilog"
+ ],
+ "extensions": [
+ ".sv",
+ ".SV"
+ ],
+ "configuration": "./config/systemverilog.configuration.json",
"icon": {
"dark": "./images/svg/dark/systemverilog.svg",
"light": "./images/svg/light/systemverilog.svg"
}
- },
- {
- "id": "arm",
- "aliases": [
- "ARM",
- "arm"
- ],
- "extensions": [
- ".s",
- ".S",
- ".asm",
- ".sx"
- ],
- "configuration": "./config/arm.configuration.json"
- },
- {
- "id": "linkerscript",
- "aliases": [
- "LinkerScript",
- "linkerscript"
- ],
- "extensions": [
- ".ld",
- ".dld"
- ],
- "configuration": "./config/link.configuration.json"
- },
- {
- "id": "digital-ide-output",
- "mimetypes": [
- "text/x-code-output"
- ]
- }
- ],
- "jsonValidation": [
- {
- "fileMatch": "property.json",
- "url": "./project/property-schema.json"
- }
- ],
- "grammars": [
- {
- "language": "linkerscript",
- "scopeName": "source.ld",
- "path": "./syntaxes/link.json"
- },
- {
- "language": "arm",
- "scopeName": "source.arm",
- "path": "./syntaxes/arm.json"
- },
- {
- "language": "tcl",
- "scopeName": "source.tcl",
- "path": "./syntaxes/tcl.json"
- },
- {
- "language": "vhdl",
- "scopeName": "source.vhdl",
- "path": "./syntaxes/vhdl.json"
- },
- {
- "language": "verilog",
- "scopeName": "source.verilog",
- "path": "./syntaxes/verilog.tmLanguage.json"
- },
- {
- "language": "systemverilog",
- "scopeName": "source.systemverilog",
- "path": "./syntaxes/systemverilog.json"
- },
- {
- "language": "digital-ide-output",
- "scopeName": "digital-ide.output",
- "path": "./syntaxes/digital-ide-output.json"
- }
- ],
- "snippets": [
- {
- "language": "tcl",
- "path": "snippets/tcl.json"
- },
- {
- "language": "vhdl",
- "path": "snippets/vhdl.json"
- },
- {
- "language": "verilog",
- "path": "snippets/svlog.json"
- },
- {
- "language": "systemverilog",
- "path": "snippets/svlog.json"
- }
- ],
- "icons": {
- "instance-verilog": {
- "description": "icon of verilog in TOOL.instance",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e7a8"
- }
- },
- "instance-vhdl": {
- "description": "icon of verilog in TOOL.instance",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e6b3"
- }
- },
- "instance-port": {
- "description": "port of verilog in TOOL.instance",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e638"
- }
- },
- "instance-param": {
- "description": "param of verilog in TOOL.instance",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e655"
- }
- },
- "instance-module": {
- "description": "module of verilog in TOOL.instance",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e60b"
- }
- },
- "instance-input": {
- "description": "input",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e908"
- }
- },
- "instance-output": {
- "description": "output",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e7b0"
- }
- },
- "instance-inout": {
- "description": "inout",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\ea19"
- }
- },
- "export-html": {
- "description": "export html",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e633"
- }
- },
- "export-markdown": {
- "description": "export markdown",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\ee68"
- }
- },
- "export-pdf": {
- "description": "export pdf",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e684"
- }
- },
- "libpick-folder": {
- "description": "libpick folder",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e600"
- }
- },
- "libpick-verilog": {
- "description": "libpick verilog",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e7a8"
- }
- },
- "libpick-vhdl": {
- "description": "libpick vhdl",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e6b3"
- }
- },
- "libpick-common": {
- "description": "libpick common",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e622"
- }
- },
- "libpick-custom": {
- "description": "libpick custom",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e623"
- }
- },
- "libpick-unknown": {
- "description": "libpick unknown",
- "default": {
- "fontPath": "./images/icons/iconfont.woff2",
- "fontCharacter": "\\e62a"
- }
- }
- }
- },
- "scripts": {
- "vscode:prepublish": "webpack --mode production",
- "compile": "tsc -p ./",
- "watch": "tsc -watch -p ./",
- "pretest": "npm run compile && npm run lint",
- "lint": "eslint src --ext ts",
- "test": "node ./out/test/runTest.js"
- },
- "devDependencies": {
- "@types/glob": "^8.0.0",
- "@types/mocha": "^10.0.0",
- "@types/node": "16.x",
- "@types/showdown": "^2.0.0",
- "@types/vscode": "^1.72.0",
- "@typescript-eslint/eslint-plugin": "^5.42.0",
- "@typescript-eslint/parser": "^5.42.0",
- "@vscode/test-electron": "^2.2.0",
- "eslint": "^8.26.0",
- "glob": "^8.0.3",
- "mocha": "^10.1.0",
- "typescript": "^4.8.4"
- },
- "dependencies": {
- "chokidar": "^3.5.3",
- "puppeteer-core": "^19.4.1",
- "showdown": "^2.1.0",
- "state-machine-cat": "^9.2.5",
- "temp": "^0.9.4",
- "vscode-textmate": "^9.0.0",
- "wavedrom": "^2.9.1"
- }
-}
+ },
+ {
+ "id": "arm",
+ "aliases": [
+ "ARM",
+ "arm"
+ ],
+ "extensions": [
+ ".s",
+ ".S",
+ ".asm",
+ ".sx"
+ ],
+ "configuration": "./config/arm.configuration.json"
+ },
+ {
+ "id": "linkerscript",
+ "aliases": [
+ "LinkerScript",
+ "linkerscript"
+ ],
+ "extensions": [
+ ".ld",
+ ".dld"
+ ],
+ "configuration": "./config/link.configuration.json"
+ },
+ {
+ "id": "digital-ide-output",
+ "mimetypes": [
+ "text/x-code-output"
+ ]
+ }
+ ],
+ "jsonValidation": [
+ {
+ "fileMatch": "property.json",
+ "url": "./project/property-schema.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "linkerscript",
+ "scopeName": "source.ld",
+ "path": "./syntaxes/link.json"
+ },
+ {
+ "language": "arm",
+ "scopeName": "source.arm",
+ "path": "./syntaxes/arm.json"
+ },
+ {
+ "language": "tcl",
+ "scopeName": "source.tcl",
+ "path": "./syntaxes/tcl.json"
+ },
+ {
+ "language": "vhdl",
+ "scopeName": "source.vhdl",
+ "path": "./syntaxes/vhdl.json"
+ },
+ {
+ "language": "verilog",
+ "scopeName": "source.verilog",
+ "path": "./syntaxes/verilog.tmLanguage.json"
+ },
+ {
+ "language": "systemverilog",
+ "scopeName": "source.systemverilog",
+ "path": "./syntaxes/systemverilog.json"
+ },
+ {
+ "language": "digital-ide-output",
+ "scopeName": "digital-ide.output",
+ "path": "./syntaxes/digital-ide-output.json"
+ }
+ ],
+ "snippets": [
+ {
+ "language": "tcl",
+ "path": "snippets/tcl.json"
+ },
+ {
+ "language": "vhdl",
+ "path": "snippets/vhdl.json"
+ },
+ {
+ "language": "verilog",
+ "path": "snippets/svlog.json"
+ },
+ {
+ "language": "systemverilog",
+ "path": "snippets/svlog.json"
+ }
+ ],
+ "icons": {
+ "instance-verilog": {
+ "description": "icon of verilog in TOOL.instance",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e7a8"
+ }
+ },
+ "instance-vhdl": {
+ "description": "icon of verilog in TOOL.instance",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e6b3"
+ }
+ },
+ "instance-port": {
+ "description": "port of verilog in TOOL.instance",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e638"
+ }
+ },
+ "instance-param": {
+ "description": "param of verilog in TOOL.instance",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e655"
+ }
+ },
+ "instance-module": {
+ "description": "module of verilog in TOOL.instance",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e60b"
+ }
+ },
+ "instance-input": {
+ "description": "input",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e908"
+ }
+ },
+ "instance-output": {
+ "description": "output",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e7b0"
+ }
+ },
+ "instance-inout": {
+ "description": "inout",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\ea19"
+ }
+ },
+ "export-html": {
+ "description": "export html",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e633"
+ }
+ },
+ "export-markdown": {
+ "description": "export markdown",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\ee68"
+ }
+ },
+ "export-pdf": {
+ "description": "export pdf",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e684"
+ }
+ },
+ "libpick-folder": {
+ "description": "libpick folder",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e600"
+ }
+ },
+ "libpick-verilog": {
+ "description": "libpick verilog",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e7a8"
+ }
+ },
+ "libpick-vhdl": {
+ "description": "libpick vhdl",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e6b3"
+ }
+ },
+ "libpick-common": {
+ "description": "libpick common",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e622"
+ }
+ },
+ "libpick-custom": {
+ "description": "libpick custom",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e623"
+ }
+ },
+ "libpick-unknown": {
+ "description": "libpick unknown",
+ "default": {
+ "fontPath": "./images/icons/iconfont.woff2",
+ "fontCharacter": "\\e62a"
+ }
+ }
+ }
+ },
+ "scripts": {
+ "vscode:prepublish": "webpack --mode production",
+ "compile": "tsc -p ./",
+ "watch": "tsc -watch -p ./",
+ "pretest": "npm run compile && npm run lint",
+ "lint": "eslint src --ext ts",
+ "test": "node ./out/test/runTest.js"
+ },
+ "devDependencies": {
+ "@types/glob": "^8.0.0",
+ "@types/mocha": "^10.0.0",
+ "@types/node": "16.x",
+ "@types/showdown": "^2.0.0",
+ "@types/vscode": "^1.72.0",
+ "@typescript-eslint/eslint-plugin": "^5.42.0",
+ "@typescript-eslint/parser": "^5.42.0",
+ "@vscode/test-electron": "^2.2.0",
+ "eslint": "^8.26.0",
+ "glob": "^8.0.3",
+ "mocha": "^10.1.0",
+ "typescript": "^4.8.4"
+ },
+ "dependencies": {
+ "chokidar": "^3.5.3",
+ "puppeteer-core": "^19.4.1",
+ "showdown": "^2.1.0",
+ "state-machine-cat": "^9.2.5",
+ "temp": "^0.9.4",
+ "vscode-textmate": "^9.0.0",
+ "wavedrom": "^2.9.1"
+ }
+}
\ No newline at end of file
diff --git a/package.nls.json b/package.nls.json
index 4ab837b..8b61ac7 100644
--- a/package.nls.json
+++ b/package.nls.json
@@ -40,8 +40,5 @@
"digital-ide.lsp.tool.transformOldPropertyFile.title": "Transform configure file from previous version to new version",
"digital-ide.vhdl2vlog.title": "Translate vhdl code to verilog code",
"digital-ide.fsm.show.title": "Show FSM graph of current file",
- "digital-ide.netlist.show.title": "Show netlist of current file",
- "digital-ide.lsp.verilog.linter.title": "type of diagnotor for verilog",
- "digital-ide.lsp.vhdl.linter.title": "type of diagnotor for vhdl",
- "digital-ide.lsp.systemverilog.linter.title": "type of diagnotor for systemverilog"
-}
+ "digital-ide.netlist.show.title": "Show netlist of current file"
+}
\ No newline at end of file
diff --git a/resources/hdlParser/parser.js b/resources/hdlParser/parser.js
index ad6ce76..5cc5f13 100644
--- a/resources/hdlParser/parser.js
+++ b/resources/hdlParser/parser.js
@@ -3,12 +3,12 @@ var Module = (() => {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
return (
-function(Module = {}) {
+function(moduleArg = {}) {
-var Module=typeof Module!="undefined"?Module:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=function(){return"[Emscripten Module object]"}}else 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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){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}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){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++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="parser.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(binaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(binaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(binaryFile)})}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(function(binary){return WebAssembly.instantiate(binary,imports)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(function(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)})})}else{return instantiateArrayBuffer(binaryFile,imports,callback)}}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["ga"];updateMemoryViews();wasmTable=Module["asm"]["la"];addOnInit(Module["asm"]["ha"]);removeRunDependency("wasm-instantiate");return exports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}var exceptionCaught=[];function exception_addRef(info){info.add_ref()}var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);exception_addRef(info);return info.get_exception_ptr()}function ___cxa_current_primary_exception(){if(!exceptionCaught.length){return 0}var info=exceptionCaught[exceptionCaught.length-1];exception_addRef(info);return info.excPtr}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function exception_decRef(info){if(info.release_ref()&&!info.get_rethrown()){var destructor=info.get_destructor();if(destructor){getWasmTableEntry(destructor)(info.excPtr)}___cxa_free_exception(info.excPtr)}}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}function ___cxa_decrement_exception_refcount(ptr){if(!ptr)return;exception_decRef(new ExceptionInfo(ptr))}var exceptionLast=0;function ___cxa_end_catch(){_setThrew(0);var info=exceptionCaught.pop();exception_decRef(info);exceptionLast=0}function ___resumeException(ptr){if(!exceptionLast){exceptionLast=ptr}throw ptr}function ___cxa_find_matching_catch(){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 i=0;i>2]=value;return value}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:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return()=>{crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return()=>crypto_module["randomBytes"](1)[0]}catch(e){}}return()=>abort("randomDevice")}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[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;i0?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 TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(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){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){abort()}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){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:function(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:function(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:function(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:function(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:function(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:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(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;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(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:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(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{assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)}var ERRNO_CODES={};var NODEFS={isWindows:false,staticInit:()=>{NODEFS.isWindows=!!process.platform.match(/^win/);var flags=process.binding("constants");if(flags["fs"]){flags=flags["fs"]}NODEFS.flagsForNodeMap={1024:flags["O_APPEND"],64:flags["O_CREAT"],128:flags["O_EXCL"],256:flags["O_NOCTTY"],0:flags["O_RDONLY"],2:flags["O_RDWR"],4096:flags["O_SYNC"],512:flags["O_TRUNC"],1:flags["O_WRONLY"],131072:flags["O_NOFOLLOW"]}},convertNodeCode:e=>{var code=e.code;return ERRNO_CODES[code]},mount:mount=>{return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)},createNode:(parent,name,mode,dev)=>{if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(28)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node},getMode:path=>{var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&292)>>2}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return stat.mode},realPath:node=>{var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)},flagsForNode:flags=>{flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;flags&=~65536;var newFlags=0;for(var k in NODEFS.flagsForNodeMap){if(flags&k){newFlags|=NODEFS.flagsForNodeMap[k];flags^=k}}if(flags){throw new FS.ErrnoError(28)}return newFlags},node_ops:{getattr:node=>{var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:(node,attr)=>{var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},lookup:(parent,name)=>{var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:(parent,name,mode,dev)=>{var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return node},rename:(oldNode,newDir,newName)=>{var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}oldNode.name=newName},unlink:(parent,name)=>{var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},rmdir:(parent,name)=>{var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},readdir:node=>{var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},symlink:(parent,newName,oldPath)=>{var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},readlink:node=>{var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=nodePath.relative(nodePath.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;if(e.code==="UNKNOWN")throw new FS.ErrnoError(28);throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}}},stream_ops:{open:stream=>{var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsForNode(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},close:stream=>{try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},read:(stream,buffer,offset,length,position)=>{if(length===0)return 0;try{return fs.readSync(stream.nfd,Buffer.from(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},write:(stream,buffer,offset,length,position)=>{try{return fs.writeSync(stream.nfd,Buffer.from(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},llseek:(stream,offset,whence)=>{var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}}}if(position<0){throw new FS.ErrnoError(28)}return position},mmap:(stream,length,position,prot,flags)=>{if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr=mmapAlloc(length);NODEFS.stream_ops.read(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}},msync:(stream,buffer,offset,length,mmapFlags)=>{NODEFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,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,parent)}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},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},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=>{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:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){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.apply(check,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:type,opts:opts,mountpoint: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;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.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 random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);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.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}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)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"NODEFS":NODEFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_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};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;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url: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]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});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:ptr,allocated:true}};node.stream_ops=stream_ops;return node},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){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload=(()=>{}),onerror=(()=>{}))=>{var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload=(()=>{}),onerror=(()=>{}))=>{var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(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:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=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.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];HEAPU32[buf+96>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>2]=tempI64[0],HEAP32[buf+108>>2]=tempI64[1];return 0},doMsync:function(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)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){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}}function _abort(){abort("")}function _emscripten_date_now(){return Date.now()}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;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,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function 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}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _proc_exit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}function exitJS(status,implicit){EXITSTATUS=status;_proc_exit(status)}var _exit=exitJS;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}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var offset=convertI32PairToI53Checked(offset_low,offset_high);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.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=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}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _llvm_eh_typeid_for(type){return type}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __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];function __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 writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _strftime_l(s,maxsize,format,tm,loc){return _strftime(s,maxsize,format,tm)}function getCFunc(ident){var func=Module["_"+ident];return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}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;itype==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}var FSNode=function(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};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();if(ENVIRONMENT_IS_NODE){NODEFS.staticInit()}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 wasmImports={"o":___assert_fail,"l":___cxa_begin_catch,"_":___cxa_current_primary_exception,"N":___cxa_decrement_exception_refcount,"v":___cxa_end_catch,"a":___cxa_find_matching_catch_2,"f":___cxa_find_matching_catch_3,"E":___cxa_find_matching_catch_5,"M":___cxa_increment_exception_refcount,"P":___cxa_rethrow,"Z":___cxa_rethrow_primary_exception,"q":___cxa_throw,"$":___cxa_uncaught_exceptions,"g":___resumeException,"L":___syscall_fcntl64,"X":___syscall_ioctl,"Y":___syscall_openat,"U":___syscall_stat64,"F":_abort,"da":_emscripten_date_now,"ea":_emscripten_memcpy_big,"aa":_emscripten_resize_heap,"ba":_environ_get,"ca":_environ_sizes_get,"fa":_exit,"J":_fd_close,"W":_fd_read,"R":_fd_seek,"K":_fd_write,"H":invoke_diii,"I":invoke_fiii,"r":invoke_i,"b":invoke_ii,"d":invoke_iii,"n":invoke_iiii,"k":invoke_iiiii,"p":invoke_iiiiii,"w":invoke_iiiiiii,"x":invoke_iiiiiiii,"O":invoke_iiiiiiiii,"A":invoke_iiiiiiiiii,"C":invoke_iiiiiiiiiiii,"z":invoke_iiiiiiiiiiiiii,"D":invoke_iiiiiiiiiiiiiii,"S":invoke_ji,"T":invoke_jii,"Q":invoke_jiiii,"h":invoke_v,"j":invoke_vi,"c":invoke_vii,"e":invoke_viii,"i":invoke_viiii,"t":invoke_viiiii,"s":invoke_viiiiii,"u":invoke_viiiiiii,"G":invoke_viiiiiiii,"y":invoke_viiiiiiiiii,"B":invoke_viiiiiiiiiiiiiii,"m":_llvm_eh_typeid_for,"V":_strftime_l};var asm=createWasm();var ___wasm_call_ctors=function(){return(___wasm_call_ctors=Module["asm"]["ha"]).apply(null,arguments)};var _vlog_fast=Module["_vlog_fast"]=function(){return(_vlog_fast=Module["_vlog_fast"]=Module["asm"]["ia"]).apply(null,arguments)};var _vlog_all=Module["_vlog_all"]=function(){return(_vlog_all=Module["_vlog_all"]=Module["asm"]["ja"]).apply(null,arguments)};var ___cxa_free_exception=function(){return(___cxa_free_exception=Module["asm"]["ka"]).apply(null,arguments)};var ___errno_location=function(){return(___errno_location=Module["asm"]["ma"]).apply(null,arguments)};var _setThrew=function(){return(_setThrew=Module["asm"]["na"]).apply(null,arguments)};var setTempRet0=function(){return(setTempRet0=Module["asm"]["oa"]).apply(null,arguments)};var stackSave=function(){return(stackSave=Module["asm"]["pa"]).apply(null,arguments)};var stackRestore=function(){return(stackRestore=Module["asm"]["qa"]).apply(null,arguments)};var stackAlloc=function(){return(stackAlloc=Module["asm"]["ra"]).apply(null,arguments)};var ___cxa_can_catch=function(){return(___cxa_can_catch=Module["asm"]["sa"]).apply(null,arguments)};var ___cxa_is_pointer_type=function(){return(___cxa_is_pointer_type=Module["asm"]["ta"]).apply(null,arguments)};var dynCall_jii=Module["dynCall_jii"]=function(){return(dynCall_jii=Module["dynCall_jii"]=Module["asm"]["ua"]).apply(null,arguments)};var dynCall_ji=Module["dynCall_ji"]=function(){return(dynCall_ji=Module["dynCall_ji"]=Module["asm"]["va"]).apply(null,arguments)};var dynCall_jiiii=Module["dynCall_jiiii"]=function(){return(dynCall_jiiii=Module["dynCall_jiiii"]=Module["asm"]["wa"]).apply(null,arguments)};function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(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{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(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{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(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{getWasmTableEntry(index)(a1,a2,a3,a4)}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 getWasmTableEntry(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{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}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 getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}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 getWasmTableEntry(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 getWasmTableEntry(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 getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jii(index,a1,a2){var sp=stackSave();try{return dynCall_jii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ji(index,a1){var sp=stackSave();try{return dynCall_ji(index,a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_jiiii(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["FS"]=FS;Module["NODEFS"]=NODEFS;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){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()()}}run();
+var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]"}else 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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}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"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var wasmExports;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="parser.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(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"&&!isFileURI(binaryFile)){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))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).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)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&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 createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;wasmExports=exports;wasmMemory=wasmExports["_"];updateMemoryViews();wasmTable=wasmExports["aa"];addOnInit(wasmExports["$"]);removeRunDependency("wasm-instantiate");return exports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{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 UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var ___assert_fail=(condition,filename,line,func)=>{abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};var exceptionCaught=[];var uncaughtExceptionCount=0;function ___cxa_begin_catch(ptr){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(info.excPtr);return info.get_exception_ptr()}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}var exceptionLast=0;function ___cxa_end_catch(){_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=0}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}function ___resumeException(ptr){if(!exceptionLast){exceptionLast=ptr}throw exceptionLast}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 arg in args){var caughtType=args[arg];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};var ___cxa_find_matching_catch_2=()=>findMatchingCatch([]);var ___cxa_find_matching_catch_3=arg0=>findMatchingCatch([arg0]);var ___cxa_find_matching_catch_5=(arg0,arg1,arg2)=>findMatchingCatch([arg0,arg1,arg2]);function ___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}function ___cxa_rethrow_primary_exception(ptr){if(!ptr)return;var info=new ExceptionInfo(ptr);exceptionCaught.push(info);info.set_rethrown(true);___cxa_rethrow()}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast}function ___cxa_uncaught_exceptions(){return uncaughtExceptionCount}var setErrNo=value=>{HEAP32[___errno_location()>>2]=value;return value};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:function(){var paths=Array.prototype.slice.call(arguments);return 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 if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("initRandomDevice")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[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)=>{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++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=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(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf,0,BUFSIZE,-1)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(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:function(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:function(tty,optional_actions,data){return 0},ioctl_tiocgwinsz:function(tty){return[24,80]}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var mmapAlloc=size=>{abort()};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)}if(!MEMFS.ops_table){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;old_node.parent=new_dir},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 in node.contents){if(!node.contents.hasOwnProperty(key)){continue}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{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url,arrayBuffer=>{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var preloadPlugins=Module["preloadPlugins"]||[];function FS_handledByPreloadPlugin(byteArray,fullname,finish,onerror){if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled}function 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){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}}function 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}function FS_getMode(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode}var ERRNO_CODES={};var NODEFS={isWindows:false,staticInit:()=>{NODEFS.isWindows=!!process.platform.match(/^win/);var flags=process.binding("constants");if(flags["fs"]){flags=flags["fs"]}NODEFS.flagsForNodeMap={1024:flags["O_APPEND"],64:flags["O_CREAT"],128:flags["O_EXCL"],256:flags["O_NOCTTY"],0:flags["O_RDONLY"],2:flags["O_RDWR"],4096:flags["O_SYNC"],512:flags["O_TRUNC"],1:flags["O_WRONLY"],131072:flags["O_NOFOLLOW"]}},convertNodeCode:e=>{var code=e.code;return ERRNO_CODES[code]},mount:mount=>NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0),createNode:(parent,name,mode,dev)=>{if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(28)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node},getMode:path=>{var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&292)>>2}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return stat.mode},realPath:node=>{var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)},flagsForNode:flags=>{flags&=~2097152;flags&=~2048;flags&=~32768;flags&=~524288;flags&=~65536;var newFlags=0;for(var k in NODEFS.flagsForNodeMap){if(flags&k){newFlags|=NODEFS.flagsForNodeMap[k];flags^=k}}if(flags){throw new FS.ErrnoError(28)}return newFlags},node_ops:{getattr:node=>{var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}},setattr:(node,attr)=>{var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},lookup:(parent,name)=>{var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)},mknod:(parent,name,mode,dev)=>{var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}return node},rename:(oldNode,newDir,newName)=>{var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}oldNode.name=newName},unlink:(parent,name)=>{var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},rmdir:(parent,name)=>{var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},readdir:node=>{var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},symlink:(parent,newName,oldPath)=>{var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},readlink:node=>{var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=nodePath.relative(nodePath.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;if(e.code==="UNKNOWN")throw new FS.ErrnoError(28);throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}}},stream_ops:{open:stream=>{var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsForNode(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},close:stream=>{try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},read:(stream,buffer,offset,length,position)=>{if(length===0)return 0;try{return fs.readSync(stream.nfd,Buffer.from(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},write:(stream,buffer,offset,length,position)=>{try{return fs.writeSync(stream.nfd,Buffer.from(buffer.buffer),offset,length,position)}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}},llseek:(stream,offset,whence)=>{var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(NODEFS.convertNodeCode(e))}}}if(position<0){throw new FS.ErrnoError(28)}return position},mmap:(stream,length,position,prot,flags)=>{if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}var ptr=mmapAlloc(length);NODEFS.stream_ops.read(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}},msync:(stream,buffer,offset,length,mmapFlags)=>{NODEFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,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,parent)}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=>node===node.parent,isMountpoint:node=>!!node.mounted,isFile:mode=>(mode&61440)===32768,isDir:mode=>(mode&61440)===16384,isLink:mode=>(mode&61440)===40960,isChrdev:mode=>(mode&61440)===8192,isBlkdev:mode=>(mode&61440)===24576,isFIFO:mode=>(mode&61440)===4096,isSocket:mode=>(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=>{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)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(val){this.node=val}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(val){this.shared.flags=val}},position:{get(){return this.shared.position},set(val){this.shared.position=val}}})}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},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){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.apply(check,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:type,opts:opts,mountpoint: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)=>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;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>FS.stat(path,true),chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStreamChecked(fd);FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStreamChecked(fd);FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStreamChecked(fd);if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS_modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>stream.fd===null,llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.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:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}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)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"NODEFS":NODEFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS_getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_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};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;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url: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]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});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:ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(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:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=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]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=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]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%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]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%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]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%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]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},doMsync:function(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)},varargs:undefined,get(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStreamChecked(fd);return stream}};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){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=SYSCALLS.get();HEAP32[argp>>2]=termios.c_iflag||0;HEAP32[argp+4>>2]=termios.c_oflag||0;HEAP32[argp+8>>2]=termios.c_cflag||0;HEAP32[argp+12>>2]=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=SYSCALLS.get();var c_iflag=HEAP32[argp>>2];var c_oflag=HEAP32[argp+4>>2];var c_cflag=HEAP32[argp+8>>2];var c_lflag=HEAP32[argp+12>>2];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_iflag,c_oflag:c_oflag,c_cflag:c_cflag,c_lflag:c_lflag,c_cc:c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();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=SYSCALLS.get();HEAP16[argp>>1]=winsize[0];HEAP16[argp+2>>1]=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}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var _abort=()=>{abort("")};var _emscripten_memcpy_big=(dest,src,num)=>HEAPU8.copyWithin(dest,src,src+num);var getHeapMax=()=>2147483648;var growMemory=size=>{var b=wasmMemory.buffer;var pages=size-b.byteLength+65535>>>16;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;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,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";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=(__environ,environ_buf)=>{var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0};var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;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}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);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]=tempI64[0],HEAP32[newOffset+4>>2]=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}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _llvm_eh_typeid_for(type){return type}var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);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};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var _strftime=(s,maxsize,format,tm)=>{var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":date=>WEEKDAYS[date.tm_wday].substring(0,3),"%A":date=>WEEKDAYS[date.tm_wday],"%b":date=>MONTHS[date.tm_mon].substring(0,3),"%B":date=>MONTHS[date.tm_mon],"%C":date=>{var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":date=>leadingNulls(date.tm_mday,2),"%e":date=>leadingSomething(date.tm_mday,2," "),"%g":date=>getWeekBasedYear(date).toString().substring(2),"%G":date=>getWeekBasedYear(date),"%H":date=>leadingNulls(date.tm_hour,2),"%I":date=>{var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":date=>leadingNulls(date.tm_mday+arraySum(isLeapYear(date.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,date.tm_mon-1),3),"%m":date=>leadingNulls(date.tm_mon+1,2),"%M":date=>leadingNulls(date.tm_min,2),"%n":()=>"\n","%p":date=>{if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":date=>leadingNulls(date.tm_sec,2),"%t":()=>"\t","%u":date=>date.tm_wday||7,"%U":date=>{var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":date=>{var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":date=>date.tm_wday,"%W":date=>{var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":date=>(date.tm_year+1900).toString().substring(2),"%Y":date=>date.tm_year+1900,"%z":date=>{var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":date=>date.tm_zone,"%%":()=>"%"};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1};var _strftime_l=(s,maxsize,format,tm,loc)=>_strftime(s,maxsize,format,tm);var wasmTableMirror=[];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};function getCFunc(ident){var func=Module["_"+ident];return func}var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var ccall=function(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;itype==="number"||type==="boolean");var numericRet=returnType!=="string";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}};var FSNode=function(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};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();if(ENVIRONMENT_IS_NODE){NODEFS.staticInit()}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 wasmImports={o:___assert_fail,k:___cxa_begin_catch,T:___cxa_current_primary_exception,v:___cxa_end_catch,a:___cxa_find_matching_catch_2,f:___cxa_find_matching_catch_3,D:___cxa_find_matching_catch_5,K:___cxa_rethrow,S:___cxa_rethrow_primary_exception,s:___cxa_throw,U:___cxa_uncaught_exceptions,g:___resumeException,J:___syscall_fcntl64,Q:___syscall_ioctl,R:___syscall_openat,E:_abort,Y:_emscripten_memcpy_big,V:_emscripten_resize_heap,W:_environ_get,X:_environ_sizes_get,Z:_exit,H:_fd_close,P:_fd_read,M:_fd_seek,I:_fd_write,F:invoke_diii,G:invoke_fiii,t:invoke_i,b:invoke_ii,c:invoke_iii,n:invoke_iiii,m:invoke_iiiii,p:invoke_iiiiii,w:invoke_iiiiiii,x:invoke_iiiiiiii,z:invoke_iiiiiiiiii,B:invoke_iiiiiiiiiiii,L:invoke_jiiii,h:invoke_v,i:invoke_vi,e:invoke_vii,d:invoke_viii,j:invoke_viiii,q:invoke_viiiii,r:invoke_viiiiii,u:invoke_viiiiiii,C:invoke_viiiiiiii,y:invoke_viiiiiiiiii,A:invoke_viiiiiiiiiiiiiii,N:invoke_viijii,l:_llvm_eh_typeid_for,O:_strftime_l};var asm=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["$"])();var ___cxa_free_exception=a0=>(___cxa_free_exception=wasmExports["__cxa_free_exception"])(a0);var _call_parser=Module["_call_parser"]=(a0,a1,a2)=>(_call_parser=Module["_call_parser"]=wasmExports["ba"])(a0,a1,a2);var ___errno_location=()=>(___errno_location=wasmExports["ca"])();var _setThrew=(a0,a1)=>(_setThrew=wasmExports["da"])(a0,a1);var setTempRet0=a0=>(setTempRet0=wasmExports["ea"])(a0);var stackSave=()=>(stackSave=wasmExports["fa"])();var stackRestore=a0=>(stackRestore=wasmExports["ga"])(a0);var stackAlloc=a0=>(stackAlloc=wasmExports["ha"])(a0);var ___cxa_decrement_exception_refcount=a0=>(___cxa_decrement_exception_refcount=wasmExports["ia"])(a0);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["ja"])(a0);var ___cxa_can_catch=(a0,a1,a2)=>(___cxa_can_catch=wasmExports["ka"])(a0,a1,a2);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["la"])(a0);var dynCall_viijii=Module["dynCall_viijii"]=(a0,a1,a2,a3,a4,a5,a6)=>(dynCall_viijii=Module["dynCall_viijii"]=wasmExports["ma"])(a0,a1,a2,a3,a4,a5,a6);var dynCall_jiiii=Module["dynCall_jiiii"]=(a0,a1,a2,a3,a4)=>(dynCall_jiiii=Module["dynCall_jiiii"]=wasmExports["na"])(a0,a1,a2,a3,a4);function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(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{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}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{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}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 getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}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 getWasmTableEntry(index)(a1,a2,a3,a4)}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 getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}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{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}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 getWasmTableEntry(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_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}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 getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viijii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{dynCall_viijii(index,a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return dynCall_jiiii(index,a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}Module["ccall"]=ccall;Module["cwrap"]=cwrap;Module["FS"]=FS;Module["NODEFS"]=NODEFS;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){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()()}}run();
- return Module.ready
+ return moduleArg.ready
}
);
@@ -16,6 +16,4 @@ var Module=typeof Module!="undefined"?Module:{};var readyPromiseResolve,readyPro
if (typeof exports === 'object' && typeof module === 'object')
module.exports = Module;
else if (typeof define === 'function' && define['amd'])
- define([], function() { return Module; });
-else if (typeof exports === 'object')
- exports["Module"] = Module;
+ define([], () => Module);
diff --git a/resources/hdlParser/parser.wasm b/resources/hdlParser/parser.wasm
index e265a1fc5b85ff3720a40efa2c997153602feb3a..b5c826df011812daa5445d93bdf04ef459632fc4 100644
GIT binary patch
literal 2599478
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
z
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