@doubao-dev/cli 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/1232.js +1 -0
  2. package/dist/1264.js +1 -0
  3. package/dist/1611.js +2 -0
  4. package/dist/2232.js +60 -0
  5. package/dist/2507.js +1 -0
  6. package/dist/275.js +5 -8
  7. package/dist/2932.js +1 -1
  8. package/dist/4525.js +1 -1
  9. package/dist/4880.js +1 -1
  10. package/dist/4931.js +1 -1
  11. package/dist/{3688.js → 5887.js} +3 -3
  12. package/dist/6438.js +140 -0
  13. package/dist/6976.js +280 -0
  14. package/dist/{8981.js.LICENSE.txt → 6976.js.LICENSE.txt} +108 -0
  15. package/dist/7410.js +1 -2
  16. package/dist/@byted-doubao-apps/create.js +1 -1
  17. package/dist/@byted-doubao-apps/kit.js +1 -1
  18. package/dist/@byted-doubao-apps/login.js +2 -2
  19. package/dist/@byted-doubao-apps/login~1.js +2 -2
  20. package/dist/@byted-doubao-apps/template-empty/package.json +3 -3
  21. package/dist/@byted-doubao-apps/template-starter/package.json +3 -3
  22. package/dist/@byted-hdt/cli.js +1 -1
  23. package/dist/@inquirer/select.js +1 -1
  24. package/dist/{assets/web-sdk-debugger/static/wasm/eaf690f2cd.module.wasm → @lynx-js/static/wasm/77fb77f77f.module.wasm} +0 -0
  25. package/dist/@lynx-js/{web-core-canary.js → web-core.js} +2 -2
  26. package/dist/app.js +1 -1
  27. package/dist/assets/web-sdk-debugger/__doubao_web_sdk_native_modules/applet-bridge-module-core.js +1 -1
  28. package/dist/assets/web-sdk-debugger/index.html +1 -1
  29. package/dist/assets/web-sdk-debugger/preact-devtools/index.js +4 -1
  30. package/dist/assets/web-sdk-debugger/static/css/index.ef5d8bc5ad.css +1 -0
  31. package/dist/assets/web-sdk-debugger/static/js/{682.de47e82f6b.js → 426.53c43a8594.js} +2 -2
  32. package/dist/assets/web-sdk-debugger/static/js/479.26e0b1d922.js +1829 -0
  33. package/dist/assets/web-sdk-debugger/static/js/async/503.259fed5610.js +1 -0
  34. package/dist/assets/web-sdk-debugger/static/js/async/{legacy-wasm-js.bacc8b5564.js → legacy-wasm-js.9b9367f818.js} +2 -2
  35. package/dist/assets/web-sdk-debugger/static/js/async/lynx-core-chunk.7f5e94dfae.js +5 -0
  36. package/dist/assets/web-sdk-debugger/static/js/async/web-core-main-chunk.f78260697f.js +1 -0
  37. package/dist/assets/web-sdk-debugger/static/js/async/web-core-markup-encoder.33c43c480e.js +4 -0
  38. package/dist/assets/web-sdk-debugger/static/js/async/web-core-template-loader-thread.ba290b32d7.js +4 -0
  39. package/dist/assets/web-sdk-debugger/static/js/async/web-core-worker-chunk.9a5989b104.js +1 -0
  40. package/dist/assets/web-sdk-debugger/static/js/async/web-elements.3fbd53918e.js +365 -0
  41. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.efd0ffb051.js +5 -0
  42. package/dist/assets/web-sdk-debugger/static/js/async/{xmarkdown-deps.3ea5672b2c.js.LICENSE.txt → xmarkdown-deps.efd0ffb051.js.LICENSE.txt} +1 -1
  43. package/dist/assets/web-sdk-debugger/static/js/index.b6e5c76345.js +44 -0
  44. package/dist/assets/web-sdk-debugger/static/js/lib-polyfill.c91181f230.js +1 -0
  45. package/dist/assets/web-sdk-debugger/static/wasm/{69a8ba8eb9.module.wasm → 4c402c7981.module.wasm} +0 -0
  46. package/dist/assets/web-sdk-debugger/static/wasm/{03b02f9e5a.module.wasm → 72aaf7d0aa.module.wasm} +0 -0
  47. package/dist/{@lynx-js/static/wasm/eaf690f2cd.module.wasm → assets/web-sdk-debugger/static/wasm/77fb77f77f.module.wasm} +0 -0
  48. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-api.template.js +0 -0
  49. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-framework.template.js +0 -0
  50. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-react-dev.template.js +0 -0
  51. package/dist/assets/web-sdk-debugger/wsd/doubao-apps-react.template.js +0 -0
  52. package/dist/browser.js +1 -1
  53. package/dist/build.js +1 -1
  54. package/dist/build~1.js +10 -10
  55. package/dist/check.js +1 -1
  56. package/dist/client.js +1 -0
  57. package/dist/client~1.js +1 -0
  58. package/dist/components-loader.js +1 -1
  59. package/dist/demo-server.js +2 -2
  60. package/dist/demo.js +2 -2
  61. package/dist/dev-config.js +2 -2
  62. package/dist/dev-shell.js +1 -1
  63. package/dist/dev.js +19 -16
  64. package/dist/explore.js +10 -0
  65. package/dist/gen-explore.js +1 -1
  66. package/dist/gen-trajectory.js +1 -1
  67. package/dist/info.js +2 -2
  68. package/dist/init.js +4 -4
  69. package/dist/ink.js +1 -1
  70. package/dist/inquirer.js +1 -1
  71. package/dist/json-file.js +2 -2
  72. package/dist/legacy-status.js +1 -1
  73. package/dist/legacy-upload.js +1 -1
  74. package/dist/lepus.js +1 -1
  75. package/dist/login.js +2 -1
  76. package/dist/main.js +1 -1
  77. package/dist/{manifest-mcp-config.js → manifest-headers.js} +1 -1
  78. package/dist/ora.js +1 -1
  79. package/dist/portal.js +1 -1
  80. package/dist/project-layout.js +1 -1
  81. package/dist/project.js +1 -1
  82. package/dist/prompt.js +8 -8
  83. package/dist/prompts.js +1 -1
  84. package/dist/qrcode.js +1 -0
  85. package/dist/report.js +1 -1
  86. package/dist/run-registry.js +1 -1
  87. package/dist/run.js +321 -321
  88. package/dist/sandbox.js +1 -1
  89. package/dist/scan.js +1 -1
  90. package/dist/sdk.js +192 -59
  91. package/dist/sdk~1.js +66 -58
  92. package/dist/server.js +10 -10
  93. package/dist/skill.js +1 -1
  94. package/dist/skills.js +1 -1
  95. package/dist/skills~1.js +1 -1
  96. package/dist/status.js +1 -1
  97. package/dist/status~1.js +2 -2
  98. package/dist/stop.js +1 -1
  99. package/dist/sync.js +1 -1
  100. package/dist/trajectory.js +3 -0
  101. package/dist/update.js +1 -1
  102. package/dist/upgrade.js +1 -1
  103. package/dist/workspace.js +1 -1
  104. package/dist/yaml.js +1 -1
  105. package/package.json +7 -6
  106. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/02-/347/263/273/347/273/237.md +2 -2
  107. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +4 -0
  108. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +8 -0
  109. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/26-/345/237/272/347/241/200/344/277/241/346/201/257.md +2 -1
  110. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/33-/345/261/217/345/271/225.md +124 -8
  111. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/groups.md +1 -1
  112. package/skills/doubao-agentic-service-development/references/frontend/doubao-agentic-service-api/quick-reference.md +2 -1
  113. package/skills/doubao-agentic-service-development/references/frontend/examples/page-widget-basics.md +1 -0
  114. package/skills/doubao-agentic-service-development/references/frontend/guides/client-tools-and-events.md +209 -0
  115. package/skills/doubao-agentic-service-development/references/frontend/guides/component-development.md +7 -1
  116. package/skills/doubao-agentic-service-development/references/frontend/guides/debugger-mcp.md +1 -1
  117. package/skills/doubao-agentic-service-development/references/frontend/widget-templates/overview.md +13 -9
  118. package/skills/doubao-agentic-service-development/references/frontend/widget-templates/props.md +26 -1
  119. package/skills/doubao-agentic-service-development/references/frontend-dev.md +2 -0
  120. package/dist/2168.js +0 -60
  121. package/dist/318.js +0 -1
  122. package/dist/3974.js +0 -151
  123. package/dist/6427.js +0 -126
  124. package/dist/7417.js +0 -204
  125. package/dist/7417.js.LICENSE.txt +0 -107
  126. package/dist/7945.js +0 -1
  127. package/dist/8981.js +0 -78
  128. package/dist/assets/web-sdk-debugger/static/css/index.7c65607402.css +0 -1
  129. package/dist/assets/web-sdk-debugger/static/js/670.8a8f0f7d57.js +0 -1829
  130. package/dist/assets/web-sdk-debugger/static/js/async/503.cf61731bba.js +0 -1
  131. package/dist/assets/web-sdk-debugger/static/js/async/lynx-core-chunk.afc1ded023.js +0 -5
  132. package/dist/assets/web-sdk-debugger/static/js/async/web-core-main-chunk.7fe9af852c.js +0 -1
  133. package/dist/assets/web-sdk-debugger/static/js/async/web-core-markup-encoder.f81d6d2cae.js +0 -4
  134. package/dist/assets/web-sdk-debugger/static/js/async/web-core-template-loader-thread.4a49f8a286.js +0 -4
  135. package/dist/assets/web-sdk-debugger/static/js/async/web-core-worker-chunk.c315fd6753.js +0 -1
  136. package/dist/assets/web-sdk-debugger/static/js/async/web-elements.43d1e29387.js +0 -365
  137. package/dist/assets/web-sdk-debugger/static/js/async/xmarkdown-deps.3ea5672b2c.js +0 -5
  138. package/dist/assets/web-sdk-debugger/static/js/index.9f626ba3a2.js +0 -44
  139. package/dist/assets/web-sdk-debugger/static/js/lib-polyfill.9daa7c863e.js +0 -1
  140. package/dist/simulator-client.js +0 -1
  141. /package/dist/{7410.js.LICENSE.txt → 1611.js.LICENSE.txt} +0 -0
  142. /package/dist/assets/web-sdk-debugger/static/js/{670.8a8f0f7d57.js.LICENSE.txt → 479.26e0b1d922.js.LICENSE.txt} +0 -0
package/dist/json-file.js CHANGED
@@ -1,2 +1,2 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./7945.js";let r=e("node:fs");var o=e.n(r);let t=e("node:path");var i=e.n(t);function n(e,r,t={}){o().mkdirSync(i().dirname(e),{recursive:!0});let c=`${e}.${process.pid}.${Date.now()}.tmp`,d=`${JSON.stringify(r,null,2)}
2
- `;try{o().writeFileSync(c,d,{encoding:"utf8",mode:t.mode}),o().renameSync(c,e),void 0!==t.mode&&o().chmodSync(e,t.mode)}catch(r){if("ENOSPC"===r.code)throw Error(`atomicWriteJson(${e}): disk full (ENOSPC). Free up space and re-run with --resume.`);if("EACCES"===r.code||"EPERM"===r.code)throw Error(`atomicWriteJson(${e}): permission denied (${r.code}). Check filesystem permissions.`);throw r}finally{try{o().rmSync(c,{force:!0})}catch{}}}function c(e){try{return JSON.parse(o().readFileSync(e,"utf8"))}catch{return}}export{n as atomicWriteJson,c as readJsonIfExists};
1
+ import"node:module";import{__webpack_require__ as r}from"./rslib-runtime.js";import"./1264.js";let e=r("node:fs");var o=r.n(e);let t=r("node:path");var n=r.n(t);function c(r,e,t={}){o().mkdirSync(n().dirname(r),{recursive:!0});let i=`${r}.${process.pid}.${Date.now()}.tmp`,d=`${JSON.stringify(e,null,2)}
2
+ `;try{o().writeFileSync(i,d,{encoding:"utf8",mode:t.mode}),o().renameSync(i,r),void 0!==t.mode&&o().chmodSync(r,t.mode)}catch(e){if("ENOSPC"===e.code)throw Error(`写入 JSON 文件 ${r} 失败:磁盘空间不足(ENOSPC)。请释放空间后使用 --resume 重试。`);if("EACCES"===e.code||"EPERM"===e.code)throw Error(`写入 JSON 文件 ${r} 失败:权限不足(${e.code})。请检查文件系统权限。`);throw e}finally{try{o().rmSync(i,{force:!0})}catch{}}}function i(r){try{return JSON.parse(o().readFileSync(r,"utf8"))}catch{return}}export{c as atomicWriteJson,i as readJsonIfExists};
@@ -1 +1 @@
1
- import"node:module";import{parsePositiveInteger as t,runCommand as a,command_Command as e,option_Option as n}from"./2168.js";import{runArtifactsStatus as o}from"./status~1.js";export default function(){return new e("status").description("查询或轮询版本产物构建状态").option("--app-id <app-id>","兼容参数;manifest 存在时必须与 app_key 一致").option("--project <path>","项目路径,用于按项目布局读取 Manifest",".").requiredOption("--version-tag <tag>","版本号").option("--poll","持续轮询直到构建成功、失败或超时",!1).addOption(new n("--interval-seconds <seconds>","轮询间隔秒数").default(5).argParser(t)).addOption(new n("--timeout-seconds <seconds>","轮询超时时间秒数").default(300).argParser(t)).action(async(t,e)=>a(e,async a=>{try{return await o(a,t)}finally{a.warn("当前命令仅为兼容保留:dbx app artifacts status\n请改用:dbx build status <version>",{style:"deprecated"})}}))};
1
+ import"node:module";import{parsePositiveInteger as t,runCommand as a,command_Command as e,option_Option as n}from"./2232.js";import{runArtifactsStatus as o}from"./status~1.js";export default function(){return new e("status").description("查询或轮询版本产物构建状态").option("--app-id <app-id>","兼容参数;manifest 存在时必须与 app_key 一致").option("--project <path>","项目路径,用于按项目布局读取 Manifest",".").requiredOption("--version-tag <tag>","版本号").option("--poll","持续轮询直到构建成功、失败或超时",!1).addOption(new n("--interval-seconds <seconds>","轮询间隔秒数").default(5).argParser(t)).addOption(new n("--timeout-seconds <seconds>","轮询超时时间秒数").default(300).argParser(t)).action(async(t,e)=>a(e,async a=>{try{return await o(a,t)}finally{a.warn("当前命令仅为兼容保留:dbx app artifacts status\n请改用:dbx build status <version>",{style:"deprecated"})}}))};
@@ -1 +1 @@
1
- import"node:module";import{command_Command as t,runCommand as e}from"./2168.js";import{uploadArtifacts as p}from"./build~1.js";export default function(){return new t("upload").description("上传产物并触发云构建").option("--app-id <app-id>","兼容参数;必须与 manifest.app_key 一致").option("--release","创建正式版本,版本号由后端生成;未传时创建测试版本",!1).option("--project <path>","项目路径;默认使用当前目录",".").option("--env <path>","构建变量文件;真实文件名须以 .env 开头,相对 --project 解析").option("--secret-env <path>","秘密构建变量文件;覆盖 --env 中的同名变量").option("--manifest <path>","manifest.yaml 路径;默认按项目布局自动解析").option("--skill <path>","Skill 目录路径;显式目录优先,相对路径按 --project 解析;未传默认 skill/,递归打包所有 SKILL.md").option("--frontend-code <path>","前端源码目录路径;默认按项目布局自动解析").option("--business-templates <path>","business-templates.yaml 路径;默认读取项目根目录同名文件").option("--business-templates-only","仅上传业务模板,不构建或提交其他产物",!1).option("--keep-packages","上传后保留本次打包生成的临时包,用于调试",!1).action(async(t,o)=>e(o,async e=>{try{return await p(e,t)}finally{e.warn("当前命令仅为兼容保留:dbx app artifacts upload\n请改用:dbx build;仅同步业务模板请使用 dbx config sync business-templates",{style:"deprecated"})}}))};
1
+ import"node:module";import{command_Command as t,runCommand as e}from"./2232.js";import{uploadArtifacts as p}from"./build~1.js";export default function(){return new t("upload").description("上传产物并触发云构建").option("--app-id <app-id>","兼容参数;必须与 manifest.app_key 一致").option("--release","创建正式版本,版本号由后端生成;未传时创建测试版本",!1).option("--project <path>","项目路径;默认使用当前目录",".").option("--env <path>","构建变量文件;真实文件名须以 .env 开头,相对 --project 解析").option("--secret-env <path>","秘密构建变量文件;覆盖 --env 中的同名变量").option("--manifest <path>","manifest.yaml 路径;默认按项目布局自动解析").option("--skill <path>","Skill 目录路径;显式目录优先,相对路径按 --project 解析;未传默认 skill/,递归打包所有 SKILL.md").option("--frontend-code <path>","前端源码目录路径;默认按项目布局自动解析").option("--business-templates <path>","business-templates.yaml 路径;默认读取项目根目录同名文件").option("--business-templates-only","仅上传业务模板,不构建或提交其他产物",!1).option("--keep-packages","上传后保留本次打包生成的临时包,用于调试",!1).action(async(t,o)=>e(o,async e=>{try{return await p(e,t)}finally{e.warn("当前命令仅为兼容保留:dbx app artifacts upload\n请改用:dbx build;仅同步业务模板请使用 dbx config sync business-templates",{style:"deprecated"})}}))};
package/dist/lepus.js CHANGED
@@ -1,4 +1,4 @@
1
- import"node:module";import{__webpack_require__ as x}from"./rslib-runtime.js";import"./3551.js";import"./7945.js";import{fileURLToPath as _}from"node:url";import{dirname as a}from"node:path";var r=_(import.meta.url);a(_(import.meta.url)),x.add({"../../../node_modules/.pnpm/@byted-lynx+tasm@4.4.40_debug@4.4.3/node_modules/@byted-lynx/tasm/lepus.js"(x,_,a){var e,A=(e=globalThis.document?.currentScript?.src,async function(x={}){let _,A;!function(){function x(x){for(var _=(x=x.split("-")[0]).split(".").slice(0,3);_.length<3;)_.push("00");return(_=_.map((x,_,a)=>x.padStart(2,"0"))).join("")}var _=x=>[x/1e4|0,(x/100|0)%100,x%100].join("."),a="u">typeof process&&process.versions?.node?x(process.versions.node):0x7fffffff;if(a<16e4)throw Error(`This emscripten-generated code requires node v${_(16e4)} (detected v${_(a)})`);var r="u">typeof navigator&&navigator.userAgent;if(r){var e=r.includes("Safari/")&&!r.includes("Chrome/")&&r.match(/Version\/(\d+\.?\d*\.?\d*)/)?x(r.match(/Version\/(\d+\.?\d*\.?\d*)/)[1]):0x7fffffff;if(e<15e4)throw Error(`This emscripten-generated code requires Safari v${_(15e4)} (detected v${e})`);var A=r.match(/Firefox\/(\d+(?:\.\d+)?)/)?parseFloat(r.match(/Firefox\/(\d+(?:\.\d+)?)/)[1]):0x7fffffff;if(A<79)throw Error(`This emscripten-generated code requires Firefox v79 (detected v${A})`);var t=r.match(/Chrome\/(\d+(?:\.\d+)?)/)?parseFloat(r.match(/Chrome\/(\d+(?:\.\d+)?)/)[1]):0x7fffffff;if(t<85)throw Error(`This emscripten-generated code requires Chrome v85 (detected v${t})`)}}();var t,n,s,i,v,l,c,o,f,d,b,u,E,j,m,h,p,S,g,y,I,N,B=!!globalThis.window,F=!!globalThis.WorkerGlobalScope,P=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer",q=!B&&!P&&!F,L="./this.program";e=r;if(P){if(!(globalThis.process?.versions?.node&&globalThis.process?.type!="renderer"))throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var w=a("fs");i=x=>{x=C(x)?new URL(x):x;var _=w.readFileSync(x);return G(Buffer.isBuffer(_)),_},s=async(x,_=!0)=>{x=C(x)?new URL(x):x;var a=w.readFileSync(x,_?void 0:"utf8");return G(_?Buffer.isBuffer(a):"string"==typeof a),a},process.argv.length>1&&(L=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else if(q);else if(B||F){try{new URL(".",e).href}catch{}if(!(globalThis.window||globalThis.WorkerGlobalScope))throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");F&&(i=x=>{var _=new XMLHttpRequest;return _.open("GET",x,!1),_.responseType="arraybuffer",_.send(null),new Uint8Array(_.response)}),s=async x=>{if(C(x))return new Promise((_,a)=>{var r=new XMLHttpRequest;r.open("GET",x,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?_(r.response):a(r.status)},r.onerror=a,r.send(null)});var _=await fetch(x,{credentials:"same-origin"});if(_.ok)return _.arrayBuffer();throw Error(_.status+" : "+_.url)}}else throw Error("environment detection error");var D=console.log.bind(console),T=console.error.bind(console);G(!q,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),globalThis.WebAssembly||T("no native wasm support detected");var k=!1;function G(x,_){x||M("Assertion failed"+(_?": "+_:""))}var C=x=>x.startsWith("file://");function $(){if(!k){var x=aS();0==x&&(x+=4);var _=u[x>>>2>>>0],a=u[x+4>>>2>>>0];(0x2135467!=_||0x89bacdfe!=a)&&M(`Stack overflow! Stack cookie has been overwritten at ${xx(x)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${xx(a)} ${xx(_)}`),0x63736d65!=u[0]&&M("Runtime error: The application has corrupted its heap memory area (address zero)!")}}class X extends Error{}class K extends X{constructor(x){super(x),this.excPtr=x;let _=al(x);this.name=_[0],this.message=_[1]}}function R(_){Object.getOwnPropertyDescriptor(x,_)||Object.defineProperty(x,_,{configurable:!0,set(){M(`Attempt to set \`Module.${_}\` after it has already been processed. This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`)}})}function Z(x){return()=>G(!1,`call to '${x}' via reference taken before Wasm module initialization`)}function O(_){Object.getOwnPropertyDescriptor(x,_)||Object.defineProperty(x,_,{configurable:!0,get(){var x=`'${_}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;("FS_createPath"===_||"FS_createDataFile"===_||"FS_createPreloadedFile"===_||"FS_preloadFile"===_||"FS_unlink"===_||"addRunDependency"===_||"FS_createLazyFile"===_||"FS_createDevice"===_||"removeRunDependency"===_)&&(x+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),M(x)}})}N=new Int8Array((I=new Int16Array(1)).buffer),I[0]=25459,(115!==N[0]||99!==N[1])&&M("Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)");var J=!1;function V(){var _=aL.buffer;c=new Int8Array(_),f=new Int16Array(_),x.HEAPU8=o=new Uint8Array(_),d=new Uint16Array(_),b=new Int32Array(_),u=new Uint32Array(_),E=new Float32Array(_),j=new Float64Array(_),m=new BigInt64Array(_),h=new BigUint64Array(_)}function M(_){x.onAbort?.(_),T(_="Aborted("+_+")"),k=!0;var a=new WebAssembly.RuntimeError(_);throw l?.(a),a}function H(x,_){return(...a)=>{G(J,`native function \`${x}\` called before runtime initialization`);var r=y[x];return G(r,`exported native function \`${x}\` not found`),G(a.length<=_,`native function \`${x}\` called with ${a.length} args but expects ${_}`),r(...a)}}G(globalThis.Int32Array&&globalThis.Float64Array&&Int32Array.prototype.subarray&&Int32Array.prototype.set,"JS engine does not provide full typed array support");var U=_=>{for(;_.length>0;)_.shift()(x)},Q=[],Y=x=>Q.push(x),z=[],W=x=>z.push(x),xx=x=>(G("number"==typeof x,`ptrToString expects a number, got ${typeof x}`),"0x"+(x>>>=0).toString(16).padStart(8,"0")),x_=()=>aI(),xa=x=>{xa.shown||={},xa.shown[x]||(xa.shown[x]=1,P&&(x="warning: "+x),T(x))};function xr(){M("missing function: _ZN4lynx4tasm12TreeResolver16FromTemplateInfoERKNS0_19ElementTemplateInfoE")}function xe(){M("missing function: _ZN4lynx4tasm14ElementManager15CreateFiberNodeERKNS_4base6StringE")}function xA(){M("missing function: _ZN4lynx4tasm14ElementManager18CreateFiberElementENS0_21ElementBuiltInTagEnumERKNS_4base6StringE")}function xt(){M("missing function: _ZN4lynx4tasm14ElementManager23PrepareNodeForInspectorEPNS0_7ElementE")}function xn(){M("missing function: _ZN4lynx4tasm14ElementManager28OnElementNodeSetForInspectorEPNS0_7ElementE")}function xs(){M("missing function: _ZN4lynx4tasm14ElementManager30OnElementNodeAddedForInspectorEPNS0_7ElementE")}function xi(){M("missing function: _ZN4lynx4tasm14ElementManager31CheckAndProcessSlotForInspectorEPNS0_7ElementE")}function xv(){M("missing function: _ZN4lynx4tasm17TemplateAssembler23TriggerLepusBridgeAsyncERKNSt3__212basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_5lepus5ValueEb")}function xl(){M("missing function: _ZN4lynx4tasm19TemplateEntryHolder9FindEntryERKNSt3__212basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE")}function xc(){M("missing function: _ZN4lynx4tasm6report12EventTracker7OnEventENS_4base15MoveOnlyClosureIvJRNS1_13MoveOnlyEventEEEE")}function xo(){M("missing function: _ZN4lynx4tasm7Element10AddDatasetERKNS_4base6StringERKNS_5lepus5ValueE")}function xf(){M("missing function: _ZN4lynx4tasm7Element13SetIdSelectorERKNS_4base6StringE")}function xd(){M("missing function: _ZN4lynx4tasm7Element15SetParsedStylesEONS_4base15LinearSearchMapINS0_13CSSPropertyIDENS0_8CSSValueENS0_25MapKeyPolicyCSSPropertyIDELm0ELb0EEEONS3_INS2_6StringES9_NS2_20ReducedHashKeyPolicyIS9_EELm0ELb0EEE")}function xb(){M("missing function: _ZN4lynx4tasm7Element17SetJSEventHandlerERKNS_4base6StringES5_S5_")}function xu(){M("missing function: _ZN4lynx4tasm7Element8SetClassERKNS_4base6StringE")}function xE(){M("missing function: _ZN4lynx4tasm7Element8SetStyleENS0_13CSSPropertyIDERKNS_5lepus5ValueE")}function xj(){M("missing function: _ZN4lynx5event20ClosureEventListenerC1EONS_4base15MoveOnlyClosureIvJNS_5lepus5ValueEEEERKNS0_13EventListener7OptionsENS1_11ClosureTypeERKS5_")}xr.stub=!0,xe.stub=!0,xA.stub=!0,xt.stub=!0,xn.stub=!0,xs.stub=!0,xi.stub=!0,xv.stub=!0,xl.stub=!0,xc.stub=!0,xo.stub=!0,xf.stub=!0,xd.stub=!0,xb.stub=!0,xu.stub=!0,xE.stub=!0,xj.stub=!0;var xm=x=>x<-0x20000000000000||x>0x20000000000000?NaN:Number(x),xh=globalThis.TextDecoder&&new TextDecoder,xp=(x,_,a,r)=>{var e=_+a;if(r)return e;for(;x[_]&&!(_>=e);)++_;return _},xS=(x,_=0,a,r)=>{var e=xp(x,_>>>=0,a,r);if(e-_>16&&x.buffer&&xh)return xh.decode(x.subarray(_,e));for(var A="";_<e;){var t=x[_++];if(!(128&t)){A+=String.fromCharCode(t);continue}var n=63&x[_++];if((224&t)==192){A+=String.fromCharCode((31&t)<<6|n);continue}var s=63&x[_++];if((240&t)==224?t=(15&t)<<12|n<<6|s:((248&t)!=240&&xa("Invalid UTF-8 leading byte "+xx(t)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),t=(7&t)<<18|n<<12|s<<6|63&x[_++]),t<65536)A+=String.fromCharCode(t);else{var i=t-65536;A+=String.fromCharCode(55296|i>>10,56320|1023&i)}}return A},xg=(x,_,a)=>(G("number"==typeof x,`UTF8ToString expects a number (got ${typeof x})`),(x>>>=0)?xS(o,x,_,a):""),xy=[],xI=0,xN=0;class xB{constructor(x){this.excPtr=x,this.ptr=x-24}set_type(x){u[this.ptr+4>>>2>>>0]=x}get_type(){return u[this.ptr+4>>>2>>>0]}set_destructor(x){u[this.ptr+8>>>2>>>0]=x}get_destructor(){return u[this.ptr+8>>>2>>>0]}set_caught(x){x=+!!x,c[this.ptr+12>>>0]=x}get_caught(){return 0!=c[this.ptr+12>>>0]}set_rethrown(x){x=+!!x,c[this.ptr+13>>>0]=x}get_rethrown(){return 0!=c[this.ptr+13>>>0]}init(x,_){this.set_adjusted_ptr(0),this.set_type(x),this.set_destructor(_)}set_adjusted_ptr(x){u[this.ptr+16>>>2>>>0]=x}get_adjusted_ptr(){return u[this.ptr+16>>>2>>>0]}}var xF=x=>ah(x),xP=x=>{var _=xN?.excPtr;if(!_)return xF(0),0;var a=new xB(_);a.set_adjusted_ptr(_);var r=a.get_type();if(!r)return xF(0),_;for(var e of x){if(0===e||e===r)break;var A=a.ptr+16;if(aP(e,r,A))return xF(e),_}return xF(r),_},xq=()=>{var x=xy.pop();x||M("no exception to throw");var _=x.excPtr;throw!x.get_rethrown()&&(xy.push(x),x.set_rethrown(!0),x.set_caught(!1),xI++),xN=new K(_)},xL=()=>{G(void 0!=x1.varargs);var x=b[x1.varargs>>>2>>>0];return x1.varargs+=4,x},xw={isAbs:x=>"/"===x.charAt(0),splitPath:x=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(x).slice(1),normalizeArray:(x,_)=>{for(var a=0,r=x.length-1;r>=0;r--){var e=x[r];"."===e?x.splice(r,1):".."===e?(x.splice(r,1),a++):a&&(x.splice(r,1),a--)}if(_)for(;a;a--)x.unshift("..");return x},normalize:x=>{var _=xw.isAbs(x),a="/"===x.slice(-1);return(x=xw.normalizeArray(x.split("/").filter(x=>!!x),!_).join("/"))||_||(x="."),x&&a&&(x+="/"),(_?"/":"")+x},dirname:x=>{var _=xw.splitPath(x),a=_[0],r=_[1];return a||r?(r&&(r=r.slice(0,-1)),a+r):"."},basename:x=>x&&x.match(/([^\/]+|\/)\/*$/)[1],join:(...x)=>xw.normalize(x.join("/")),join2:(x,_)=>xw.normalize(x+"/"+_)},xD=x=>{(xD=(()=>{if(P){var x=a("crypto");return _=>x.randomFillSync(_)}return x=>crypto.getRandomValues(x)})())(x)},xT={resolve:(...x)=>{for(var _="",a=!1,r=x.length-1;r>=-1&&!a;r--){var e=r>=0?x[r]:x0.cwd();if("string"!=typeof e)throw TypeError("Arguments to path.resolve must be strings");if(!e)return"";_=e+"/"+_,a=xw.isAbs(e)}return _=xw.normalizeArray(_.split("/").filter(x=>!!x),!a).join("/"),(a?"/":"")+_||"."},relative:(x,_)=>{function a(x){for(var _=0;_<x.length&&""===x[_];_++);for(var a=x.length-1;a>=0&&""===x[a];a--);return _>a?[]:x.slice(_,a-_+1)}x=xT.resolve(x).slice(1),_=xT.resolve(_).slice(1);for(var r=a(x.split("/")),e=a(_.split("/")),A=Math.min(r.length,e.length),t=A,n=0;n<A;n++)if(r[n]!==e[n]){t=n;break}for(var s=[],n=t;n<r.length;n++)s.push("..");return(s=s.concat(e.slice(t))).join("/")}},xk=[],xG=x=>{for(var _=0,a=0;a<x.length;++a){var r=x.charCodeAt(a);r<=127?_++:r<=2047?_+=2:r>=55296&&r<=57343?(_+=4,++a):_+=3}return _},xC=(x,_,a,r)=>{if(a>>>=0,G("string"==typeof x,`stringToUTF8Array expects a string (got ${typeof x})`),!(r>0))return 0;for(var e=a,A=a+r-1,t=0;t<x.length;++t){var n=x.codePointAt(t);if(n<=127){if(a>=A)break;_[a++>>>0]=n}else if(n<=2047){if(a+1>=A)break;_[a++>>>0]=192|n>>6,_[a++>>>0]=128|63&n}else if(n<=65535){if(a+2>=A)break;_[a++>>>0]=224|n>>12,_[a++>>>0]=128|n>>6&63,_[a++>>>0]=128|63&n}else{if(a+3>=A)break;n>1114111&&xa("Invalid Unicode code point "+xx(n)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),_[a++>>>0]=240|n>>18,_[a++>>>0]=128|n>>12&63,_[a++>>>0]=128|n>>6&63,_[a++>>>0]=128|63&n,t++}}return _[a>>>0]=0,a-e},x$=(x,_,a)=>{var r=Array(a>0?a:xG(x)+1),e=xC(x,r,0,r.length);return _&&(r.length=e),r},xX={ttys:[],init(){},shutdown(){},register(x,_){xX.ttys[x]={input:[],output:[],ops:_},x0.registerDevice(x,xX.stream_ops)},stream_ops:{open(x){var _=xX.ttys[x.node.rdev];if(!_)throw new x0.ErrnoError(43);x.tty=_,x.seekable=!1},close(x){x.tty.ops.fsync(x.tty)},fsync(x){x.tty.ops.fsync(x.tty)},read(x,_,a,r,e){if(!x.tty||!x.tty.ops.get_char)throw new x0.ErrnoError(60);for(var A,t=0,n=0;n<r;n++){try{A=x.tty.ops.get_char(x.tty)}catch(x){throw new x0.ErrnoError(29)}if(void 0===A&&0===t)throw new x0.ErrnoError(6);if(null==A)break;t++,_[a+n]=A}return t&&(x.node.atime=Date.now()),t},write(x,_,a,r,e){if(!x.tty||!x.tty.ops.put_char)throw new x0.ErrnoError(60);try{for(var A=0;A<r;A++)x.tty.ops.put_char(x.tty,_[a+A])}catch(x){throw new x0.ErrnoError(29)}return r&&(x.node.mtime=x.node.ctime=Date.now()),A}},default_tty_ops:{get_char:x=>(()=>{if(!xk.length){var x=null;if(P){var _=Buffer.alloc(256),a=0,r=process.stdin.fd;try{a=w.readSync(r,_,0,256)}catch(x){if(x.toString().includes("EOF"))a=0;else throw x}a>0&&(x=_.slice(0,a).toString("utf-8"))}else globalThis.window?.prompt&&null!==(x=window.prompt("Input: "))&&(x+="\n");if(!x)return null;xk=x$(x,!0)}return xk.shift()})(),put_char(x,_){null===_||10===_?(D(xS(x.output)),x.output=[]):0!=_&&x.output.push(_)},fsync(x){x.output?.length>0&&(D(xS(x.output)),x.output=[])},ioctl_tcgets:x=>({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:(x,_,a)=>0,ioctl_tiocgwinsz:x=>[24,80]},default_tty1_ops:{put_char(x,_){null===_||10===_?(T(xS(x.output)),x.output=[]):0!=_&&x.output.push(_)},fsync(x){x.output?.length>0&&(T(xS(x.output)),x.output=[])}}},xK=(x,_)=>(G(_,"alignment argument is required"),Math.ceil(x/_)*_),xR=x=>{let _;x=xK(x,65536);var a=au(65536,x);return a&&(_=x,o.fill(0,a,a+_)),a},xZ={ops_table:null,mount:x=>xZ.createNode(null,"/",16895,0),createNode(x,_,a,r){if(x0.isBlkdev(a)||x0.isFIFO(a))throw new x0.ErrnoError(63);xZ.ops_table||={dir:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr,lookup:xZ.node_ops.lookup,mknod:xZ.node_ops.mknod,rename:xZ.node_ops.rename,unlink:xZ.node_ops.unlink,rmdir:xZ.node_ops.rmdir,readdir:xZ.node_ops.readdir,symlink:xZ.node_ops.symlink},stream:{llseek:xZ.stream_ops.llseek}},file:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr},stream:{llseek:xZ.stream_ops.llseek,read:xZ.stream_ops.read,write:xZ.stream_ops.write,mmap:xZ.stream_ops.mmap,msync:xZ.stream_ops.msync}},link:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr,readlink:xZ.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr},stream:x0.chrdev_stream_ops}};var e=x0.createNode(x,_,a,r);return x0.isDir(e.mode)?(e.node_ops=xZ.ops_table.dir.node,e.stream_ops=xZ.ops_table.dir.stream,e.contents={}):x0.isFile(e.mode)?(e.node_ops=xZ.ops_table.file.node,e.stream_ops=xZ.ops_table.file.stream,e.usedBytes=0,e.contents=null):x0.isLink(e.mode)?(e.node_ops=xZ.ops_table.link.node,e.stream_ops=xZ.ops_table.link.stream):x0.isChrdev(e.mode)&&(e.node_ops=xZ.ops_table.chrdev.node,e.stream_ops=xZ.ops_table.chrdev.stream),e.atime=e.mtime=e.ctime=Date.now(),x&&(x.contents[_]=e,x.atime=x.mtime=x.ctime=e.atime),e},getFileDataAsTypedArray:x=>x.contents?x.contents.subarray?x.contents.subarray(0,x.usedBytes):new Uint8Array(x.contents):new Uint8Array(0),expandFileStorage(x,_){var a=x.contents?x.contents.length:0;if(!(a>=_)){_=Math.max(_,a*(a<1048576?2:1.125)>>>0),0!=a&&(_=Math.max(_,256));var r=x.contents;x.contents=new Uint8Array(_),x.usedBytes>0&&x.contents.set(r.subarray(0,x.usedBytes),0)}},resizeFileStorage(x,_){if(x.usedBytes!=_)if(0==_)x.contents=null,x.usedBytes=0;else{var a=x.contents;x.contents=new Uint8Array(_),a&&x.contents.set(a.subarray(0,Math.min(_,x.usedBytes))),x.usedBytes=_}},node_ops:{getattr(x){var _={};return _.dev=x0.isChrdev(x.mode)?x.id:1,_.ino=x.id,_.mode=x.mode,_.nlink=1,_.uid=0,_.gid=0,_.rdev=x.rdev,x0.isDir(x.mode)?_.size=4096:x0.isFile(x.mode)?_.size=x.usedBytes:x0.isLink(x.mode)?_.size=x.link.length:_.size=0,_.atime=new Date(x.atime),_.mtime=new Date(x.mtime),_.ctime=new Date(x.ctime),_.blksize=4096,_.blocks=Math.ceil(_.size/_.blksize),_},setattr(x,_){for(let a of["mode","atime","mtime","ctime"])null!=_[a]&&(x[a]=_[a]);void 0!==_.size&&xZ.resizeFileStorage(x,_.size)},lookup(x,_){throw new x0.ErrnoError(44)},mknod:(x,_,a,r)=>xZ.createNode(x,_,a,r),rename(x,_,a){var r;try{r=x0.lookupNode(_,a)}catch(x){}if(r){if(x0.isDir(x.mode))for(var e in r.contents)throw new x0.ErrnoError(55);x0.hashRemoveNode(r)}delete x.parent.contents[x.name],_.contents[a]=x,x.name=a,_.ctime=_.mtime=x.parent.ctime=x.parent.mtime=Date.now()},unlink(x,_){delete x.contents[_],x.ctime=x.mtime=Date.now()},rmdir(x,_){var a=x0.lookupNode(x,_);for(var r in a.contents)throw new x0.ErrnoError(55);delete x.contents[_],x.ctime=x.mtime=Date.now()},readdir:x=>[".","..",...Object.keys(x.contents)],symlink(x,_,a){var r=xZ.createNode(x,_,41471,0);return r.link=a,r},readlink(x){if(!x0.isLink(x.mode))throw new x0.ErrnoError(28);return x.link}},stream_ops:{read(x,_,a,r,e){var A=x.node.contents;if(e>=x.node.usedBytes)return 0;var t=Math.min(x.node.usedBytes-e,r);if(G(t>=0),t>8&&A.subarray)_.set(A.subarray(e,e+t),a);else for(var n=0;n<t;n++)_[a+n]=A[e+n];return t},write(x,_,a,r,e,A){if(G(!(_ instanceof ArrayBuffer)),_.buffer===c.buffer&&(A=!1),!r)return 0;var t=x.node;if(t.mtime=t.ctime=Date.now(),_.subarray&&(!t.contents||t.contents.subarray)){if(A)return G(0===e,"canOwn must imply no weird position inside the file"),t.contents=_.subarray(a,a+r),t.usedBytes=r,r;else if(0===t.usedBytes&&0===e)return t.contents=_.slice(a,a+r),t.usedBytes=r,r;else if(e+r<=t.usedBytes)return t.contents.set(_.subarray(a,a+r),e),r}if(xZ.expandFileStorage(t,e+r),t.contents.subarray&&_.subarray)t.contents.set(_.subarray(a,a+r),e);else for(var n=0;n<r;n++)t.contents[e+n]=_[a+n];return t.usedBytes=Math.max(t.usedBytes,e+r),r},llseek(x,_,a){var r=_;if(1===a?r+=x.position:2===a&&x0.isFile(x.node.mode)&&(r+=x.node.usedBytes),r<0)throw new x0.ErrnoError(28);return r},mmap(x,_,a,r,e){if(!x0.isFile(x.node.mode))throw new x0.ErrnoError(43);var A,t,n=x.node.contents;if(!(2&e)&&n&&n.buffer===c.buffer)t=!1,A=n.byteOffset;else{if(t=!0,!(A=xR(_)))throw new x0.ErrnoError(48);n&&((a>0||a+_<n.length)&&(n=n.subarray?n.subarray(a,a+_):Array.prototype.slice.call(n,a,a+_)),c.set(n,A>>>0))}return{ptr:A,allocated:t}},msync:(x,_,a,r,e)=>(xZ.stream_ops.write(x,_,0,r,a,!1),0)}},xO=(x,_)=>{var a=0;return x&&(a|=365),_&&(a|=146),a},xJ={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},xV=async x=>{var _=await s(x);return G(_,`Loading data file "${x}" failed (no arrayBuffer).`),new Uint8Array(_)},xM=0,xH=null,xU={},xQ=null,xY=[],xz=async(x,_)=>{for(var a of("u">typeof Browser&&Browser.init(),xY))if(a.canHandle(_))return G("AsyncFunction"===a.handle.constructor.name,"Filesystem plugin handlers must be async functions (See #24914)"),a.handle(x,_);return x},xW=async(_,a,r,e,A,t,n,s)=>{var i=a?xT.resolve(xw.join2(_,a)):_,v=(x=>{for(var _=x;;){if(!xU[x])return x;x=_+Math.random()}})(`cp ${i}`);xM++,x.monitorRunDependencies?.(xM),G(v,"addRunDependency requires an ID"),G(!xU[v]),xU[v]=1,null===xQ&&globalThis.setInterval&&(xQ=setInterval(()=>{if(k){clearInterval(xQ),xQ=null;return}var x=!1;for(var _ in xU)x||(x=!0,T("still waiting on run dependencies:")),T(`dependency: ${_}`);x&&T("(end of list)")},1e4),xQ.unref?.());try{var l=r;"string"==typeof r&&(l=await xV(r)),l=await xz(l,i),s?.(),t||((...x)=>x0.createDataFile(...x))(_,a,l,e,A,n)}finally{if(xM--,x.monitorRunDependencies?.(xM),G(v,"removeRunDependency requires an ID"),G(xU[v]),delete xU[v],0==xM&&(null!==xQ&&(clearInterval(xQ),xQ=null),xH)){var c=xH;xH=null,c()}}},x0={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,readFiles:{},ErrnoError:class extends Error{name="ErrnoError";constructor(x){for(var _ in super(J?xg(ab(x)):""),this.errno=x,xJ)if(xJ[_]===x){this.code=_;break}}},FSStream:class{shared={};get object(){return this.node}set object(x){this.node=x}get isRead(){return(2097155&this.flags)!=1}get isWrite(){return(2097155&this.flags)!=0}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(x){this.shared.flags=x}get position(){return this.shared.position}set position(x){this.shared.position=x}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(x,_,a,r){x||(x=this),this.parent=x,this.mount=x.mount,this.id=x0.nextInode++,this.name=_,this.mode=a,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(x){x?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(x){x?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return x0.isDir(this.mode)}get isDevice(){return x0.isChrdev(this.mode)}},lookupPath(x,_={}){if(!x)throw new x0.ErrnoError(44);_.follow_mount??=!0,xw.isAbs(x)||(x=x0.cwd()+"/"+x);x:for(var a=0;a<40;a++){for(var r=x.split("/").filter(x=>!!x),e=x0.root,A="/",t=0;t<r.length;t++){var n=t===r.length-1;if(n&&_.parent)break;if("."!==r[t]){if(".."===r[t]){if(A=xw.dirname(A),x0.isRoot(e)){x=A+"/"+r.slice(t+1).join("/"),a--;continue x}e=e.parent;continue}A=xw.join2(A,r[t]);try{e=x0.lookupNode(e,r[t])}catch(x){if(x?.errno===44&&n&&_.noent_okay)return{path:A};throw x}if(x0.isMountpoint(e)&&(!n||_.follow_mount)&&(e=e.mounted.root),x0.isLink(e.mode)&&(!n||_.follow)){if(!e.node_ops.readlink)throw new x0.ErrnoError(52);var s=e.node_ops.readlink(e);xw.isAbs(s)||(s=xw.dirname(A)+"/"+s),x=s+"/"+r.slice(t+1).join("/");continue x}}}return{path:A,node:e}}throw new x0.ErrnoError(32)},getPath(x){for(var _;;){if(x0.isRoot(x)){var a=x.mount.mountpoint;if(!_)return a;return"/"!==a[a.length-1]?`${a}/${_}`:a+_}_=_?`${x.name}/${_}`:x.name,x=x.parent}},hashName(x,_){for(var a=0,r=0;r<_.length;r++)a=(a<<5)-a+_.charCodeAt(r)|0;return(x+a>>>0)%x0.nameTable.length},hashAddNode(x){var _=x0.hashName(x.parent.id,x.name);x.name_next=x0.nameTable[_],x0.nameTable[_]=x},hashRemoveNode(x){var _=x0.hashName(x.parent.id,x.name);if(x0.nameTable[_]===x)x0.nameTable[_]=x.name_next;else for(var a=x0.nameTable[_];a;){if(a.name_next===x){a.name_next=x.name_next;break}a=a.name_next}},lookupNode(x,_){var a=x0.mayLookup(x);if(a)throw new x0.ErrnoError(a);for(var r=x0.hashName(x.id,_),e=x0.nameTable[r];e;e=e.name_next){var A=e.name;if(e.parent.id===x.id&&A===_)return e}return x0.lookup(x,_)},createNode(x,_,a,r){G("object"==typeof x);var e=new x0.FSNode(x,_,a,r);return x0.hashAddNode(e),e},destroyNode(x){x0.hashRemoveNode(x)},isRoot:x=>x===x.parent,isMountpoint:x=>!!x.mounted,isFile:x=>(61440&x)==32768,isDir:x=>(61440&x)==16384,isLink:x=>(61440&x)==40960,isChrdev:x=>(61440&x)==8192,isBlkdev:x=>(61440&x)==24576,isFIFO:x=>(61440&x)==4096,isSocket:x=>(49152&x)==49152,flagsToPermissionString(x){var _=["r","w","rw"][3&x];return 512&x&&(_+="w"),_},nodePermissions:(x,_)=>x0.ignorePermissions?0:_.includes("r")&&!(292&x.mode)||_.includes("w")&&!(146&x.mode)||_.includes("x")&&!(73&x.mode)?2:0,mayLookup(x){if(!x0.isDir(x.mode))return 54;var _=x0.nodePermissions(x,"x");return _||2*!x.node_ops.lookup},mayCreate(x,_){if(!x0.isDir(x.mode))return 54;try{return x0.lookupNode(x,_),20}catch(x){}return x0.nodePermissions(x,"wx")},mayDelete(x,_,a){try{r=x0.lookupNode(x,_)}catch(x){return x.errno}var r,e=x0.nodePermissions(x,"wx");if(e)return e;if(a){if(!x0.isDir(r.mode))return 54;if(x0.isRoot(r)||x0.getPath(r)===x0.cwd())return 10}else if(x0.isDir(r.mode))return 31;return 0},mayOpen:(x,_)=>x?x0.isLink(x.mode)?32:x0.isDir(x.mode)&&("r"!==x0.flagsToPermissionString(_)||576&_)?31:x0.nodePermissions(x,x0.flagsToPermissionString(_)):44,checkOpExists(x,_){if(!x)throw new x0.ErrnoError(_);return x},MAX_OPEN_FDS:4096,nextfd(){for(var x=0;x<=x0.MAX_OPEN_FDS;x++)if(!x0.streams[x])return x;throw new x0.ErrnoError(33)},getStreamChecked(x){var _=x0.getStream(x);if(!_)throw new x0.ErrnoError(8);return _},getStream:x=>x0.streams[x],createStream:(x,_=-1)=>(G(_>=-1),x=Object.assign(new x0.FSStream,x),-1==_&&(_=x0.nextfd()),x.fd=_,x0.streams[_]=x,x),closeStream(x){x0.streams[x]=null},dupStream(x,_=-1){var a=x0.createStream(x,_);return a.stream_ops?.dup?.(a),a},doSetAttr(x,_,a){var r=x?.stream_ops.setattr,e=r?x:_;r??=_.node_ops.setattr,x0.checkOpExists(r,63),r(e,a)},chrdev_stream_ops:{open(x){var _=x0.getDevice(x.node.rdev);x.stream_ops=_.stream_ops,x.stream_ops.open?.(x)},llseek(){throw new x0.ErrnoError(70)}},major:x=>x>>8,minor:x=>255&x,makedev:(x,_)=>x<<8|_,registerDevice(x,_){x0.devices[x]={stream_ops:_}},getDevice:x=>x0.devices[x],getMounts(x){for(var _=[],a=[x];a.length;){var r=a.pop();_.push(r),a.push(...r.mounts)}return _},syncfs(x,_){"function"==typeof x&&(_=x,x=!1),x0.syncFSRequests++,x0.syncFSRequests>1&&T(`warning: ${x0.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var a=x0.getMounts(x0.root.mount),r=0;function e(x){return G(x0.syncFSRequests>0),x0.syncFSRequests--,_(x)}function A(x){if(x)return A.errored?void 0:(A.errored=!0,e(x));++r>=a.length&&e(null)}for(var t of a)t.type.syncfs?t.type.syncfs(t,x,A):A(null)},mount(x,_,a){if("string"==typeof x)throw x;var r,e="/"===a,A=!a;if(e&&x0.root)throw new x0.ErrnoError(10);if(!e&&!A){var t=x0.lookupPath(a,{follow_mount:!1});if(a=t.path,r=t.node,x0.isMountpoint(r))throw new x0.ErrnoError(10);if(!x0.isDir(r.mode))throw new x0.ErrnoError(54)}var n={type:x,opts:_,mountpoint:a,mounts:[]},s=x.mount(n);return s.mount=n,n.root=s,e?x0.root=s:r&&(r.mounted=n,r.mount&&r.mount.mounts.push(n)),s},unmount(x){var _=x0.lookupPath(x,{follow_mount:!1});if(!x0.isMountpoint(_.node))throw new x0.ErrnoError(28);var a=_.node,r=a.mounted,e=x0.getMounts(r);for(var[A,t]of Object.entries(x0.nameTable))for(;t;){var n=t.name_next;e.includes(t.mount)&&x0.destroyNode(t),t=n}a.mounted=null;var s=a.mount.mounts.indexOf(r);G(-1!==s),a.mount.mounts.splice(s,1)},lookup:(x,_)=>x.node_ops.lookup(x,_),mknod(x,_,a){var r=x0.lookupPath(x,{parent:!0}).node,e=xw.basename(x);if(!e)throw new x0.ErrnoError(28);if("."===e||".."===e)throw new x0.ErrnoError(20);var A=x0.mayCreate(r,e);if(A)throw new x0.ErrnoError(A);if(!r.node_ops.mknod)throw new x0.ErrnoError(63);return r.node_ops.mknod(r,e,_,a)},statfs:x=>x0.statfsNode(x0.lookupPath(x,{follow:!0}).node),statfsStream:x=>x0.statfsNode(x.node),statfsNode(x){var _={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:x0.nextInode,ffree:x0.nextInode-1,fsid:42,flags:2,namelen:255};return x.node_ops.statfs&&Object.assign(_,x.node_ops.statfs(x.mount.opts.root)),_},create:(x,_=438)=>(_&=4095,_|=32768,x0.mknod(x,_,0)),mkdir:(x,_=511)=>(_&=1023,_|=16384,x0.mknod(x,_,0)),mkdirTree(x,_){var a=x.split("/"),r="";for(var e of a)if(e){(r||xw.isAbs(x))&&(r+="/"),r+=e;try{x0.mkdir(r,_)}catch(x){if(20!=x.errno)throw x}}},mkdev:(x,_,a)=>(void 0===a&&(a=_,_=438),_|=8192,x0.mknod(x,_,a)),symlink(x,_){if(!xT.resolve(x))throw new x0.ErrnoError(44);var a=x0.lookupPath(_,{parent:!0}).node;if(!a)throw new x0.ErrnoError(44);var r=xw.basename(_),e=x0.mayCreate(a,r);if(e)throw new x0.ErrnoError(e);if(!a.node_ops.symlink)throw new x0.ErrnoError(63);return a.node_ops.symlink(a,r,x)},rename(x,_){var a,r,e,A=xw.dirname(x),t=xw.dirname(_),n=xw.basename(x),s=xw.basename(_);if(a=x0.lookupPath(x,{parent:!0}).node,r=x0.lookupPath(_,{parent:!0}).node,!a||!r)throw new x0.ErrnoError(44);if(a.mount!==r.mount)throw new x0.ErrnoError(75);var i=x0.lookupNode(a,n),v=xT.relative(x,t);if("."!==v.charAt(0))throw new x0.ErrnoError(28);if("."!==(v=xT.relative(_,A)).charAt(0))throw new x0.ErrnoError(55);try{e=x0.lookupNode(r,s)}catch(x){}if(i!==e){var l=x0.isDir(i.mode),c=x0.mayDelete(a,n,l);if(c||(c=e?x0.mayDelete(r,s,l):x0.mayCreate(r,s)))throw new x0.ErrnoError(c);if(!a.node_ops.rename)throw new x0.ErrnoError(63);if(x0.isMountpoint(i)||e&&x0.isMountpoint(e))throw new x0.ErrnoError(10);if(r!==a&&(c=x0.nodePermissions(a,"w")))throw new x0.ErrnoError(c);x0.hashRemoveNode(i);try{a.node_ops.rename(i,r,s),i.parent=r}catch(x){throw x}finally{x0.hashAddNode(i)}}},rmdir(x){var _=x0.lookupPath(x,{parent:!0}).node,a=xw.basename(x),r=x0.lookupNode(_,a),e=x0.mayDelete(_,a,!0);if(e)throw new x0.ErrnoError(e);if(!_.node_ops.rmdir)throw new x0.ErrnoError(63);if(x0.isMountpoint(r))throw new x0.ErrnoError(10);_.node_ops.rmdir(_,a),x0.destroyNode(r)},readdir(x){var _=x0.lookupPath(x,{follow:!0}).node;return x0.checkOpExists(_.node_ops.readdir,54)(_)},unlink(x){var _=x0.lookupPath(x,{parent:!0}).node;if(!_)throw new x0.ErrnoError(44);var a=xw.basename(x),r=x0.lookupNode(_,a),e=x0.mayDelete(_,a,!1);if(e)throw new x0.ErrnoError(e);if(!_.node_ops.unlink)throw new x0.ErrnoError(63);if(x0.isMountpoint(r))throw new x0.ErrnoError(10);_.node_ops.unlink(_,a),x0.destroyNode(r)},readlink(x){var _=x0.lookupPath(x).node;if(!_)throw new x0.ErrnoError(44);if(!_.node_ops.readlink)throw new x0.ErrnoError(28);return _.node_ops.readlink(_)},stat(x,_){var a=x0.lookupPath(x,{follow:!_}).node;return x0.checkOpExists(a.node_ops.getattr,63)(a)},fstat(x){var _=x0.getStreamChecked(x),a=_.node,r=_.stream_ops.getattr,e=r?_:a;return r??=a.node_ops.getattr,x0.checkOpExists(r,63),r(e)},lstat:x=>x0.stat(x,!0),doChmod(x,_,a,r){x0.doSetAttr(x,_,{mode:4095&a|-4096&_.mode,ctime:Date.now(),dontFollow:r})},chmod(x,_,a){var r;r="string"==typeof x?x0.lookupPath(x,{follow:!a}).node:x,x0.doChmod(null,r,_,a)},lchmod(x,_){x0.chmod(x,_,!0)},fchmod(x,_){var a=x0.getStreamChecked(x);x0.doChmod(a,a.node,_,!1)},doChown(x,_,a){x0.doSetAttr(x,_,{timestamp:Date.now(),dontFollow:a})},chown(x,_,a,r){var e;e="string"==typeof x?x0.lookupPath(x,{follow:!r}).node:x,x0.doChown(null,e,r)},lchown(x,_,a){x0.chown(x,_,a,!0)},fchown(x,_,a){var r=x0.getStreamChecked(x);x0.doChown(r,r.node,!1)},doTruncate(x,_,a){if(x0.isDir(_.mode))throw new x0.ErrnoError(31);if(!x0.isFile(_.mode))throw new x0.ErrnoError(28);var r=x0.nodePermissions(_,"w");if(r)throw new x0.ErrnoError(r);x0.doSetAttr(x,_,{size:a,timestamp:Date.now()})},truncate(x,_){if(_<0)throw new x0.ErrnoError(28);if("string"==typeof x){var a;a=x0.lookupPath(x,{follow:!0}).node}else a=x;x0.doTruncate(null,a,_)},ftruncate(x,_){var a=x0.getStreamChecked(x);if(_<0||(2097155&a.flags)==0)throw new x0.ErrnoError(28);x0.doTruncate(a,a.node,_)},utime(x,_,a){var r=x0.lookupPath(x,{follow:!0}).node;x0.checkOpExists(r.node_ops.setattr,63)(r,{atime:_,mtime:a})},open(_,a,r=438){if(""===_)throw new x0.ErrnoError(44);if(r=64&(a="string"==typeof a?(x=>{var _={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[x];if(void 0===_)throw Error(`Unknown file open mode: ${x}`);return _})(a):a)?4095&r|32768:0,"object"==typeof _)e=_;else{var e,A=_.endsWith("/"),t=x0.lookupPath(_,{follow:!(131072&a),noent_okay:!0});e=t.node,_=t.path}var n=!1;if(64&a)if(e){if(128&a)throw new x0.ErrnoError(20)}else if(A)throw new x0.ErrnoError(31);else e=x0.mknod(_,511|r,0),n=!0;if(!e)throw new x0.ErrnoError(44);if(x0.isChrdev(e.mode)&&(a&=-513),65536&a&&!x0.isDir(e.mode))throw new x0.ErrnoError(54);if(!n){var s=x0.mayOpen(e,a);if(s)throw new x0.ErrnoError(s)}512&a&&!n&&x0.truncate(e,0),a&=-131713;var i=x0.createStream({node:e,path:x0.getPath(e),flags:a,seekable:!0,position:0,stream_ops:e.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),n&&x0.chmod(e,511&r),!x.logReadFiles||1&a||_ in x0.readFiles||(x0.readFiles[_]=1),i},close(x){if(x0.isClosed(x))throw new x0.ErrnoError(8);x.getdents&&(x.getdents=null);try{x.stream_ops.close&&x.stream_ops.close(x)}catch(x){throw x}finally{x0.closeStream(x.fd)}x.fd=null},isClosed:x=>null===x.fd,llseek(x,_,a){if(x0.isClosed(x))throw new x0.ErrnoError(8);if(!x.seekable||!x.stream_ops.llseek)throw new x0.ErrnoError(70);if(0!=a&&1!=a&&2!=a)throw new x0.ErrnoError(28);return x.position=x.stream_ops.llseek(x,_,a),x.ungotten=[],x.position},read(x,_,a,r,e){if(G(a>=0),r<0||e<0)throw new x0.ErrnoError(28);if(x0.isClosed(x)||(2097155&x.flags)==1)throw new x0.ErrnoError(8);if(x0.isDir(x.node.mode))throw new x0.ErrnoError(31);if(!x.stream_ops.read)throw new x0.ErrnoError(28);var A=void 0!==e;if(A){if(!x.seekable)throw new x0.ErrnoError(70)}else e=x.position;var t=x.stream_ops.read(x,_,a,r,e);return A||(x.position+=t),t},write(x,_,a,r,e,A){if(G(a>=0),r<0||e<0)throw new x0.ErrnoError(28);if(x0.isClosed(x)||(2097155&x.flags)==0)throw new x0.ErrnoError(8);if(x0.isDir(x.node.mode))throw new x0.ErrnoError(31);if(!x.stream_ops.write)throw new x0.ErrnoError(28);x.seekable&&1024&x.flags&&x0.llseek(x,0,2);var t=void 0!==e;if(t){if(!x.seekable)throw new x0.ErrnoError(70)}else e=x.position;var n=x.stream_ops.write(x,_,a,r,e,A);return t||(x.position+=n),n},mmap(x,_,a,r,e){if((2&r)!=0&&(2&e)==0&&(2097155&x.flags)!=2||(2097155&x.flags)==1)throw new x0.ErrnoError(2);if(!x.stream_ops.mmap)throw new x0.ErrnoError(43);if(!_)throw new x0.ErrnoError(28);return x.stream_ops.mmap(x,_,a,r,e)},msync:(x,_,a,r,e)=>(G(a>=0),x.stream_ops.msync)?x.stream_ops.msync(x,_,a,r,e):0,ioctl(x,_,a){if(!x.stream_ops.ioctl)throw new x0.ErrnoError(59);return x.stream_ops.ioctl(x,_,a)},readFile(x,_={}){_.flags=_.flags||0,_.encoding=_.encoding||"binary","utf8"!==_.encoding&&"binary"!==_.encoding&&M(`Invalid encoding type "${_.encoding}"`);var a=x0.open(x,_.flags),r=x0.stat(x).size,e=new Uint8Array(r);return x0.read(a,e,0,r,0),"utf8"===_.encoding&&(e=xS(e)),x0.close(a),e},writeFile(x,_,a={}){a.flags=a.flags||577;var r=x0.open(x,a.flags,a.mode);"string"==typeof _&&(_=new Uint8Array(x$(_,!0))),ArrayBuffer.isView(_)?x0.write(r,_,0,_.byteLength,void 0,a.canOwn):M("Unsupported data type"),x0.close(r)},cwd:()=>x0.currentPath,chdir(x){var _=x0.lookupPath(x,{follow:!0});if(null===_.node)throw new x0.ErrnoError(44);if(!x0.isDir(_.node.mode))throw new x0.ErrnoError(54);var a=x0.nodePermissions(_.node,"x");if(a)throw new x0.ErrnoError(a);x0.currentPath=_.path},createDefaultDirectories(){x0.mkdir("/tmp"),x0.mkdir("/home"),x0.mkdir("/home/web_user")},createDefaultDevices(){x0.mkdir("/dev"),x0.registerDevice(x0.makedev(1,3),{read:()=>0,write:(x,_,a,r,e)=>r,llseek:()=>0}),x0.mkdev("/dev/null",x0.makedev(1,3)),xX.register(x0.makedev(5,0),xX.default_tty_ops),xX.register(x0.makedev(6,0),xX.default_tty1_ops),x0.mkdev("/dev/tty",x0.makedev(5,0)),x0.mkdev("/dev/tty1",x0.makedev(6,0));var x=new Uint8Array(1024),_=0,a=()=>(0===_&&(xD(x),_=x.byteLength),x[--_]);x0.createDevice("/dev","random",a),x0.createDevice("/dev","urandom",a),x0.mkdir("/dev/shm"),x0.mkdir("/dev/shm/tmp")},createSpecialDirectories(){x0.mkdir("/proc");var x=x0.mkdir("/proc/self");x0.mkdir("/proc/self/fd"),x0.mount({mount(){var _=x0.createNode(x,"fd",16895,73);return _.stream_ops={llseek:xZ.stream_ops.llseek},_.node_ops={lookup(x,_){var a=+_,r=x0.getStreamChecked(a),e={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path},id:a+1};return e.parent=e,e},readdir:()=>Array.from(x0.streams.entries()).filter(([x,_])=>_).map(([x,_])=>x.toString())},_}},{},"/proc/self/fd")},createStandardStreams(x,_,a){x?x0.createDevice("/dev","stdin",x):x0.symlink("/dev/tty","/dev/stdin"),_?x0.createDevice("/dev","stdout",null,_):x0.symlink("/dev/tty","/dev/stdout"),a?x0.createDevice("/dev","stderr",null,a):x0.symlink("/dev/tty1","/dev/stderr");var r=x0.open("/dev/stdin",0),e=x0.open("/dev/stdout",1),A=x0.open("/dev/stderr",1);G(0===r.fd,`invalid handle for stdin (${r.fd})`),G(1===e.fd,`invalid handle for stdout (${e.fd})`),G(2===A.fd,`invalid handle for stderr (${A.fd})`)},staticInit(){x0.nameTable=Array(4096),x0.mount(xZ,{},"/"),x0.createDefaultDirectories(),x0.createDefaultDevices(),x0.createSpecialDirectories(),x0.filesystems={MEMFS:xZ}},init(_,a,r){G(!x0.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),x0.initialized=!0,_??=x.stdin,a??=x.stdout,r??=x.stderr,x0.createStandardStreams(_,a,r)},quit(){for(var x of(x0.initialized=!1,ad(0),x0.streams))x&&x0.close(x)},findObject(x,_){var a=x0.analyzePath(x,_);return a.exists?a.object:null},analyzePath(x,_){try{var a=x0.lookupPath(x,{follow:!_});x=a.path}catch(x){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var a=x0.lookupPath(x,{parent:!0});r.parentExists=!0,r.parentPath=a.path,r.parentObject=a.node,r.name=xw.basename(x),a=x0.lookupPath(x,{follow:!_}),r.exists=!0,r.path=a.path,r.object=a.node,r.name=a.node.name,r.isRoot="/"===a.path}catch(x){r.error=x.errno}return r},createPath(x,_,a,r){x="string"==typeof x?x:x0.getPath(x);for(var e=_.split("/").reverse();e.length;){var A=e.pop();if(A){var t=xw.join2(x,A);try{x0.mkdir(t)}catch(x){if(20!=x.errno)throw x}x=t}}return t},createFile(x,_,a,r,e){var A=xw.join2("string"==typeof x?x:x0.getPath(x),_),t=xO(r,e);return x0.create(A,t)},createDataFile(x,_,a,r,e,A){var t=_;x&&(x="string"==typeof x?x:x0.getPath(x),t=_?xw.join2(x,_):x);var n=xO(r,e),s=x0.create(t,n);if(a){if("string"==typeof a){for(var i=Array(a.length),v=0,l=a.length;v<l;++v)i[v]=a.charCodeAt(v);a=i}x0.chmod(s,146|n);var c=x0.open(s,577);x0.write(c,a,0,a.length,0,A),x0.close(c),x0.chmod(s,n)}},createDevice(x,_,a,r){var e=xw.join2("string"==typeof x?x:x0.getPath(x),_),A=xO(!!a,!!r);x0.createDevice.major??=64;var t=x0.makedev(x0.createDevice.major++,0);return x0.registerDevice(t,{open(x){x.seekable=!1},close(x){r?.buffer?.length&&r(10)},read(x,_,r,e,A){for(var t,n=0,s=0;s<e;s++){try{t=a()}catch(x){throw new x0.ErrnoError(29)}if(void 0===t&&0===n)throw new x0.ErrnoError(6);if(null==t)break;n++,_[r+s]=t}return n&&(x.node.atime=Date.now()),n},write(x,_,a,e,A){for(var t=0;t<e;t++)try{r(_[a+t])}catch(x){throw new x0.ErrnoError(29)}return e&&(x.node.mtime=x.node.ctime=Date.now()),t}}),x0.mkdev(e,A,t)},forceLoadFile(x){if(x.isDevice||x.isFolder||x.link||x.contents)return!0;if(globalThis.XMLHttpRequest)M("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 try{x.contents=i(x.url)}catch(x){throw new x0.ErrnoError(29)}},createLazyFile(x,_,a,r,e){if(globalThis.XMLHttpRequest){F||M("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var A={isDevice:!1,contents:new class{lengthKnown=!1;chunks=[];get(x){if(!(x>this.length-1)&&!(x<0)){var _=x%this.chunkSize,a=x/this.chunkSize|0;return this.getter(a)[_]}}setDataGetter(x){this.getter=x}cacheLength(){var x,_=new XMLHttpRequest;_.open("HEAD",a,!1),_.send(null),_.status>=200&&_.status<300||304===_.status||M("Couldn't load "+a+". Status: "+_.status);var r=Number(_.getResponseHeader("Content-length")),e=(x=_.getResponseHeader("Accept-Ranges"))&&"bytes"===x,A=(x=_.getResponseHeader("Content-Encoding"))&&"gzip"===x,t=1048576;e||(t=r);var n=this;n.setDataGetter(x=>{var _,e,A=x*t,s=(x+1)*t-1;return s=Math.min(s,r-1),void 0===n.chunks[x]&&(n.chunks[x]=(A>(_=s)&&M("invalid range ("+A+", "+_+") or no bytes requested!"),_>r-1&&M("only "+r+" bytes available! programmer error!"),((e=new XMLHttpRequest).open("GET",a,!1),r!==t&&e.setRequestHeader("Range","bytes="+A+"-"+_),e.responseType="arraybuffer",e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.send(null),e.status>=200&&e.status<300||304===e.status||M("Couldn't load "+a+". Status: "+e.status),void 0!==e.response)?new Uint8Array(e.response||[]):x$(e.responseText||"",!0))),void 0===n.chunks[x]&&M("doXHR failed!"),n.chunks[x]}),(A||!r)&&(t=r=1,t=r=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=t,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}}else var A={isDevice:!1,url:a};var t=x0.createFile(x,_,A,r,e);A.contents?t.contents=A.contents:A.url&&(t.contents=null,t.url=A.url),Object.defineProperties(t,{usedBytes:{get:function(){return this.contents.length}}});var n={};for(let[x,_]of Object.entries(t.stream_ops))n[x]=(...x)=>(x0.forceLoadFile(t),_(...x));function s(x,_,a,r,e){var A=x.node.contents;if(e>=A.length)return 0;var t=Math.min(A.length-e,r);if(G(t>=0),A.slice)for(var n=0;n<t;n++)_[a+n]=A[e+n];else for(var n=0;n<t;n++)_[a+n]=A.get(e+n);return t}return n.read=(x,_,a,r,e)=>(x0.forceLoadFile(t),s(x,_,a,r,e)),n.mmap=(x,_,a,r,e)=>{x0.forceLoadFile(t);var A=xR(_);if(!A)throw new x0.ErrnoError(48);return s(x,c,A,_,a),{ptr:A,allocated:!0}},t.stream_ops=n,t},absolutePath(){M("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){M("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){M("FS.createLink has been removed; use FS.symlink instead")},joinPath(){M("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){M("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){M("FS.standardizePath has been removed; use PATH.normalize instead")}},x1={DEFAULT_POLLMASK:5,calculateAt(x,_,a){if(xw.isAbs(_))return _;if(-100===x)r=x0.cwd();else{var r;r=x1.getStreamFromFD(x).path}if(0==_.length){if(!a)throw new x0.ErrnoError(44);return r}return r+"/"+_},writeStat(x,_){u[x>>>2>>>0]=_.dev,u[x+4>>>2>>>0]=_.mode,u[x+8>>>2>>>0]=_.nlink,u[x+12>>>2>>>0]=_.uid,u[x+16>>>2>>>0]=_.gid,u[x+20>>>2>>>0]=_.rdev,m[x+24>>>3>>>0]=BigInt(_.size),b[x+32>>>2>>>0]=4096,b[x+36>>>2>>>0]=_.blocks;var a=_.atime.getTime(),r=_.mtime.getTime(),e=_.ctime.getTime();return m[x+40>>>3>>>0]=BigInt(Math.floor(a/1e3)),u[x+48>>>2>>>0]=a%1e3*1e6,m[x+56>>>3>>>0]=BigInt(Math.floor(r/1e3)),u[x+64>>>2>>>0]=r%1e3*1e6,m[x+72>>>3>>>0]=BigInt(Math.floor(e/1e3)),u[x+80>>>2>>>0]=e%1e3*1e6,m[x+88>>>3>>>0]=BigInt(_.ino),0},writeStatFs(x,_){u[x+4>>>2>>>0]=_.bsize,u[x+60>>>2>>>0]=_.bsize,m[x+8>>>3>>>0]=BigInt(_.blocks),m[x+16>>>3>>>0]=BigInt(_.bfree),m[x+24>>>3>>>0]=BigInt(_.bavail),m[x+32>>>3>>>0]=BigInt(_.files),m[x+40>>>3>>>0]=BigInt(_.ffree),u[x+48>>>2>>>0]=_.fsid,u[x+64>>>2>>>0]=_.flags,u[x+56>>>2>>>0]=_.namelen},doMsync(x,_,a,r,e){if(!x0.isFile(_.node.mode))throw new x0.ErrnoError(43);if(2&r)return 0;var A=o.slice(x,x+a);x0.msync(_,A,e,a,r)},getStreamFromFD:x=>x0.getStreamChecked(x),varargs:void 0,getStr:x=>xg(x)},x2={},x3=x=>{for(;x.length;){var _=x.pop();x.pop()(_)}};function x6(x){return this.fromWireType(u[x>>>2>>>0])}var x4={},x5={},x7={},x8=class extends Error{constructor(x){super(x),this.name="InternalError"}},x9=x=>{throw new x8(x)},_x=(x,_,a)=>{function r(_){var r=a(_);r.length!==x.length&&x9("Mismatched type converter count");for(var e=0;e<x.length;++e)_e(x[e],r[e])}x.forEach(x=>x7[x]=_);var e=Array(_.length),A=[],t=0;for(let[x,a]of _.entries())x5.hasOwnProperty(a)?e[x]=x5[a]:(A.push(a),x4.hasOwnProperty(a)||(x4[a]=[]),x4[a].push(()=>{e[x]=x5[a],++t===A.length&&r(e)}));0===A.length&&r(e)},__=x=>{x>>>=0;for(var _="";;){var a=o[x++>>>0];if(!a)return _;_+=String.fromCharCode(a)}},_a=class extends Error{constructor(x){super(x),this.name="BindingError"}},_r=x=>{throw new _a(x)};function _e(x,_,a={}){return function(x,_,a={}){var r=_.name;if(x||_r(`type "${r}" must have a positive integer typeid pointer`),x5.hasOwnProperty(x))if(a.ignoreDuplicateRegistrations)return;else _r(`Cannot register type '${r}' twice`);if(x5[x]=_,delete x7[x],x4.hasOwnProperty(x)){var e=x4[x];delete x4[x],e.forEach(x=>x())}}(x,_,a)}var _A=(x,_,a)=>{switch(_){case 1:return a?x=>c[x>>>0]:x=>o[x>>>0];case 2:return a?x=>f[x>>>1>>>0]:x=>d[x>>>1>>>0];case 4:return a?x=>b[x>>>2>>>0]:x=>u[x>>>2>>>0];case 8:return a?x=>m[x>>>3>>>0]:x=>h[x>>>3>>>0];default:throw TypeError(`invalid integer width (${_}): ${x}`)}},_t=x=>{if(null===x)return"null";var _=typeof x;return"object"===_||"array"===_||"function"===_?x.toString():""+x},_n=(x,_,a,r)=>{if(_<a||_>r)throw TypeError(`Passing a number "${_t(_)}" from JS side to C/C++ side to an argument of type "${x}", which is outside the valid range [${a}, ${r}]!`)},_s=x=>{_r(x.$$.ptrType.registeredClass.name+" instance already deleted")},_i=!1,_v=x=>{},_l=x=>{x.count.value-=1,0===x.count.value&&(x.smartPtr?x.smartPtrType.rawDestructor(x.smartPtr):x.ptrType.registeredClass.rawDestructor(x.ptr))},_c=(x,_,a)=>{if(_===a)return x;if(void 0===a.baseClass)return null;var r=_c(x,_,a.baseClass);return null===r?null:a.downcast(r)},_o={},_f={},_d=(x,_)=>(_.ptrType&&_.ptr||x9("makeClassHandle requires ptr and ptrType"),!!_.smartPtrType!=!!_.smartPtr&&x9("Both smartPtrType and smartPtr must be specified"),_.count={value:1},_u(Object.create(x,{$$:{value:_,writable:!0}})));function _b(x){var _,a=this.getPointee(x);if(!a)return this.destructor(x),null;var r=_f[((x,_)=>{for(void 0===_&&_r("ptr should not be undefined");x.baseClass;)_=x.upcast(_),x=x.baseClass;return _})(this.registeredClass,a)];if(void 0!==r)if(0===r.$$.count.value)return r.$$.ptr=a,r.$$.smartPtr=x,r.clone();else{var e=r.clone();return this.destructor(x),e}function A(){return this.isSmartPointer?_d(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:a,smartPtrType:this,smartPtr:x}):_d(this.registeredClass.instancePrototype,{ptrType:this,ptr:x})}var t=_o[this.registeredClass.getActualType(a)];if(!t)return A.call(this);_=this.isConst?t.constPointerType:t.pointerType;var n=_c(a,this.registeredClass,_.registeredClass);return null===n?A.call(this):this.isSmartPointer?_d(_.registeredClass.instancePrototype,{ptrType:_,ptr:n,smartPtrType:this,smartPtr:x}):_d(_.registeredClass.instancePrototype,{ptrType:_,ptr:n})}var _u=x=>globalThis.FinalizationRegistry?(_i=new FinalizationRegistry(x=>{console.warn(x.leakWarning),_l(x.$$)}),_u=x=>{var _=x.$$;if(_.smartPtr){var a={$$:_},r=_.ptrType.registeredClass,e=Error(`Embind found a leaked C++ instance ${r.name} <${xx(_.ptr)}>.
1
+ import"node:module";import{__webpack_require__ as x}from"./rslib-runtime.js";import"./3551.js";import"./1264.js";import{fileURLToPath as _}from"node:url";import{dirname as a}from"node:path";var r=_(import.meta.url);a(_(import.meta.url)),x.add({"../../../node_modules/.pnpm/@byted-lynx+tasm@4.4.40_debug@4.4.3/node_modules/@byted-lynx/tasm/lepus.js"(x,_,a){var e,A=(e=globalThis.document?.currentScript?.src,async function(x={}){let _,A;!function(){function x(x){for(var _=(x=x.split("-")[0]).split(".").slice(0,3);_.length<3;)_.push("00");return(_=_.map((x,_,a)=>x.padStart(2,"0"))).join("")}var _=x=>[x/1e4|0,(x/100|0)%100,x%100].join("."),a="u">typeof process&&process.versions?.node?x(process.versions.node):0x7fffffff;if(a<16e4)throw Error(`This emscripten-generated code requires node v${_(16e4)} (detected v${_(a)})`);var r="u">typeof navigator&&navigator.userAgent;if(r){var e=r.includes("Safari/")&&!r.includes("Chrome/")&&r.match(/Version\/(\d+\.?\d*\.?\d*)/)?x(r.match(/Version\/(\d+\.?\d*\.?\d*)/)[1]):0x7fffffff;if(e<15e4)throw Error(`This emscripten-generated code requires Safari v${_(15e4)} (detected v${e})`);var A=r.match(/Firefox\/(\d+(?:\.\d+)?)/)?parseFloat(r.match(/Firefox\/(\d+(?:\.\d+)?)/)[1]):0x7fffffff;if(A<79)throw Error(`This emscripten-generated code requires Firefox v79 (detected v${A})`);var t=r.match(/Chrome\/(\d+(?:\.\d+)?)/)?parseFloat(r.match(/Chrome\/(\d+(?:\.\d+)?)/)[1]):0x7fffffff;if(t<85)throw Error(`This emscripten-generated code requires Chrome v85 (detected v${t})`)}}();var t,n,s,i,v,l,c,o,f,d,b,u,E,j,m,h,p,S,g,y,I,N,B=!!globalThis.window,F=!!globalThis.WorkerGlobalScope,P=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer",q=!B&&!P&&!F,L="./this.program";e=r;if(P){if(!(globalThis.process?.versions?.node&&globalThis.process?.type!="renderer"))throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var w=a("fs");i=x=>{x=C(x)?new URL(x):x;var _=w.readFileSync(x);return G(Buffer.isBuffer(_)),_},s=async(x,_=!0)=>{x=C(x)?new URL(x):x;var a=w.readFileSync(x,_?void 0:"utf8");return G(_?Buffer.isBuffer(a):"string"==typeof a),a},process.argv.length>1&&(L=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else if(q);else if(B||F){try{new URL(".",e).href}catch{}if(!(globalThis.window||globalThis.WorkerGlobalScope))throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");F&&(i=x=>{var _=new XMLHttpRequest;return _.open("GET",x,!1),_.responseType="arraybuffer",_.send(null),new Uint8Array(_.response)}),s=async x=>{if(C(x))return new Promise((_,a)=>{var r=new XMLHttpRequest;r.open("GET",x,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?_(r.response):a(r.status)},r.onerror=a,r.send(null)});var _=await fetch(x,{credentials:"same-origin"});if(_.ok)return _.arrayBuffer();throw Error(_.status+" : "+_.url)}}else throw Error("environment detection error");var D=console.log.bind(console),T=console.error.bind(console);G(!q,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),globalThis.WebAssembly||T("no native wasm support detected");var k=!1;function G(x,_){x||M("Assertion failed"+(_?": "+_:""))}var C=x=>x.startsWith("file://");function $(){if(!k){var x=aS();0==x&&(x+=4);var _=u[x>>>2>>>0],a=u[x+4>>>2>>>0];(0x2135467!=_||0x89bacdfe!=a)&&M(`Stack overflow! Stack cookie has been overwritten at ${xx(x)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${xx(a)} ${xx(_)}`),0x63736d65!=u[0]&&M("Runtime error: The application has corrupted its heap memory area (address zero)!")}}class X extends Error{}class K extends X{constructor(x){super(x),this.excPtr=x;let _=al(x);this.name=_[0],this.message=_[1]}}function R(_){Object.getOwnPropertyDescriptor(x,_)||Object.defineProperty(x,_,{configurable:!0,set(){M(`Attempt to set \`Module.${_}\` after it has already been processed. This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`)}})}function Z(x){return()=>G(!1,`call to '${x}' via reference taken before Wasm module initialization`)}function O(_){Object.getOwnPropertyDescriptor(x,_)||Object.defineProperty(x,_,{configurable:!0,get(){var x=`'${_}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;("FS_createPath"===_||"FS_createDataFile"===_||"FS_createPreloadedFile"===_||"FS_preloadFile"===_||"FS_unlink"===_||"addRunDependency"===_||"FS_createLazyFile"===_||"FS_createDevice"===_||"removeRunDependency"===_)&&(x+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),M(x)}})}N=new Int8Array((I=new Int16Array(1)).buffer),I[0]=25459,(115!==N[0]||99!==N[1])&&M("Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)");var J=!1;function V(){var _=aL.buffer;c=new Int8Array(_),f=new Int16Array(_),x.HEAPU8=o=new Uint8Array(_),d=new Uint16Array(_),b=new Int32Array(_),u=new Uint32Array(_),E=new Float32Array(_),j=new Float64Array(_),m=new BigInt64Array(_),h=new BigUint64Array(_)}function M(_){x.onAbort?.(_),T(_="Aborted("+_+")"),k=!0;var a=new WebAssembly.RuntimeError(_);throw l?.(a),a}function H(x,_){return(...a)=>{G(J,`native function \`${x}\` called before runtime initialization`);var r=y[x];return G(r,`exported native function \`${x}\` not found`),G(a.length<=_,`native function \`${x}\` called with ${a.length} args but expects ${_}`),r(...a)}}G(globalThis.Int32Array&&globalThis.Float64Array&&Int32Array.prototype.subarray&&Int32Array.prototype.set,"JS engine does not provide full typed array support");var U=_=>{for(;_.length>0;)_.shift()(x)},Q=[],Y=x=>Q.push(x),z=[],W=x=>z.push(x),xx=x=>(G("number"==typeof x,`ptrToString expects a number, got ${typeof x}`),"0x"+(x>>>=0).toString(16).padStart(8,"0")),x_=()=>aI(),xa=x=>{xa.shown||={},xa.shown[x]||(xa.shown[x]=1,P&&(x="warning: "+x),T(x))};function xr(){M("missing function: _ZN4lynx4tasm12TreeResolver16FromTemplateInfoERKNS0_19ElementTemplateInfoE")}function xe(){M("missing function: _ZN4lynx4tasm14ElementManager15CreateFiberNodeERKNS_4base6StringE")}function xA(){M("missing function: _ZN4lynx4tasm14ElementManager18CreateFiberElementENS0_21ElementBuiltInTagEnumERKNS_4base6StringE")}function xt(){M("missing function: _ZN4lynx4tasm14ElementManager23PrepareNodeForInspectorEPNS0_7ElementE")}function xn(){M("missing function: _ZN4lynx4tasm14ElementManager28OnElementNodeSetForInspectorEPNS0_7ElementE")}function xs(){M("missing function: _ZN4lynx4tasm14ElementManager30OnElementNodeAddedForInspectorEPNS0_7ElementE")}function xi(){M("missing function: _ZN4lynx4tasm14ElementManager31CheckAndProcessSlotForInspectorEPNS0_7ElementE")}function xv(){M("missing function: _ZN4lynx4tasm17TemplateAssembler23TriggerLepusBridgeAsyncERKNSt3__212basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_5lepus5ValueEb")}function xl(){M("missing function: _ZN4lynx4tasm19TemplateEntryHolder9FindEntryERKNSt3__212basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE")}function xc(){M("missing function: _ZN4lynx4tasm6report12EventTracker7OnEventENS_4base15MoveOnlyClosureIvJRNS1_13MoveOnlyEventEEEE")}function xo(){M("missing function: _ZN4lynx4tasm7Element10AddDatasetERKNS_4base6StringERKNS_5lepus5ValueE")}function xf(){M("missing function: _ZN4lynx4tasm7Element13SetIdSelectorERKNS_4base6StringE")}function xd(){M("missing function: _ZN4lynx4tasm7Element15SetParsedStylesEONS_4base15LinearSearchMapINS0_13CSSPropertyIDENS0_8CSSValueENS0_25MapKeyPolicyCSSPropertyIDELm0ELb0EEEONS3_INS2_6StringES9_NS2_20ReducedHashKeyPolicyIS9_EELm0ELb0EEE")}function xb(){M("missing function: _ZN4lynx4tasm7Element17SetJSEventHandlerERKNS_4base6StringES5_S5_")}function xu(){M("missing function: _ZN4lynx4tasm7Element8SetClassERKNS_4base6StringE")}function xE(){M("missing function: _ZN4lynx4tasm7Element8SetStyleENS0_13CSSPropertyIDERKNS_5lepus5ValueE")}function xj(){M("missing function: _ZN4lynx5event20ClosureEventListenerC1EONS_4base15MoveOnlyClosureIvJNS_5lepus5ValueEEEERKNS0_13EventListener7OptionsENS1_11ClosureTypeERKS5_")}xr.stub=!0,xe.stub=!0,xA.stub=!0,xt.stub=!0,xn.stub=!0,xs.stub=!0,xi.stub=!0,xv.stub=!0,xl.stub=!0,xc.stub=!0,xo.stub=!0,xf.stub=!0,xd.stub=!0,xb.stub=!0,xu.stub=!0,xE.stub=!0,xj.stub=!0;var xm=x=>x<-0x20000000000000||x>0x20000000000000?NaN:Number(x),xh=globalThis.TextDecoder&&new TextDecoder,xp=(x,_,a,r)=>{var e=_+a;if(r)return e;for(;x[_]&&!(_>=e);)++_;return _},xS=(x,_=0,a,r)=>{var e=xp(x,_>>>=0,a,r);if(e-_>16&&x.buffer&&xh)return xh.decode(x.subarray(_,e));for(var A="";_<e;){var t=x[_++];if(!(128&t)){A+=String.fromCharCode(t);continue}var n=63&x[_++];if((224&t)==192){A+=String.fromCharCode((31&t)<<6|n);continue}var s=63&x[_++];if((240&t)==224?t=(15&t)<<12|n<<6|s:((248&t)!=240&&xa("Invalid UTF-8 leading byte "+xx(t)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),t=(7&t)<<18|n<<12|s<<6|63&x[_++]),t<65536)A+=String.fromCharCode(t);else{var i=t-65536;A+=String.fromCharCode(55296|i>>10,56320|1023&i)}}return A},xg=(x,_,a)=>(G("number"==typeof x,`UTF8ToString expects a number (got ${typeof x})`),(x>>>=0)?xS(o,x,_,a):""),xy=[],xI=0,xN=0;class xB{constructor(x){this.excPtr=x,this.ptr=x-24}set_type(x){u[this.ptr+4>>>2>>>0]=x}get_type(){return u[this.ptr+4>>>2>>>0]}set_destructor(x){u[this.ptr+8>>>2>>>0]=x}get_destructor(){return u[this.ptr+8>>>2>>>0]}set_caught(x){x=+!!x,c[this.ptr+12>>>0]=x}get_caught(){return 0!=c[this.ptr+12>>>0]}set_rethrown(x){x=+!!x,c[this.ptr+13>>>0]=x}get_rethrown(){return 0!=c[this.ptr+13>>>0]}init(x,_){this.set_adjusted_ptr(0),this.set_type(x),this.set_destructor(_)}set_adjusted_ptr(x){u[this.ptr+16>>>2>>>0]=x}get_adjusted_ptr(){return u[this.ptr+16>>>2>>>0]}}var xF=x=>ah(x),xP=x=>{var _=xN?.excPtr;if(!_)return xF(0),0;var a=new xB(_);a.set_adjusted_ptr(_);var r=a.get_type();if(!r)return xF(0),_;for(var e of x){if(0===e||e===r)break;var A=a.ptr+16;if(aP(e,r,A))return xF(e),_}return xF(r),_},xq=()=>{var x=xy.pop();x||M("no exception to throw");var _=x.excPtr;throw!x.get_rethrown()&&(xy.push(x),x.set_rethrown(!0),x.set_caught(!1),xI++),xN=new K(_)},xL=()=>{G(void 0!=x1.varargs);var x=b[x1.varargs>>>2>>>0];return x1.varargs+=4,x},xw={isAbs:x=>"/"===x.charAt(0),splitPath:x=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(x).slice(1),normalizeArray:(x,_)=>{for(var a=0,r=x.length-1;r>=0;r--){var e=x[r];"."===e?x.splice(r,1):".."===e?(x.splice(r,1),a++):a&&(x.splice(r,1),a--)}if(_)for(;a;a--)x.unshift("..");return x},normalize:x=>{var _=xw.isAbs(x),a="/"===x.slice(-1);return(x=xw.normalizeArray(x.split("/").filter(x=>!!x),!_).join("/"))||_||(x="."),x&&a&&(x+="/"),(_?"/":"")+x},dirname:x=>{var _=xw.splitPath(x),a=_[0],r=_[1];return a||r?(r&&(r=r.slice(0,-1)),a+r):"."},basename:x=>x&&x.match(/([^\/]+|\/)\/*$/)[1],join:(...x)=>xw.normalize(x.join("/")),join2:(x,_)=>xw.normalize(x+"/"+_)},xD=x=>{(xD=(()=>{if(P){var x=a("crypto");return _=>x.randomFillSync(_)}return x=>crypto.getRandomValues(x)})())(x)},xT={resolve:(...x)=>{for(var _="",a=!1,r=x.length-1;r>=-1&&!a;r--){var e=r>=0?x[r]:x0.cwd();if("string"!=typeof e)throw TypeError("Arguments to path.resolve must be strings");if(!e)return"";_=e+"/"+_,a=xw.isAbs(e)}return _=xw.normalizeArray(_.split("/").filter(x=>!!x),!a).join("/"),(a?"/":"")+_||"."},relative:(x,_)=>{function a(x){for(var _=0;_<x.length&&""===x[_];_++);for(var a=x.length-1;a>=0&&""===x[a];a--);return _>a?[]:x.slice(_,a-_+1)}x=xT.resolve(x).slice(1),_=xT.resolve(_).slice(1);for(var r=a(x.split("/")),e=a(_.split("/")),A=Math.min(r.length,e.length),t=A,n=0;n<A;n++)if(r[n]!==e[n]){t=n;break}for(var s=[],n=t;n<r.length;n++)s.push("..");return(s=s.concat(e.slice(t))).join("/")}},xk=[],xG=x=>{for(var _=0,a=0;a<x.length;++a){var r=x.charCodeAt(a);r<=127?_++:r<=2047?_+=2:r>=55296&&r<=57343?(_+=4,++a):_+=3}return _},xC=(x,_,a,r)=>{if(a>>>=0,G("string"==typeof x,`stringToUTF8Array expects a string (got ${typeof x})`),!(r>0))return 0;for(var e=a,A=a+r-1,t=0;t<x.length;++t){var n=x.codePointAt(t);if(n<=127){if(a>=A)break;_[a++>>>0]=n}else if(n<=2047){if(a+1>=A)break;_[a++>>>0]=192|n>>6,_[a++>>>0]=128|63&n}else if(n<=65535){if(a+2>=A)break;_[a++>>>0]=224|n>>12,_[a++>>>0]=128|n>>6&63,_[a++>>>0]=128|63&n}else{if(a+3>=A)break;n>1114111&&xa("Invalid Unicode code point "+xx(n)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),_[a++>>>0]=240|n>>18,_[a++>>>0]=128|n>>12&63,_[a++>>>0]=128|n>>6&63,_[a++>>>0]=128|63&n,t++}}return _[a>>>0]=0,a-e},x$=(x,_,a)=>{var r=Array(a>0?a:xG(x)+1),e=xC(x,r,0,r.length);return _&&(r.length=e),r},xX={ttys:[],init(){},shutdown(){},register(x,_){xX.ttys[x]={input:[],output:[],ops:_},x0.registerDevice(x,xX.stream_ops)},stream_ops:{open(x){var _=xX.ttys[x.node.rdev];if(!_)throw new x0.ErrnoError(43);x.tty=_,x.seekable=!1},close(x){x.tty.ops.fsync(x.tty)},fsync(x){x.tty.ops.fsync(x.tty)},read(x,_,a,r,e){if(!x.tty||!x.tty.ops.get_char)throw new x0.ErrnoError(60);for(var A,t=0,n=0;n<r;n++){try{A=x.tty.ops.get_char(x.tty)}catch(x){throw new x0.ErrnoError(29)}if(void 0===A&&0===t)throw new x0.ErrnoError(6);if(null==A)break;t++,_[a+n]=A}return t&&(x.node.atime=Date.now()),t},write(x,_,a,r,e){if(!x.tty||!x.tty.ops.put_char)throw new x0.ErrnoError(60);try{for(var A=0;A<r;A++)x.tty.ops.put_char(x.tty,_[a+A])}catch(x){throw new x0.ErrnoError(29)}return r&&(x.node.mtime=x.node.ctime=Date.now()),A}},default_tty_ops:{get_char:x=>(()=>{if(!xk.length){var x=null;if(P){var _=Buffer.alloc(256),a=0,r=process.stdin.fd;try{a=w.readSync(r,_,0,256)}catch(x){if(x.toString().includes("EOF"))a=0;else throw x}a>0&&(x=_.slice(0,a).toString("utf-8"))}else globalThis.window?.prompt&&null!==(x=window.prompt("Input: "))&&(x+="\n");if(!x)return null;xk=x$(x,!0)}return xk.shift()})(),put_char(x,_){null===_||10===_?(D(xS(x.output)),x.output=[]):0!=_&&x.output.push(_)},fsync(x){x.output?.length>0&&(D(xS(x.output)),x.output=[])},ioctl_tcgets:x=>({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:(x,_,a)=>0,ioctl_tiocgwinsz:x=>[24,80]},default_tty1_ops:{put_char(x,_){null===_||10===_?(T(xS(x.output)),x.output=[]):0!=_&&x.output.push(_)},fsync(x){x.output?.length>0&&(T(xS(x.output)),x.output=[])}}},xK=(x,_)=>(G(_,"alignment argument is required"),Math.ceil(x/_)*_),xR=x=>{let _;x=xK(x,65536);var a=au(65536,x);return a&&(_=x,o.fill(0,a,a+_)),a},xZ={ops_table:null,mount:x=>xZ.createNode(null,"/",16895,0),createNode(x,_,a,r){if(x0.isBlkdev(a)||x0.isFIFO(a))throw new x0.ErrnoError(63);xZ.ops_table||={dir:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr,lookup:xZ.node_ops.lookup,mknod:xZ.node_ops.mknod,rename:xZ.node_ops.rename,unlink:xZ.node_ops.unlink,rmdir:xZ.node_ops.rmdir,readdir:xZ.node_ops.readdir,symlink:xZ.node_ops.symlink},stream:{llseek:xZ.stream_ops.llseek}},file:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr},stream:{llseek:xZ.stream_ops.llseek,read:xZ.stream_ops.read,write:xZ.stream_ops.write,mmap:xZ.stream_ops.mmap,msync:xZ.stream_ops.msync}},link:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr,readlink:xZ.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xZ.node_ops.getattr,setattr:xZ.node_ops.setattr},stream:x0.chrdev_stream_ops}};var e=x0.createNode(x,_,a,r);return x0.isDir(e.mode)?(e.node_ops=xZ.ops_table.dir.node,e.stream_ops=xZ.ops_table.dir.stream,e.contents={}):x0.isFile(e.mode)?(e.node_ops=xZ.ops_table.file.node,e.stream_ops=xZ.ops_table.file.stream,e.usedBytes=0,e.contents=null):x0.isLink(e.mode)?(e.node_ops=xZ.ops_table.link.node,e.stream_ops=xZ.ops_table.link.stream):x0.isChrdev(e.mode)&&(e.node_ops=xZ.ops_table.chrdev.node,e.stream_ops=xZ.ops_table.chrdev.stream),e.atime=e.mtime=e.ctime=Date.now(),x&&(x.contents[_]=e,x.atime=x.mtime=x.ctime=e.atime),e},getFileDataAsTypedArray:x=>x.contents?x.contents.subarray?x.contents.subarray(0,x.usedBytes):new Uint8Array(x.contents):new Uint8Array(0),expandFileStorage(x,_){var a=x.contents?x.contents.length:0;if(!(a>=_)){_=Math.max(_,a*(a<1048576?2:1.125)>>>0),0!=a&&(_=Math.max(_,256));var r=x.contents;x.contents=new Uint8Array(_),x.usedBytes>0&&x.contents.set(r.subarray(0,x.usedBytes),0)}},resizeFileStorage(x,_){if(x.usedBytes!=_)if(0==_)x.contents=null,x.usedBytes=0;else{var a=x.contents;x.contents=new Uint8Array(_),a&&x.contents.set(a.subarray(0,Math.min(_,x.usedBytes))),x.usedBytes=_}},node_ops:{getattr(x){var _={};return _.dev=x0.isChrdev(x.mode)?x.id:1,_.ino=x.id,_.mode=x.mode,_.nlink=1,_.uid=0,_.gid=0,_.rdev=x.rdev,x0.isDir(x.mode)?_.size=4096:x0.isFile(x.mode)?_.size=x.usedBytes:x0.isLink(x.mode)?_.size=x.link.length:_.size=0,_.atime=new Date(x.atime),_.mtime=new Date(x.mtime),_.ctime=new Date(x.ctime),_.blksize=4096,_.blocks=Math.ceil(_.size/_.blksize),_},setattr(x,_){for(let a of["mode","atime","mtime","ctime"])null!=_[a]&&(x[a]=_[a]);void 0!==_.size&&xZ.resizeFileStorage(x,_.size)},lookup(x,_){throw new x0.ErrnoError(44)},mknod:(x,_,a,r)=>xZ.createNode(x,_,a,r),rename(x,_,a){var r;try{r=x0.lookupNode(_,a)}catch(x){}if(r){if(x0.isDir(x.mode))for(var e in r.contents)throw new x0.ErrnoError(55);x0.hashRemoveNode(r)}delete x.parent.contents[x.name],_.contents[a]=x,x.name=a,_.ctime=_.mtime=x.parent.ctime=x.parent.mtime=Date.now()},unlink(x,_){delete x.contents[_],x.ctime=x.mtime=Date.now()},rmdir(x,_){var a=x0.lookupNode(x,_);for(var r in a.contents)throw new x0.ErrnoError(55);delete x.contents[_],x.ctime=x.mtime=Date.now()},readdir:x=>[".","..",...Object.keys(x.contents)],symlink(x,_,a){var r=xZ.createNode(x,_,41471,0);return r.link=a,r},readlink(x){if(!x0.isLink(x.mode))throw new x0.ErrnoError(28);return x.link}},stream_ops:{read(x,_,a,r,e){var A=x.node.contents;if(e>=x.node.usedBytes)return 0;var t=Math.min(x.node.usedBytes-e,r);if(G(t>=0),t>8&&A.subarray)_.set(A.subarray(e,e+t),a);else for(var n=0;n<t;n++)_[a+n]=A[e+n];return t},write(x,_,a,r,e,A){if(G(!(_ instanceof ArrayBuffer)),_.buffer===c.buffer&&(A=!1),!r)return 0;var t=x.node;if(t.mtime=t.ctime=Date.now(),_.subarray&&(!t.contents||t.contents.subarray)){if(A)return G(0===e,"canOwn must imply no weird position inside the file"),t.contents=_.subarray(a,a+r),t.usedBytes=r,r;else if(0===t.usedBytes&&0===e)return t.contents=_.slice(a,a+r),t.usedBytes=r,r;else if(e+r<=t.usedBytes)return t.contents.set(_.subarray(a,a+r),e),r}if(xZ.expandFileStorage(t,e+r),t.contents.subarray&&_.subarray)t.contents.set(_.subarray(a,a+r),e);else for(var n=0;n<r;n++)t.contents[e+n]=_[a+n];return t.usedBytes=Math.max(t.usedBytes,e+r),r},llseek(x,_,a){var r=_;if(1===a?r+=x.position:2===a&&x0.isFile(x.node.mode)&&(r+=x.node.usedBytes),r<0)throw new x0.ErrnoError(28);return r},mmap(x,_,a,r,e){if(!x0.isFile(x.node.mode))throw new x0.ErrnoError(43);var A,t,n=x.node.contents;if(!(2&e)&&n&&n.buffer===c.buffer)t=!1,A=n.byteOffset;else{if(t=!0,!(A=xR(_)))throw new x0.ErrnoError(48);n&&((a>0||a+_<n.length)&&(n=n.subarray?n.subarray(a,a+_):Array.prototype.slice.call(n,a,a+_)),c.set(n,A>>>0))}return{ptr:A,allocated:t}},msync:(x,_,a,r,e)=>(xZ.stream_ops.write(x,_,0,r,a,!1),0)}},xO=(x,_)=>{var a=0;return x&&(a|=365),_&&(a|=146),a},xJ={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},xV=async x=>{var _=await s(x);return G(_,`Loading data file "${x}" failed (no arrayBuffer).`),new Uint8Array(_)},xM=0,xH=null,xU={},xQ=null,xY=[],xz=async(x,_)=>{for(var a of("u">typeof Browser&&Browser.init(),xY))if(a.canHandle(_))return G("AsyncFunction"===a.handle.constructor.name,"Filesystem plugin handlers must be async functions (See #24914)"),a.handle(x,_);return x},xW=async(_,a,r,e,A,t,n,s)=>{var i=a?xT.resolve(xw.join2(_,a)):_,v=(x=>{for(var _=x;;){if(!xU[x])return x;x=_+Math.random()}})(`cp ${i}`);xM++,x.monitorRunDependencies?.(xM),G(v,"addRunDependency requires an ID"),G(!xU[v]),xU[v]=1,null===xQ&&globalThis.setInterval&&(xQ=setInterval(()=>{if(k){clearInterval(xQ),xQ=null;return}var x=!1;for(var _ in xU)x||(x=!0,T("still waiting on run dependencies:")),T(`dependency: ${_}`);x&&T("(end of list)")},1e4),xQ.unref?.());try{var l=r;"string"==typeof r&&(l=await xV(r)),l=await xz(l,i),s?.(),t||((...x)=>x0.createDataFile(...x))(_,a,l,e,A,n)}finally{if(xM--,x.monitorRunDependencies?.(xM),G(v,"removeRunDependency requires an ID"),G(xU[v]),delete xU[v],0==xM&&(null!==xQ&&(clearInterval(xQ),xQ=null),xH)){var c=xH;xH=null,c()}}},x0={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,readFiles:{},ErrnoError:class extends Error{name="ErrnoError";constructor(x){for(var _ in super(J?xg(ab(x)):""),this.errno=x,xJ)if(xJ[_]===x){this.code=_;break}}},FSStream:class{shared={};get object(){return this.node}set object(x){this.node=x}get isRead(){return(2097155&this.flags)!=1}get isWrite(){return(2097155&this.flags)!=0}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(x){this.shared.flags=x}get position(){return this.shared.position}set position(x){this.shared.position=x}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(x,_,a,r){x||(x=this),this.parent=x,this.mount=x.mount,this.id=x0.nextInode++,this.name=_,this.mode=a,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(x){x?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(x){x?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return x0.isDir(this.mode)}get isDevice(){return x0.isChrdev(this.mode)}},lookupPath(x,_={}){if(!x)throw new x0.ErrnoError(44);_.follow_mount??=!0,xw.isAbs(x)||(x=x0.cwd()+"/"+x);x:for(var a=0;a<40;a++){for(var r=x.split("/").filter(x=>!!x),e=x0.root,A="/",t=0;t<r.length;t++){var n=t===r.length-1;if(n&&_.parent)break;if("."!==r[t]){if(".."===r[t]){if(A=xw.dirname(A),x0.isRoot(e)){x=A+"/"+r.slice(t+1).join("/"),a--;continue x}e=e.parent;continue}A=xw.join2(A,r[t]);try{e=x0.lookupNode(e,r[t])}catch(x){if(x?.errno===44&&n&&_.noent_okay)return{path:A};throw x}if(x0.isMountpoint(e)&&(!n||_.follow_mount)&&(e=e.mounted.root),x0.isLink(e.mode)&&(!n||_.follow)){if(!e.node_ops.readlink)throw new x0.ErrnoError(52);var s=e.node_ops.readlink(e);xw.isAbs(s)||(s=xw.dirname(A)+"/"+s),x=s+"/"+r.slice(t+1).join("/");continue x}}}return{path:A,node:e}}throw new x0.ErrnoError(32)},getPath(x){for(var _;;){if(x0.isRoot(x)){var a=x.mount.mountpoint;if(!_)return a;return"/"!==a[a.length-1]?`${a}/${_}`:a+_}_=_?`${x.name}/${_}`:x.name,x=x.parent}},hashName(x,_){for(var a=0,r=0;r<_.length;r++)a=(a<<5)-a+_.charCodeAt(r)|0;return(x+a>>>0)%x0.nameTable.length},hashAddNode(x){var _=x0.hashName(x.parent.id,x.name);x.name_next=x0.nameTable[_],x0.nameTable[_]=x},hashRemoveNode(x){var _=x0.hashName(x.parent.id,x.name);if(x0.nameTable[_]===x)x0.nameTable[_]=x.name_next;else for(var a=x0.nameTable[_];a;){if(a.name_next===x){a.name_next=x.name_next;break}a=a.name_next}},lookupNode(x,_){var a=x0.mayLookup(x);if(a)throw new x0.ErrnoError(a);for(var r=x0.hashName(x.id,_),e=x0.nameTable[r];e;e=e.name_next){var A=e.name;if(e.parent.id===x.id&&A===_)return e}return x0.lookup(x,_)},createNode(x,_,a,r){G("object"==typeof x);var e=new x0.FSNode(x,_,a,r);return x0.hashAddNode(e),e},destroyNode(x){x0.hashRemoveNode(x)},isRoot:x=>x===x.parent,isMountpoint:x=>!!x.mounted,isFile:x=>(61440&x)==32768,isDir:x=>(61440&x)==16384,isLink:x=>(61440&x)==40960,isChrdev:x=>(61440&x)==8192,isBlkdev:x=>(61440&x)==24576,isFIFO:x=>(61440&x)==4096,isSocket:x=>(49152&x)==49152,flagsToPermissionString(x){var _=["r","w","rw"][3&x];return 512&x&&(_+="w"),_},nodePermissions:(x,_)=>x0.ignorePermissions?0:_.includes("r")&&!(292&x.mode)||_.includes("w")&&!(146&x.mode)||_.includes("x")&&!(73&x.mode)?2:0,mayLookup(x){if(!x0.isDir(x.mode))return 54;var _=x0.nodePermissions(x,"x");return _||2*!x.node_ops.lookup},mayCreate(x,_){if(!x0.isDir(x.mode))return 54;try{return x0.lookupNode(x,_),20}catch(x){}return x0.nodePermissions(x,"wx")},mayDelete(x,_,a){try{r=x0.lookupNode(x,_)}catch(x){return x.errno}var r,e=x0.nodePermissions(x,"wx");if(e)return e;if(a){if(!x0.isDir(r.mode))return 54;if(x0.isRoot(r)||x0.getPath(r)===x0.cwd())return 10}else if(x0.isDir(r.mode))return 31;return 0},mayOpen:(x,_)=>x?x0.isLink(x.mode)?32:x0.isDir(x.mode)&&("r"!==x0.flagsToPermissionString(_)||576&_)?31:x0.nodePermissions(x,x0.flagsToPermissionString(_)):44,checkOpExists(x,_){if(!x)throw new x0.ErrnoError(_);return x},MAX_OPEN_FDS:4096,nextfd(){for(var x=0;x<=x0.MAX_OPEN_FDS;x++)if(!x0.streams[x])return x;throw new x0.ErrnoError(33)},getStreamChecked(x){var _=x0.getStream(x);if(!_)throw new x0.ErrnoError(8);return _},getStream:x=>x0.streams[x],createStream:(x,_=-1)=>(G(_>=-1),x=Object.assign(new x0.FSStream,x),-1==_&&(_=x0.nextfd()),x.fd=_,x0.streams[_]=x,x),closeStream(x){x0.streams[x]=null},dupStream(x,_=-1){var a=x0.createStream(x,_);return a.stream_ops?.dup?.(a),a},doSetAttr(x,_,a){var r=x?.stream_ops.setattr,e=r?x:_;r??=_.node_ops.setattr,x0.checkOpExists(r,63),r(e,a)},chrdev_stream_ops:{open(x){var _=x0.getDevice(x.node.rdev);x.stream_ops=_.stream_ops,x.stream_ops.open?.(x)},llseek(){throw new x0.ErrnoError(70)}},major:x=>x>>8,minor:x=>255&x,makedev:(x,_)=>x<<8|_,registerDevice(x,_){x0.devices[x]={stream_ops:_}},getDevice:x=>x0.devices[x],getMounts(x){for(var _=[],a=[x];a.length;){var r=a.pop();_.push(r),a.push(...r.mounts)}return _},syncfs(x,_){"function"==typeof x&&(_=x,x=!1),x0.syncFSRequests++,x0.syncFSRequests>1&&T(`warning: ${x0.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var a=x0.getMounts(x0.root.mount),r=0;function e(x){return G(x0.syncFSRequests>0),x0.syncFSRequests--,_(x)}function A(x){if(x)return A.errored?void 0:(A.errored=!0,e(x));++r>=a.length&&e(null)}for(var t of a)t.type.syncfs?t.type.syncfs(t,x,A):A(null)},mount(x,_,a){if("string"==typeof x)throw x;var r,e="/"===a,A=!a;if(e&&x0.root)throw new x0.ErrnoError(10);if(!e&&!A){var t=x0.lookupPath(a,{follow_mount:!1});if(a=t.path,r=t.node,x0.isMountpoint(r))throw new x0.ErrnoError(10);if(!x0.isDir(r.mode))throw new x0.ErrnoError(54)}var n={type:x,opts:_,mountpoint:a,mounts:[]},s=x.mount(n);return s.mount=n,n.root=s,e?x0.root=s:r&&(r.mounted=n,r.mount&&r.mount.mounts.push(n)),s},unmount(x){var _=x0.lookupPath(x,{follow_mount:!1});if(!x0.isMountpoint(_.node))throw new x0.ErrnoError(28);var a=_.node,r=a.mounted,e=x0.getMounts(r);for(var[A,t]of Object.entries(x0.nameTable))for(;t;){var n=t.name_next;e.includes(t.mount)&&x0.destroyNode(t),t=n}a.mounted=null;var s=a.mount.mounts.indexOf(r);G(-1!==s),a.mount.mounts.splice(s,1)},lookup:(x,_)=>x.node_ops.lookup(x,_),mknod(x,_,a){var r=x0.lookupPath(x,{parent:!0}).node,e=xw.basename(x);if(!e)throw new x0.ErrnoError(28);if("."===e||".."===e)throw new x0.ErrnoError(20);var A=x0.mayCreate(r,e);if(A)throw new x0.ErrnoError(A);if(!r.node_ops.mknod)throw new x0.ErrnoError(63);return r.node_ops.mknod(r,e,_,a)},statfs:x=>x0.statfsNode(x0.lookupPath(x,{follow:!0}).node),statfsStream:x=>x0.statfsNode(x.node),statfsNode(x){var _={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:x0.nextInode,ffree:x0.nextInode-1,fsid:42,flags:2,namelen:255};return x.node_ops.statfs&&Object.assign(_,x.node_ops.statfs(x.mount.opts.root)),_},create:(x,_=438)=>(_&=4095,_|=32768,x0.mknod(x,_,0)),mkdir:(x,_=511)=>(_&=1023,_|=16384,x0.mknod(x,_,0)),mkdirTree(x,_){var a=x.split("/"),r="";for(var e of a)if(e){(r||xw.isAbs(x))&&(r+="/"),r+=e;try{x0.mkdir(r,_)}catch(x){if(20!=x.errno)throw x}}},mkdev:(x,_,a)=>(void 0===a&&(a=_,_=438),_|=8192,x0.mknod(x,_,a)),symlink(x,_){if(!xT.resolve(x))throw new x0.ErrnoError(44);var a=x0.lookupPath(_,{parent:!0}).node;if(!a)throw new x0.ErrnoError(44);var r=xw.basename(_),e=x0.mayCreate(a,r);if(e)throw new x0.ErrnoError(e);if(!a.node_ops.symlink)throw new x0.ErrnoError(63);return a.node_ops.symlink(a,r,x)},rename(x,_){var a,r,e,A=xw.dirname(x),t=xw.dirname(_),n=xw.basename(x),s=xw.basename(_);if(a=x0.lookupPath(x,{parent:!0}).node,r=x0.lookupPath(_,{parent:!0}).node,!a||!r)throw new x0.ErrnoError(44);if(a.mount!==r.mount)throw new x0.ErrnoError(75);var i=x0.lookupNode(a,n),v=xT.relative(x,t);if("."!==v.charAt(0))throw new x0.ErrnoError(28);if("."!==(v=xT.relative(_,A)).charAt(0))throw new x0.ErrnoError(55);try{e=x0.lookupNode(r,s)}catch(x){}if(i!==e){var l=x0.isDir(i.mode),c=x0.mayDelete(a,n,l);if(c||(c=e?x0.mayDelete(r,s,l):x0.mayCreate(r,s)))throw new x0.ErrnoError(c);if(!a.node_ops.rename)throw new x0.ErrnoError(63);if(x0.isMountpoint(i)||e&&x0.isMountpoint(e))throw new x0.ErrnoError(10);if(r!==a&&(c=x0.nodePermissions(a,"w")))throw new x0.ErrnoError(c);x0.hashRemoveNode(i);try{a.node_ops.rename(i,r,s),i.parent=r}catch(x){throw x}finally{x0.hashAddNode(i)}}},rmdir(x){var _=x0.lookupPath(x,{parent:!0}).node,a=xw.basename(x),r=x0.lookupNode(_,a),e=x0.mayDelete(_,a,!0);if(e)throw new x0.ErrnoError(e);if(!_.node_ops.rmdir)throw new x0.ErrnoError(63);if(x0.isMountpoint(r))throw new x0.ErrnoError(10);_.node_ops.rmdir(_,a),x0.destroyNode(r)},readdir(x){var _=x0.lookupPath(x,{follow:!0}).node;return x0.checkOpExists(_.node_ops.readdir,54)(_)},unlink(x){var _=x0.lookupPath(x,{parent:!0}).node;if(!_)throw new x0.ErrnoError(44);var a=xw.basename(x),r=x0.lookupNode(_,a),e=x0.mayDelete(_,a,!1);if(e)throw new x0.ErrnoError(e);if(!_.node_ops.unlink)throw new x0.ErrnoError(63);if(x0.isMountpoint(r))throw new x0.ErrnoError(10);_.node_ops.unlink(_,a),x0.destroyNode(r)},readlink(x){var _=x0.lookupPath(x).node;if(!_)throw new x0.ErrnoError(44);if(!_.node_ops.readlink)throw new x0.ErrnoError(28);return _.node_ops.readlink(_)},stat(x,_){var a=x0.lookupPath(x,{follow:!_}).node;return x0.checkOpExists(a.node_ops.getattr,63)(a)},fstat(x){var _=x0.getStreamChecked(x),a=_.node,r=_.stream_ops.getattr,e=r?_:a;return r??=a.node_ops.getattr,x0.checkOpExists(r,63),r(e)},lstat:x=>x0.stat(x,!0),doChmod(x,_,a,r){x0.doSetAttr(x,_,{mode:4095&a|-4096&_.mode,ctime:Date.now(),dontFollow:r})},chmod(x,_,a){var r;r="string"==typeof x?x0.lookupPath(x,{follow:!a}).node:x,x0.doChmod(null,r,_,a)},lchmod(x,_){x0.chmod(x,_,!0)},fchmod(x,_){var a=x0.getStreamChecked(x);x0.doChmod(a,a.node,_,!1)},doChown(x,_,a){x0.doSetAttr(x,_,{timestamp:Date.now(),dontFollow:a})},chown(x,_,a,r){var e;e="string"==typeof x?x0.lookupPath(x,{follow:!r}).node:x,x0.doChown(null,e,r)},lchown(x,_,a){x0.chown(x,_,a,!0)},fchown(x,_,a){var r=x0.getStreamChecked(x);x0.doChown(r,r.node,!1)},doTruncate(x,_,a){if(x0.isDir(_.mode))throw new x0.ErrnoError(31);if(!x0.isFile(_.mode))throw new x0.ErrnoError(28);var r=x0.nodePermissions(_,"w");if(r)throw new x0.ErrnoError(r);x0.doSetAttr(x,_,{size:a,timestamp:Date.now()})},truncate(x,_){if(_<0)throw new x0.ErrnoError(28);if("string"==typeof x){var a;a=x0.lookupPath(x,{follow:!0}).node}else a=x;x0.doTruncate(null,a,_)},ftruncate(x,_){var a=x0.getStreamChecked(x);if(_<0||(2097155&a.flags)==0)throw new x0.ErrnoError(28);x0.doTruncate(a,a.node,_)},utime(x,_,a){var r=x0.lookupPath(x,{follow:!0}).node;x0.checkOpExists(r.node_ops.setattr,63)(r,{atime:_,mtime:a})},open(_,a,r=438){if(""===_)throw new x0.ErrnoError(44);if(r=64&(a="string"==typeof a?(x=>{var _={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[x];if(void 0===_)throw Error(`Unknown file open mode: ${x}`);return _})(a):a)?4095&r|32768:0,"object"==typeof _)e=_;else{var e,A=_.endsWith("/"),t=x0.lookupPath(_,{follow:!(131072&a),noent_okay:!0});e=t.node,_=t.path}var n=!1;if(64&a)if(e){if(128&a)throw new x0.ErrnoError(20)}else if(A)throw new x0.ErrnoError(31);else e=x0.mknod(_,511|r,0),n=!0;if(!e)throw new x0.ErrnoError(44);if(x0.isChrdev(e.mode)&&(a&=-513),65536&a&&!x0.isDir(e.mode))throw new x0.ErrnoError(54);if(!n){var s=x0.mayOpen(e,a);if(s)throw new x0.ErrnoError(s)}512&a&&!n&&x0.truncate(e,0),a&=-131713;var i=x0.createStream({node:e,path:x0.getPath(e),flags:a,seekable:!0,position:0,stream_ops:e.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),n&&x0.chmod(e,511&r),!x.logReadFiles||1&a||_ in x0.readFiles||(x0.readFiles[_]=1),i},close(x){if(x0.isClosed(x))throw new x0.ErrnoError(8);x.getdents&&(x.getdents=null);try{x.stream_ops.close&&x.stream_ops.close(x)}catch(x){throw x}finally{x0.closeStream(x.fd)}x.fd=null},isClosed:x=>null===x.fd,llseek(x,_,a){if(x0.isClosed(x))throw new x0.ErrnoError(8);if(!x.seekable||!x.stream_ops.llseek)throw new x0.ErrnoError(70);if(0!=a&&1!=a&&2!=a)throw new x0.ErrnoError(28);return x.position=x.stream_ops.llseek(x,_,a),x.ungotten=[],x.position},read(x,_,a,r,e){if(G(a>=0),r<0||e<0)throw new x0.ErrnoError(28);if(x0.isClosed(x)||(2097155&x.flags)==1)throw new x0.ErrnoError(8);if(x0.isDir(x.node.mode))throw new x0.ErrnoError(31);if(!x.stream_ops.read)throw new x0.ErrnoError(28);var A=void 0!==e;if(A){if(!x.seekable)throw new x0.ErrnoError(70)}else e=x.position;var t=x.stream_ops.read(x,_,a,r,e);return A||(x.position+=t),t},write(x,_,a,r,e,A){if(G(a>=0),r<0||e<0)throw new x0.ErrnoError(28);if(x0.isClosed(x)||(2097155&x.flags)==0)throw new x0.ErrnoError(8);if(x0.isDir(x.node.mode))throw new x0.ErrnoError(31);if(!x.stream_ops.write)throw new x0.ErrnoError(28);x.seekable&&1024&x.flags&&x0.llseek(x,0,2);var t=void 0!==e;if(t){if(!x.seekable)throw new x0.ErrnoError(70)}else e=x.position;var n=x.stream_ops.write(x,_,a,r,e,A);return t||(x.position+=n),n},mmap(x,_,a,r,e){if((2&r)!=0&&(2&e)==0&&(2097155&x.flags)!=2||(2097155&x.flags)==1)throw new x0.ErrnoError(2);if(!x.stream_ops.mmap)throw new x0.ErrnoError(43);if(!_)throw new x0.ErrnoError(28);return x.stream_ops.mmap(x,_,a,r,e)},msync:(x,_,a,r,e)=>(G(a>=0),x.stream_ops.msync)?x.stream_ops.msync(x,_,a,r,e):0,ioctl(x,_,a){if(!x.stream_ops.ioctl)throw new x0.ErrnoError(59);return x.stream_ops.ioctl(x,_,a)},readFile(x,_={}){_.flags=_.flags||0,_.encoding=_.encoding||"binary","utf8"!==_.encoding&&"binary"!==_.encoding&&M(`Invalid encoding type "${_.encoding}"`);var a=x0.open(x,_.flags),r=x0.stat(x).size,e=new Uint8Array(r);return x0.read(a,e,0,r,0),"utf8"===_.encoding&&(e=xS(e)),x0.close(a),e},writeFile(x,_,a={}){a.flags=a.flags||577;var r=x0.open(x,a.flags,a.mode);"string"==typeof _&&(_=new Uint8Array(x$(_,!0))),ArrayBuffer.isView(_)?x0.write(r,_,0,_.byteLength,void 0,a.canOwn):M("Unsupported data type"),x0.close(r)},cwd:()=>x0.currentPath,chdir(x){var _=x0.lookupPath(x,{follow:!0});if(null===_.node)throw new x0.ErrnoError(44);if(!x0.isDir(_.node.mode))throw new x0.ErrnoError(54);var a=x0.nodePermissions(_.node,"x");if(a)throw new x0.ErrnoError(a);x0.currentPath=_.path},createDefaultDirectories(){x0.mkdir("/tmp"),x0.mkdir("/home"),x0.mkdir("/home/web_user")},createDefaultDevices(){x0.mkdir("/dev"),x0.registerDevice(x0.makedev(1,3),{read:()=>0,write:(x,_,a,r,e)=>r,llseek:()=>0}),x0.mkdev("/dev/null",x0.makedev(1,3)),xX.register(x0.makedev(5,0),xX.default_tty_ops),xX.register(x0.makedev(6,0),xX.default_tty1_ops),x0.mkdev("/dev/tty",x0.makedev(5,0)),x0.mkdev("/dev/tty1",x0.makedev(6,0));var x=new Uint8Array(1024),_=0,a=()=>(0===_&&(xD(x),_=x.byteLength),x[--_]);x0.createDevice("/dev","random",a),x0.createDevice("/dev","urandom",a),x0.mkdir("/dev/shm"),x0.mkdir("/dev/shm/tmp")},createSpecialDirectories(){x0.mkdir("/proc");var x=x0.mkdir("/proc/self");x0.mkdir("/proc/self/fd"),x0.mount({mount(){var _=x0.createNode(x,"fd",16895,73);return _.stream_ops={llseek:xZ.stream_ops.llseek},_.node_ops={lookup(x,_){var a=+_,r=x0.getStreamChecked(a),e={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path},id:a+1};return e.parent=e,e},readdir:()=>Array.from(x0.streams.entries()).filter(([x,_])=>_).map(([x,_])=>x.toString())},_}},{},"/proc/self/fd")},createStandardStreams(x,_,a){x?x0.createDevice("/dev","stdin",x):x0.symlink("/dev/tty","/dev/stdin"),_?x0.createDevice("/dev","stdout",null,_):x0.symlink("/dev/tty","/dev/stdout"),a?x0.createDevice("/dev","stderr",null,a):x0.symlink("/dev/tty1","/dev/stderr");var r=x0.open("/dev/stdin",0),e=x0.open("/dev/stdout",1),A=x0.open("/dev/stderr",1);G(0===r.fd,`invalid handle for stdin (${r.fd})`),G(1===e.fd,`invalid handle for stdout (${e.fd})`),G(2===A.fd,`invalid handle for stderr (${A.fd})`)},staticInit(){x0.nameTable=Array(4096),x0.mount(xZ,{},"/"),x0.createDefaultDirectories(),x0.createDefaultDevices(),x0.createSpecialDirectories(),x0.filesystems={MEMFS:xZ}},init(_,a,r){G(!x0.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),x0.initialized=!0,_??=x.stdin,a??=x.stdout,r??=x.stderr,x0.createStandardStreams(_,a,r)},quit(){for(var x of(x0.initialized=!1,ad(0),x0.streams))x&&x0.close(x)},findObject(x,_){var a=x0.analyzePath(x,_);return a.exists?a.object:null},analyzePath(x,_){try{var a=x0.lookupPath(x,{follow:!_});x=a.path}catch(x){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var a=x0.lookupPath(x,{parent:!0});r.parentExists=!0,r.parentPath=a.path,r.parentObject=a.node,r.name=xw.basename(x),a=x0.lookupPath(x,{follow:!_}),r.exists=!0,r.path=a.path,r.object=a.node,r.name=a.node.name,r.isRoot="/"===a.path}catch(x){r.error=x.errno}return r},createPath(x,_,a,r){x="string"==typeof x?x:x0.getPath(x);for(var e=_.split("/").reverse();e.length;){var A=e.pop();if(A){var t=xw.join2(x,A);try{x0.mkdir(t)}catch(x){if(20!=x.errno)throw x}x=t}}return t},createFile(x,_,a,r,e){var A=xw.join2("string"==typeof x?x:x0.getPath(x),_),t=xO(r,e);return x0.create(A,t)},createDataFile(x,_,a,r,e,A){var t=_;x&&(x="string"==typeof x?x:x0.getPath(x),t=_?xw.join2(x,_):x);var n=xO(r,e),s=x0.create(t,n);if(a){if("string"==typeof a){for(var i=Array(a.length),v=0,l=a.length;v<l;++v)i[v]=a.charCodeAt(v);a=i}x0.chmod(s,146|n);var c=x0.open(s,577);x0.write(c,a,0,a.length,0,A),x0.close(c),x0.chmod(s,n)}},createDevice(x,_,a,r){var e=xw.join2("string"==typeof x?x:x0.getPath(x),_),A=xO(!!a,!!r);x0.createDevice.major??=64;var t=x0.makedev(x0.createDevice.major++,0);return x0.registerDevice(t,{open(x){x.seekable=!1},close(x){r?.buffer?.length&&r(10)},read(x,_,r,e,A){for(var t,n=0,s=0;s<e;s++){try{t=a()}catch(x){throw new x0.ErrnoError(29)}if(void 0===t&&0===n)throw new x0.ErrnoError(6);if(null==t)break;n++,_[r+s]=t}return n&&(x.node.atime=Date.now()),n},write(x,_,a,e,A){for(var t=0;t<e;t++)try{r(_[a+t])}catch(x){throw new x0.ErrnoError(29)}return e&&(x.node.mtime=x.node.ctime=Date.now()),t}}),x0.mkdev(e,A,t)},forceLoadFile(x){if(x.isDevice||x.isFolder||x.link||x.contents)return!0;if(globalThis.XMLHttpRequest)M("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 try{x.contents=i(x.url)}catch(x){throw new x0.ErrnoError(29)}},createLazyFile(x,_,a,r,e){if(globalThis.XMLHttpRequest){F||M("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var A={isDevice:!1,contents:new class{lengthKnown=!1;chunks=[];get(x){if(!(x>this.length-1)&&!(x<0)){var _=x%this.chunkSize,a=x/this.chunkSize|0;return this.getter(a)[_]}}setDataGetter(x){this.getter=x}cacheLength(){var x,_=new XMLHttpRequest;_.open("HEAD",a,!1),_.send(null),_.status>=200&&_.status<300||304===_.status||M("Couldn't load "+a+". Status: "+_.status);var r=Number(_.getResponseHeader("Content-length")),e=(x=_.getResponseHeader("Accept-Ranges"))&&"bytes"===x,A=(x=_.getResponseHeader("Content-Encoding"))&&"gzip"===x,t=1048576;e||(t=r);var n=this;n.setDataGetter(x=>{var _,e,A=x*t,s=(x+1)*t-1;return s=Math.min(s,r-1),void 0===n.chunks[x]&&(n.chunks[x]=(A>(_=s)&&M("invalid range ("+A+", "+_+") or no bytes requested!"),_>r-1&&M("only "+r+" bytes available! programmer error!"),((e=new XMLHttpRequest).open("GET",a,!1),r!==t&&e.setRequestHeader("Range","bytes="+A+"-"+_),e.responseType="arraybuffer",e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.send(null),e.status>=200&&e.status<300||304===e.status||M("Couldn't load "+a+". Status: "+e.status),void 0!==e.response)?new Uint8Array(e.response||[]):x$(e.responseText||"",!0))),void 0===n.chunks[x]&&M("doXHR failed!"),n.chunks[x]}),(A||!r)&&(t=r=1,t=r=this.getter(0).length,D("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=t,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}}else var A={isDevice:!1,url:a};var t=x0.createFile(x,_,A,r,e);A.contents?t.contents=A.contents:A.url&&(t.contents=null,t.url=A.url),Object.defineProperties(t,{usedBytes:{get:function(){return this.contents.length}}});var n={};for(let[x,_]of Object.entries(t.stream_ops))n[x]=(...x)=>(x0.forceLoadFile(t),_(...x));function s(x,_,a,r,e){var A=x.node.contents;if(e>=A.length)return 0;var t=Math.min(A.length-e,r);if(G(t>=0),A.slice)for(var n=0;n<t;n++)_[a+n]=A[e+n];else for(var n=0;n<t;n++)_[a+n]=A.get(e+n);return t}return n.read=(x,_,a,r,e)=>(x0.forceLoadFile(t),s(x,_,a,r,e)),n.mmap=(x,_,a,r,e)=>{x0.forceLoadFile(t);var A=xR(_);if(!A)throw new x0.ErrnoError(48);return s(x,c,A,_,a),{ptr:A,allocated:!0}},t.stream_ops=n,t},absolutePath(){M("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){M("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){M("FS.createLink has been removed; use FS.symlink instead")},joinPath(){M("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){M("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){M("FS.standardizePath has been removed; use PATH.normalize instead")}},x1={DEFAULT_POLLMASK:5,calculateAt(x,_,a){if(xw.isAbs(_))return _;if(-100===x)r=x0.cwd();else{var r;r=x1.getStreamFromFD(x).path}if(0==_.length){if(!a)throw new x0.ErrnoError(44);return r}return r+"/"+_},writeStat(x,_){u[x>>>2>>>0]=_.dev,u[x+4>>>2>>>0]=_.mode,u[x+8>>>2>>>0]=_.nlink,u[x+12>>>2>>>0]=_.uid,u[x+16>>>2>>>0]=_.gid,u[x+20>>>2>>>0]=_.rdev,m[x+24>>>3>>>0]=BigInt(_.size),b[x+32>>>2>>>0]=4096,b[x+36>>>2>>>0]=_.blocks;var a=_.atime.getTime(),r=_.mtime.getTime(),e=_.ctime.getTime();return m[x+40>>>3>>>0]=BigInt(Math.floor(a/1e3)),u[x+48>>>2>>>0]=a%1e3*1e6,m[x+56>>>3>>>0]=BigInt(Math.floor(r/1e3)),u[x+64>>>2>>>0]=r%1e3*1e6,m[x+72>>>3>>>0]=BigInt(Math.floor(e/1e3)),u[x+80>>>2>>>0]=e%1e3*1e6,m[x+88>>>3>>>0]=BigInt(_.ino),0},writeStatFs(x,_){u[x+4>>>2>>>0]=_.bsize,u[x+60>>>2>>>0]=_.bsize,m[x+8>>>3>>>0]=BigInt(_.blocks),m[x+16>>>3>>>0]=BigInt(_.bfree),m[x+24>>>3>>>0]=BigInt(_.bavail),m[x+32>>>3>>>0]=BigInt(_.files),m[x+40>>>3>>>0]=BigInt(_.ffree),u[x+48>>>2>>>0]=_.fsid,u[x+64>>>2>>>0]=_.flags,u[x+56>>>2>>>0]=_.namelen},doMsync(x,_,a,r,e){if(!x0.isFile(_.node.mode))throw new x0.ErrnoError(43);if(2&r)return 0;var A=o.slice(x,x+a);x0.msync(_,A,e,a,r)},getStreamFromFD:x=>x0.getStreamChecked(x),varargs:void 0,getStr:x=>xg(x)},x2={},x3=x=>{for(;x.length;){var _=x.pop();x.pop()(_)}};function x6(x){return this.fromWireType(u[x>>>2>>>0])}var x4={},x5={},x7={},x8=class extends Error{constructor(x){super(x),this.name="InternalError"}},x9=x=>{throw new x8(x)},_x=(x,_,a)=>{function r(_){var r=a(_);r.length!==x.length&&x9("Mismatched type converter count");for(var e=0;e<x.length;++e)_e(x[e],r[e])}x.forEach(x=>x7[x]=_);var e=Array(_.length),A=[],t=0;for(let[x,a]of _.entries())x5.hasOwnProperty(a)?e[x]=x5[a]:(A.push(a),x4.hasOwnProperty(a)||(x4[a]=[]),x4[a].push(()=>{e[x]=x5[a],++t===A.length&&r(e)}));0===A.length&&r(e)},__=x=>{x>>>=0;for(var _="";;){var a=o[x++>>>0];if(!a)return _;_+=String.fromCharCode(a)}},_a=class extends Error{constructor(x){super(x),this.name="BindingError"}},_r=x=>{throw new _a(x)};function _e(x,_,a={}){return function(x,_,a={}){var r=_.name;if(x||_r(`type "${r}" must have a positive integer typeid pointer`),x5.hasOwnProperty(x))if(a.ignoreDuplicateRegistrations)return;else _r(`Cannot register type '${r}' twice`);if(x5[x]=_,delete x7[x],x4.hasOwnProperty(x)){var e=x4[x];delete x4[x],e.forEach(x=>x())}}(x,_,a)}var _A=(x,_,a)=>{switch(_){case 1:return a?x=>c[x>>>0]:x=>o[x>>>0];case 2:return a?x=>f[x>>>1>>>0]:x=>d[x>>>1>>>0];case 4:return a?x=>b[x>>>2>>>0]:x=>u[x>>>2>>>0];case 8:return a?x=>m[x>>>3>>>0]:x=>h[x>>>3>>>0];default:throw TypeError(`invalid integer width (${_}): ${x}`)}},_t=x=>{if(null===x)return"null";var _=typeof x;return"object"===_||"array"===_||"function"===_?x.toString():""+x},_n=(x,_,a,r)=>{if(_<a||_>r)throw TypeError(`Passing a number "${_t(_)}" from JS side to C/C++ side to an argument of type "${x}", which is outside the valid range [${a}, ${r}]!`)},_s=x=>{_r(x.$$.ptrType.registeredClass.name+" instance already deleted")},_i=!1,_v=x=>{},_l=x=>{x.count.value-=1,0===x.count.value&&(x.smartPtr?x.smartPtrType.rawDestructor(x.smartPtr):x.ptrType.registeredClass.rawDestructor(x.ptr))},_c=(x,_,a)=>{if(_===a)return x;if(void 0===a.baseClass)return null;var r=_c(x,_,a.baseClass);return null===r?null:a.downcast(r)},_o={},_f={},_d=(x,_)=>(_.ptrType&&_.ptr||x9("makeClassHandle requires ptr and ptrType"),!!_.smartPtrType!=!!_.smartPtr&&x9("Both smartPtrType and smartPtr must be specified"),_.count={value:1},_u(Object.create(x,{$$:{value:_,writable:!0}})));function _b(x){var _,a=this.getPointee(x);if(!a)return this.destructor(x),null;var r=_f[((x,_)=>{for(void 0===_&&_r("ptr should not be undefined");x.baseClass;)_=x.upcast(_),x=x.baseClass;return _})(this.registeredClass,a)];if(void 0!==r)if(0===r.$$.count.value)return r.$$.ptr=a,r.$$.smartPtr=x,r.clone();else{var e=r.clone();return this.destructor(x),e}function A(){return this.isSmartPointer?_d(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:a,smartPtrType:this,smartPtr:x}):_d(this.registeredClass.instancePrototype,{ptrType:this,ptr:x})}var t=_o[this.registeredClass.getActualType(a)];if(!t)return A.call(this);_=this.isConst?t.constPointerType:t.pointerType;var n=_c(a,this.registeredClass,_.registeredClass);return null===n?A.call(this):this.isSmartPointer?_d(_.registeredClass.instancePrototype,{ptrType:_,ptr:n,smartPtrType:this,smartPtr:x}):_d(_.registeredClass.instancePrototype,{ptrType:_,ptr:n})}var _u=x=>globalThis.FinalizationRegistry?(_i=new FinalizationRegistry(x=>{console.warn(x.leakWarning),_l(x.$$)}),_u=x=>{var _=x.$$;if(_.smartPtr){var a={$$:_},r=_.ptrType.registeredClass,e=Error(`Embind found a leaked C++ instance ${r.name} <${xx(_.ptr)}>.
2
2
  We'll free it automatically in this case, but this functionality is not reliable across various environments.
3
3
  Make sure to invoke .delete() manually once you're done with the instance instead.
4
4
  Originally allocated`);"captureStackTrace"in Error&&Error.captureStackTrace(e,_b),a.leakWarning=e.stack.replace(/^Error: /,""),_i.register(x,a,x)}return x},_v=x=>_i.unregister(x),_u(x)):(_u=x=>x,x),_E=[],_j=()=>{for(;_E.length;){var x=_E.pop();x.$$.deleteScheduled=!1,x.delete()}};function _m(){}var _h=(x,_)=>Object.defineProperty(_,"name",{value:x}),_p=(x,_,a)=>{if(void 0===x[_].overloadTable){var r=x[_];x[_]=function(...r){return x[_].overloadTable.hasOwnProperty(r.length)||_r(`Function '${a}' called with an invalid number of arguments (${r.length}) - expects one of (${x[_].overloadTable})!`),x[_].overloadTable[r.length].apply(this,r)},x[_].overloadTable=[],x[_].overloadTable[r.argCount]=r}},_S=(_,a,r)=>{x.hasOwnProperty(_)?((void 0===r||void 0!==x[_].overloadTable&&void 0!==x[_].overloadTable[r])&&_r(`Cannot register public name '${_}' twice`),_p(x,_,_),x[_].overloadTable.hasOwnProperty(r)&&_r(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),x[_].overloadTable[r]=a):(x[_]=a,x[_].argCount=r)};function _g(x,_,a,r,e,A,t,n){this.name=x,this.constructor=_,this.instancePrototype=a,this.rawDestructor=r,this.baseClass=e,this.getActualType=A,this.upcast=t,this.downcast=n,this.pureVirtualFunctions=[]}var _y=(x,_,a)=>{for(;_!==a;)_.upcast||_r(`Expected null or instance of ${a.name}, got an instance of ${_.name}`),x=_.upcast(x),_=_.baseClass;return x};function _I(x,_){if(null===_)return this.isReference&&_r(`null is not a valid ${this.name}`),0;_.$$||_r(`Cannot pass "${_t(_)}" as a ${this.name}`),_.$$.ptr||_r(`Cannot pass deleted object as a pointer of type ${this.name}`);var a=_.$$.ptrType.registeredClass;return _y(_.$$.ptr,a,this.registeredClass)}function _N(x,_){if(null===_)return(this.isReference&&_r(`null is not a valid ${this.name}`),this.isSmartPointer)?(a=this.rawConstructor(),null!==x&&x.push(this.rawDestructor,a),a):0;_&&_.$$||_r(`Cannot pass "${_t(_)}" as a ${this.name}`),_.$$.ptr||_r(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&_.$$.ptrType.isConst&&_r(`Cannot convert argument of type ${_.$$.smartPtrType?_.$$.smartPtrType.name:_.$$.ptrType.name} to parameter type ${this.name}`);var a,r=_.$$.ptrType.registeredClass;if(a=_y(_.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===_.$$.smartPtr&&_r("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:_.$$.smartPtrType===this?a=_.$$.smartPtr:_r(`Cannot convert argument of type ${_.$$.smartPtrType?_.$$.smartPtrType.name:_.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:a=_.$$.smartPtr;break;case 2:if(_.$$.smartPtrType===this)a=_.$$.smartPtr;else{var e=_.clone();a=this.rawShare(a,_J.toHandle(()=>e.delete())),null!==x&&x.push(this.rawDestructor,a)}break;default:_r("Unsupporting sharing policy")}return a}function _B(x,_){if(null===_)return this.isReference&&_r(`null is not a valid ${this.name}`),0;_.$$||_r(`Cannot pass "${_t(_)}" as a ${this.name}`),_.$$.ptr||_r(`Cannot pass deleted object as a pointer of type ${this.name}`),_.$$.ptrType.isConst&&_r(`Cannot convert argument of type ${_.$$.ptrType.name} to parameter type ${this.name}`);var a=_.$$.ptrType.registeredClass;return _y(_.$$.ptr,a,this.registeredClass)}function _F(x,_,a,r,e,A,t,n,s,i,v){this.name=x,this.registeredClass=_,this.isReference=a,this.isConst=r,this.isSmartPointer=e,this.pointeeType=A,this.sharingPolicy=t,this.rawGetPointee=n,this.rawConstructor=s,this.rawShare=i,this.rawDestructor=v,e||void 0!==_.baseClass?this.toWireType=_N:(r?this.toWireType=_I:this.toWireType=_B,this.destructorFunction=null)}var _P=(_,a,r)=>{x.hasOwnProperty(_)||x9("Replacing nonexistent public symbol"),void 0!==x[_].overloadTable&&void 0!==r?x[_].overloadTable[r]=a:(x[_]=a,x[_].argCount=r)},_q=[],_L=x=>{var _=_q[x];return _||(_q[x]=_=aw.get(x)),G(aw.get(x)==_,"JavaScript-side Wasm function table mirror is out of date!"),_},_w=(x,_,a=!1)=>{G(!a,"Async bindings are only supported with JSPI.");var r=(x=__(x)).includes("p")?((x,_,a=!1)=>(G(x.includes("j")||x.includes("p"),"getDynCaller should only be called with i64 sigs"),(...r)=>((x,_,a=[],r=!1)=>{G(_,"null function pointer in dynCall"),G(!r,"async dynCall is not supported in this mode"),G(_L(_),`missing table entry in dynCall: ${_}`);var e=_L(_)(...a);return"p"==x[0]?e>>>0:e})(x,_,r,a)))(x,_,a):_L(_);return"function"!=typeof r&&_r(`unknown function pointer with signature ${x}: ${_}`),r};class _D extends Error{}var _T=x=>{var _=af(x),a=__(_);return aj(_),a},_k=(x,_)=>{var a=[],r={};throw _.forEach(function x(_){if(!r[_]&&!x5[_]){if(x7[_])return void x7[_].forEach(x);a.push(_),r[_]=!0}}),new _D(`${x}: `+a.map(_T).join([", "]))},_G=(x,_)=>{for(var a=[],r=0;r<x;r++)a.push(u[_+4*r>>>2>>>0]);return a};function _C(x){for(var _=1;_<x.length;++_)if(null!==x[_]&&void 0===x[_].destructorFunction)return!0;return!1}function _$(x,_,a,r,e){if(x<_||x>a){var A=_==a?_:`${_} to ${a}`;e(`function ${r} called with ${x} arguments, expected ${A}`)}}function _X(x,_,a,r,e,A){var t=_.length;t<2&&_r("argTypes array size mismatch! Must at least get return value and 'this' types!"),G(!A,"Async bindings are only supported with JSPI.");for(var n=null!==_[1]&&null!==a,s=_C(_),i=!_[0].isVoid,v=function(x){for(var _=x.length-2,a=x.length-1;a>=2&&x[a].optional;--a)_--;return _}(_),l=_[0],c=_[1],o=[x,_r,r,e,x3,l.fromWireType.bind(l),c?.toWireType.bind(c)],f=2;f<t;++f){var d=_[f];o.push(d.toWireType.bind(d))}if(!s)for(var f=n?1:2;f<_.length;++f)null!==_[f].destructorFunction&&o.push(_[f].destructorFunction);return o.push(_$,v,t-2),_h(x,(function(x,_,a,r){var e=_C(x),A=x.length-2,t=[],n=["fn"];_&&n.push("thisWired");for(var s=0;s<A;++s)t.push(`arg${s}`),n.push(`arg${s}Wired`);t=t.join(","),n=n.join(",");var i=`return function (${t}) {
package/dist/login.js CHANGED
@@ -1 +1,2 @@
1
- import"node:module";import{auth_login as e,auth_completeLogin as t,option_Option as i,command_Command as n,types_TokenStatus as o,formatPollStatus as r,runCommand as a,auth_startLogin as s}from"./2168.js";import{openUrlInBrowser as c}from"./browser.js";async function l(e,t){let i=!e.json;return t.complete?g(e,t.complete):t.begin?d(e,i):u(e,i)}async function d(e,t){let i=await s(),n={userCode:i.userCode,deviceCode:i.deviceCode,verificationUrl:i.verificationUrl,expiresIn:i.expiresIn};return e.json||(e.log(`Visit: ${i.verificationUrl}`),e.log(`User code: ${i.userCode}`),e.log(""),t&&await f(e,i.verificationUrl),e.log("After approval, run:"),e.log(""),e.log(` $ dbx auth login --complete ${i.deviceCode}`)),n}async function g(e,i){let n,o=await t(i,{onPoll:t=>{e.json||t.status===n||(n=t.status,e.log(r(t.status)))}});return e.log(`Logged in. Token expires at: ${new Date(1e3*o.expiresAt).toISOString()}`),p(o)}async function u(t,i){let n,a=await e({onVerification:e=>{t.json||(t.log(`Visit: ${e.verificationUrl}`),t.log(`Expires in: ${e.expiresIn} seconds`),i&&f(t,e.verificationUrl),t.log(r(o.Pending)),n=o.Pending)},onPoll:e=>{t.json||e.status===n||(n=e.status,t.log(r(e.status)))}});return t.log(`Logged in. Token expires at: ${new Date(1e3*a.expiresAt).toISOString()}`),p(a)}function p(e){return{loggedIn:!0,uid:e.uid,expiresAt:e.expiresAt,baseUrl:e.baseUrl,tokenPath:e.tokenPath}}async function f(e,t){e.log("Opening auth link in browser...");try{await c(t)}catch(t){var i;e.warn(`failed to open browser: ${(i=t)instanceof Error&&i.message?i.message:String(i)}`)}}export default function(){return new n("login").description("登录").addOption(new i("--begin","Start device authorization and print instructions").conflicts("complete")).addOption(new i("--complete <device-code>","Complete device authorization with the given device code").conflicts("begin")).action(async(e,t)=>a(t,t=>l(t,e)))};
1
+ import"node:module";import{auth_login as e,auth_completeLogin as t,option_Option as n,command_Command as o,types_TokenStatus as i,formatPollStatus as r,runCommand as a,auth_startLogin as s}from"./2232.js";import{openUrlInBrowser as l}from"./browser.js";async function c(e,t){let n=!e.json;return t.complete?u(e,t.complete):t.begin?g(e,n):d(e,n)}async function g(e,t){let n=await s(),o={userCode:n.userCode,deviceCode:n.deviceCode,verificationUrl:n.verificationUrl,expiresIn:n.expiresIn};return e.json||(e.log(`访问地址:${n.verificationUrl}`),e.log(`用户验证码:${n.userCode}`),e.log(""),t&&await p(e,n.verificationUrl),e.log("完成授权后,请运行:"),e.log(""),e.log(` $ dbx auth login --complete ${n.deviceCode}`)),o}async function u(e,n){let o,i=await t(n,{onPoll:t=>{e.json||t.status===o||(o=t.status,e.log(r(t.status)))}});return e.log(`登录成功。凭证过期时间:${new Date(1e3*i.expiresAt).toISOString()}`),f(i)}async function d(t,n){let o,a=await e({onVerification:e=>{t.json||(t.log(`访问地址:${e.verificationUrl}`),t.log(`有效期:${e.expiresIn} 秒`),n&&p(t,e.verificationUrl),t.log(r(i.Pending)),o=i.Pending)},onPoll:e=>{t.json||e.status===o||(o=e.status,t.log(r(e.status)))}});return t.log(`登录成功。凭证过期时间:${new Date(1e3*a.expiresAt).toISOString()}`),f(a)}function f(e){return{loggedIn:!0,uid:e.uid,expiresAt:e.expiresAt,baseUrl:e.baseUrl,tokenPath:e.tokenPath}}async function p(e,t){e.log("正在浏览器中打开授权链接……");try{await l(t)}catch(t){var n;e.warn(`无法自动打开浏览器,请复制上方的访问地址完成授权。
2
+ 详情:${(n=t)instanceof Error&&n.message?n.message:String(n)}`)}}export default function(){return new o("login").description("登录").addOption(new n("--begin","发起设备授权并显示操作说明").conflicts("complete")).addOption(new n("--complete <device-code>","使用指定设备码完成授权").conflicts("begin")).action(async(e,t)=>a(t,t=>c(t,e)))};
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- import"node:module";export{main}from"./2168.js";
1
+ import"node:module";export{main}from"./2232.js";
@@ -1 +1 @@
1
- import"node:module";import{isRecord as e}from"./2168.js";function r(r){let o=e(r)&&e(r.mcp_server)?r.mcp_server:void 0,t=e(o?.mcp_config)?o.mcp_config:void 0,i=Array.isArray(t?.headers)?t.headers:[],n={};for(let r of i)e(r)&&"constant"===r.source&&"string"==typeof r.key&&"string"==typeof r.value&&(n[r.key]=r.value);return Object.keys(n).length>0?n:void 0}export{r as extractMCPHeadersFromManifest};
1
+ import"node:module";import{isRecord as e}from"./2232.js";function r(r){let o=e(r)&&e(r.mcp_server)?r.mcp_server:void 0,t=e(o?.mcp_config)?o.mcp_config:void 0,i=Array.isArray(t?.headers)?t.headers:[],n={};for(let r of i)e(r)&&"constant"===r.source&&"string"==typeof r.key&&"string"==typeof r.value&&(n[r.key]=r.value);return Object.keys(n).length>0?n:void 0}export{r as extractMCPHeadersFromManifest};
package/dist/ora.js CHANGED
@@ -1,3 +1,3 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./7945.js";import"./7410.js";import"./4880.js";e.add({"../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(e){e.exports=({onlyFirst:e=!1}={})=>RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))",e?void 0:"g")},"../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js"(e,t,s){let{Buffer:r}=s("buffer"),i=Symbol.for("BufferList");function n(e){if(!(this instanceof n))return new n(e);n._init.call(this,e)}n._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},n.prototype._new=function(e){return new n(e)},n.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let s=0;s<this._bufs.length;s++){let r=t+this._bufs[s].length;if(e<r||s===this._bufs.length-1)return[s,e-t];t=r}},n.prototype._reverseOffset=function(e){let t=e[0],s=e[1];for(let e=0;e<t;e++)s+=this._bufs[e].length;return s},n.prototype.get=function(e){if(e>this.length||e<0)return;let t=this._offset(e);return this._bufs[t[0]][t[1]]},n.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},n.prototype.copy=function(e,t,s,i){if(("number"!=typeof s||s<0)&&(s=0),("number"!=typeof i||i>this.length)&&(i=this.length),s>=this.length||i<=0)return e||r.alloc(0);let n=!!e,o=this._offset(s),l=i-s,_=l,a=n&&t||0,f=o[1];if(0===s&&i===this.length){if(!n)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,a),a+=this._bufs[t].length;return e}if(_<=this._bufs[o[0]].length-f)return n?this._bufs[o[0]].copy(e,t,f,f+_):this._bufs[o[0]].slice(f,f+_);n||(e=r.allocUnsafe(l));for(let t=o[0];t<this._bufs.length;t++){let s=this._bufs[t].length-f;if(_>s)this._bufs[t].copy(e,a,f),a+=s;else{this._bufs[t].copy(e,a,f,f+_),a+=s;break}_-=s,f&&(f=0)}return e.length>a?e.slice(0,a):e},n.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();let s=this._offset(e),r=this._offset(t),i=this._bufs.slice(s[0],r[0]+1);return 0===r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!==s[1]&&(i[0]=i[0].slice(s[1])),this._new(i)},n.prototype.toString=function(e,t,s){return this.slice(t,s).toString(e)},n.prototype.consume=function(e){if(Number.isNaN(e=Math.trunc(e))||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this},n.prototype.duplicate=function(){let e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},n.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(r.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(r.from(e));return this},n.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},n.prototype.indexOf=function(e,t,s){if(void 0===s&&"string"==typeof t&&(s=t,t=void 0),"function"==typeof e||Array.isArray(e))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=r.from([e]):"string"==typeof e?e=r.from(e,s):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=r.from(e.buffer,e.byteOffset,e.byteLength):r.isBuffer(e)||(e=r.from(e)),isNaN(t=Number(t||0))&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;let i=this._offset(t),n=i[0],o=i[1];for(;n<this._bufs.length;n++){let t=this._bufs[n];for(;o<t.length;)if(t.length-o>=e.length){let s=t.indexOf(e,o);if(-1!==s)return this._reverseOffset([n,s]);o=t.length-e.length+1}else{let t=this._reverseOffset([n,o]);if(this._match(t,e))return t;o++}o=0}return -1},n.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let s=0;s<t.length;s++)if(this.get(e+s)!==t[s])return!1;return!0};let o={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in o)!function(e){null===o[e]?n.prototype[e]=function(t,s){return this.slice(t,t+s)[e](0,s)}:n.prototype[e]=function(t=0){return this.slice(t,t+o[e])[e](0)}}(e);n.prototype._isBufferList=function(e){return e instanceof n||n.isBufferList(e)},n.isBufferList=function(e){return null!=e&&e[i]},e.exports=n},"../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"(e,t,s){let r=s("../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js").Duplex,i=s("../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"),n=s("../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js");function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;let t=(function(e){this._callback&&(this._callback(e),this._callback=null)}).bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)}),e=null}n._init.call(this,e),r.call(this)}i(o,r),Object.assign(o.prototype,n.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,s){this._appendBuffer(e),"function"==typeof s&&s()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof n||o.isBufferList(e)},o.isBufferList=n.isBufferList,e.exports=o,e.exports.BufferListStream=o,e.exports.BufferList=n},"../../../node_modules/.pnpm/cli-cursor@3.1.0/node_modules/cli-cursor/index.js"(e,t,s){let r=s("../../../node_modules/.pnpm/restore-cursor@3.1.0/node_modules/restore-cursor/index.js"),i=!1;t.show=(e=process.stderr)=>{e.isTTY&&(i=!1,e.write("\x1b[?25h"))},t.hide=(e=process.stderr)=>{e.isTTY&&(r(),i=!0,e.write("\x1b[?25l"))},t.toggle=(e,s)=>{void 0!==e&&(i=e),i?t.show(s):t.hide(s)}},"../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js"(e,t,s){let r=Object.assign({},s("../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json")),i=Object.keys(r);Object.defineProperty(r,"random",{get(){let e=Math.floor(Math.random()*i.length);return r[i[e]]}}),e.exports=r},"../../../node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js"(e){var t=function(){"use strict";function e(t,r,i,n){"object"==typeof r&&(i=r.depth,n=r.prototype,r.filter,r=r.circular);var o=[],l=[],_="u">typeof Buffer;return void 0===r&&(r=!0),void 0===i&&(i=1/0),function t(i,a){if(null===i)return null;if(0==a||"object"!=typeof i)return i;if(e.__isArray(i))f=[];else if(e.__isRegExp(i))f=new RegExp(i.source,s(i)),i.lastIndex&&(f.lastIndex=i.lastIndex);else if(e.__isDate(i))f=new Date(i.getTime());else{if(_&&Buffer.isBuffer(i))return f=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(f),f;void 0===n?f=Object.create(u=Object.getPrototypeOf(i)):(f=Object.create(n),u=n)}if(r){var f,u,d,p=o.indexOf(i);if(-1!=p)return l[p];o.push(i),l.push(f)}for(var h in i)u&&(d=Object.getOwnPropertyDescriptor(u,h)),d&&null==d.set||(f[h]=t(i[h],a-1));return f}(t,i)}function t(e){return Object.prototype.toString.call(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"==typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"==typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=s,e}();e.exports&&(e.exports=t)},"../../../node_modules/.pnpm/defaults@1.0.4/node_modules/defaults/index.js"(e,t,s){var r=s("../../../node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js");e.exports=function(e,t){return e=e||{},Object.keys(t).forEach(function(s){void 0===e[s]&&(e[s]=r(t[s]))}),e}},"../../../node_modules/.pnpm/is-interactive@1.0.0/node_modules/is-interactive/index.js"(e){e.exports=({stream:e=process.stdout}={})=>!!(e&&e.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))},"../../../node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js"(e){e.exports=()=>"win32"!==process.platform||!!process.env.CI||!!process.env.WT_SESSION||"vscode"===process.env.TERM_PROGRAM||"xterm-256color"===process.env.TERM||"alacritty"===process.env.TERM},"../../../node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js"(e,t,s){let r=s("../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"),i=s("../../../node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js"),n={info:r.blue("ℹ"),success:r.green("✔"),warning:r.yellow("⚠"),error:r.red("✖")},o={info:r.blue("i"),success:r.green("√"),warning:r.yellow("‼"),error:r.red("\xd7")};e.exports=i()?n:o},"../../../node_modules/.pnpm/ora@5.4.1/node_modules/ora/index.js"(e,t,s){let r,i=s("readline"),n=s("../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"),o=s("../../../node_modules/.pnpm/cli-cursor@3.1.0/node_modules/cli-cursor/index.js"),l=s("../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js"),_=s("../../../node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js"),a=s("../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"),f=s("../../../node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/index.js"),u=s("../../../node_modules/.pnpm/is-interactive@1.0.0/node_modules/is-interactive/index.js"),d=s("../../../node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js"),{BufferListStream:p}=s("../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"),h=Symbol("text"),m=Symbol("prefixText");class c{constructor(){this.requests=0,this.mutedStream=new p,this.mutedStream.pipe(process.stdout);let e=this;this.ourEmit=function(t,s,...r){let{stdin:i}=process;if(e.requests>0||i.emit===e.ourEmit){if("keypress"===t)return;"data"===t&&s.includes(3)&&process.emit("SIGINT"),Reflect.apply(e.oldEmit,this,[t,s,...r])}else Reflect.apply(process.stdin.emit,this,[t,s,...r])}}start(){this.requests++,1===this.requests&&this.realStart()}stop(){if(this.requests<=0)throw Error("`stop` called more times than `start`");this.requests--,0===this.requests&&this.realStop()}realStart(){"win32"!==process.platform&&(this.rl=i.createInterface({input:process.stdin,output:this.mutedStream}),this.rl.on("SIGINT",()=>{0===process.listenerCount("SIGINT")?process.emit("SIGINT"):(this.rl.close(),process.kill(process.pid,"SIGINT"))}))}realStop(){"win32"!==process.platform&&(this.rl.close(),this.rl=void 0)}}class g{constructor(e){r||(r=new c),"string"==typeof e&&(e={text:e}),this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...e},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=!1!==this.options.hideCursor,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled="boolean"==typeof this.options.isEnabled?this.options.isEnabled:u({stream:this.stream}),this.isSilent="boolean"==typeof this.options.isSilent&&this.options.isSilent,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=e}_updateInterval(e){void 0!==e&&(this.interval=e)}get spinner(){return this._spinner}set spinner(e){if(this.frameIndex=0,"object"==typeof e){if(void 0===e.frames)throw Error("The given spinner must have a `frames` property");this._spinner=e}else if(d())if(void 0===e)this._spinner=l.dots;else if("default"!==e&&l[e])this._spinner=l[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);else this._spinner=l.line;this._updateInterval(this._spinner.interval)}get text(){return this[h]}set text(e){this[h]=e,this.updateLineCount()}get prefixText(){return this[m]}set prefixText(e){this[m]=e,this.updateLineCount()}get isSpinning(){return void 0!==this.id}getFullPrefixText(e=this[m],t=" "){return"string"==typeof e?e+t:"function"==typeof e?e()+t:""}updateLineCount(){let e=this.stream.columns||80,t=this.getFullPrefixText(this.prefixText,"-");for(let s of(this.lineCount=0,a(t+"--"+this[h]).split("\n")))this.lineCount+=Math.max(1,Math.ceil(f(s)/e))}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(e){if("boolean"!=typeof e)throw TypeError("The `isEnabled` option must be a boolean");this._isEnabled=e}get isSilent(){return this._isSilent}set isSilent(e){if("boolean"!=typeof e)throw TypeError("The `isSilent` option must be a boolean");this._isSilent=e}frame(){let{frames:e}=this.spinner,t=e[this.frameIndex];return this.color&&(t=n[this.color](t)),this.frameIndex=++this.frameIndex%e.length,("string"==typeof this.prefixText&&""!==this.prefixText?this.prefixText+" ":"")+t+("string"==typeof this.text?" "+this.text:"")}clear(){if(!this.isEnabled||!this.stream.isTTY)return this;for(let e=0;e<this.linesToClear;e++)e>0&&this.stream.moveCursor(0,-1),this.stream.clearLine(),this.stream.cursorTo(this.indent);return this.linesToClear=0,this}render(){return this.isSilent||(this.clear(),this.stream.write(this.frame()),this.linesToClear=this.lineCount),this}start(e){return e&&(this.text=e),this.isSilent||(this.isEnabled?this.isSpinning||(this.hideCursor&&o.hide(this.stream),this.discardStdin&&process.stdin.isTTY&&(this.isDiscardingStdin=!0,r.start()),this.render(),this.id=setInterval(this.render.bind(this),this.interval)):this.text&&this.stream.write(`- ${this.text}
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./1264.js";import"./7410.js";import"./1611.js";import"./2232.js";import"./4880.js";e.add({"../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(e){e.exports=({onlyFirst:e=!1}={})=>RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))",e?void 0:"g")},"../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js"(e,t,s){let{Buffer:r}=s("buffer"),i=Symbol.for("BufferList");function n(e){if(!(this instanceof n))return new n(e);n._init.call(this,e)}n._init=function(e){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},n.prototype._new=function(e){return new n(e)},n.prototype._offset=function(e){if(0===e)return[0,0];let t=0;for(let s=0;s<this._bufs.length;s++){let r=t+this._bufs[s].length;if(e<r||s===this._bufs.length-1)return[s,e-t];t=r}},n.prototype._reverseOffset=function(e){let t=e[0],s=e[1];for(let e=0;e<t;e++)s+=this._bufs[e].length;return s},n.prototype.get=function(e){if(e>this.length||e<0)return;let t=this._offset(e);return this._bufs[t[0]][t[1]]},n.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},n.prototype.copy=function(e,t,s,i){if(("number"!=typeof s||s<0)&&(s=0),("number"!=typeof i||i>this.length)&&(i=this.length),s>=this.length||i<=0)return e||r.alloc(0);let n=!!e,o=this._offset(s),l=i-s,_=l,a=n&&t||0,f=o[1];if(0===s&&i===this.length){if(!n)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(let t=0;t<this._bufs.length;t++)this._bufs[t].copy(e,a),a+=this._bufs[t].length;return e}if(_<=this._bufs[o[0]].length-f)return n?this._bufs[o[0]].copy(e,t,f,f+_):this._bufs[o[0]].slice(f,f+_);n||(e=r.allocUnsafe(l));for(let t=o[0];t<this._bufs.length;t++){let s=this._bufs[t].length-f;if(_>s)this._bufs[t].copy(e,a,f),a+=s;else{this._bufs[t].copy(e,a,f,f+_),a+=s;break}_-=s,f&&(f=0)}return e.length>a?e.slice(0,a):e},n.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();let s=this._offset(e),r=this._offset(t),i=this._bufs.slice(s[0],r[0]+1);return 0===r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!==s[1]&&(i[0]=i[0].slice(s[1])),this._new(i)},n.prototype.toString=function(e,t,s){return this.slice(t,s).toString(e)},n.prototype.consume=function(e){if(Number.isNaN(e=Math.trunc(e))||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this},n.prototype.duplicate=function(){let e=this._new();for(let t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},n.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(r.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(let t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(let t=0;t<e._bufs.length;t++)this.append(e._bufs[t]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(r.from(e));return this},n.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},n.prototype.indexOf=function(e,t,s){if(void 0===s&&"string"==typeof t&&(s=t,t=void 0),"function"==typeof e||Array.isArray(e))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=r.from([e]):"string"==typeof e?e=r.from(e,s):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=r.from(e.buffer,e.byteOffset,e.byteLength):r.isBuffer(e)||(e=r.from(e)),isNaN(t=Number(t||0))&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;let i=this._offset(t),n=i[0],o=i[1];for(;n<this._bufs.length;n++){let t=this._bufs[n];for(;o<t.length;)if(t.length-o>=e.length){let s=t.indexOf(e,o);if(-1!==s)return this._reverseOffset([n,s]);o=t.length-e.length+1}else{let t=this._reverseOffset([n,o]);if(this._match(t,e))return t;o++}o=0}return -1},n.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let s=0;s<t.length;s++)if(this.get(e+s)!==t[s])return!1;return!0};let o={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in o)!function(e){null===o[e]?n.prototype[e]=function(t,s){return this.slice(t,t+s)[e](0,s)}:n.prototype[e]=function(t=0){return this.slice(t,t+o[e])[e](0)}}(e);n.prototype._isBufferList=function(e){return e instanceof n||n.isBufferList(e)},n.isBufferList=function(e){return null!=e&&e[i]},e.exports=n},"../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"(e,t,s){let r=s("../../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js").Duplex,i=s("../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"),n=s("../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js");function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;let t=(function(e){this._callback&&(this._callback(e),this._callback=null)}).bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)}),e=null}n._init.call(this,e),r.call(this)}i(o,r),Object.assign(o.prototype,n.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,s){this._appendBuffer(e),"function"==typeof s&&s()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof n||o.isBufferList(e)},o.isBufferList=n.isBufferList,e.exports=o,e.exports.BufferListStream=o,e.exports.BufferList=n},"../../../node_modules/.pnpm/cli-cursor@3.1.0/node_modules/cli-cursor/index.js"(e,t,s){let r=s("../../../node_modules/.pnpm/restore-cursor@3.1.0/node_modules/restore-cursor/index.js"),i=!1;t.show=(e=process.stderr)=>{e.isTTY&&(i=!1,e.write("\x1b[?25h"))},t.hide=(e=process.stderr)=>{e.isTTY&&(r(),i=!0,e.write("\x1b[?25l"))},t.toggle=(e,s)=>{void 0!==e&&(i=e),i?t.show(s):t.hide(s)}},"../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js"(e,t,s){let r=Object.assign({},s("../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json")),i=Object.keys(r);Object.defineProperty(r,"random",{get(){let e=Math.floor(Math.random()*i.length);return r[i[e]]}}),e.exports=r},"../../../node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js"(e){var t=function(){"use strict";function e(t,r,i,n){"object"==typeof r&&(i=r.depth,n=r.prototype,r.filter,r=r.circular);var o=[],l=[],_="u">typeof Buffer;return void 0===r&&(r=!0),void 0===i&&(i=1/0),function t(i,a){if(null===i)return null;if(0==a||"object"!=typeof i)return i;if(e.__isArray(i))f=[];else if(e.__isRegExp(i))f=new RegExp(i.source,s(i)),i.lastIndex&&(f.lastIndex=i.lastIndex);else if(e.__isDate(i))f=new Date(i.getTime());else{if(_&&Buffer.isBuffer(i))return f=Buffer.allocUnsafe?Buffer.allocUnsafe(i.length):new Buffer(i.length),i.copy(f),f;void 0===n?f=Object.create(u=Object.getPrototypeOf(i)):(f=Object.create(n),u=n)}if(r){var f,u,d,p=o.indexOf(i);if(-1!=p)return l[p];o.push(i),l.push(f)}for(var h in i)u&&(d=Object.getOwnPropertyDescriptor(u,h)),d&&null==d.set||(f[h]=t(i[h],a-1));return f}(t,i)}function t(e){return Object.prototype.toString.call(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return e.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},e.__objToStr=t,e.__isDate=function(e){return"object"==typeof e&&"[object Date]"===t(e)},e.__isArray=function(e){return"object"==typeof e&&"[object Array]"===t(e)},e.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===t(e)},e.__getRegExpFlags=s,e}();e.exports&&(e.exports=t)},"../../../node_modules/.pnpm/defaults@1.0.4/node_modules/defaults/index.js"(e,t,s){var r=s("../../../node_modules/.pnpm/clone@1.0.4/node_modules/clone/clone.js");e.exports=function(e,t){return e=e||{},Object.keys(t).forEach(function(s){void 0===e[s]&&(e[s]=r(t[s]))}),e}},"../../../node_modules/.pnpm/is-interactive@1.0.0/node_modules/is-interactive/index.js"(e){e.exports=({stream:e=process.stdout}={})=>!!(e&&e.isTTY&&"dumb"!==process.env.TERM&&!("CI"in process.env))},"../../../node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js"(e){e.exports=()=>"win32"!==process.platform||!!process.env.CI||!!process.env.WT_SESSION||"vscode"===process.env.TERM_PROGRAM||"xterm-256color"===process.env.TERM||"alacritty"===process.env.TERM},"../../../node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js"(e,t,s){let r=s("../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"),i=s("../../../node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js"),n={info:r.blue("ℹ"),success:r.green("✔"),warning:r.yellow("⚠"),error:r.red("✖")},o={info:r.blue("i"),success:r.green("√"),warning:r.yellow("‼"),error:r.red("\xd7")};e.exports=i()?n:o},"../../../node_modules/.pnpm/ora@5.4.1/node_modules/ora/index.js"(e,t,s){let r,i=s("readline"),n=s("../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"),o=s("../../../node_modules/.pnpm/cli-cursor@3.1.0/node_modules/cli-cursor/index.js"),l=s("../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/index.js"),_=s("../../../node_modules/.pnpm/log-symbols@4.1.0/node_modules/log-symbols/index.js"),a=s("../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"),f=s("../../../node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/index.js"),u=s("../../../node_modules/.pnpm/is-interactive@1.0.0/node_modules/is-interactive/index.js"),d=s("../../../node_modules/.pnpm/is-unicode-supported@0.1.0/node_modules/is-unicode-supported/index.js"),{BufferListStream:p}=s("../../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"),h=Symbol("text"),m=Symbol("prefixText");class c{constructor(){this.requests=0,this.mutedStream=new p,this.mutedStream.pipe(process.stdout);let e=this;this.ourEmit=function(t,s,...r){let{stdin:i}=process;if(e.requests>0||i.emit===e.ourEmit){if("keypress"===t)return;"data"===t&&s.includes(3)&&process.emit("SIGINT"),Reflect.apply(e.oldEmit,this,[t,s,...r])}else Reflect.apply(process.stdin.emit,this,[t,s,...r])}}start(){this.requests++,1===this.requests&&this.realStart()}stop(){if(this.requests<=0)throw Error("`stop` called more times than `start`");this.requests--,0===this.requests&&this.realStop()}realStart(){"win32"!==process.platform&&(this.rl=i.createInterface({input:process.stdin,output:this.mutedStream}),this.rl.on("SIGINT",()=>{0===process.listenerCount("SIGINT")?process.emit("SIGINT"):(this.rl.close(),process.kill(process.pid,"SIGINT"))}))}realStop(){"win32"!==process.platform&&(this.rl.close(),this.rl=void 0)}}class g{constructor(e){r||(r=new c),"string"==typeof e&&(e={text:e}),this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...e},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=!1!==this.options.hideCursor,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled="boolean"==typeof this.options.isEnabled?this.options.isEnabled:u({stream:this.stream}),this.isSilent="boolean"==typeof this.options.isSilent&&this.options.isSilent,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=e}_updateInterval(e){void 0!==e&&(this.interval=e)}get spinner(){return this._spinner}set spinner(e){if(this.frameIndex=0,"object"==typeof e){if(void 0===e.frames)throw Error("The given spinner must have a `frames` property");this._spinner=e}else if(d())if(void 0===e)this._spinner=l.dots;else if("default"!==e&&l[e])this._spinner=l[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);else this._spinner=l.line;this._updateInterval(this._spinner.interval)}get text(){return this[h]}set text(e){this[h]=e,this.updateLineCount()}get prefixText(){return this[m]}set prefixText(e){this[m]=e,this.updateLineCount()}get isSpinning(){return void 0!==this.id}getFullPrefixText(e=this[m],t=" "){return"string"==typeof e?e+t:"function"==typeof e?e()+t:""}updateLineCount(){let e=this.stream.columns||80,t=this.getFullPrefixText(this.prefixText,"-");for(let s of(this.lineCount=0,a(t+"--"+this[h]).split("\n")))this.lineCount+=Math.max(1,Math.ceil(f(s)/e))}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(e){if("boolean"!=typeof e)throw TypeError("The `isEnabled` option must be a boolean");this._isEnabled=e}get isSilent(){return this._isSilent}set isSilent(e){if("boolean"!=typeof e)throw TypeError("The `isSilent` option must be a boolean");this._isSilent=e}frame(){let{frames:e}=this.spinner,t=e[this.frameIndex];return this.color&&(t=n[this.color](t)),this.frameIndex=++this.frameIndex%e.length,("string"==typeof this.prefixText&&""!==this.prefixText?this.prefixText+" ":"")+t+("string"==typeof this.text?" "+this.text:"")}clear(){if(!this.isEnabled||!this.stream.isTTY)return this;for(let e=0;e<this.linesToClear;e++)e>0&&this.stream.moveCursor(0,-1),this.stream.clearLine(),this.stream.cursorTo(this.indent);return this.linesToClear=0,this}render(){return this.isSilent||(this.clear(),this.stream.write(this.frame()),this.linesToClear=this.lineCount),this}start(e){return e&&(this.text=e),this.isSilent||(this.isEnabled?this.isSpinning||(this.hideCursor&&o.hide(this.stream),this.discardStdin&&process.stdin.isTTY&&(this.isDiscardingStdin=!0,r.start()),this.render(),this.id=setInterval(this.render.bind(this),this.interval)):this.text&&this.stream.write(`- ${this.text}
2
2
  `)),this}stop(){return this.isEnabled&&(clearInterval(this.id),this.id=void 0,this.frameIndex=0,this.clear(),this.hideCursor&&o.show(this.stream),this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin&&(r.stop(),this.isDiscardingStdin=!1)),this}succeed(e){return this.stopAndPersist({symbol:_.success,text:e})}fail(e){return this.stopAndPersist({symbol:_.error,text:e})}warn(e){return this.stopAndPersist({symbol:_.warning,text:e})}info(e){return this.stopAndPersist({symbol:_.info,text:e})}stopAndPersist(e={}){if(this.isSilent)return this;let t=e.prefixText||this.prefixText,s=e.text||this.text;return this.stop(),this.stream.write(`${this.getFullPrefixText(t," ")}${e.symbol||" "}${"string"==typeof s?" "+s:""}
3
3
  `),this}}e.exports=function(e){return new g(e)},e.exports.promise=(e,t)=>{if("function"!=typeof e.then)throw TypeError("Parameter `action` must be a Promise");let s=new g(t);return s.start(),(async()=>{try{await e,s.succeed()}catch{s.fail()}})(),s}},"../../../node_modules/.pnpm/restore-cursor@3.1.0/node_modules/restore-cursor/index.js"(e,t,s){let r=s("../../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"),i=s("../../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js");e.exports=r(()=>{i(()=>{process.stderr.write("\x1b[?25h")},{alwaysLast:!0})})},"../../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(e,t,s){let r=s("../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js");e.exports=e=>"string"==typeof e?e.replace(r(),""):e},"../../../node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/combining.js"(e){e.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]},"../../../node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/index.js"(e,t,s){var r=s("../../../node_modules/.pnpm/defaults@1.0.4/node_modules/defaults/index.js"),i=s("../../../node_modules/.pnpm/wcwidth@1.0.1/node_modules/wcwidth/combining.js"),n={nul:0,control:0};function o(e,t){if("string"!=typeof e)return l(e,t);for(var s=0,r=0;r<e.length;r++){var i=l(e.charCodeAt(r),t);if(i<0)return -1;s+=i}return s}function l(e,t){return 0===e?t.nul:e<32||e>=127&&e<160?t.control:!function(e){var t,s=0,r=i.length-1;if(e<i[0][0]||e>i[r][1])return!1;for(;r>=s;)if(e>i[t=Math.floor((s+r)/2)][1])s=t+1;else{if(!(e<i[t][0]))return!0;r=t-1}return!1}(e)?1+(e>=4352&&(e<=4447||9001==e||9002==e||e>=11904&&e<=42191&&12351!=e||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141)):0}e.exports=function(e){return o(e,n)},e.exports.config=function(e){return e=r(e||{},n),function(t){return o(t,e)}}},"../../../node_modules/.pnpm/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json"(e){e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["\uD83D\uDE04 ","\uD83D\uDE1D "]},"monkey":{"interval":300,"frames":["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},"hearts":{"interval":100,"frames":["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","❤️ "]},"clock":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},"earth":{"interval":180,"frames":["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},"runner":{"interval":140,"frames":["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["\uD83C\uDF32","\uD83C\uDF84"]},"grenade":{"interval":80,"frames":["، ","′ "," \xb4 "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},"fistBump":{"interval":80,"frames":["\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B "," \uD83E\uDD1C  \uD83E\uDD1B  ","  \uD83E\uDD1C\uD83E\uDD1B   "," \uD83E\uDD1C✨\uD83E\uDD1B   ","\uD83E\uDD1C ✨ \uD83E\uDD1B  "]},"soccerHeader":{"interval":80,"frames":[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},"mindblown":{"interval":160,"frames":["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ ","  ","  ","  "]},"speaker":{"interval":160,"frames":["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},"orangePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},"bluePulse":{"interval":100,"frames":["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"orangeBluePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"timeTravel":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺ █████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺ ████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺ ███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺ ██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺ █\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺ \xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺░\xa3\xa3 "," ☺░\xa3\xa3 "," ☺ \xa3\xa3 "," ☺\xa3\xa3 "," ☺\xa3\xa3 "," ☺▓\xa3 "," ☺▓\xa3 "," ☺▒\xa3 "," ☺▒\xa3 "," ☺░\xa3 "," ☺░\xa3 "," ☺ \xa3 "," ☺\xa3 "," ☺\xa3 "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & \xa3 "," & ░\xa3 "," & ▒\xa3 "," & ▓\xa3 "," & \xa3\xa3 "," & ░\xa3\xa3 "," & ▒\xa3\xa3 ","& ▓\xa3\xa3 ","& \xa3\xa3\xa3 "," ░\xa3\xa3\xa3 "," ▒\xa3\xa3\xa3 "," ▓\xa3\xa3\xa3 "," █\xa3\xa3\xa3 "," ░█\xa3\xa3\xa3 "," ▒█\xa3\xa3\xa3 "," ▓█\xa3\xa3\xa3 "," ██\xa3\xa3\xa3 "," ░██\xa3\xa3\xa3 "," ▒██\xa3\xa3\xa3 "," ▓██\xa3\xa3\xa3 "," ███\xa3\xa3\xa3 "," ░███\xa3\xa3\xa3 "," ▒███\xa3\xa3\xa3 "," ▓███\xa3\xa3\xa3 "," ████\xa3\xa3\xa3 "," ░████\xa3\xa3\xa3 "," ▒████\xa3\xa3\xa3 "," ▓████\xa3\xa3\xa3 "," █████\xa3\xa3\xa3 "," ░█████\xa3\xa3\xa3 "," ▒█████\xa3\xa3\xa3 "," ▓█████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "]}}')}});
package/dist/portal.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{http_getApiBaseUrl as e}from"./2168.js";function n(e){return`${i()}/agentic_service/${encodeURIComponent(e)}`}function o(e,n){return`${i()}/agentic_service/${encodeURIComponent(e)}/versions/${encodeURIComponent(n)}`}function i(){return e().replace(/\/+$/,"")}export{n as miniAppDetailUrl,o as miniAppVersionDetailUrl};
1
+ import"node:module";import{http_getApiBaseUrl as e}from"./2232.js";function n(e){return`${i()}/agentic_service/${encodeURIComponent(e)}`}function o(e,n){return`${i()}/agentic_service/${encodeURIComponent(e)}/versions/${encodeURIComponent(n)}`}function i(){return e().replace(/\/+$/,"")}export{n as miniAppDetailUrl,o as miniAppVersionDetailUrl};
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./7945.js";import{isRecord as t}from"./2168.js";let r=e("node:fs");var i=e.n(r);let n=e("node:path");var o=e.n(n);function l(e){let t,i=n.resolve(e);try{t=r.lstatSync(i)}catch(e){if("ENOENT"===e.code)return a(i,"missing",[]);return a(i,"invalid",[],`skill path cannot be inspected: ${i}: ${e.message}`)}if(t.isSymbolicLink()||!t.isDirectory())return a(i,"invalid",[],`skill path must be a non-symlink directory: ${i}`);let o=[];try{!function e(t,i,o){let l;try{l=r.readdirSync(i,{withFileTypes:!0})}catch(e){throw Error(`skill directory is not readable: ${i}: ${e.message}`)}for(let s of l){if(s.isSymbolicLink())continue;let l=n.join(i,s.name);s.isDirectory()?e(t,l,o):s.isFile()&&"SKILL.md"===s.name&&o.push(function(e,t){try{return{absolutePath:t,relativePath:n.relative(e,t).split(n.sep).join("/"),content:r.readFileSync(t,"utf8")}}catch(e){throw Error(`runtime Skill is not readable: ${t}: ${e.message}`)}}(t,l))}}(i,i,o)}catch(e){return a(i,"invalid",[],e.message)}return o.sort(u),a(i,0===o.length?"missing":"resolved",o)}function s(e){let t=l(e);if("resolved"===t.layout)return t.entries;throw Error(t.error??`skill directory contains no runtime Skill: ${t.directory}; add at least one regular file named SKILL.md anywhere under it`)}function a(e,t,r,i){return{directory:e,layout:t,entries:r,...i?{error:i}:{}}}function u(e,t){return e.relativePath<t.relativePath?-1:+(e.relativePath>t.relativePath)}let c="manifest.yaml";function f(e,t={}){let r=o().resolve(e),n=o().join(r,"skill"),s=l(n),a=t.kind??(!function(e,t){if(!m(o().join(e,c))&&"resolved"!==t.layout)return!1;let r=d(e);return void 0!==r?"."===r:!function(e){try{return i().statSync(e).isDirectory()}catch{return!1}}(o().join(e,"miniapp"))}(r,s)?"legacy":"root");return{businessTemplatesPath:o().join(r,"business-templates.yaml"),eventsPath:o().join(r,"events.json"),kind:a,root:r,frontendDirectory:t.frontendDirectory??("root"===a?".":d(r)??"miniapp"),manifestPath:o().join(r,c),skillDirectory:n,skillResolution:s,toolsPath:o().join(r,"tools.json")}}function d(e){let r=o().join(e,".dbx","config.json");if(m(r))try{let s=JSON.parse(i().readFileSync(r,"utf8"));if(t(s)&&t(s.frontend)){let t=s.frontend.directory;if("string"==typeof t){var n=e,l=t;let r=l.trim();if(!r||o().isAbsolute(r)||o().win32.isAbsolute(r))return;let i=o().relative(n,o().resolve(n,r));return o().isAbsolute(i)||".."===i||i.startsWith(`..${o().sep}`)?void 0:i||"."}}}catch{}}function m(e){try{return i().statSync(e).isFile()}catch{return!1}}function y(e){let t=o().resolve(e);for(;;){if(m(o().join(t,c))||m(o().join(t,".dbx","config.json")))return t;let e=o().dirname(t);if(e===t)return;t=e}}export{y as findProjectRoot,s as requireRuntimeSkillEntries,f as resolveProjectLayout,l as runtime_skill_layout_resolveRuntimeSkillLayout};
1
+ import"node:module";import{__webpack_require__ as t}from"./rslib-runtime.js";import"./1264.js";import{isRecord as e}from"./2232.js";let r=t("node:fs");var i=t.n(r);let n=t("node:path");var o=t.n(n);function l(t){let e,i=n.resolve(t);try{e=r.lstatSync(i)}catch(t){if("ENOENT"===t.code)return a(i,"missing",[]);return a(i,"invalid",[],`无法检查 Skill 路径: ${i}: ${t.message}`)}if(e.isSymbolicLink()||!e.isDirectory())return a(i,"invalid",[],`Skill 路径必须是目录,且不能是符号链接: ${i}`);let o=[];try{!function t(e,i,o){let l;try{l=r.readdirSync(i,{withFileTypes:!0})}catch(t){throw Error(`无法读取 Skill 目录: ${i}: ${t.message}`)}for(let s of l){if(s.isSymbolicLink())continue;let l=n.join(i,s.name);s.isDirectory()?t(e,l,o):s.isFile()&&"SKILL.md"===s.name&&o.push(function(t,e){try{return{absolutePath:e,relativePath:n.relative(t,e).split(n.sep).join("/"),content:r.readFileSync(e,"utf8")}}catch(t){throw Error(`无法读取运行时 Skill: ${e}: ${t.message}`)}}(e,l))}}(i,i,o)}catch(t){return a(i,"invalid",[],t.message)}return o.sort(c),a(i,0===o.length?"missing":"resolved",o)}function s(t){let e=l(t);if("resolved"===e.layout)return e.entries;throw Error(e.error??`Skill 目录中没有可用的运行时 Skill: ${e.directory};请在目录任意层级添加至少一个名为 SKILL.md 的普通文件`)}function a(t,e,r,i){return{directory:t,layout:e,entries:r,...i?{error:i}:{}}}function c(t,e){return t.relativePath<e.relativePath?-1:+(t.relativePath>e.relativePath)}let u="manifest.yaml";function f(t,e={}){let r=o().resolve(t),n=o().join(r,"skill"),s=l(n),a=e.kind??(!function(t,e){if(!y(o().join(t,u))&&"resolved"!==e.layout)return!1;let r=m(t);return void 0!==r?"."===r:!function(t){try{return i().statSync(t).isDirectory()}catch{return!1}}(o().join(t,"miniapp"))}(r,s)?"legacy":"root");return{businessTemplatesPath:o().join(r,"business-templates.yaml"),eventsPath:o().join(r,"events.json"),kind:a,root:r,frontendDirectory:e.frontendDirectory??("root"===a?".":m(r)??"miniapp"),manifestPath:o().join(r,u),skillDirectory:n,skillResolution:s,toolsPath:o().join(r,"tools.json")}}function m(t){let r=o().join(t,".dbx","config.json");if(y(r))try{let s=JSON.parse(i().readFileSync(r,"utf8"));if(e(s)&&e(s.frontend)){let e=s.frontend.directory;if("string"==typeof e){var n=t,l=e;let r=l.trim();if(!r||o().isAbsolute(r)||o().win32.isAbsolute(r))return;let i=o().relative(n,o().resolve(n,r));return o().isAbsolute(i)||".."===i||i.startsWith(`..${o().sep}`)?void 0:i||"."}}}catch{}}function y(t){try{return i().statSync(t).isFile()}catch{return!1}}function d(t){let e=o().resolve(t);for(;;){if(y(o().join(e,u))||y(o().join(e,".dbx","config.json")))return e;let t=o().dirname(e);if(t===e)return;e=t}}export{d as findProjectRoot,s as requireRuntimeSkillEntries,f as resolveProjectLayout,l as resolveRuntimeSkillLayout};
package/dist/project.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{resolveAppKey as r}from"./workspace.js";import{CliUsageError as o}from"./2168.js";function e(e){try{return r(e)}catch(r){throw new o(r instanceof Error?r.message:String(r),"DBX_PROJECT_INVALID")}}export{e as resolveProjectAppId};
1
+ import"node:module";import{resolveAppKey as r}from"./workspace.js";import{CliUsageError as o}from"./2232.js";function e(e){try{return r(e)}catch(r){throw new o(r instanceof Error?r.message:String(r),"DBX_PROJECT_INVALID")}}export{e as resolveProjectAppId};
package/dist/prompt.js CHANGED
@@ -1,10 +1,10 @@
1
- import"node:module";import{ignoreUpdateVersion as r,runtime_packageName as e}from"./2168.js";import{formatError as t,updateCli as n}from"./update.js";import{source as i}from"./3688.js";import{dist as o}from"./@inquirer/select.js";async function s(s){let a;process.stderr.write(`
2
- ${i.bold.yellow("✨ Update available!")} ${i.dim(s.current)} -> ${i.green(s.latest)}
1
+ import"node:module";import{ignoreUpdateVersion as r,runtime_packageName as e}from"./2232.js";import{formatError as t,updateCli as s}from"./update.js";import{source as o}from"./5887.js";import{dist as i}from"./@inquirer/select.js";async function n(n){let a;process.stderr.write(`
2
+ ${o.bold.yellow("✨ 发现新版本!")} ${o.dim(n.current)} -> ${o.green(n.latest)}
3
3
 
4
- Release notes: ${i.underline("https://developer.doubao.com/docs/resources/changelog")}
4
+ 更新说明: ${o.underline("https://developer.doubao.com/docs/resources/changelog")}
5
5
 
6
- `);try{a=await o({message:"Select an action",choices:[{name:`1. Update now (runs \`npm install -g ${e}\`)`,value:"update"},{name:"2. Skip",value:"skip"},{name:"3. Skip until next version",value:"skip_version"}]},{output:process.stderr})}catch(r){if(r instanceof Error&&"ExitPromptError"===r.name)return!1;return process.stderr.write(`Warning: update prompt failed: ${t(r)}
7
- `),!1}if("skip_version"===a)return r(s.latest),!1;if("skip"===a)return!1;try{let r=await n({currentVersion:s.current});if("updated"!==r.action)return!1;return process.stderr.write(`dbx upgraded: ${r.currentVersion} -> ${r.latestVersion}. Run your original dbx command again to use the new version.
8
- `),r.skillsWarning&&process.stderr.write(`Warning: skills refresh failed: ${r.skillsWarning}
9
- `),!0}catch(r){return process.stderr.write(`Warning: dbx upgrade failed: ${t(r)}
10
- `),!1}}export{s as promptForUpdate};
6
+ `);try{a=await i({message:"请选择操作",choices:[{name:`1. 立即更新(运行 \`npm install -g ${e}\`)`,value:"update"},{name:"2. 本次跳过",value:"skip"},{name:"3. 跳过此版本",value:"skip_version"}]},{output:process.stderr})}catch(r){if(r instanceof Error&&"ExitPromptError"===r.name)return!1;return process.stderr.write(`警告:显示更新提示失败: ${t(r)}
7
+ `),!1}if("skip_version"===a)return r(n.latest),!1;if("skip"===a)return!1;try{let r=await s({currentVersion:n.current});if("updated"!==r.action)return!1;return process.stderr.write(`dbx 已更新:${r.currentVersion} -> ${r.latestVersion}。请重新运行原来的 dbx 命令以使用新版本。
8
+ `),r.skillsWarning&&process.stderr.write(`警告:刷新 Skills 失败: ${r.skillsWarning}
9
+ `),!0}catch(r){return process.stderr.write(`警告:dbx 更新失败: ${t(r)}
10
+ `),!1}}export{n as promptForUpdate};
package/dist/prompts.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./7945.js";import{SUPPORTED_AGENTS as t}from"./skills~1.js";import{dist as n,checkbox_dist as r}from"./2932.js";let i=e("node:path");var l=e.n(i);let s=["universal","claude-code","codex","trae"],a="universal",o={output:process.stderr};async function c(){let e=t.filter(e=>s.includes(e.id)).filter(e=>e.id!==a);return r({message:"选择要初始化的 Agent",choices:[{name:"Universal (.agents/skills)",short:"Universal",value:a,checked:!0,disabled:" "},...e.map(e=>({name:`${e.name} (${e.projectPath.replace(/\/+$/,"")})`,short:e.name,value:e.id}))],shortcuts:{all:null,invert:null},theme:{style:{disabled:e=>e.trimEnd(),keysHelpTip:()=>"↑↓ move, space select, enter confirm"}}},o)}async function u(){return n({message:"是否初始化 Git 仓库? (Y/n)"},o).then(e=>"n"!==e&&"N"!==e)}async function m(){return n({message:"项目文件夹名",default:"my-app",required:!0,validate(e){let t=_(e);return t?l().isAbsolute(t)||i.win32.isAbsolute(t)?"请输入相对目录名称":!("."===t||t.split("/").includes(".."))||"目录必须位于当前目录内":"目录名称不能为空"}},o).then(_)}function _(e){return e.trim().replace(/\\/g,"/").replace(/\/+$/,"")}export{s as INIT_AGENT_IDS,m as inputProjectDirectory,u as selectGitInitialization,c as selectInitAgents};
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./1264.js";import{SUPPORTED_AGENTS as t}from"./skills~1.js";import{dist as n,checkbox_dist as r}from"./2932.js";let i=e("node:path");var l=e.n(i);let s=["universal","claude-code","codex","trae"],a="universal",o={output:process.stderr};async function c(){let e=t.filter(e=>s.includes(e.id)).filter(e=>e.id!==a);return r({message:"选择要初始化的 Agent",choices:[{name:"Universal (.agents/skills)",short:"Universal",value:a,checked:!0,disabled:" "},...e.map(e=>({name:`${e.name} (${e.projectPath.replace(/\/+$/,"")})`,short:e.name,value:e.id}))],shortcuts:{all:null,invert:null},theme:{style:{disabled:e=>e.trimEnd(),keysHelpTip:()=>"↑↓ move, space select, enter confirm"}}},o)}async function u(){return n({message:"是否初始化 Git 仓库? (Y/n)"},o).then(e=>"n"!==e&&"N"!==e)}async function m(){return n({message:"项目文件夹名",default:"my-app",required:!0,validate(e){let t=_(e);return t?l().isAbsolute(t)||i.win32.isAbsolute(t)?"请输入相对目录名称":!("."===t||t.split("/").includes(".."))||"目录必须位于当前目录内":"目录名称不能为空"}},o).then(_)}function _(e){return e.trim().replace(/\\/g,"/").replace(/\/+$/,"")}export{s as INIT_AGENT_IDS,m as inputProjectDirectory,u as selectGitInitialization,c as selectInitAgents};