@inkeep/open-knowledge 0.11.0-beta.4 → 0.11.0-beta.6

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 (283) hide show
  1. package/dist/alias-JE7RI5QX-oTDRHt3W.mjs +1 -0
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/awk2-POPGKRAI-BZ_7e8H1.mjs +1 -0
  5. package/dist/base64-4YMZCVJ5-BhIrz6He.mjs +1 -0
  6. package/dist/basename-AA2KJYZQ-C5R0pcfV.mjs +1 -0
  7. package/dist/bash-IJWYRKFO-DywpGlyx.mjs +1 -0
  8. package/dist/{build-Dt6UA4sF.mjs → build-CJEQ0nGy.mjs} +1 -1
  9. package/dist/build-CZpdADQB.mjs +1 -0
  10. package/dist/cat-RDUMLXKC-BNwer8pK.mjs +1 -0
  11. package/dist/chmod-SYMGL4JA-BN-B1xmG.mjs +1 -0
  12. package/dist/{chunk-24IMIIXA-B6yIPkk2.mjs → chunk-24IMIIXA-C-Zyd2K_.mjs} +2 -2
  13. package/dist/{chunk-3THT3N7L-DztAF386.mjs → chunk-3THT3N7L-Ce6LrnIA.mjs} +1 -1
  14. package/dist/{chunk-44UOCSGV-CaFxJDHm.mjs → chunk-44UOCSGV-uErOrz7G.mjs} +1 -1
  15. package/dist/{chunk-5QMZ5MUS-CAp625aG.mjs → chunk-5QMZ5MUS-BfIuRNkK.mjs} +2 -2
  16. package/dist/{chunk-62RKD26F-CBIDfuTL.mjs → chunk-62RKD26F-CvuML91F.mjs} +2 -2
  17. package/dist/{chunk-A4JSPFCI-v5lUtffG.mjs → chunk-A4JSPFCI-k-tJSZgB.mjs} +2 -2
  18. package/dist/{chunk-A5O5YHGN-DvJz5Cpw.mjs → chunk-A5O5YHGN-C6ngIqYR.mjs} +2 -2
  19. package/dist/{chunk-BBXLRYSX-DHx5dxhT.mjs → chunk-BBXLRYSX-Oks1GMhO.mjs} +2 -2
  20. package/dist/{chunk-BRGMQKJV-CD9YvPOS.mjs → chunk-BRGMQKJV-CHO764qS.mjs} +2 -2
  21. package/dist/{chunk-CR5AFCPT-BWXo8X-o.mjs → chunk-CR5AFCPT-CH8ZGz3B.mjs} +2 -2
  22. package/dist/{chunk-CWQS3NFK-Co4ALolT.mjs → chunk-CWQS3NFK-BP3kiNgH.mjs} +1 -1
  23. package/dist/{chunk-D6CWQ5DW-Cik2LGX1.mjs → chunk-D6CWQ5DW-BgQGt8eQ.mjs} +2 -2
  24. package/dist/{chunk-DXB73IDG-DIKSLkPq.mjs → chunk-DXB73IDG-C2RuFAAY.mjs} +1 -1
  25. package/dist/{chunk-F55TLFGB-oTuag-aK.mjs → chunk-F55TLFGB-Bkfd8ak_.mjs} +2 -2
  26. package/dist/{chunk-FEIOJCZD-C25Und0M.mjs → chunk-FEIOJCZD-DmvuPNqm.mjs} +2 -2
  27. package/dist/{chunk-GFQRA5P5-DnjwTqP3.mjs → chunk-GFQRA5P5-ePq2jelx.mjs} +1 -1
  28. package/dist/{chunk-GOV5EKKI-i-yw_7Ty.mjs → chunk-GOV5EKKI-CyL1eJ32.mjs} +2 -2
  29. package/dist/{chunk-HWBSOZZR-Bw5kf-cE.mjs → chunk-HWBSOZZR-BeVrNfQw.mjs} +2 -2
  30. package/dist/{chunk-I57KEIP3-DwNGEmJW.mjs → chunk-I57KEIP3-5RFY25TO.mjs} +2 -2
  31. package/dist/{chunk-IPJHKYVM-C3IodQq7.mjs → chunk-IPJHKYVM-D6H6ZTtk.mjs} +1 -1
  32. package/dist/{chunk-J642UCRS-DuJ82Ao2.mjs → chunk-J642UCRS-D87gHOLP.mjs} +2 -2
  33. package/dist/{chunk-LPQPILI2-CfDX1Tyv.mjs → chunk-LPQPILI2-DyyhWSR7.mjs} +2 -2
  34. package/dist/{chunk-MDDMCKUK-BrBgeH_z.mjs → chunk-MDDMCKUK-poQ25EjI.mjs} +2 -2
  35. package/dist/{chunk-MIZPJHVH-D3ET6RI_.mjs → chunk-MIZPJHVH-BdoPqh_Y.mjs} +2 -2
  36. package/dist/{chunk-MLXIYONF-dOe6Iqcc.mjs → chunk-MLXIYONF-DwewZM3r.mjs} +2 -2
  37. package/dist/{chunk-NAERJDUW-CYdostkt.mjs → chunk-NAERJDUW-BFcmkHme.mjs} +2 -2
  38. package/dist/{chunk-NUYSJFDK-CU1FKadr.mjs → chunk-NUYSJFDK-DAvAseHr.mjs} +2 -2
  39. package/dist/{chunk-NYQYO467-DUxnOnNG.mjs → chunk-NYQYO467-_2947cgi.mjs} +2 -2
  40. package/dist/{chunk-OARHFVLG-CpUL83N9.mjs → chunk-OARHFVLG-vxL5zuWx.mjs} +2 -2
  41. package/dist/{chunk-OCLXQMOG-LAs82g00.mjs → chunk-OCLXQMOG-C7k2qEN6.mjs} +2 -2
  42. package/dist/{chunk-OCS6LSEM-y5pQiBQp.mjs → chunk-OCS6LSEM-Lh1p0H-V.mjs} +2 -2
  43. package/dist/{chunk-OJDRYQWQ-ikvLWpfV.mjs → chunk-OJDRYQWQ-DWhg7YHU.mjs} +1 -1
  44. package/dist/{chunk-OL3S66CO-DjFShiWt.mjs → chunk-OL3S66CO-B3hSNlNP.mjs} +2 -2
  45. package/dist/{chunk-PBXLG62G-CU755yEQ.mjs → chunk-PBXLG62G-MmAqjdXR.mjs} +2 -2
  46. package/dist/{chunk-R6VWJ2ZL-FwG_Za20.mjs → chunk-R6VWJ2ZL-D1Ufj9fh.mjs} +1 -1
  47. package/dist/{chunk-SYMJJMQ4-tl6Dz6VW.mjs → chunk-SYMJJMQ4-DLPoQaug.mjs} +2 -2
  48. package/dist/{chunk-T56QNPHK-Dzjonwlk.mjs → chunk-T56QNPHK-TppyesRp.mjs} +2 -2
  49. package/dist/{chunk-TLSUDHID-DYvzalvd.mjs → chunk-TLSUDHID-BeulIM_X.mjs} +2 -2
  50. package/dist/{chunk-TOMNU26N-DYqwg_75.mjs → chunk-TOMNU26N-DfLjxpHW.mjs} +2 -2
  51. package/dist/{chunk-UNYNJIFU-B6KF1Gqq.mjs → chunk-UNYNJIFU--HT-3lrq.mjs} +3 -3
  52. package/dist/{chunk-VLGZJRPG-ChVasMna.mjs → chunk-VLGZJRPG-DbWYxLfI.mjs} +2 -2
  53. package/dist/{chunk-XHM67O4N-53eJIPK0.mjs → chunk-XHM67O4N-BWGDFyz_.mjs} +1 -1
  54. package/dist/{chunk-XORM457F-BlSrSdGX.mjs → chunk-XORM457F-D-QrjagQ.mjs} +2 -2
  55. package/dist/{chunk-YCFVLTST-uJkMN44i.mjs → chunk-YCFVLTST-CFJxSbsH.mjs} +2 -2
  56. package/dist/{chunk-YFG2CMIF-DYVCRkoM.mjs → chunk-YFG2CMIF-DkT4NiqV.mjs} +2 -2
  57. package/dist/{chunk-YNYSPYQ5-DesxOVHh.mjs → chunk-YNYSPYQ5-iQGTFdx0.mjs} +1 -1
  58. package/dist/{chunk-YS3AZT3J-DqU1hDNV.mjs → chunk-YS3AZT3J-w6Dw8reo.mjs} +2 -2
  59. package/dist/{chunk-YTNYSM6T-ChSQxUVG.mjs → chunk-YTNYSM6T-Cz_dxkBy.mjs} +2 -2
  60. package/dist/{chunk-Z6LRHWXI-CEAGkbzj.mjs → chunk-Z6LRHWXI-BcgkPhhu.mjs} +2 -2
  61. package/dist/clear-5CZ5X4YR-B6kVcfOw.mjs +1 -0
  62. package/dist/cli.mjs +50 -50
  63. package/dist/column-WLPMMSTS-CEev_e2R.mjs +1 -0
  64. package/dist/comm-5SLSESQG-BXsiD7To.mjs +1 -0
  65. package/dist/constants-DSCKzAUk.mjs +2 -0
  66. package/dist/cp-XOYR4ABJ-Dy5aHk72.mjs +1 -0
  67. package/dist/{curl-47BFPSFW-CseKVLFy.mjs → curl-47BFPSFW-CdMFK7aW.mjs} +2 -2
  68. package/dist/cut-OPC3VAGB-GohHdbJ4.mjs +1 -0
  69. package/dist/date-DD7FVA2V-RM_vdvCh.mjs +1 -0
  70. package/dist/diff-HJF2MPDN-Ci7M3Pfx.mjs +1 -0
  71. package/dist/dirname-LEMTZZFS-C6aDcxLl.mjs +1 -0
  72. package/dist/dist-CHRfgQ3D.mjs +1 -0
  73. package/dist/{dist-D0BxLviK.mjs → dist-DFDll_q5.mjs} +16 -17
  74. package/dist/{dist-bundle-BK4P1EQn.mjs → dist-bundle-B3l-HkEL.mjs} +1 -1
  75. package/dist/dist-bundle-XlngXUNr.mjs +1 -0
  76. package/dist/du-WO2ENHXQ-Da1HuQkH.mjs +1 -0
  77. package/dist/echo-O45JWWI2-Cr9jHdYm.mjs +1 -0
  78. package/dist/env-5EPCWSXR-6RSqo9Bn.mjs +1 -0
  79. package/dist/{esm-s2X3YAg-.mjs → esm-k1YlZnpm.mjs} +1 -1
  80. package/dist/expand-DTNXU4LQ-D4dbwBrD.mjs +1 -0
  81. package/dist/expansion-ENLSRCXJ-Bv6RV19y.mjs +1 -0
  82. package/dist/expr-5T3UU5KE-D7ekHiOy.mjs +1 -0
  83. package/dist/file-ZIGAJ4YS-DzKHvjCj.mjs +1 -0
  84. package/dist/find-TPUOAIUQ-DuBwOGWI.mjs +1 -0
  85. package/dist/{flag-coverage-QT4N2Z44-C7XMLkDY.mjs → flag-coverage-QT4N2Z44-C38ybzz7.mjs} +2 -2
  86. package/dist/fold-LDSORVYE-BQyKAmCr.mjs +1 -0
  87. package/dist/{getMachineId-bsd-BCJXEJCn.mjs → getMachineId-bsd-CzP05Ffc.mjs} +2 -2
  88. package/dist/{getMachineId-bsd-GIcY1fmf.mjs → getMachineId-bsd-D0erQsHH.mjs} +2 -2
  89. package/dist/{getMachineId-bsd-D7C80Q-x.mjs → getMachineId-bsd-Dp2q7huT.mjs} +2 -2
  90. package/dist/{getMachineId-darwin-C9wsuHP1.mjs → getMachineId-darwin-C4PiguA-.mjs} +2 -2
  91. package/dist/{getMachineId-darwin-D9y6ky_l.mjs → getMachineId-darwin-COcA_c6l.mjs} +2 -2
  92. package/dist/{getMachineId-darwin-DG876t7S.mjs → getMachineId-darwin-CywdnyvB.mjs} +2 -2
  93. package/dist/{getMachineId-linux-Bt9mk0EE.mjs → getMachineId-linux-BRPjBsHg.mjs} +2 -2
  94. package/dist/{getMachineId-linux-D9atImpV.mjs → getMachineId-linux-CQZJR55S.mjs} +2 -2
  95. package/dist/{getMachineId-linux-BJESQahL.mjs → getMachineId-linux-DcN5tfI_.mjs} +2 -2
  96. package/dist/{getMachineId-unsupported-Dabs3aBp.mjs → getMachineId-unsupported-BokXsjFr.mjs} +2 -2
  97. package/dist/{getMachineId-unsupported-cApRznzG.mjs → getMachineId-unsupported-DZAxq-oW.mjs} +2 -2
  98. package/dist/{getMachineId-unsupported-DAbsbHrs.mjs → getMachineId-unsupported-GPbM_evk.mjs} +2 -2
  99. package/dist/{getMachineId-win-CU_iAQo9.mjs → getMachineId-win-B20yaCSB.mjs} +2 -2
  100. package/dist/{getMachineId-win-CH98qgwX.mjs → getMachineId-win-BXWDfxLS.mjs} +2 -2
  101. package/dist/{getMachineId-win-1MPHaim9.mjs → getMachineId-win-BfSvDvM7.mjs} +2 -2
  102. package/dist/gh-detect-C3kYac-p.mjs +3 -0
  103. package/dist/{git-handle-BSAUg1L_-Bn2h-fYS.mjs → git-handle-BSAUg1L_-B0dX3OSo.mjs} +1 -1
  104. package/dist/git-handle-CvT4CaVU-BqccGnFS.mjs +1 -0
  105. package/dist/grep-3AIAIJVR-DhLMPK9o.mjs +1 -0
  106. package/dist/gzip-AQXSGOVS-kzAFjO_Y.mjs +1 -0
  107. package/dist/head-HT2B6D2J-BR-dv_ar.mjs +1 -0
  108. package/dist/help-VVWX7SA5-jdvqGfQj.mjs +1 -0
  109. package/dist/history-J4QRNGRO-jb5B-tWQ.mjs +1 -0
  110. package/dist/hostname-BK6HG2DE-CVVAGatl.mjs +1 -0
  111. package/dist/html-to-markdown-TFCECAGV-B5yiu2Qr.mjs +1 -0
  112. package/dist/index.d.mts +12 -1
  113. package/dist/index.mjs +1 -1
  114. package/dist/{init-DRfbG7u0.mjs → init-DOOSSLEH.mjs} +15 -15
  115. package/dist/init-s_zGdaxm.mjs +1 -0
  116. package/dist/join-GG2LDHE5-BLgXAHZ_.mjs +1 -0
  117. package/dist/jq-ODXZBPLY-JpgGenzN.mjs +1 -0
  118. package/dist/{js-exec-M6UR76J5-Cw-W_H_2.mjs → js-exec-M6UR76J5-Bo7dCQVP.mjs} +3 -3
  119. package/dist/{libesm-B_qVEpZ1.mjs → libesm-BXjuRhd9.mjs} +1 -1
  120. package/dist/ln-4TRFBYAT-C7xn5Rqr.mjs +1 -0
  121. package/dist/{loader-Dr74NhT-.mjs → loader-BrdaUVEQ.mjs} +3 -3
  122. package/dist/loader-DePwbagD.mjs +1 -0
  123. package/dist/ls-KSXFZCWH-BFVVAoBi.mjs +1 -0
  124. package/dist/md5sum-INMIK4DX-0GZIz1Ci.mjs +1 -0
  125. package/dist/mkdir-TDEMSB6C-DTyG__G-.mjs +1 -0
  126. package/dist/mv-Z6MORUFL-CmjBk72Q.mjs +1 -0
  127. package/dist/nl-U5YJDM32-5XaxKjVN.mjs +1 -0
  128. package/dist/od-VJEF2UR5-BYZOEzSd.mjs +1 -0
  129. package/dist/paste-7N6AFSDS-BnDgUhuq.mjs +1 -0
  130. package/dist/{preview-WlY5Fo0D.mjs → preview-BHPfi0n1.mjs} +2 -2
  131. package/dist/preview-CQODygq-.mjs +1 -0
  132. package/dist/printf-CX64KX2P-0abCeF-D.mjs +1 -0
  133. package/dist/public/assets/{ActivityModeContent-DYz6rey5.js → ActivityModeContent-A9JVnd1C.js} +1 -1
  134. package/dist/public/assets/{DocumentContext-B4QIWPrL.js → DocumentContext-CmBtR_Ex.js} +1 -1
  135. package/dist/public/assets/{GraphPanel-DFeRGhXy.js → GraphPanel-BvMeDFSM.js} +1 -1
  136. package/dist/public/assets/{SettingsDialogBody-B8ZGJUn1.js → SettingsDialogBody-Dhgc3_Ok.js} +1 -1
  137. package/dist/public/assets/{SourceEditor-_U6sbaL_.js → SourceEditor-D0EQlBRn.js} +1 -1
  138. package/dist/public/assets/{config-validation-events-DOsyw_ZJ.js → config-validation-events-BnNnGv50.js} +1 -1
  139. package/dist/public/assets/{index-BDfLuihf.js → index-BXJoxA8K.js} +4 -4
  140. package/dist/public/assets/{keyboard-shortcuts-Cb78kYel.js → keyboard-shortcuts-DGQUJa57.js} +1 -1
  141. package/dist/public/assets/{prop-types-IdQnEpCT.js → prop-types-z8aPJgr3.js} +155 -153
  142. package/dist/public/assets/{target-navigation-intent-CE2P4fcd.js → target-navigation-intent-BAXnlSRH.js} +1 -1
  143. package/dist/public/assets/{typing-burst-detector-jWK_zqz9.js → typing-burst-detector-DihrFfB5.js} +1 -1
  144. package/dist/public/index.html +7 -7
  145. package/dist/pwd-D4OZ7N27-AYS4A9o1.mjs +1 -0
  146. package/dist/{python3-AUFTPCU6-C02r6EXI.mjs → python3-AUFTPCU6-1PPUn2I7.mjs} +2 -2
  147. package/dist/readlink-MI4GCHJF-BvzND_DT.mjs +1 -0
  148. package/dist/{repair-launch-json-bfPeTjC1.mjs → repair-launch-json-C6PTJ9xk.mjs} +2 -2
  149. package/dist/{repair-mcp-configs-Dv7-MChW.mjs → repair-mcp-configs-1DLQ_aI_.mjs} +2 -2
  150. package/dist/{repair-skills-DYNSfoYx.mjs → repair-skills-CjT8z59t.mjs} +2 -2
  151. package/dist/repair-skills-DIfWiu1E.mjs +1 -0
  152. package/dist/rev-XOSYPP45-Bqdhxuez.mjs +1 -0
  153. package/dist/rg-FOQSCCX3-CrVzsut-.mjs +1 -0
  154. package/dist/rm-RTZG23RL-DVQCHLUL.mjs +1 -0
  155. package/dist/rmdir-XTQXT7RK-DrUUkxCF.mjs +1 -0
  156. package/dist/sed-VFTTATXJ-QHemmbCP.mjs +1 -0
  157. package/dist/seq-RN5ZUASB-BBSGpJq5.mjs +1 -0
  158. package/dist/{server-lock-BpjJj3OD-0F8DEGbQ.mjs → server-lock-BpjJj3OD-vTp6kF0e.mjs} +10 -8
  159. package/dist/server-lock-CyhBidkz-C2yQNfyA.mjs +1 -0
  160. package/dist/sha1sum-VJPNLNU6-D6-7B21n.mjs +1 -0
  161. package/dist/sha256sum-PI32XWXY-BYVtIJOS.mjs +1 -0
  162. package/dist/sleep-VZFPZFWA-C-x_VGtG.mjs +1 -0
  163. package/dist/sort-DCNRDA7U-BTlvuG7X.mjs +1 -0
  164. package/dist/split-SITCSYCZ-BmGbaiMe.mjs +1 -0
  165. package/dist/sqlite3-56UMWEY3-Cjvsy5Oo.mjs +1 -0
  166. package/dist/{src-C_kqzFe0.mjs → src-DPAvJMN5.mjs} +3 -3
  167. package/dist/{start-C2GdC0f6.mjs → start-CQvloGGb.mjs} +2 -2
  168. package/dist/start-DMPvMQIA.mjs +1 -0
  169. package/dist/stat-BT5A227F-BjNsVAze.mjs +1 -0
  170. package/dist/strings-7PLOGTPD-B6_kjNM-.mjs +1 -0
  171. package/dist/tac-SJGXQ4T2-BEQ9sZmi.mjs +1 -0
  172. package/dist/tail-S5ULNTJU-DSe2aEO8.mjs +1 -0
  173. package/dist/tar-ANUBEFJY-HbwMpE1g.mjs +1 -0
  174. package/dist/tee-O7VXZDCO-BD6QXg_b.mjs +1 -0
  175. package/dist/time-DEUO3QV2-CRnH51wk.mjs +1 -0
  176. package/dist/timeout-VRKMCG72-D_oS0IDg.mjs +1 -0
  177. package/dist/touch-DX2IJOQ4-4yR1M9Nd.mjs +1 -0
  178. package/dist/tr-2HXZRDSW-Ca-NmLk7.mjs +1 -0
  179. package/dist/tree-LYXBS7DC-CR3kfmh6.mjs +1 -0
  180. package/dist/true-WHJNXCHG-x85l8vsW.mjs +1 -0
  181. package/dist/unexpand-RGTMIGZM-D-1EwjbB.mjs +1 -0
  182. package/dist/uniq-SUNANL47-DtBj3lmA.mjs +1 -0
  183. package/dist/wc-TQB3VNOX-Qw6WjSl1.mjs +1 -0
  184. package/dist/which-XZHEH76L-B-Xo178d.mjs +1 -0
  185. package/dist/whoami-DGKU3D2X-_Mgzu6ty.mjs +1 -0
  186. package/dist/{write-project-skill-CPYFetL-.mjs → write-project-skill-B4WKDHbQ.mjs} +2 -2
  187. package/dist/xan-BXDXYEIB-qijhj_cA.mjs +1 -0
  188. package/dist/xan-view-ECQUO7AJ-BfZejrY6.mjs +1 -0
  189. package/dist/xargs-I6EZUCYF-aS184J1w.mjs +1 -0
  190. package/dist/{yazl-DjRp4wSy.mjs → yazl-CB0sfSbo.mjs} +1 -1
  191. package/dist/yazl-Dqnhfxk7.mjs +1 -0
  192. package/dist/yq-MJMAR36V-Cgql6fKu.mjs +1 -0
  193. package/package.json +1 -1
  194. package/dist/alias-JE7RI5QX-DvXqsNuT.mjs +0 -1
  195. package/dist/awk2-POPGKRAI-DjdS5H9u.mjs +0 -1
  196. package/dist/base64-4YMZCVJ5-KM4zCU91.mjs +0 -1
  197. package/dist/basename-AA2KJYZQ-623KrTZh.mjs +0 -1
  198. package/dist/bash-IJWYRKFO-Czh-Vt61.mjs +0 -1
  199. package/dist/build-CcnIXJkq.mjs +0 -1
  200. package/dist/cat-RDUMLXKC-BcPFfXNy.mjs +0 -1
  201. package/dist/chmod-SYMGL4JA-DNQ-_FB-.mjs +0 -1
  202. package/dist/clear-5CZ5X4YR-DQDNPZFX.mjs +0 -1
  203. package/dist/column-WLPMMSTS-D7ZdQMYX.mjs +0 -1
  204. package/dist/comm-5SLSESQG-D314YMTX.mjs +0 -1
  205. package/dist/constants-LiLVgWIu.mjs +0 -2
  206. package/dist/cp-XOYR4ABJ-BoeqT96E.mjs +0 -1
  207. package/dist/cut-OPC3VAGB-BduNLBmG.mjs +0 -1
  208. package/dist/date-DD7FVA2V-CXtS-UgC.mjs +0 -1
  209. package/dist/diff-HJF2MPDN-BIBcfzYf.mjs +0 -1
  210. package/dist/dirname-LEMTZZFS-y-nYlas9.mjs +0 -1
  211. package/dist/dist-DDYBq5tf.mjs +0 -1
  212. package/dist/dist-bundle-CjV1Pdeo.mjs +0 -1
  213. package/dist/du-WO2ENHXQ-DxBFDhE9.mjs +0 -1
  214. package/dist/echo-O45JWWI2-D2qFOnG-.mjs +0 -1
  215. package/dist/env-5EPCWSXR-3enSMuUq.mjs +0 -1
  216. package/dist/expand-DTNXU4LQ-ByrWF7LC.mjs +0 -1
  217. package/dist/expansion-ENLSRCXJ-ZEK-CtLJ.mjs +0 -1
  218. package/dist/expr-5T3UU5KE-DslbMHGH.mjs +0 -1
  219. package/dist/file-ZIGAJ4YS-5ydJB32I.mjs +0 -1
  220. package/dist/find-TPUOAIUQ-B-6hQsZ1.mjs +0 -1
  221. package/dist/fold-LDSORVYE-BcrX-J9k.mjs +0 -1
  222. package/dist/gh-detect-DjyibUoa.mjs +0 -3
  223. package/dist/git-handle-CvT4CaVU-HAzuhDq0.mjs +0 -1
  224. package/dist/grep-3AIAIJVR-Gk5ggptS.mjs +0 -1
  225. package/dist/gzip-AQXSGOVS-DVhom50G.mjs +0 -1
  226. package/dist/head-HT2B6D2J-ahSJqSiq.mjs +0 -1
  227. package/dist/help-VVWX7SA5-DWuklTmV.mjs +0 -1
  228. package/dist/history-J4QRNGRO-DF-FzAzf.mjs +0 -1
  229. package/dist/hostname-BK6HG2DE-BduSSI6z.mjs +0 -1
  230. package/dist/html-to-markdown-TFCECAGV-Dyh1D0fg.mjs +0 -1
  231. package/dist/init-CehvDihd.mjs +0 -1
  232. package/dist/join-GG2LDHE5-DbbozPoG.mjs +0 -1
  233. package/dist/jq-ODXZBPLY-DDNFO29H.mjs +0 -1
  234. package/dist/ln-4TRFBYAT-D-c9GUlv.mjs +0 -1
  235. package/dist/loader-CX4fDb28.mjs +0 -1
  236. package/dist/ls-KSXFZCWH-Cpvwn_RB.mjs +0 -1
  237. package/dist/md5sum-INMIK4DX-ysJE_fRH.mjs +0 -1
  238. package/dist/mkdir-TDEMSB6C-Doj-uc1V.mjs +0 -1
  239. package/dist/mv-Z6MORUFL-CB3JJwR7.mjs +0 -1
  240. package/dist/nl-U5YJDM32-DNpHPr0D.mjs +0 -1
  241. package/dist/od-VJEF2UR5-CU4HUmLC.mjs +0 -1
  242. package/dist/paste-7N6AFSDS-CRLhW5JD.mjs +0 -1
  243. package/dist/preview-b3CbdBUE.mjs +0 -1
  244. package/dist/printf-CX64KX2P-BRDA91sv.mjs +0 -1
  245. package/dist/pwd-D4OZ7N27-DOBMwDAQ.mjs +0 -1
  246. package/dist/readlink-MI4GCHJF-C7jxdmka.mjs +0 -1
  247. package/dist/repair-skills-C9qAyzit.mjs +0 -1
  248. package/dist/rev-XOSYPP45-BrzxRIO9.mjs +0 -1
  249. package/dist/rg-FOQSCCX3-D0ctWk6O.mjs +0 -1
  250. package/dist/rm-RTZG23RL-DZt78fCD.mjs +0 -1
  251. package/dist/rmdir-XTQXT7RK-CJJKrOdm.mjs +0 -1
  252. package/dist/sed-VFTTATXJ-Cv8KiT35.mjs +0 -1
  253. package/dist/seq-RN5ZUASB-BD6p5vId.mjs +0 -1
  254. package/dist/server-lock-CyhBidkz-DRsKQAKO.mjs +0 -1
  255. package/dist/sha1sum-VJPNLNU6-DukJfnER.mjs +0 -1
  256. package/dist/sha256sum-PI32XWXY-QlLE_NGo.mjs +0 -1
  257. package/dist/sleep-VZFPZFWA-gwZmptDS.mjs +0 -1
  258. package/dist/sort-DCNRDA7U-Bnmzizlk.mjs +0 -1
  259. package/dist/split-SITCSYCZ-NsOC8k0n.mjs +0 -1
  260. package/dist/sqlite3-56UMWEY3-URg2-QXI.mjs +0 -1
  261. package/dist/start-Cuu2M83v.mjs +0 -1
  262. package/dist/stat-BT5A227F-Di81wqB8.mjs +0 -1
  263. package/dist/strings-7PLOGTPD-DKTG3t3M.mjs +0 -1
  264. package/dist/tac-SJGXQ4T2-CMuGqDl5.mjs +0 -1
  265. package/dist/tail-S5ULNTJU-CxhswWhX.mjs +0 -1
  266. package/dist/tar-ANUBEFJY-BBFrIW8E.mjs +0 -1
  267. package/dist/tee-O7VXZDCO-DwJ0hUpW.mjs +0 -1
  268. package/dist/time-DEUO3QV2-W5vzutuD.mjs +0 -1
  269. package/dist/timeout-VRKMCG72-wW3XOtt7.mjs +0 -1
  270. package/dist/touch-DX2IJOQ4-C7eGjNGd.mjs +0 -1
  271. package/dist/tr-2HXZRDSW-DlafN6SW.mjs +0 -1
  272. package/dist/tree-LYXBS7DC-Ou8JkGQ1.mjs +0 -1
  273. package/dist/true-WHJNXCHG-B4B4ZHqp.mjs +0 -1
  274. package/dist/unexpand-RGTMIGZM-D6xZmTWp.mjs +0 -1
  275. package/dist/uniq-SUNANL47-Ce9L4IzE.mjs +0 -1
  276. package/dist/wc-TQB3VNOX-dwG38U4n.mjs +0 -1
  277. package/dist/which-XZHEH76L-Cw9SQliE.mjs +0 -1
  278. package/dist/whoami-DGKU3D2X-hzRI9gvz.mjs +0 -1
  279. package/dist/xan-BXDXYEIB-loWv9Mk3.mjs +0 -1
  280. package/dist/xan-view-ECQUO7AJ-8Lt55NoE.mjs +0 -1
  281. package/dist/xargs-I6EZUCYF-CG6axhMW.mjs +0 -1
  282. package/dist/yazl-CJayzk0b.mjs +0 -1
  283. package/dist/yq-MJMAR36V-CsEAtdgj.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{a as e,r as t,t as n}from"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as r,r as i,t as a}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{open as o}from"node:fs/promises";var s=t(e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:(p?-1:1)*(1/0);o+=2**r,a-=l}return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}}),c=t((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}}),l=t((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=s,n.humanize=c(),n.destroy=u,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(typeof t>`u`?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n}),u=t((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=l()(e);var{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}}),d=t((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}}),f=t((e,t)=>{var r=n(`os`),i=n(`tty`),a=d(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}t.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}}),p=t((e,t)=>{var r=n(`tty`),i=n(`util`);e.init=p,e.log=c,e.formatArgs=o,e.save=u,e.load=d,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=f();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${n} \x1B[0m`;e[0]=a+e[0].split(`
1
+ import{a as e,r as t,t as n}from"./chunk-DXB73IDG-C2RuFAAY.mjs";import{n as r,r as i,t as a}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{open as o}from"node:fs/promises";var s=t(e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:(p?-1:1)*(1/0);o+=2**r,a-=l}return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}}),c=t((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}}),l=t((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=s,n.humanize=c(),n.destroy=u,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(typeof t>`u`?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n}),u=t((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=l()(e);var{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}}),d=t((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}}),f=t((e,t)=>{var r=n(`os`),i=n(`tty`),a=d(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}t.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}}),p=t((e,t)=>{var r=n(`tty`),i=n(`util`);e.init=p,e.log=c,e.formatArgs=o,e.save=u,e.load=d,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=f();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${n} \x1B[0m`;e[0]=a+e[0].split(`
2
2
  `).join(`
3
3
  `+a),e.push(i+`m+`+t.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+n+` `+e[0]}function s(){return e.inspectOpts.hideDate?``:new Date().toISOString()+` `}function c(...t){return process.stderr.write(i.formatWithOptions(e.inspectOpts,...t)+`
4
4
  `)}function u(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function d(){return process.env.DEBUG}function p(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;r<n.length;r++)t.inspectOpts[n[r]]=e.inspectOpts[n[r]]}t.exports=l()(e);var{formatters:m}=t.exports;m.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split(`
@@ -21,4 +21,4 @@ ieee754/index.js:
21
21
  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
22
22
  */
23
23
  export{Oe as n,De as t};
24
- //# sourceMappingURL=chunk-CR5AFCPT-BWXo8X-o.mjs.map
24
+ //# sourceMappingURL=chunk-CR5AFCPT-CH8ZGz3B.mjs.map
@@ -1,2 +1,2 @@
1
1
  var e=globalThis.SharedArrayBuffer,t=globalThis.Atomics,n=performance.now.bind(performance),r=globalThis.Headers;export{e as i,t as n,n as r,r as t};
2
- //# sourceMappingURL=chunk-CWQS3NFK-Co4ALolT.mjs.map
2
+ //# sourceMappingURL=chunk-CWQS3NFK-BP3kiNgH.mjs.map
@@ -1,6 +1,6 @@
1
- import{t as e}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-D1bzz49u.mjs";var r={name:`bash`,summary:`execute shell commands or scripts`,usage:`bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]`,options:[`-c COMMAND execute COMMAND string`,` --help display this help and exit`],notes:[`Without -c, reads and executes commands from SCRIPT_FILE.`,`Arguments are passed as $1, $2, etc. to the script.`,`$0 is set to the script name (or "bash" with -c).`]},i={name:`bash`,async execute(e,i){if(n(e))return t(r);if(e[0]===`-c`&&e.length>=2){let t=e[1];return o(t,e[2]||`bash`,e.slice(3),i)}if(e.length===0)return i.stdin?.trim()?o(i.stdin,`bash`,[],i):{stdout:``,stderr:``,exitCode:0};let a=e[0],s=e.slice(1);try{let e=i.fs.resolvePath(i.cwd,a);return o(await i.fs.readFile(e),a,s,i)}catch{return{stdout:``,stderr:`bash: ${a}: No such file or directory
1
+ import{t as e}from"./chunk-OJDRYQWQ-DWhg7YHU.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-D1bzz49u.mjs";var r={name:`bash`,summary:`execute shell commands or scripts`,usage:`bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]`,options:[`-c COMMAND execute COMMAND string`,` --help display this help and exit`],notes:[`Without -c, reads and executes commands from SCRIPT_FILE.`,`Arguments are passed as $1, $2, etc. to the script.`,`$0 is set to the script name (or "bash" with -c).`]},i={name:`bash`,async execute(e,i){if(n(e))return t(r);if(e[0]===`-c`&&e.length>=2){let t=e[1];return o(t,e[2]||`bash`,e.slice(3),i)}if(e.length===0)return i.stdin?.trim()?o(i.stdin,`bash`,[],i):{stdout:``,stderr:``,exitCode:0};let a=e[0],s=e.slice(1);try{let e=i.fs.resolvePath(i.cwd,a);return o(await i.fs.readFile(e),a,s,i)}catch{return{stdout:``,stderr:`bash: ${a}: No such file or directory
2
2
  `,exitCode:127}}}},a={name:`sh`,async execute(e,i){if(n(e))return t({...r,name:`sh`,summary:`execute shell commands or scripts (POSIX shell)`});if(e[0]===`-c`&&e.length>=2){let t=e[1];return o(t,e[2]||`sh`,e.slice(3),i)}if(e.length===0)return i.stdin?.trim()?o(i.stdin,`sh`,[],i):{stdout:``,stderr:``,exitCode:0};let a=e[0],s=e.slice(1);try{let e=i.fs.resolvePath(i.cwd,a);return o(await i.fs.readFile(e),a,s,i)}catch{return{stdout:``,stderr:`sh: ${a}: No such file or directory
3
3
  `,exitCode:127}}}};async function o(t,n,r,i){if(!i.exec)return{stdout:``,stderr:`bash: internal error: exec function not available
4
4
  `,exitCode:1};let a=e(i.exportedEnv||{},{0:n,"#":String(r.length),"@":r.join(` `),"*":r.join(` `)});r.forEach((e,t)=>{a[String(t+1)]=e});let o=t;if(o.startsWith(`#!`)){let e=o.indexOf(`
5
5
  `);e!==-1&&(o=o.slice(e+1))}return await i.exec(o,{env:a,cwd:i.cwd,stdin:i.stdin,signal:i.signal})}var s={name:`bash`,flags:[{flag:`-c`,type:`value`,valueHint:`string`}],stdinType:`text`},c={name:`sh`,flags:[{flag:`-c`,type:`value`,valueHint:`string`}],stdinType:`text`};export{i,c as n,s as r,a as t};
6
- //# sourceMappingURL=chunk-D6CWQ5DW-Cik2LGX1.mjs.map
6
+ //# sourceMappingURL=chunk-D6CWQ5DW-BgQGt8eQ.mjs.map
@@ -1,2 +1,2 @@
1
1
  import{i as e}from"./chunk-FK9Q3tQk.mjs";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(t=>typeof e<`u`?e:typeof Proxy<`u`?new Proxy(t,{get:(t,n)=>(typeof e<`u`?e:t)[n]}):t)(function(t){if(typeof e<`u`)return e.apply(this,arguments);throw Error(`Dynamic require of "`+t+`" is not supported`)}),c=(e,t)=>()=>(e&&(t=e(e=0)),t),l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},d=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!o.call(e,c)&&c!==a&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},f=(e,r,i)=>(i=e==null?{}:t(a(e)),d(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),p=e=>d(n({},`__esModule`,{value:!0}),e);export{f as a,u as i,c as n,p as o,l as r,s as t};
2
- //# sourceMappingURL=chunk-DXB73IDG-DIKSLkPq.mjs.map
2
+ //# sourceMappingURL=chunk-DXB73IDG-C2RuFAAY.mjs.map
@@ -1,4 +1,4 @@
1
- import{a as e}from"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t}from"./chunk-SYMJJMQ4-tl6Dz6VW.mjs";var n=e(t(),1);function r(){return Object.create(null)}function i(e,t,n){e[t]=n}function a(e){let t=r();for(let n of Object.keys(e)){let r=e[n];(typeof r==`string`||typeof r==`number`||typeof r==`boolean`||r===null)&&(t[n]=r)}return t}function o(e){let t=n.default.parse(e.trim(),{header:!0,dynamicTyping:!0,skipEmptyLines:!0}),r=t.data.map(e=>a(e));return{headers:t.meta.fields||[],data:r}}function s(e,t){return t.length===0?`${e.join(`,`)}
1
+ import{a as e}from"./chunk-DXB73IDG-C2RuFAAY.mjs";import{t}from"./chunk-SYMJJMQ4-DLPoQaug.mjs";var n=e(t(),1);function r(){return Object.create(null)}function i(e,t,n){e[t]=n}function a(e){let t=r();for(let n of Object.keys(e)){let r=e[n];(typeof r==`string`||typeof r==`number`||typeof r==`boolean`||r===null)&&(t[n]=r)}return t}function o(e){let t=n.default.parse(e.trim(),{header:!0,dynamicTyping:!0,skipEmptyLines:!0}),r=t.data.map(e=>a(e));return{headers:t.meta.fields||[],data:r}}function s(e,t){return t.length===0?`${e.join(`,`)}
2
2
  `:`${n.default.unparse(t,{columns:e}).replace(/\r\n/g,`
3
3
  `)}
4
4
  `}async function c(e,t){let n=e.find(e=>!e.startsWith(`-`)),r;if(!n||n===`-`)r=t.stdin;else try{let e=t.fs.resolvePath(t.cwd,n);r=await t.fs.readFile(e)}catch{return{headers:[],data:[],error:{stdout:``,stderr:`xan: ${n}: No such file or directory
@@ -7,4 +7,4 @@ import{a as e}from"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t}from"./chunk-SYMJJMQ4
7
7
  `,stderr:``,exitCode:0}}async function u(e,t){let n=0,r=[];for(let t=0;t<e.length;t++){let i=e[t];i===`-n`&&t+1<e.length?n=Number.parseInt(e[++t],10):i.startsWith(`-`)||r.push(i)}let{headers:i,data:a,error:o}=await c(r,t);if(o)return o;let s=n>0?a.slice(0,n):a,l=i.map(e=>e.length);for(let e of s)for(let t=0;t<i.length;t++){let n=String(e[i[t]]??``);l[t]=Math.max(l[t],n.length)}let u=[];u.push(`\u250C${l.map(e=>`─`.repeat(e+2)).join(`┬`)}\u2510`);let d=i.map((e,t)=>` ${e.padEnd(l[t])} `).join(`│`);u.push(`│${d}│`),u.push(`\u251C${l.map(e=>`─`.repeat(e+2)).join(`┼`)}\u2524`);for(let e of s){let t=i.map((t,n)=>` ${String(e[t]??``).padEnd(l[n])} `).join(`│`);u.push(`│${t}│`)}return u.push(`\u2514${l.map(e=>`─`.repeat(e+2)).join(`┴`)}\u2518`),{stdout:`${u.join(`
8
8
  `)}
9
9
  `,stderr:``,exitCode:0}}export{o as a,u as c,l as i,s as n,c as o,i as r,r as s,a as t};
10
- //# sourceMappingURL=chunk-F55TLFGB-oTuag-aK.mjs.map
10
+ //# sourceMappingURL=chunk-F55TLFGB-Bkfd8ak_.mjs.map
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-YNYSPYQ5-DesxOVHh.mjs";import{c as t,d as n,f as r,h as i,i as a,o,u as s}from"./chunk-GFQRA5P5-DnjwTqP3.mjs";function c(e,t){for(;t<e.length;){if(e[t]===`\\`&&e[t+1]===`
1
+ import{t as e}from"./chunk-YNYSPYQ5-iQGTFdx0.mjs";import{c as t,d as n,f as r,h as i,i as a,o,u as s}from"./chunk-GFQRA5P5-ePq2jelx.mjs";function c(e,t){for(;t<e.length;){if(e[t]===`\\`&&e[t+1]===`
2
2
  `){t+=2;continue}if(/\s/.test(e[t])){t++;continue}break}return t}var l=[`=`,`+=`,`-=`,`*=`,`/=`,`%=`,`<<=`,`>>=`,`&=`,`|=`,`^=`];function u(e){if(e.includes(`#`)){let[t,n]=e.split(`#`),r=Number.parseInt(t,10);if(r<2||r>64)return NaN;if(r<=36){let e=Number.parseInt(n,r);return e>2**53-1?2**53-1:e}let i=0;for(let e of n){let t;if(/[0-9]/.test(e))t=e.charCodeAt(0)-48;else if(/[a-z]/.test(e))t=e.charCodeAt(0)-97+10;else if(/[A-Z]/.test(e))t=e.charCodeAt(0)-65+36;else if(e===`@`)t=62;else if(e===`_`)t=63;else return NaN;if(t>=r)return NaN;if(i=i*r+t,i>2**53-1)return 2**53-1}return i}if(e.startsWith(`0x`)||e.startsWith(`0X`)){let t=Number.parseInt(e.slice(2),16);return t>2**53-1?2**53-1:t}if(e.startsWith(`0`)&&e.length>1&&/^[0-9]+$/.test(e)){if(/[89]/.test(e))return NaN;let t=Number.parseInt(e,8);return t>2**53-1?2**53-1:t}let t=Number.parseInt(e,10);return t>2**53-1?2**53-1:t}function d(e,t,n,r){if(n.slice(r,r+3)!==`$((`)return null;let i=r+3,a=1,o=i;for(;i<n.length-1&&a>0;)n[i]===`(`&&n[i+1]===`(`?(a++,i+=2):n[i]===`)`&&n[i+1]===`)`?(a--,a>0&&(i+=2)):i++;let{expr:s}=e(t,n.slice(o,i),0);return i+=2,{expr:{type:`ArithNested`,expression:s},pos:i}}function f(e,t){if(e.slice(t,t+2)!==`$'`)return null;let n=t+2,r=``;for(;n<e.length&&e[n]!==`'`;)if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];switch(t){case`n`:r+=`
3
3
  `;break;case`t`:r+=` `;break;case`r`:r+=`\r`;break;case`\\`:r+=`\\`;break;case`'`:r+=`'`;break;default:r+=t}n+=2}else r+=e[n],n++;e[n]===`'`&&n++;let i=Number.parseInt(r,10);return{expr:{type:`ArithNumber`,value:Number.isNaN(i)?0:i},pos:n}}function p(e,t){if(e.slice(t,t+2)!==`$"`)return null;let n=t+2,r=``;for(;n<e.length&&e[n]!==`"`;)e[n]===`\\`&&n+1<e.length?(r+=e[n+1],n+=2):(r+=e[n],n++);e[n]===`"`&&n++;let i=Number.parseInt(r,10);return{expr:{type:`ArithNumber`,value:Number.isNaN(i)?0:i},pos:n}}function m(e){let t=``,n=0;for(;n<e.length;)if(e[n]===`"`){for(n++;n<e.length&&e[n]!==`"`;)e[n]===`\\`&&n+1<e.length?(t+=e[n+1],n+=2):(t+=e[n],n++);n<e.length&&n++}else t+=e[n],n++;return t}function h(e,t){let n=m(t),{expr:r,pos:i}=v(e,n,0),a=c(n,i);if(a<n.length){let e=t.slice(a).trim();if(e)return{type:`ArithmeticExpression`,originalText:t,expression:{type:`ArithSyntaxError`,errorToken:e,message:`${e}: syntax error: invalid arithmetic operator (error token is "${e}")`}}}return{type:`ArithmeticExpression`,expression:r,originalText:t}}function g(e,t){return{expr:{type:`ArithSyntaxError`,errorToken:e,message:`syntax error: operand expected (error token is "${e}")`},pos:t}}function _(e,t){return c(e,t)>=e.length}function v(e,t,n){return ee(e,t,n)}function ee(e,t,n){let{expr:r,pos:i}=y(e,t,n);for(i=c(t,i);t[i]===`,`;){if(i++,_(t,i))return g(`,`,i);let{expr:n,pos:a}=y(e,t,i);r={type:`ArithBinary`,operator:`,`,left:r,right:n},i=c(t,a)}return{expr:r,pos:i}}function y(e,t,n){let{expr:r,pos:i}=te(e,t,n);if(i=c(t,i),t[i]===`?`){i++;let{expr:n,pos:a}=v(e,t,i);if(i=c(t,a),t[i]===`:`){i++;let{expr:a,pos:o}=v(e,t,i);return{expr:{type:`ArithTernary`,condition:r,consequent:n,alternate:a},pos:o}}}return{expr:r,pos:i}}function te(e,t,n){let{expr:r,pos:i}=ne(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`||`;){if(i+=2,_(t,i))return g(`||`,i);let{expr:n,pos:a}=ne(e,t,i);r={type:`ArithBinary`,operator:`||`,left:r,right:n},i=a}return{expr:r,pos:i}}function ne(e,t,n){let{expr:r,pos:i}=re(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`&&`;){if(i+=2,_(t,i))return g(`&&`,i);let{expr:n,pos:a}=re(e,t,i);r={type:`ArithBinary`,operator:`&&`,left:r,right:n},i=a}return{expr:r,pos:i}}function re(e,t,n){let{expr:r,pos:i}=ie(e,t,n);for(;i=c(t,i),t[i]===`|`&&t[i+1]!==`|`;){if(i++,_(t,i))return g(`|`,i);let{expr:n,pos:a}=ie(e,t,i);r={type:`ArithBinary`,operator:`|`,left:r,right:n},i=a}return{expr:r,pos:i}}function ie(e,t,n){let{expr:r,pos:i}=ae(e,t,n);for(;i=c(t,i),t[i]===`^`;){if(i++,_(t,i))return g(`^`,i);let{expr:n,pos:a}=ae(e,t,i);r={type:`ArithBinary`,operator:`^`,left:r,right:n},i=a}return{expr:r,pos:i}}function ae(e,t,n){let{expr:r,pos:i}=oe(e,t,n);for(;i=c(t,i),t[i]===`&`&&t[i+1]!==`&`;){if(i++,_(t,i))return g(`&`,i);let{expr:n,pos:a}=oe(e,t,i);r={type:`ArithBinary`,operator:`&`,left:r,right:n},i=a}return{expr:r,pos:i}}function oe(e,t,n){let{expr:r,pos:i}=se(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`==`||t.slice(i,i+2)===`!=`;){let n=t.slice(i,i+2);if(i+=2,_(t,i))return g(n,i);let{expr:a,pos:o}=se(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}return{expr:r,pos:i}}function se(e,t,n){let{expr:r,pos:i}=ce(e,t,n);for(;;)if(i=c(t,i),t.slice(i,i+2)===`<=`||t.slice(i,i+2)===`>=`){let n=t.slice(i,i+2);if(i+=2,_(t,i))return g(n,i);let{expr:a,pos:o}=ce(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}else if(t[i]===`<`||t[i]===`>`){let n=t[i];if(i++,_(t,i))return g(n,i);let{expr:a,pos:o}=ce(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}else break;return{expr:r,pos:i}}function ce(e,t,n){let{expr:r,pos:i}=le(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`<<`||t.slice(i,i+2)===`>>`;){let n=t.slice(i,i+2);if(i+=2,_(t,i))return g(n,i);let{expr:a,pos:o}=le(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}return{expr:r,pos:i}}function le(e,t,n){let{expr:r,pos:i}=ue(e,t,n);for(;i=c(t,i),(t[i]===`+`||t[i]===`-`)&&t[i+1]!==t[i];){let n=t[i];if(i++,_(t,i))return g(n,i);let{expr:a,pos:o}=ue(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}return{expr:r,pos:i}}function ue(e,t,n){let{expr:r,pos:i}=de(e,t,n);for(;;)if(i=c(t,i),t[i]===`*`&&t[i+1]!==`*`){if(i++,_(t,i))return g(`*`,i);let{expr:n,pos:a}=de(e,t,i);r={type:`ArithBinary`,operator:`*`,left:r,right:n},i=a}else if(t[i]===`/`||t[i]===`%`){let n=t[i];if(i++,_(t,i))return g(n,i);let{expr:a,pos:o}=de(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}else break;return{expr:r,pos:i}}function de(e,t,n){let{expr:r,pos:i}=fe(e,t,n),a=c(t,i);if(t.slice(a,a+2)===`**`){if(a+=2,_(t,a))return g(`**`,a);let{expr:n,pos:i}=de(e,t,a);return{expr:{type:`ArithBinary`,operator:`**`,left:r,right:n},pos:i}}return{expr:r,pos:i}}function fe(e,t,n){let r=c(t,n);if(t.slice(r,r+2)===`++`||t.slice(r,r+2)===`--`){let n=t.slice(r,r+2);r+=2;let{expr:i,pos:a}=fe(e,t,r);return{expr:{type:`ArithUnary`,operator:n,operand:i,prefix:!0},pos:a}}if(t[r]===`+`||t[r]===`-`||t[r]===`!`||t[r]===`~`){let n=t[r];r++;let{expr:i,pos:a}=fe(e,t,r);return{expr:{type:`ArithUnary`,operator:n,operand:i,prefix:!0},pos:a}}return me(e,t,r)}function pe(e,t){let n=e[t];return n===`$`||n==="`"}function me(e,t,n){let{expr:r,pos:i}=he(e,t,n,!1),a=[r];for(;pe(t,i);){let{expr:n,pos:r}=he(e,t,i,!0);a.push(n),i=r}a.length>1&&(r={type:`ArithConcat`,parts:a});let o;if(t[i]===`[`&&r.type===`ArithConcat`){i++;let{expr:n,pos:r}=v(e,t,i);o=n,i=r,t[i]===`]`&&i++}if(o&&r.type===`ArithConcat`&&(r={type:`ArithDynamicElement`,nameExpr:r,subscript:o},o=void 0),i=c(t,i),r.type===`ArithConcat`||r.type===`ArithVariable`||r.type===`ArithDynamicElement`){for(let n of l)if(t.slice(i,i+n.length)===n&&t.slice(i,i+n.length+1)!==`==`){i+=n.length;let{expr:a,pos:o}=y(e,t,i);return r.type===`ArithDynamicElement`?{expr:{type:`ArithDynamicAssignment`,operator:n,target:r.nameExpr,subscript:r.subscript,value:a},pos:o}:r.type===`ArithConcat`?{expr:{type:`ArithDynamicAssignment`,operator:n,target:r,value:a},pos:o}:{expr:{type:`ArithAssignment`,operator:n,variable:r.name,value:a},pos:o}}}if(t.slice(i,i+2)===`++`||t.slice(i,i+2)===`--`){let e=t.slice(i,i+2);return i+=2,{expr:{type:`ArithUnary`,operator:e,operand:r,prefix:!1},pos:i}}return{expr:r,pos:i}}function he(e,t,n,i=!1){let a=c(t,n),o=d(v,e,t,a);if(o)return o;let s=f(t,a);if(s)return s;let m=p(t,a);if(m)return m;if(t.slice(a,a+2)===`$(`&&t[a+2]!==`(`){a+=2;let e=1,n=a;for(;a<t.length&&e>0;)t[a]===`(`?e++:t[a]===`)`&&e--,e>0&&a++;let r=t.slice(n,a);return a++,{expr:{type:`ArithCommandSubst`,command:r},pos:a}}if(t[a]==="`"){a++;let e=a;for(;a<t.length&&t[a]!=="`";)a++;let n=t.slice(e,a);return t[a]==="`"&&a++,{expr:{type:`ArithCommandSubst`,command:n},pos:a}}if(t[a]===`(`){a++;let{expr:n,pos:r}=v(e,t,a);return a=c(t,r),t[a]===`)`&&a++,{expr:{type:`ArithGroup`,expression:n},pos:a}}if(t[a]===`'`){a++;let e=``;for(;a<t.length&&t[a]!==`'`;)e+=t[a],a++;t[a]===`'`&&a++;let n=Number.parseInt(e,10);return{expr:{type:`ArithSingleQuote`,content:e,value:Number.isNaN(n)?0:n},pos:a}}if(t[a]===`"`){a++;let n=``;for(;a<t.length&&t[a]!==`"`;)t[a]===`\\`&&a+1<t.length?(n+=t[a+1],a+=2):(n+=t[a],a++);t[a]===`"`&&a++;let r=n.trim();if(!r)return{expr:{type:`ArithNumber`,value:0},pos:a};let{expr:i}=v(e,r,0);return{expr:i,pos:a}}if(/[0-9]/.test(t[a])){let e=``,n=!1,i=!1;for(;a<t.length;){let r=t[a];if(n)if(/[0-9a-zA-Z@_]/.test(r))e+=r,a++;else break;else if(r===`#`)n=!0,e+=r,a++;else if(e===`0`&&(r===`x`||r===`X`)&&a+1<t.length&&/[0-9a-fA-F]/.test(t[a+1]))i=!0,e+=r,a++;else if(i&&/[0-9a-fA-F]/.test(r))e+=r,a++;else if(!i&&/[0-9]/.test(r))e+=r,a++;else break}if(a<t.length&&/[a-zA-Z_]/.test(t[a])){let n=e;for(;a<t.length&&/[a-zA-Z0-9_]/.test(t[a]);)n+=t[a],a++;return{expr:{type:`ArithSyntaxError`,errorToken:n,message:`${n}: value too great for base (error token is "${n}")`},pos:a}}if(t[a]===`.`&&/[0-9]/.test(t[a+1]))throw new r(`${e}.${t[a+1]}...: syntax error: invalid arithmetic operator`);if(t[a]===`[`){let n=t.slice(a).trim();return{expr:{type:`ArithNumberSubscript`,number:e,errorToken:n},pos:t.length}}return{expr:{type:`ArithNumber`,value:u(e)},pos:a}}if(t[a]===`$`&&t[a+1]===`{`){let e=a+2,n=1,r=e;for(;r<t.length&&n>0;)t[r]===`{`?n++:t[r]===`}`&&n--,n>0&&r++;let i=t.slice(e,r),o=r+1;if(t[o]===`#`){let e=o+1;for(;e<t.length&&/[0-9a-zA-Z@_]/.test(t[e]);)e++;return{expr:{type:`ArithDynamicBase`,baseExpr:i,value:t.slice(o+1,e)},pos:e}}if(/[0-9]/.test(t[o])||t[o]===`x`||t[o]===`X`){let e=o;if(t[o]===`x`||t[o]===`X`)for(e++;e<t.length&&/[0-9a-fA-F]/.test(t[e]);)e++;else for(;e<t.length&&/[0-9]/.test(t[e]);)e++;return{expr:{type:`ArithDynamicNumber`,prefix:i,suffix:t.slice(o,e)},pos:e}}return a=o,{expr:{type:`ArithBracedExpansion`,content:i},pos:a}}if(t[a]===`$`&&a+1<t.length&&/[0-9]/.test(t[a+1])){a++;let e=``;for(;a<t.length&&/[0-9]/.test(t[a]);)e+=t[a],a++;return{expr:{type:`ArithVariable`,name:e,hasDollarPrefix:!0},pos:a}}if(t[a]===`$`&&a+1<t.length&&/[*@#?\-!$]/.test(t[a+1])){let e=t[a+1];return a+=2,{expr:{type:`ArithSpecialVar`,name:e},pos:a}}let h=!1;if(t[a]===`$`&&a+1<t.length&&/[a-zA-Z_]/.test(t[a+1])&&(h=!0,a++),a<t.length&&/[a-zA-Z_]/.test(t[a])){let n=``;for(;a<t.length&&/[a-zA-Z0-9_]/.test(t[a]);)n+=t[a],a++;if(t[a]===`[`&&!i){a++;let r;if(t[a]===`'`||t[a]===`"`){let e=t[a];for(a++,r=``;a<t.length&&t[a]!==e;)r+=t[a],a++;t[a]===e&&a++,a=c(t,a),t[a]===`]`&&a++}let o;if(r===void 0){let{expr:n,pos:r}=v(e,t,a);o=n,a=r,t[a]===`]`&&a++}if(a=c(t,a),t[a]===`[`&&o)return{expr:{type:`ArithDoubleSubscript`,array:n,index:o},pos:a};if(!i){for(let i of l)if(t.slice(a,a+i.length)===i&&t.slice(a,a+i.length+1)!==`==`){a+=i.length;let{expr:s,pos:c}=y(e,t,a);return{expr:{type:`ArithAssignment`,operator:i,variable:n,subscript:o,stringKey:r,value:s},pos:c}}}return{expr:{type:`ArithArrayElement`,array:n,index:o,stringKey:r},pos:a}}if(a=c(t,a),!i){for(let r of l)if(t.slice(a,a+r.length)===r&&t.slice(a,a+r.length+1)!==`==`){a+=r.length;let{expr:i,pos:o}=y(e,t,a);return{expr:{type:`ArithAssignment`,operator:r,variable:n,value:i},pos:o}}}return{expr:{type:`ArithVariable`,name:n,hasDollarPrefix:h},pos:a}}if(t[a]===`#`){let e=a+1;for(;e<t.length&&t[e]!==`
4
4
  `;)e++;let n=t.slice(a,e).trim()||`#`;return{expr:{type:`ArithSyntaxError`,errorToken:n,message:`${n}: syntax error: invalid arithmetic operator (error token is "${n}")`},pos:t.length}}return{expr:{type:`ArithNumber`,value:0},pos:a}}var b={script(e){return{type:`Script`,statements:e}},statement(e,t=[],n=!1,r,i){let a={type:`Statement`,pipelines:e,operators:t,background:n};return r&&(a.deferredError=r),i!==void 0&&(a.sourceText=i),a},pipeline(e,t=!1,n=!1,r=!1,i){return{type:`Pipeline`,commands:e,negated:t,timed:n,timePosix:r,pipeStderr:i}},simpleCommand(e,t=[],n=[],r=[]){return{type:`SimpleCommand`,name:e,args:t,assignments:n,redirections:r}},word(e){return{type:`Word`,parts:e}},literal(e){return{type:`Literal`,value:e}},singleQuoted(e){return{type:`SingleQuoted`,value:e}},doubleQuoted(e){return{type:`DoubleQuoted`,parts:e}},escaped(e){return{type:`Escaped`,value:e}},parameterExpansion(e,t=null){return{type:`ParameterExpansion`,parameter:e,operation:t}},commandSubstitution(e,t=!1){return{type:`CommandSubstitution`,body:e,legacy:t}},arithmeticExpansion(e){return{type:`ArithmeticExpansion`,expression:e}},assignment(e,t,n=!1,r=null){return{type:`Assignment`,name:e,value:t,append:n,array:r}},redirection(e,t,n=null,r){let i={type:`Redirection`,fd:n,operator:e,target:t};return r&&(i.fdVariable=r),i},hereDoc(e,t,n=!1,r=!1){return{type:`HereDoc`,delimiter:e,content:t,stripTabs:n,quoted:r}},ifNode(e,t=null,n=[]){return{type:`If`,clauses:e,elseBody:t,redirections:n}},forNode(e,t,n,r=[]){return{type:`For`,variable:e,words:t,body:n,redirections:r}},whileNode(e,t,n=[]){return{type:`While`,condition:e,body:t,redirections:n}},untilNode(e,t,n=[]){return{type:`Until`,condition:e,body:t,redirections:n}},caseNode(e,t,n=[]){return{type:`Case`,word:e,items:t,redirections:n}},caseItem(e,t,n=`;;`){return{type:`CaseItem`,patterns:e,body:t,terminator:n}},subshell(e,t=[]){return{type:`Subshell`,body:e,redirections:t}},group(e,t=[]){return{type:`Group`,body:e,redirections:t}},functionDef(e,t,n=[],r){return{type:`FunctionDef`,name:e,body:t,redirections:n,sourceFile:r}},conditionalCommand(e,t=[],n){return{type:`ConditionalCommand`,expression:e,redirections:t,line:n}},arithmeticCommand(e,t=[],n){return{type:`ArithmeticCommand`,expression:e,redirections:t,line:n}}},x;(function(e){e.EOF=`EOF`,e.NEWLINE=`NEWLINE`,e.SEMICOLON=`SEMICOLON`,e.AMP=`AMP`,e.PIPE=`PIPE`,e.PIPE_AMP=`PIPE_AMP`,e.AND_AND=`AND_AND`,e.OR_OR=`OR_OR`,e.BANG=`BANG`,e.LESS=`LESS`,e.GREAT=`GREAT`,e.DLESS=`DLESS`,e.DGREAT=`DGREAT`,e.LESSAND=`LESSAND`,e.GREATAND=`GREATAND`,e.LESSGREAT=`LESSGREAT`,e.DLESSDASH=`DLESSDASH`,e.CLOBBER=`CLOBBER`,e.TLESS=`TLESS`,e.AND_GREAT=`AND_GREAT`,e.AND_DGREAT=`AND_DGREAT`,e.LPAREN=`LPAREN`,e.RPAREN=`RPAREN`,e.LBRACE=`LBRACE`,e.RBRACE=`RBRACE`,e.DSEMI=`DSEMI`,e.SEMI_AND=`SEMI_AND`,e.SEMI_SEMI_AND=`SEMI_SEMI_AND`,e.DBRACK_START=`DBRACK_START`,e.DBRACK_END=`DBRACK_END`,e.DPAREN_START=`DPAREN_START`,e.DPAREN_END=`DPAREN_END`,e.IF=`IF`,e.THEN=`THEN`,e.ELSE=`ELSE`,e.ELIF=`ELIF`,e.FI=`FI`,e.FOR=`FOR`,e.WHILE=`WHILE`,e.UNTIL=`UNTIL`,e.DO=`DO`,e.DONE=`DONE`,e.CASE=`CASE`,e.ESAC=`ESAC`,e.IN=`IN`,e.FUNCTION=`FUNCTION`,e.SELECT=`SELECT`,e.TIME=`TIME`,e.COPROC=`COPROC`,e.WORD=`WORD`,e.NAME=`NAME`,e.NUMBER=`NUMBER`,e.ASSIGNMENT_WORD=`ASSIGNMENT_WORD`,e.FD_VARIABLE=`FD_VARIABLE`,e.COMMENT=`COMMENT`,e.HEREDOC_CONTENT=`HEREDOC_CONTENT`})(x||={});var S=class extends Error{line;column;constructor(e,t,n){super(`line ${t}: ${e}`),this.line=t,this.column=n,this.name=`LexerError`}},ge=new Map([[`if`,x.IF],[`then`,x.THEN],[`else`,x.ELSE],[`elif`,x.ELIF],[`fi`,x.FI],[`for`,x.FOR],[`while`,x.WHILE],[`until`,x.UNTIL],[`do`,x.DO],[`done`,x.DONE],[`case`,x.CASE],[`esac`,x.ESAC],[`in`,x.IN],[`function`,x.FUNCTION],[`select`,x.SELECT],[`time`,x.TIME],[`coproc`,x.COPROC]]);function _e(e){let t=e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(!t)return!1;let n=e.slice(t[0].length);if(n===``||n===`+`)return!0;if(n[0]===`[`){let e=0,t=0;for(;t<n.length;t++)if(n[t]===`[`)e++;else if(n[t]===`]`&&(e--,e===0))break;if(e!==0||t>=n.length)return!1;let r=n.slice(t+1);return r===``||r===`+`}return!1}function ve(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r===`[`)t++;else if(r===`]`)t--;else{if(t===0&&r===`=`)return n;if(t===0&&r===`+`&&e[n+1]===`=`)return n+1}}return-1}var ye=[[`;`,`;`,`&`,x.SEMI_SEMI_AND],[`<`,`<`,`<`,x.TLESS],[`&`,`>`,`>`,x.AND_DGREAT]],be=[[`[`,`[`,x.DBRACK_START],[`]`,`]`,x.DBRACK_END],[`(`,`(`,x.DPAREN_START],[`)`,`)`,x.DPAREN_END],[`&`,`&`,x.AND_AND],[`|`,`|`,x.OR_OR],[`;`,`;`,x.DSEMI],[`;`,`&`,x.SEMI_AND],[`|`,`&`,x.PIPE_AMP],[`>`,`>`,x.DGREAT],[`<`,`&`,x.LESSAND],[`>`,`&`,x.GREATAND],[`<`,`>`,x.LESSGREAT],[`>`,`|`,x.CLOBBER],[`&`,`>`,x.AND_GREAT]],xe=new Map([[`|`,x.PIPE],[`&`,x.AMP],[`;`,x.SEMICOLON],[`(`,x.LPAREN],[`)`,x.RPAREN],[`<`,x.LESS],[`>`,x.GREAT]]);function Se(e){return/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e)}function Ce(e){return e===` `||e===` `||e===`
@@ -72,4 +72,4 @@ Gid: ${i} ${i} ${i} ${i}
72
72
  `};if(r||e.state.options.noglob)return{target:i};let s=await pi(e,t);if(!H(s,e.state.shoptOptions.extglob))return{target:i};let c=new Pt(e.fs,e.state.cwd,e.state.env,{globstar:e.state.shoptOptions.globstar,nullglob:e.state.shoptOptions.nullglob,failglob:e.state.shoptOptions.failglob,dotglob:e.state.shoptOptions.dotglob,extglob:e.state.shoptOptions.extglob,globskipdots:e.state.shoptOptions.globskipdots,maxGlobOperations:e.limits.maxGlobOperations}),l=await c.expand(s);return l.length===0?c.hasFailglob()?{error:`bash: no match: ${i}
73
73
  `}:{target:i}:l.length===1?{target:l[0]}:{error:`bash: ${i}: ambiguous redirect
74
74
  `}}async function Ci(e,t){let n=t.parts,r=n.length;if(r===1){let t=await $(e,n[0]);return Z(t,e.limits.maxStringLength,`word expansion`),t}let i=[];for(let t=0;t<r;t++)i.push(await $(e,n[t]));let a=i.join(``);return Z(a,e.limits.maxStringLength,`word expansion`),a}async function $(e,t,n=!1){if(t.type===`ParameterExpansion`)return wi(e,t,n);let r=li(e,t,n);if(r!==null)return r;switch(t.type){case`DoubleQuoted`:{let n=[];for(let r of t.parts)n.push(await $(e,r,!0));return n.join(``)}case`CommandSubstitution`:{let n=En(t.body);if(n)try{let t=await ui(e,n.target),r=t.startsWith(`/`)?t:`${e.state.cwd}/${t}`,i=await e.fs.readFile(r);e.state.lastExitCode=0,e.state.env.set(`?`,`0`);let a=i.replace(/\n+$/,``);return Z(a,e.limits.maxStringLength,`command substitution`),a}catch(t){if(t instanceof a)throw t;return e.state.lastExitCode=1,e.state.env.set(`?`,`1`),``}let r=e.substitutionDepth??0,i=e.limits.maxSubstitutionDepth;if(r>=i)throw new a(`Command substitution nesting limit exceeded (${i})`,`substitution_depth`);let s=e.substitutionDepth;e.substitutionDepth=r+1;let c=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let l=new Map(e.state.env),u=e.state.cwd,d=e.state.suppressVerbose;e.state.suppressVerbose=!0;try{let n=await e.executeScript(t.body),r=n.exitCode;e.state.env=l,e.state.cwd=u,e.state.suppressVerbose=d,e.state.lastExitCode=r,e.state.env.set(`?`,String(r)),n.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||``)+n.stderr),e.state.bashPid=c,e.substitutionDepth=s;let i=n.stdout.replace(/\n+$/,``);return Z(i,e.limits.maxStringLength,`command substitution`),i}catch(t){if(e.state.env=l,e.state.cwd=u,e.state.bashPid=c,e.substitutionDepth=s,e.state.suppressVerbose=d,t instanceof a)throw t;if(t instanceof o){e.state.lastExitCode=t.exitCode,e.state.env.set(`?`,String(t.exitCode)),t.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||``)+t.stderr);let n=t.stdout.replace(/\n+$/,``);return Z(n,e.limits.maxStringLength,`command substitution`),n}throw t}}case`ArithmeticExpansion`:{let n=t.expression.originalText;if(n&&/\$[a-zA-Z_][a-zA-Z0-9_]*(?![{[(])/.test(n)){let t=await xn(e,n),r=h(new D,t);return String(await O(e,r.expression,!0))}return String(await O(e,t.expression.expression,!0))}case`BraceExpansion`:{let n=[];for(let r of t.items)if(r.type===`Range`){let e=Tn(r.start,r.end,r.step,r.startStr,r.endStr);if(e.expanded)n.push(...e.expanded);else return e.literal}else n.push(await ui(e,r.word));return n.join(` `)}default:return``}}async function wi(e,t,n=!1){let{parameter:r}=t,{operation:i}=t,a=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(a){let[,t,n]=a;(e.state.associativeArrays?.has(t)||n.includes(`$(`)||n.includes("`")||n.includes("${"))&&(r=`${t}[${await Sn(e,n)}]`)}else if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)&&P(e,r)){let t=F(e,r);if(t&&t!==r){let n=t.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(n){let[,t,i]=n;(e.state.associativeArrays?.has(t)||i.includes(`$(`)||i.includes("`")||i.includes("${"))&&(r=`${t}[${await Sn(e,i)}]`)}}}let o=i&&(i.type===`DefaultValue`||i.type===`AssignDefault`||i.type===`UseAlternative`||i.type===`ErrorIfUnset`),c=await z(e,r,!o);if(!i)return c;let l=!await B(e,r),{isEmpty:u,effectiveValue:d}=nr(e,r,c,n),f={value:c,isUnset:l,isEmpty:u,effectiveValue:d,inDoubleQuotes:n};switch(i.type){case`DefaultValue`:return Un(e,i,f,Q);case`AssignDefault`:return Wn(e,r,i,f,Q);case`ErrorIfUnset`:return Gn(e,r,i,f,Q);case`UseAlternative`:return Kn(e,i,f,Q);case`PatternRemoval`:{let t=await qn(e,c,i,Q,$);return Z(t,e.limits.maxStringLength,`pattern removal`),t}case`PatternReplacement`:{let t=await Jn(e,c,i,Q,$);return Z(t,e.limits.maxStringLength,`pattern replacement`),t}case`Length`:return Yn(e,r,c);case`LengthSliceError`:throw new s(r);case`BadSubstitution`:throw new s(i.text);case`Substring`:return Xn(e,r,c,i);case`CaseModification`:{let t=await Zn(e,c,i,Q,wi);return Z(t,e.limits.maxStringLength,`case modification`),t}case`Transform`:return Qn(e,r,c,l,i);case`Indirection`:return $n(e,r,c,l,i,wi,n);case`ArrayKeys`:return er(e,i);case`VarNamePrefix`:return tr(e,i);default:return c}}export{Qt as A,zn as B,Yt as C,Bn as D,On as E,S as F,yn as H,mn as I,vn as L,Vn as M,Xt as N,Et as O,Rn as P,z as R,U as S,fi as T,Jt as V,fn as _,_n as a,P as b,h as c,L as d,ui as f,A as g,di as h,nn as i,F as j,Hn as k,Si as l,I as m,hn as n,xi as o,O as p,Zt as r,C as s,ci as t,en as u,D as v,R as w,ln as x,pn as y,yi as z};
75
- //# sourceMappingURL=chunk-FEIOJCZD-C25Und0M.mjs.map
75
+ //# sourceMappingURL=chunk-FEIOJCZD-DmvuPNqm.mjs.map
@@ -5,4 +5,4 @@ var e=class extends Error{stdout;stderr;constructor(e,t=``,n=``){super(e),this.s
5
5
  `}},u=class extends e{name=`BraceExpansionError`;constructor(e,t=``,n=``){super(e,t,n),this.stderr=n||`bash: ${e}
6
6
  `}},d=class extends e{limitType;name=`ExecutionLimitError`;static EXIT_CODE=126;constructor(e,t,n=``,r=``){super(e,n,r),this.limitType=t,this.stderr=r||`bash: ${e}
7
7
  `}},f=class extends e{name=`ExecutionAbortedError`;constructor(e=``,t=``){super(`execution aborted`,e,t)}},p=class extends e{name=`SubshellExitError`;constructor(e=``,t=``){super(`subshell exit`,e,t)}};function m(e){return e instanceof t||e instanceof n||e instanceof r}var h=class extends e{exitCode;name=`PosixFatalError`;constructor(e,t=``,n=``){super(`posix fatal error`,t,n),this.exitCode=e}};export{t as a,l as c,u as d,s as f,a as h,d as i,r as l,m,h as n,o,i as p,n as r,p as s,f as t,c as u};
8
- //# sourceMappingURL=chunk-GFQRA5P5-DnjwTqP3.mjs.map
8
+ //# sourceMappingURL=chunk-GFQRA5P5-ePq2jelx.mjs.map
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{r as n,t as r}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as i}from"./chunk-3ZUFRYJ4-C93H8j0V.mjs";var a={name:`sleep`,summary:`delay for a specified amount of time`,usage:`sleep NUMBER[SUFFIX]`,description:`Pause for NUMBER seconds. SUFFIX may be:
1
+ import{n as e,t}from"./chunk-A5O5YHGN-C6ngIqYR.mjs";import{r as n,t as r}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as i}from"./chunk-3ZUFRYJ4-C93H8j0V.mjs";var a={name:`sleep`,summary:`delay for a specified amount of time`,usage:`sleep NUMBER[SUFFIX]`,description:`Pause for NUMBER seconds. SUFFIX may be:
2
2
  s - seconds (default)
3
3
  m - minutes
4
4
  h - hours
@@ -7,4 +7,4 @@ import{n as e,t}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{r as n,t as r}from"./
7
7
  NUMBER may be a decimal number.`,options:[` --help display this help and exit`]},o=36e5,s={name:`sleep`,async execute(s,c){if(r(s))return n(a);if(s.length===0)return{stdout:``,stderr:`sleep: missing operand
8
8
  `,exitCode:1};let l=0;for(let e of s){let t=i(e);if(t===null)return{stdout:``,stderr:`sleep: invalid time interval '${e}'
9
9
  `,exitCode:1};l+=t}return l>o&&(l=o),c.signal?.aborted||(c.sleep?await c.sleep(l):c.signal?await new Promise(n=>{let r=()=>{e(i),n()},i=t(()=>{c.signal?.removeEventListener(`abort`,r),n()},l);c.signal?.addEventListener(`abort`,r,{once:!0})}):await new Promise(e=>t(e,l))),{stdout:``,stderr:``,exitCode:0}}},c={name:`sleep`,flags:[],needsArgs:!0};export{s as n,c as t};
10
- //# sourceMappingURL=chunk-GOV5EKKI-i-yw_7Ty.mjs.map
10
+ //# sourceMappingURL=chunk-GOV5EKKI-CyL1eJ32.mjs.map
@@ -1,4 +1,4 @@
1
- import{i as e,o as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{t as r}from"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as i,t as a}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{n as o}from"./chunk-24IMIIXA-B6yIPkk2.mjs";import{n as s,t as c}from"./chunk-3THT3N7L-DztAF386.mjs";import{r as l,t as u}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{existsSync as d}from"node:fs";import{dirname as f,join as p}from"node:path";import{fileURLToPath as m}from"node:url";import{randomBytes as h}from"node:crypto";import{Worker as g}from"node:worker_threads";var _=t(n(((t,n)=>{var r=void 0,i=function(t){return r||(r=new Promise(function(r,i){var a=t===void 0?{}:t,o=a.onAbort;a.onAbort=function(e){i(Error(e)),o&&o(e)},a.postRun=a.postRun||[],a.postRun.push(function(){r(a)}),n=void 0;var s;s||=a===void 0?{}:a;var c=!!globalThis.window,l=!!globalThis.WorkerGlobalScope,u=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;s.onRuntimeInitialized=function(){function e(e,t){switch(typeof t){case`boolean`:fe(e,t?1:0);break;case`number`:ue(e,t);break;case`string`:j(e,t,-1,-1);break;case`object`:if(t===null)de(e);else if(t.length!=null){var n=Mt(t.length);C.set(t,n),M(e,n,t.length,-1),Nt(n)}else P(e,`Wrong API use : tried to return a value of an unknown type (`+t+`).`,-1);break;default:de(e)}}function t(e,t){for(var n=[],r=0;r<e;r+=1){var i=N(t+4*r,`i32`),a=ae(i);if(a===1||a===2)i=le(i);else if(a===3)i=se(i);else if(a===4){a=i,i=oe(a),a=ce(a);for(var o=new Uint8Array(i),s=0;s<i;s+=1)o[s]=C[a+s];i=o}else i=null;n.push(i)}return n}function n(e,t){this.Qa=e,this.db=t,this.Oa=1,this.mb=[]}function r(e,t){if(this.db=t,this.fb=Et(e),this.fb===null)throw Error(`Unable to allocate memory for the SQL string`);this.lb=this.fb,this.$a=this.sb=null}function i(e){if(this.filename=`dbfile_`+(4294967295*Math.random()>>>0),e!=null){var t=this.filename,n=`/`,r=t;if(n&&(n=typeof n==`string`?n:Re(n),r=t?ge(n+`/`+t):n),t=ke(!0,!0),r=Qe(r,t),e){if(typeof e==`string`){n=Array(e.length);for(var i=0,o=e.length;i<o;++i)n[i]=e.charCodeAt(i);e=n}at(r,t|146),n=st(r,577),dt(n,e,0,e.length,0),ct(n),at(r,t)}}this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),this.gb={},this.Sa={}}var a=Q(4),o=s.cwrap,c=o(`sqlite3_open`,`number`,[`string`,`number`]),l=o(`sqlite3_close_v2`,`number`,[`number`]),u=o(`sqlite3_exec`,`number`,[`number`,`string`,`number`,`number`,`number`]),d=o(`sqlite3_changes`,`number`,[`number`]),f=o(`sqlite3_prepare_v2`,`number`,[`number`,`string`,`number`,`number`,`number`]),p=o(`sqlite3_sql`,`string`,[`number`]),m=o(`sqlite3_normalized_sql`,`string`,[`number`]),h=o(`sqlite3_prepare_v2`,`number`,[`number`,`number`,`number`,`number`,`number`]),g=o(`sqlite3_bind_text`,`number`,[`number`,`number`,`number`,`number`,`number`]),_=o(`sqlite3_bind_blob`,`number`,[`number`,`number`,`number`,`number`,`number`]),ee=o(`sqlite3_bind_double`,`number`,[`number`,`number`,`number`]),v=o(`sqlite3_bind_int`,`number`,[`number`,`number`,`number`]),y=o(`sqlite3_bind_parameter_index`,`number`,[`number`,`string`]),b=o(`sqlite3_step`,`number`,[`number`]),x=o(`sqlite3_errmsg`,`string`,[`number`]),S=o(`sqlite3_column_count`,`number`,[`number`]),w=o(`sqlite3_data_count`,`number`,[`number`]),T=o(`sqlite3_column_double`,`number`,[`number`,`number`]),E=o(`sqlite3_column_text`,`string`,[`number`,`number`]),D=o(`sqlite3_column_blob`,`number`,[`number`,`number`]),te=o(`sqlite3_column_bytes`,`number`,[`number`,`number`]),ne=o(`sqlite3_column_type`,`number`,[`number`,`number`]),O=o(`sqlite3_column_name`,`string`,[`number`,`number`]),re=o(`sqlite3_reset`,`number`,[`number`]),k=o(`sqlite3_clear_bindings`,`number`,[`number`]),A=o(`sqlite3_finalize`,`number`,[`number`]),ie=o(`sqlite3_create_function_v2`,`number`,`number string number number number number number number number`.split(` `)),ae=o(`sqlite3_value_type`,`number`,[`number`]),oe=o(`sqlite3_value_bytes`,`number`,[`number`]),se=o(`sqlite3_value_text`,`string`,[`number`]),ce=o(`sqlite3_value_blob`,`number`,[`number`]),le=o(`sqlite3_value_double`,`number`,[`number`]),ue=o(`sqlite3_result_double`,``,[`number`,`number`]),de=o(`sqlite3_result_null`,``,[`number`]),j=o(`sqlite3_result_text`,``,[`number`,`string`,`number`,`number`]),M=o(`sqlite3_result_blob`,``,[`number`,`number`,`number`,`number`]),fe=o(`sqlite3_result_int`,``,[`number`,`number`]),P=o(`sqlite3_result_error`,``,[`number`,`string`,`number`]),me=o(`sqlite3_aggregate_context`,`number`,[`number`,`number`]),he=o(`RegisterExtensionFunctions`,`number`,[`number`]),_e=o(`sqlite3_update_hook`,`number`,[`number`,`number`,`number`]);n.prototype.bind=function(e){if(!this.Qa)throw`Statement closed`;return this.reset(),Array.isArray(e)?this.Gb(e):typeof e==`object`&&e?this.Hb(e):!0},n.prototype.step=function(){if(!this.Qa)throw`Statement closed`;this.Oa=1;var e=b(this.Qa);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},n.prototype.Ab=function(e){return e??(e=this.Oa,this.Oa+=1),T(this.Qa,e)},n.prototype.Ob=function(e){if(e??(e=this.Oa,this.Oa+=1),e=E(this.Qa,e),typeof BigInt!=`function`)throw Error(`BigInt is not supported`);return BigInt(e)},n.prototype.Tb=function(e){return e??(e=this.Oa,this.Oa+=1),E(this.Qa,e)},n.prototype.getBlob=function(e){e??(e=this.Oa,this.Oa+=1);var t=te(this.Qa,e);e=D(this.Qa,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=C[e+r];return n},n.prototype.get=function(e,t){t||={},e!=null&&this.bind(e)&&this.step(),e=[];for(var n=w(this.Qa),r=0;r<n;r+=1)switch(ne(this.Qa,r)){case 1:var i=t.useBigInt?this.Ob(r):this.Ab(r);e.push(i);break;case 2:e.push(this.Ab(r));break;case 3:e.push(this.Tb(r));break;case 4:e.push(this.getBlob(r));break;default:e.push(null)}return e},n.prototype.qb=function(){for(var e=[],t=S(this.Qa),n=0;n<t;n+=1)e.push(O(this.Qa,n));return e},n.prototype.zb=function(e,t){e=this.get(e,t),t=this.qb();for(var n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},n.prototype.Sb=function(){return p(this.Qa)},n.prototype.Pb=function(){return m(this.Qa)},n.prototype.run=function(e){return e!=null&&this.bind(e),this.step(),this.reset()},n.prototype.wb=function(e,t){t??(t=this.Oa,this.Oa+=1),e=Et(e),this.mb.push(e),this.db.handleError(g(this.Qa,t,e,-1,0))},n.prototype.Fb=function(e,t){t??(t=this.Oa,this.Oa+=1);var n=Mt(e.length);C.set(e,n),this.mb.push(n),this.db.handleError(_(this.Qa,t,n,e.length,0))},n.prototype.vb=function(e,t){t??(t=this.Oa,this.Oa+=1),this.db.handleError((e===(e|0)?v:ee)(this.Qa,t,e))},n.prototype.Ib=function(e){e??(e=this.Oa,this.Oa+=1),_(this.Qa,e,0,0,0)},n.prototype.xb=function(e,t){switch(t??(t=this.Oa,this.Oa+=1),typeof e){case`string`:this.wb(e,t);return;case`number`:this.vb(e,t);return;case`bigint`:this.wb(e.toString(),t);return;case`boolean`:this.vb(e+0,t);return;case`object`:if(e===null){this.Ib(t);return}if(e.length!=null){this.Fb(e,t);return}}throw`Wrong API use : tried to bind a value of an unknown type (`+e+`).`},n.prototype.Hb=function(e){var t=this;return Object.keys(e).forEach(function(n){var r=y(t.Qa,n);r!==0&&t.xb(e[n],r)}),!0},n.prototype.Gb=function(e){for(var t=0;t<e.length;t+=1)this.xb(e[t],t+1);return!0},n.prototype.reset=function(){return this.freemem(),k(this.Qa)===0&&re(this.Qa)===0},n.prototype.freemem=function(){for(var e;(e=this.mb.pop())!==void 0;)Nt(e)},n.prototype.Ya=function(){this.freemem();var e=A(this.Qa)===0;return delete this.db.gb[this.Qa],this.Qa=0,e},r.prototype.next=function(){if(this.fb===null)return{done:!0};if(this.$a!==null&&(this.$a.Ya(),this.$a=null),!this.db.db)throw this.ob(),Error(`Database closed`);var e=Lt(),t=Q(4);pe(a),pe(t);try{this.db.handleError(h(this.db.db,this.lb,-1,a,t)),this.lb=N(t,`i32`);var r=N(a,`i32`);return r===0?(this.ob(),{done:!0}):(this.$a=new n(r,this.db),this.db.gb[r]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.sb=F(this.lb),this.ob(),e}finally{It(e)}},r.prototype.ob=function(){Nt(this.fb),this.fb=null},r.prototype.Qb=function(){return this.sb===null?F(this.lb):this.sb},typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`&&(r.prototype[Symbol.iterator]=function(){return this}),i.prototype.run=function(e,t){if(!this.db)throw`Database closed`;if(t){e=this.tb(e,t);try{e.step()}finally{e.Ya()}}else this.handleError(u(this.db,e,0,0,a));return this},i.prototype.exec=function(e,t,r){if(!this.db)throw`Database closed`;var i=null,o=null,s=null;try{s=o=Et(e);var c=Q(4);for(e=[];N(s,`i8`)!==0;){pe(a),pe(c),this.handleError(h(this.db,s,-1,a,c));var l=N(a,`i32`);if(s=N(c,`i32`),l!==0){var u=null;for(i=new n(l,this),t!=null&&i.bind(t);i.step();)u===null&&(u={columns:i.qb(),values:[]},e.push(u)),u.values.push(i.get(null,r));i.Ya()}}return e}catch(e){throw i&&i.Ya(),e}finally{o&&Nt(o)}},i.prototype.Mb=function(e,t,n,r,i){typeof t==`function`&&(r=n,n=t,t=void 0),e=this.tb(e,t);try{for(;e.step();)n(e.zb(null,i))}finally{e.Ya()}if(typeof r==`function`)return r()},i.prototype.tb=function(e,t){if(pe(a),this.handleError(f(this.db,e,-1,a,0)),e=N(a,`i32`),e===0)throw`Nothing to prepare`;var r=new n(e,this);return t!=null&&r.bind(t),this.gb[e]=r},i.prototype.Ub=function(e){return new r(e,this)},i.prototype.Nb=function(){Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.handleError(l(this.db));var e=ft(this.filename);return this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),e},i.prototype.close=function(){this.db!==null&&(Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.Za&&=(Z(this.Za),void 0),this.handleError(l(this.db)),nt(`/`+this.filename),this.db=null)},i.prototype.handleError=function(e){if(e===0)return null;throw e=x(this.db),Error(e)},i.prototype.Rb=function(){return d(this.db)},i.prototype.Kb=function(n,r){Object.prototype.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]);var i=jt(function(n,i,a){i=t(i,a);try{var o=r.apply(null,i)}catch(e){P(n,e,-1);return}e(n,o)},`viii`);return this.Sa[n]=i,this.handleError(ie(this.db,n,r.length,1,0,i,0,0,0)),this},i.prototype.Jb=function(n,r){var i=r.init||function(){return null},a=r.finalize||function(e){return e},o=r.step;if(!o)throw`An aggregate function must have a step function in `+n;var s={};Object.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]),r=n+`__finalize`,Object.hasOwnProperty.call(this.Sa,r)&&(Z(this.Sa[r]),delete this.Sa[r]);var c=jt(function(e,n,r){var a=me(e,1);Object.hasOwnProperty.call(s,a)||(s[a]=i()),n=t(n,r),n=[s[a]].concat(n);try{s[a]=o.apply(null,n)}catch(t){delete s[a],P(e,t,-1)}},`viii`),l=jt(function(t){var n=me(t,1);try{var r=a(s[n])}catch(e){delete s[n],P(t,e,-1);return}e(t,r),delete s[n]},`vi`);return this.Sa[n]=c,this.Sa[r]=l,this.handleError(ie(this.db,n,o.length-1,1,0,0,c,l,0)),this},i.prototype.Zb=function(e){return this.Za&&=(_e(this.db,0,0),Z(this.Za),void 0),e?(this.Za=jt(function(t,n,r,i,a){switch(n){case 18:t=`insert`;break;case 23:t=`update`;break;case 9:t=`delete`;break;default:throw`unknown operationCode in updateHook callback: `+n}if(r=F(r),i=F(i),a>2**53-1)throw`rowId too big to fit inside a Number`;e(t,r,i,Number(a))},`viiiij`),_e(this.db,this.Za,0),this):this},n.prototype.bind=n.prototype.bind,n.prototype.step=n.prototype.step,n.prototype.get=n.prototype.get,n.prototype.getColumnNames=n.prototype.qb,n.prototype.getAsObject=n.prototype.zb,n.prototype.getSQL=n.prototype.Sb,n.prototype.getNormalizedSQL=n.prototype.Pb,n.prototype.run=n.prototype.run,n.prototype.reset=n.prototype.reset,n.prototype.freemem=n.prototype.freemem,n.prototype.free=n.prototype.Ya,r.prototype.next=r.prototype.next,r.prototype.getRemainingSQL=r.prototype.Qb,i.prototype.run=i.prototype.run,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.Mb,i.prototype.prepare=i.prototype.tb,i.prototype.iterateStatements=i.prototype.Ub,i.prototype.export=i.prototype.Nb,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.Rb,i.prototype.create_function=i.prototype.Kb,i.prototype.create_aggregate=i.prototype.Jb,i.prototype.updateHook=i.prototype.Zb,s.Database=i};var d=`./this.program`,f=(e,t)=>{throw t},p=globalThis.document?.currentScript?.src;typeof __filename<`u`?p=__filename:l&&(p=self.location.href);var m=``,h,g;if(u){var _=e(`node:fs`);m=__dirname+`/`,g=e=>(e=S(e)?new URL(e):e,_.readFileSync(e)),h=async e=>(e=S(e)?new URL(e):e,_.readFileSync(e,void 0)),1<process.argv.length&&(d=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),n!==void 0&&(n.exports=s),f=(e,t)=>{throw process.exitCode=e,t}}else if(c||l){try{m=new URL(`.`,p).href}catch{}l&&(g=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),h=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var ee=console.log.bind(console),v=console.error.bind(console),y,b=!1,x,S=e=>e.startsWith(`file://`),C,w,T,E,D,te,ne,O;function re(){var e=Rt.buffer;C=new Int8Array(e),T=new Int16Array(e),w=new Uint8Array(e),new Uint16Array(e),E=new Int32Array(e),D=new Uint32Array(e),te=new Float32Array(e),ne=new Float64Array(e),O=new BigInt64Array(e),new BigUint64Array(e)}function k(e){throw s.onAbort?.(e),e=`Aborted(`+e+`)`,v(e),b=!0,new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`)}var A;async function ie(e){if(!y)try{var t=await h(e);return new Uint8Array(t)}catch{}if(e==A&&y)e=new Uint8Array(y);else if(g)e=g(e);else throw`both async and sync fetching of the wasm failed`;return e}async function ae(e,t){try{var n=await ie(e);return await WebAssembly.instantiate(n,t)}catch(e){v(`failed to asynchronously prepare wasm: ${e}`),k(e)}}async function oe(e){var t=A;if(!y&&!S(t)&&!u)try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){v(`wasm streaming compile failed: ${e}`),v(`falling back to ArrayBuffer instantiation`)}return ae(t,e)}class se{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var ce=e=>{for(;0<e.length;)e.shift()(s)},le=[],ue=[],de=()=>{var e=s.preRun.shift();ue.push(e)},j=0,M=null;function N(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return C[e];case`i8`:return C[e];case`i16`:return T[e>>1];case`i32`:return E[e>>2];case`i64`:return O[e>>3];case`float`:return te[e>>2];case`double`:return ne[e>>3];case`*`:return D[e>>2];default:k(`invalid type for getValue: ${t}`)}}var fe=!0;function pe(e){var t=`i32`;switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:C[e]=0;break;case`i8`:C[e]=0;break;case`i16`:T[e>>1]=0;break;case`i32`:E[e>>2]=0;break;case`i64`:O[e>>3]=BigInt(0);break;case`float`:te[e>>2]=0;break;case`double`:ne[e>>3]=0;break;case`*`:D[e>>2]=0;break;default:k(`invalid type for setValue: ${t}`)}}var P=new TextDecoder,me=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},F=(e,t,n)=>e?P.decode(w.subarray(e,me(w,e,t,n))):``,he=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},ge=e=>{var t=e.charAt(0)===`/`,n=e.slice(-1)===`/`;return(e=he(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},_e=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.slice(0,-1),e+t)},ve=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],ye=()=>{if(u){var t=e(`node:crypto`);return e=>t.randomFillSync(e)}return e=>crypto.getRandomValues(e)},be=e=>{(be=ye())(e)},xe=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=he(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},Se=e=>{var t=me(e,0);return P.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},Ce=[],I=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},L=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.codePointAt(a);if(127>=o){if(n>=r)break;t[n++]=o}else if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63,a++}}return t[n]=0,n-i},we=[];function Te(e,t){we[e]={input:[],output:[],eb:t},Ye(e,Ee)}var Ee={open(e){var t=we[e.node.rdev];if(!t)throw new B(43);e.tty=t,e.seekable=!1},close(e){e.tty.eb.fsync(e.tty)},fsync(e){e.tty.eb.fsync(e.tty)},read(e,t,n,r){if(!e.tty||!e.tty.eb.Bb)throw new B(60);for(var i=0,a=0;a<r;a++){try{var o=e.tty.eb.Bb(e.tty)}catch{throw new B(29)}if(o===void 0&&i===0)throw new B(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.atime=Date.now()),i},write(e,t,n,r){if(!e.tty||!e.tty.eb.ub)throw new B(60);try{for(var i=0;i<r;i++)e.tty.eb.ub(e.tty,t[n+i])}catch{throw new B(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),i}},De={Bb(){a:{if(!Ce.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=_.readSync(r,t,0,256)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}0<n&&(e=t.slice(0,n).toString(`utf-8`))}else globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
1
+ import{i as e,o as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{t as r}from"./chunk-5QMZ5MUS-BfIuRNkK.mjs";import{n as i,t as a}from"./chunk-A5O5YHGN-C6ngIqYR.mjs";import{n as o}from"./chunk-24IMIIXA-C-Zyd2K_.mjs";import{n as s,t as c}from"./chunk-3THT3N7L-Ce6LrnIA.mjs";import{r as l,t as u}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{existsSync as d}from"node:fs";import{dirname as f,join as p}from"node:path";import{fileURLToPath as m}from"node:url";import{randomBytes as h}from"node:crypto";import{Worker as g}from"node:worker_threads";var _=t(n(((t,n)=>{var r=void 0,i=function(t){return r||(r=new Promise(function(r,i){var a=t===void 0?{}:t,o=a.onAbort;a.onAbort=function(e){i(Error(e)),o&&o(e)},a.postRun=a.postRun||[],a.postRun.push(function(){r(a)}),n=void 0;var s;s||=a===void 0?{}:a;var c=!!globalThis.window,l=!!globalThis.WorkerGlobalScope,u=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;s.onRuntimeInitialized=function(){function e(e,t){switch(typeof t){case`boolean`:fe(e,t?1:0);break;case`number`:ue(e,t);break;case`string`:j(e,t,-1,-1);break;case`object`:if(t===null)de(e);else if(t.length!=null){var n=Mt(t.length);C.set(t,n),M(e,n,t.length,-1),Nt(n)}else P(e,`Wrong API use : tried to return a value of an unknown type (`+t+`).`,-1);break;default:de(e)}}function t(e,t){for(var n=[],r=0;r<e;r+=1){var i=N(t+4*r,`i32`),a=ae(i);if(a===1||a===2)i=le(i);else if(a===3)i=se(i);else if(a===4){a=i,i=oe(a),a=ce(a);for(var o=new Uint8Array(i),s=0;s<i;s+=1)o[s]=C[a+s];i=o}else i=null;n.push(i)}return n}function n(e,t){this.Qa=e,this.db=t,this.Oa=1,this.mb=[]}function r(e,t){if(this.db=t,this.fb=Et(e),this.fb===null)throw Error(`Unable to allocate memory for the SQL string`);this.lb=this.fb,this.$a=this.sb=null}function i(e){if(this.filename=`dbfile_`+(4294967295*Math.random()>>>0),e!=null){var t=this.filename,n=`/`,r=t;if(n&&(n=typeof n==`string`?n:Re(n),r=t?ge(n+`/`+t):n),t=ke(!0,!0),r=Qe(r,t),e){if(typeof e==`string`){n=Array(e.length);for(var i=0,o=e.length;i<o;++i)n[i]=e.charCodeAt(i);e=n}at(r,t|146),n=st(r,577),dt(n,e,0,e.length,0),ct(n),at(r,t)}}this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),this.gb={},this.Sa={}}var a=Q(4),o=s.cwrap,c=o(`sqlite3_open`,`number`,[`string`,`number`]),l=o(`sqlite3_close_v2`,`number`,[`number`]),u=o(`sqlite3_exec`,`number`,[`number`,`string`,`number`,`number`,`number`]),d=o(`sqlite3_changes`,`number`,[`number`]),f=o(`sqlite3_prepare_v2`,`number`,[`number`,`string`,`number`,`number`,`number`]),p=o(`sqlite3_sql`,`string`,[`number`]),m=o(`sqlite3_normalized_sql`,`string`,[`number`]),h=o(`sqlite3_prepare_v2`,`number`,[`number`,`number`,`number`,`number`,`number`]),g=o(`sqlite3_bind_text`,`number`,[`number`,`number`,`number`,`number`,`number`]),_=o(`sqlite3_bind_blob`,`number`,[`number`,`number`,`number`,`number`,`number`]),ee=o(`sqlite3_bind_double`,`number`,[`number`,`number`,`number`]),v=o(`sqlite3_bind_int`,`number`,[`number`,`number`,`number`]),y=o(`sqlite3_bind_parameter_index`,`number`,[`number`,`string`]),b=o(`sqlite3_step`,`number`,[`number`]),x=o(`sqlite3_errmsg`,`string`,[`number`]),S=o(`sqlite3_column_count`,`number`,[`number`]),w=o(`sqlite3_data_count`,`number`,[`number`]),T=o(`sqlite3_column_double`,`number`,[`number`,`number`]),E=o(`sqlite3_column_text`,`string`,[`number`,`number`]),D=o(`sqlite3_column_blob`,`number`,[`number`,`number`]),te=o(`sqlite3_column_bytes`,`number`,[`number`,`number`]),ne=o(`sqlite3_column_type`,`number`,[`number`,`number`]),O=o(`sqlite3_column_name`,`string`,[`number`,`number`]),re=o(`sqlite3_reset`,`number`,[`number`]),k=o(`sqlite3_clear_bindings`,`number`,[`number`]),A=o(`sqlite3_finalize`,`number`,[`number`]),ie=o(`sqlite3_create_function_v2`,`number`,`number string number number number number number number number`.split(` `)),ae=o(`sqlite3_value_type`,`number`,[`number`]),oe=o(`sqlite3_value_bytes`,`number`,[`number`]),se=o(`sqlite3_value_text`,`string`,[`number`]),ce=o(`sqlite3_value_blob`,`number`,[`number`]),le=o(`sqlite3_value_double`,`number`,[`number`]),ue=o(`sqlite3_result_double`,``,[`number`,`number`]),de=o(`sqlite3_result_null`,``,[`number`]),j=o(`sqlite3_result_text`,``,[`number`,`string`,`number`,`number`]),M=o(`sqlite3_result_blob`,``,[`number`,`number`,`number`,`number`]),fe=o(`sqlite3_result_int`,``,[`number`,`number`]),P=o(`sqlite3_result_error`,``,[`number`,`string`,`number`]),me=o(`sqlite3_aggregate_context`,`number`,[`number`,`number`]),he=o(`RegisterExtensionFunctions`,`number`,[`number`]),_e=o(`sqlite3_update_hook`,`number`,[`number`,`number`,`number`]);n.prototype.bind=function(e){if(!this.Qa)throw`Statement closed`;return this.reset(),Array.isArray(e)?this.Gb(e):typeof e==`object`&&e?this.Hb(e):!0},n.prototype.step=function(){if(!this.Qa)throw`Statement closed`;this.Oa=1;var e=b(this.Qa);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},n.prototype.Ab=function(e){return e??(e=this.Oa,this.Oa+=1),T(this.Qa,e)},n.prototype.Ob=function(e){if(e??(e=this.Oa,this.Oa+=1),e=E(this.Qa,e),typeof BigInt!=`function`)throw Error(`BigInt is not supported`);return BigInt(e)},n.prototype.Tb=function(e){return e??(e=this.Oa,this.Oa+=1),E(this.Qa,e)},n.prototype.getBlob=function(e){e??(e=this.Oa,this.Oa+=1);var t=te(this.Qa,e);e=D(this.Qa,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=C[e+r];return n},n.prototype.get=function(e,t){t||={},e!=null&&this.bind(e)&&this.step(),e=[];for(var n=w(this.Qa),r=0;r<n;r+=1)switch(ne(this.Qa,r)){case 1:var i=t.useBigInt?this.Ob(r):this.Ab(r);e.push(i);break;case 2:e.push(this.Ab(r));break;case 3:e.push(this.Tb(r));break;case 4:e.push(this.getBlob(r));break;default:e.push(null)}return e},n.prototype.qb=function(){for(var e=[],t=S(this.Qa),n=0;n<t;n+=1)e.push(O(this.Qa,n));return e},n.prototype.zb=function(e,t){e=this.get(e,t),t=this.qb();for(var n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},n.prototype.Sb=function(){return p(this.Qa)},n.prototype.Pb=function(){return m(this.Qa)},n.prototype.run=function(e){return e!=null&&this.bind(e),this.step(),this.reset()},n.prototype.wb=function(e,t){t??(t=this.Oa,this.Oa+=1),e=Et(e),this.mb.push(e),this.db.handleError(g(this.Qa,t,e,-1,0))},n.prototype.Fb=function(e,t){t??(t=this.Oa,this.Oa+=1);var n=Mt(e.length);C.set(e,n),this.mb.push(n),this.db.handleError(_(this.Qa,t,n,e.length,0))},n.prototype.vb=function(e,t){t??(t=this.Oa,this.Oa+=1),this.db.handleError((e===(e|0)?v:ee)(this.Qa,t,e))},n.prototype.Ib=function(e){e??(e=this.Oa,this.Oa+=1),_(this.Qa,e,0,0,0)},n.prototype.xb=function(e,t){switch(t??(t=this.Oa,this.Oa+=1),typeof e){case`string`:this.wb(e,t);return;case`number`:this.vb(e,t);return;case`bigint`:this.wb(e.toString(),t);return;case`boolean`:this.vb(e+0,t);return;case`object`:if(e===null){this.Ib(t);return}if(e.length!=null){this.Fb(e,t);return}}throw`Wrong API use : tried to bind a value of an unknown type (`+e+`).`},n.prototype.Hb=function(e){var t=this;return Object.keys(e).forEach(function(n){var r=y(t.Qa,n);r!==0&&t.xb(e[n],r)}),!0},n.prototype.Gb=function(e){for(var t=0;t<e.length;t+=1)this.xb(e[t],t+1);return!0},n.prototype.reset=function(){return this.freemem(),k(this.Qa)===0&&re(this.Qa)===0},n.prototype.freemem=function(){for(var e;(e=this.mb.pop())!==void 0;)Nt(e)},n.prototype.Ya=function(){this.freemem();var e=A(this.Qa)===0;return delete this.db.gb[this.Qa],this.Qa=0,e},r.prototype.next=function(){if(this.fb===null)return{done:!0};if(this.$a!==null&&(this.$a.Ya(),this.$a=null),!this.db.db)throw this.ob(),Error(`Database closed`);var e=Lt(),t=Q(4);pe(a),pe(t);try{this.db.handleError(h(this.db.db,this.lb,-1,a,t)),this.lb=N(t,`i32`);var r=N(a,`i32`);return r===0?(this.ob(),{done:!0}):(this.$a=new n(r,this.db),this.db.gb[r]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.sb=F(this.lb),this.ob(),e}finally{It(e)}},r.prototype.ob=function(){Nt(this.fb),this.fb=null},r.prototype.Qb=function(){return this.sb===null?F(this.lb):this.sb},typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`&&(r.prototype[Symbol.iterator]=function(){return this}),i.prototype.run=function(e,t){if(!this.db)throw`Database closed`;if(t){e=this.tb(e,t);try{e.step()}finally{e.Ya()}}else this.handleError(u(this.db,e,0,0,a));return this},i.prototype.exec=function(e,t,r){if(!this.db)throw`Database closed`;var i=null,o=null,s=null;try{s=o=Et(e);var c=Q(4);for(e=[];N(s,`i8`)!==0;){pe(a),pe(c),this.handleError(h(this.db,s,-1,a,c));var l=N(a,`i32`);if(s=N(c,`i32`),l!==0){var u=null;for(i=new n(l,this),t!=null&&i.bind(t);i.step();)u===null&&(u={columns:i.qb(),values:[]},e.push(u)),u.values.push(i.get(null,r));i.Ya()}}return e}catch(e){throw i&&i.Ya(),e}finally{o&&Nt(o)}},i.prototype.Mb=function(e,t,n,r,i){typeof t==`function`&&(r=n,n=t,t=void 0),e=this.tb(e,t);try{for(;e.step();)n(e.zb(null,i))}finally{e.Ya()}if(typeof r==`function`)return r()},i.prototype.tb=function(e,t){if(pe(a),this.handleError(f(this.db,e,-1,a,0)),e=N(a,`i32`),e===0)throw`Nothing to prepare`;var r=new n(e,this);return t!=null&&r.bind(t),this.gb[e]=r},i.prototype.Ub=function(e){return new r(e,this)},i.prototype.Nb=function(){Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.handleError(l(this.db));var e=ft(this.filename);return this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),e},i.prototype.close=function(){this.db!==null&&(Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.Za&&=(Z(this.Za),void 0),this.handleError(l(this.db)),nt(`/`+this.filename),this.db=null)},i.prototype.handleError=function(e){if(e===0)return null;throw e=x(this.db),Error(e)},i.prototype.Rb=function(){return d(this.db)},i.prototype.Kb=function(n,r){Object.prototype.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]);var i=jt(function(n,i,a){i=t(i,a);try{var o=r.apply(null,i)}catch(e){P(n,e,-1);return}e(n,o)},`viii`);return this.Sa[n]=i,this.handleError(ie(this.db,n,r.length,1,0,i,0,0,0)),this},i.prototype.Jb=function(n,r){var i=r.init||function(){return null},a=r.finalize||function(e){return e},o=r.step;if(!o)throw`An aggregate function must have a step function in `+n;var s={};Object.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]),r=n+`__finalize`,Object.hasOwnProperty.call(this.Sa,r)&&(Z(this.Sa[r]),delete this.Sa[r]);var c=jt(function(e,n,r){var a=me(e,1);Object.hasOwnProperty.call(s,a)||(s[a]=i()),n=t(n,r),n=[s[a]].concat(n);try{s[a]=o.apply(null,n)}catch(t){delete s[a],P(e,t,-1)}},`viii`),l=jt(function(t){var n=me(t,1);try{var r=a(s[n])}catch(e){delete s[n],P(t,e,-1);return}e(t,r),delete s[n]},`vi`);return this.Sa[n]=c,this.Sa[r]=l,this.handleError(ie(this.db,n,o.length-1,1,0,0,c,l,0)),this},i.prototype.Zb=function(e){return this.Za&&=(_e(this.db,0,0),Z(this.Za),void 0),e?(this.Za=jt(function(t,n,r,i,a){switch(n){case 18:t=`insert`;break;case 23:t=`update`;break;case 9:t=`delete`;break;default:throw`unknown operationCode in updateHook callback: `+n}if(r=F(r),i=F(i),a>2**53-1)throw`rowId too big to fit inside a Number`;e(t,r,i,Number(a))},`viiiij`),_e(this.db,this.Za,0),this):this},n.prototype.bind=n.prototype.bind,n.prototype.step=n.prototype.step,n.prototype.get=n.prototype.get,n.prototype.getColumnNames=n.prototype.qb,n.prototype.getAsObject=n.prototype.zb,n.prototype.getSQL=n.prototype.Sb,n.prototype.getNormalizedSQL=n.prototype.Pb,n.prototype.run=n.prototype.run,n.prototype.reset=n.prototype.reset,n.prototype.freemem=n.prototype.freemem,n.prototype.free=n.prototype.Ya,r.prototype.next=r.prototype.next,r.prototype.getRemainingSQL=r.prototype.Qb,i.prototype.run=i.prototype.run,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.Mb,i.prototype.prepare=i.prototype.tb,i.prototype.iterateStatements=i.prototype.Ub,i.prototype.export=i.prototype.Nb,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.Rb,i.prototype.create_function=i.prototype.Kb,i.prototype.create_aggregate=i.prototype.Jb,i.prototype.updateHook=i.prototype.Zb,s.Database=i};var d=`./this.program`,f=(e,t)=>{throw t},p=globalThis.document?.currentScript?.src;typeof __filename<`u`?p=__filename:l&&(p=self.location.href);var m=``,h,g;if(u){var _=e(`node:fs`);m=__dirname+`/`,g=e=>(e=S(e)?new URL(e):e,_.readFileSync(e)),h=async e=>(e=S(e)?new URL(e):e,_.readFileSync(e,void 0)),1<process.argv.length&&(d=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),n!==void 0&&(n.exports=s),f=(e,t)=>{throw process.exitCode=e,t}}else if(c||l){try{m=new URL(`.`,p).href}catch{}l&&(g=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),h=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var ee=console.log.bind(console),v=console.error.bind(console),y,b=!1,x,S=e=>e.startsWith(`file://`),C,w,T,E,D,te,ne,O;function re(){var e=Rt.buffer;C=new Int8Array(e),T=new Int16Array(e),w=new Uint8Array(e),new Uint16Array(e),E=new Int32Array(e),D=new Uint32Array(e),te=new Float32Array(e),ne=new Float64Array(e),O=new BigInt64Array(e),new BigUint64Array(e)}function k(e){throw s.onAbort?.(e),e=`Aborted(`+e+`)`,v(e),b=!0,new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`)}var A;async function ie(e){if(!y)try{var t=await h(e);return new Uint8Array(t)}catch{}if(e==A&&y)e=new Uint8Array(y);else if(g)e=g(e);else throw`both async and sync fetching of the wasm failed`;return e}async function ae(e,t){try{var n=await ie(e);return await WebAssembly.instantiate(n,t)}catch(e){v(`failed to asynchronously prepare wasm: ${e}`),k(e)}}async function oe(e){var t=A;if(!y&&!S(t)&&!u)try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){v(`wasm streaming compile failed: ${e}`),v(`falling back to ArrayBuffer instantiation`)}return ae(t,e)}class se{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var ce=e=>{for(;0<e.length;)e.shift()(s)},le=[],ue=[],de=()=>{var e=s.preRun.shift();ue.push(e)},j=0,M=null;function N(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return C[e];case`i8`:return C[e];case`i16`:return T[e>>1];case`i32`:return E[e>>2];case`i64`:return O[e>>3];case`float`:return te[e>>2];case`double`:return ne[e>>3];case`*`:return D[e>>2];default:k(`invalid type for getValue: ${t}`)}}var fe=!0;function pe(e){var t=`i32`;switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:C[e]=0;break;case`i8`:C[e]=0;break;case`i16`:T[e>>1]=0;break;case`i32`:E[e>>2]=0;break;case`i64`:O[e>>3]=BigInt(0);break;case`float`:te[e>>2]=0;break;case`double`:ne[e>>3]=0;break;case`*`:D[e>>2]=0;break;default:k(`invalid type for setValue: ${t}`)}}var P=new TextDecoder,me=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},F=(e,t,n)=>e?P.decode(w.subarray(e,me(w,e,t,n))):``,he=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},ge=e=>{var t=e.charAt(0)===`/`,n=e.slice(-1)===`/`;return(e=he(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},_e=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.slice(0,-1),e+t)},ve=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],ye=()=>{if(u){var t=e(`node:crypto`);return e=>t.randomFillSync(e)}return e=>crypto.getRandomValues(e)},be=e=>{(be=ye())(e)},xe=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=he(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},Se=e=>{var t=me(e,0);return P.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},Ce=[],I=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},L=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.codePointAt(a);if(127>=o){if(n>=r)break;t[n++]=o}else if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63,a++}}return t[n]=0,n-i},we=[];function Te(e,t){we[e]={input:[],output:[],eb:t},Ye(e,Ee)}var Ee={open(e){var t=we[e.node.rdev];if(!t)throw new B(43);e.tty=t,e.seekable=!1},close(e){e.tty.eb.fsync(e.tty)},fsync(e){e.tty.eb.fsync(e.tty)},read(e,t,n,r){if(!e.tty||!e.tty.eb.Bb)throw new B(60);for(var i=0,a=0;a<r;a++){try{var o=e.tty.eb.Bb(e.tty)}catch{throw new B(29)}if(o===void 0&&i===0)throw new B(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.atime=Date.now()),i},write(e,t,n,r){if(!e.tty||!e.tty.eb.ub)throw new B(60);try{for(var i=0;i<r;i++)e.tty.eb.ub(e.tty,t[n+i])}catch{throw new B(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),i}},De={Bb(){a:{if(!Ce.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=_.readSync(r,t,0,256)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}0<n&&(e=t.slice(0,n).toString(`utf-8`))}else globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
2
2
  `));if(!e){e=null;break a}t=Array(I(e)+1),e=L(e,t,0,t.length),t.length=e,Ce=t}e=Ce.shift()}return e},ub(e,t){t===null||t===10?(ee(Se(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){0<e.output?.length&&(ee(Se(e.output)),e.output=[])},hc(){return{bc:25856,dc:5,ac:191,cc:35387,$b:[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]}},ic(){return 0},jc(){return[24,80]}},Oe={ub(e,t){t===null||t===10?(v(Se(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){0<e.output?.length&&(v(Se(e.output)),e.output=[])}},R={Wa:null,Xa(){return R.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if((n&61440)==24576||(n&61440)==4096)throw new B(63);return R.Wa||={dir:{node:{Ta:R.La.Ta,Ua:R.La.Ua,lookup:R.La.lookup,ib:R.La.ib,rename:R.La.rename,unlink:R.La.unlink,rmdir:R.La.rmdir,readdir:R.La.readdir,symlink:R.La.symlink},stream:{Va:R.Ma.Va}},file:{node:{Ta:R.La.Ta,Ua:R.La.Ua},stream:{Va:R.Ma.Va,read:R.Ma.read,write:R.Ma.write,jb:R.Ma.jb,kb:R.Ma.kb}},link:{node:{Ta:R.La.Ta,Ua:R.La.Ua,readlink:R.La.readlink},stream:{}},yb:{node:{Ta:R.La.Ta,Ua:R.La.Ua},stream:Je}},n=Ve(e,t,n,r),U(n.mode)?(n.La=R.Wa.dir.node,n.Ma=R.Wa.dir.stream,n.Na={}):(n.mode&61440)==32768?(n.La=R.Wa.file.node,n.Ma=R.Wa.file.stream,n.Ra=0,n.Na=null):(n.mode&61440)==40960?(n.La=R.Wa.link.node,n.Ma=R.Wa.link.stream):(n.mode&61440)==8192&&(n.La=R.Wa.yb.node,n.Ma=R.Wa.yb.stream),n.atime=n.mtime=n.ctime=Date.now(),e&&(e.Na[t]=n,e.atime=e.mtime=e.ctime=n.atime),n},fc(e){return e.Na?e.Na.subarray?e.Na.subarray(0,e.Ra):new Uint8Array(e.Na):new Uint8Array},La:{Ta(e){var t={};return t.dev=(e.mode&61440)==8192?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,U(e.mode)?t.size=4096:(e.mode&61440)==32768?t.size=e.Ra:(e.mode&61440)==40960?t.size=e.link.length:t.size=0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},Ua(e,t){for(var n of[`mode`,`atime`,`mtime`,`ctime`])t[n]!=null&&(e[n]=t[n]);t.size!==void 0&&(t=t.size,e.Ra!=t&&(t==0?(e.Na=null,e.Ra=0):(n=e.Na,e.Na=new Uint8Array(t),n&&e.Na.set(n.subarray(0,Math.min(t,e.Ra))),e.Ra=t)))},lookup(){throw R.nb||(R.nb=new B(44),R.nb.stack=`<generic error, no stack>`),R.nb},ib(e,t,n,r){return R.createNode(e,t,n,r)},rename(e,t,n){try{var r=H(t,n)}catch{}if(r){if(U(e.mode))for(var i in r.Na)throw new B(55);Be(r)}delete e.parent.Na[e.name],t.Na[n]=e,e.name=n,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.Na[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){var n=H(e,t),r;for(r in n.Na)throw new B(55);delete e.Na[t],e.ctime=e.mtime=Date.now()},readdir(e){return[`.`,`..`,...Object.keys(e.Na)]},symlink(e,t,n){return e=R.createNode(e,t,41471,0),e.link=n,e},readlink(e){if((e.mode&61440)!=40960)throw new B(28);return e.link}},Ma:{read(e,t,n,r,i){var a=e.node.Na;if(i>=e.node.Ra)return 0;if(e=Math.min(e.node.Ra-i,r),8<e&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===C.buffer&&(a=!1),!r)return 0;if(e=e.node,e.mtime=e.ctime=Date.now(),t.subarray&&(!e.Na||e.Na.subarray)){if(a)return e.Na=t.subarray(n,n+r),e.Ra=r;if(e.Ra===0&&i===0)return e.Na=t.slice(n,n+r),e.Ra=r;if(i+r<=e.Ra)return e.Na.set(t.subarray(n,n+r),i),r}a=i+r;var o=e.Na?e.Na.length:0;if(o>=a||(a=Math.max(a,o*(1048576>o?2:1.125)>>>0),o!=0&&(a=Math.max(a,256)),o=e.Na,e.Na=new Uint8Array(a),0<e.Ra&&e.Na.set(o.subarray(0,e.Ra),0)),e.Na.subarray&&t.subarray)e.Na.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.Na[i+a]=t[n+a];return e.Ra=Math.max(e.Ra,i+r),r},Va(e,t,n){if(n===1?t+=e.position:n===2&&(e.node.mode&61440)==32768&&(t+=e.node.Ra),0>t)throw new B(28);return t},jb(e,t,n,r,i){if((e.node.mode&61440)!=32768)throw new B(43);if(e=e.node.Na,i&2||!e||e.buffer!==C.buffer){i=!0,r=65536*Math.ceil(t/65536);var a=Pt(65536,r);if(a&&w.fill(0,a,a+r),r=a,!r)throw new B(48);e&&((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),C.set(e,r))}else i=!1,r=e.byteOffset;return{Xb:r,Eb:i}},kb(e,t,n,r){return R.Ma.write(e,t,0,r,n,!1),0}}},ke=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Ae=null,je={},Me=[],Ne=1,z=null,Pe=!1,Fe=!0,B=class{name=`ErrnoError`;constructor(e){this.Pa=e}},Ie=class{hb={};node=null;get flags(){return this.hb.flags}set flags(e){this.hb.flags=e}get position(){return this.hb.position}set position(e){this.hb.position=e}},Le=class{La={};Ma={};bb=null;constructor(e,t,n,r){e||=this,this.parent=e,this.Xa=e.Xa,this.id=Ne++,this.name=t,this.mode=n,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)==365}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)==146}set write(e){e?this.mode|=146:this.mode&=-147}};function V(e,t={}){if(!e)throw new B(44);t.pb??=!0,e.charAt(0)===`/`||(e=`//`+e);var n=0;a:for(;40>n;n++){e=e.split(`/`).filter(e=>!!e);for(var r=Ae,i=`/`,a=0;a<e.length;a++){var o=a===e.length-1;if(o&&t.parent)break;if(e[a]!==`.`)if(e[a]===`..`)if(i=_e(i),r===r.parent){e=i+`/`+e.slice(a+1).join(`/`),n--;continue a}else r=r.parent;else{i=ge(i+`/`+e[a]);try{r=H(r,e[a])}catch(e){if(e?.Pa===44&&o&&t.Wb)return{path:i};throw e}if(!r.bb||o&&!t.pb||(r=r.bb.root),(r.mode&61440)==40960&&(!o||t.ab)){if(!r.La.readlink)throw new B(52);r=r.La.readlink(r),r.charAt(0)===`/`||(r=_e(i)+`/`+r),e=r+`/`+e.slice(a+1).join(`/`);continue a}}}return{path:i,node:r}}throw new B(32)}function Re(e){for(var t;;){if(e===e.parent)return e=e.Xa.Db,t?e[e.length-1]===`/`?e+t:`${e}/${t}`:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function ze(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%z.length}function Be(e){var t=ze(e.parent.id,e.name);if(z[t]===e)z[t]=e.cb;else for(t=z[t];t;){if(t.cb===e){t.cb=e.cb;break}t=t.cb}}function H(e,t){var n=U(e.mode)?(n=W(e,`x`))?n:e.La.lookup?0:2:54;if(n)throw new B(n);for(n=z[ze(e.id,t)];n;n=n.cb){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.La.lookup(e,t)}function Ve(e,t,n,r){return e=new Le(e,t,n,r),t=ze(e.parent.id,e.name),e.cb=z[t],z[t]=e}function U(e){return(e&61440)==16384}function W(e,t){return Fe?0:t.includes(`r`)&&!(e.mode&292)||t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73)?2:0}function He(e,t){if(!U(e.mode))return 54;try{return H(e,t),20}catch{}return W(e,`wx`)}function Ue(e,t,n){try{var r=H(e,t)}catch(e){return e.Pa}if(e=W(e,`wx`))return e;if(n){if(!U(r.mode))return 54;if(r===r.parent||Re(r)===`/`)return 10}else if(U(r.mode))return 31;return 0}function We(e){if(!e)throw new B(63);return e}function G(e){if(e=Me[e],!e)throw new B(8);return e}function Ge(e,t=-1){if(e=Object.assign(new Ie,e),t==-1)a:{for(t=0;4096>=t;t++)if(!Me[t])break a;throw new B(33)}return e.fd=t,Me[t]=e}function Ke(e,t=-1){return e=Ge(e,t),e.Ma?.ec?.(e),e}function qe(e,t,n){var r=e?.Ma.Ua;e=r?e:t,r??=t.La.Ua,We(r),r(e,n)}var Je={open(e){e.Ma=je[e.node.rdev].Ma,e.Ma.open?.(e)},Va(){throw new B(70)}};function Ye(e,t){je[e]={Ma:t}}function Xe(e,t){var n=t===`/`;if(n&&Ae)throw new B(10);if(!n&&t){var r=V(t,{pb:!1});if(t=r.path,r=r.node,r.bb)throw new B(10);if(!U(r.mode))throw new B(54)}t={type:e,kc:{},Db:t,Vb:[]},e=e.Xa(t),e.Xa=t,t.root=e,n?Ae=e:r&&(r.bb=t,r.Xa&&r.Xa.Vb.push(t))}function Ze(e,t,n){var r=V(e,{parent:!0}).node;if(e=ve(e),!e)throw new B(28);if(e===`.`||e===`..`)throw new B(20);var i=He(r,e);if(i)throw new B(i);if(!r.La.ib)throw new B(63);return r.La.ib(r,e,t,n)}function Qe(e,t=438){return Ze(e,t&4095|32768,0)}function K(e,t=511){return Ze(e,t&1023|16384,0)}function $e(e,t,n){n===void 0&&(n=t,t=438),Ze(e,t|8192,n)}function et(e,t){if(!xe(e))throw new B(44);var n=V(t,{parent:!0}).node;if(!n)throw new B(44);t=ve(t);var r=He(n,t);if(r)throw new B(r);if(!n.La.symlink)throw new B(63);n.La.symlink(n,t,e)}function tt(e){var t=V(e,{parent:!0}).node;e=ve(e);var n=H(t,e),r=Ue(t,e,!0);if(r)throw new B(r);if(!t.La.rmdir)throw new B(63);if(n.bb)throw new B(10);t.La.rmdir(t,e),Be(n)}function nt(e){var t=V(e,{parent:!0}).node;if(!t)throw new B(44);e=ve(e);var n=H(t,e),r=Ue(t,e,!1);if(r)throw new B(r);if(!t.La.unlink)throw new B(63);if(n.bb)throw new B(10);t.La.unlink(t,e),Be(n)}function rt(e,t){return e=V(e,{ab:!t}).node,We(e.La.Ta)(e)}function it(e,t,n,r){qe(e,t,{mode:n&4095|t.mode&-4096,ctime:Date.now(),Lb:r})}function at(e,t){e=typeof e==`string`?V(e,{ab:!0}).node:e,it(null,e,t)}function ot(e,t,n){if(U(t.mode))throw new B(31);if((t.mode&61440)!=32768)throw new B(28);var r=W(t,`w`);if(r)throw new B(r);qe(e,t,{size:n,timestamp:Date.now()})}function st(e,t,n=438){if(e===``)throw new B(44);if(typeof t==`string`){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(r===void 0)throw Error(`Unknown file open mode: ${t}`);t=r}if(n=t&64?n&4095|32768:0,typeof e==`object`)r=e;else{var i=e.endsWith(`/`),a=V(e,{ab:!(t&131072),Wb:!0});r=a.node,e=a.path}if(a=!1,t&64)if(r){if(t&128)throw new B(20)}else{if(i)throw new B(31);r=Ze(e,n|511,0),a=!0}if(!r)throw new B(44);if((r.mode&61440)==8192&&(t&=-513),t&65536&&!U(r.mode))throw new B(54);if(!a&&(r?(r.mode&61440)==40960?i=32:(i=[`r`,`w`,`rw`][t&3],t&512&&(i+=`w`),i=U(r.mode)&&(i!==`r`||t&576)?31:W(r,i)):i=44,i))throw new B(i);return t&512&&!a&&(i=r,i=typeof i==`string`?V(i,{ab:!0}).node:i,ot(null,i,0)),t=Ge({node:r,path:Re(r),flags:t&-131713,seekable:!0,position:0,Ma:r.Ma,Yb:[],error:!1}),t.Ma.open&&t.Ma.open(t),a&&at(r,n&511),t}function ct(e){if(e.fd===null)throw new B(8);e.rb&&=null;try{e.Ma.close&&e.Ma.close(e)}catch(e){throw e}finally{Me[e.fd]=null}e.fd=null}function lt(e,t,n){if(e.fd===null)throw new B(8);if(!e.seekable||!e.Ma.Va)throw new B(70);if(n!=0&&n!=1&&n!=2)throw new B(28);e.position=e.Ma.Va(e,t,n),e.Yb=[]}function ut(e,t,n,r,i){if(0>r||0>i)throw new B(28);if(e.fd===null||(e.flags&2097155)==1)throw new B(8);if(U(e.node.mode))throw new B(31);if(!e.Ma.read)throw new B(28);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new B(70);return t=e.Ma.read(e,t,n,r,i),a||(e.position+=t),t}function dt(e,t,n,r,i){if(0>r||0>i)throw new B(28);if(e.fd===null||!(e.flags&2097155))throw new B(8);if(U(e.node.mode))throw new B(31);if(!e.Ma.write)throw new B(28);e.seekable&&e.flags&1024&&lt(e,0,2);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new B(70);return t=e.Ma.write(e,t,n,r,i,void 0),a||(e.position+=t),t}function ft(e){var t=t||0,n=`binary`;n!==`utf8`&&n!==`binary`&&k(`Invalid encoding type "${n}"`),t=st(e,t),e=rt(e).size;var r=new Uint8Array(e);return ut(t,r,0,e,0),n===`utf8`&&(r=Se(r)),ct(t),r}function q(e,t,n){e=ge(`/dev/`+e);var r=ke(!!t,!!n);q.Cb??=64;var i=q.Cb++<<8|0;Ye(i,{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,r,i){for(var a=0,o=0;o<i;o++){try{var s=t()}catch{throw new B(29)}if(s===void 0&&a===0)throw new B(6);if(s==null)break;a++,n[r+o]=s}return a&&(e.node.atime=Date.now()),a},write(e,t,r,i){for(var a=0;a<i;a++)try{n(t[r+a])}catch{throw new B(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),a}}),$e(e,r,i)}var J={};function Y(e,t,n){if(t.charAt(0)===`/`)return t;if(e=e===-100?`/`:G(e).path,t.length==0){if(!n)throw new B(44);return e}return e+`/`+t}function pt(e,t){D[e>>2]=t.dev,D[e+4>>2]=t.mode,D[e+8>>2]=t.nlink,D[e+12>>2]=t.uid,D[e+16>>2]=t.gid,D[e+20>>2]=t.rdev,O[e+24>>3]=BigInt(t.size),E[e+32>>2]=4096,E[e+36>>2]=t.blocks;var n=t.atime.getTime(),r=t.mtime.getTime(),i=t.ctime.getTime();return O[e+40>>3]=BigInt(Math.floor(n/1e3)),D[e+48>>2]=n%1e3*1e6,O[e+56>>3]=BigInt(Math.floor(r/1e3)),D[e+64>>2]=r%1e3*1e6,O[e+72>>3]=BigInt(Math.floor(i/1e3)),D[e+80>>2]=i%1e3*1e6,O[e+88>>3]=BigInt(t.ino),0}var mt=void 0,ht=()=>{var e=E[mt>>2];return mt+=4,e},gt=0,_t=[0,31,60,91,121,152,182,213,244,274,305,335],vt=[0,31,59,90,120,151,181,212,243,273,304,334],yt={},bt=e=>{x=e,fe||0<gt||(s.onExit?.(e),b=!0),f(e,new se(e))},xt=e=>{if(!b)try{e()}catch(e){e instanceof se||e==`unwind`||f(1,e)}finally{if(!(fe||0<gt))try{x=e=x,bt(e)}catch(e){e instanceof se||e==`unwind`||f(1,e)}}},St={},Ct=()=>{if(!wt){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:d||`./this.program`},t;for(t in St)St[t]===void 0?delete e[t]:e[t]=St[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);wt=n}return wt},wt,Tt=(e,t,n,r)=>{var i={string:e=>{var t=0;if(e!=null&&e!==0){t=I(e)+1;var n=Q(t);L(e,w,n,t),t=n}return t},array:e=>{var t=Q(e.length);return C.set(e,t),t}};e=s[`_`+e];var a=[],o=0;if(r)for(var c=0;c<r.length;c++){var l=i[n[c]];l?(o===0&&(o=Lt()),a[c]=l(r[c])):a[c]=r[c]}return n=e(...a),n=function(e){return o!==0&&It(o),t===`string`?F(e):t===`boolean`?!!e:e}(n)},Et=e=>{var t=I(e)+1,n=Mt(t);return n&&L(e,w,n,t),n},X,Dt=[],Z=e=>{X.delete($.get(e)),$.set(e,null),Dt.push(e)},Ot=e=>{let t=e.length;return[t%128|128,t>>7,...e]},kt={i:127,p:127,j:126,f:125,d:124,e:111},At=e=>Ot(Array.from(e,e=>kt[e])),jt=(e,t)=>{if(!X){X=new WeakMap;var n=$.length;if(X)for(var r=0;r<0+n;r++){var i=$.get(r);i&&X.set(i,r)}}if(n=X.get(e)||0)return n;n=Dt.length?Dt.pop():$.grow(1);try{$.set(n,e)}catch(r){if(!(r instanceof TypeError))throw r;t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Ot([1,96,...At(t.slice(1)),...At(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),t=new WebAssembly.Module(t),t=new WebAssembly.Instance(t,{e:{f:e}}).exports.f,$.set(n,t)}return X.set(e,n),n};if(z=Array(4096),Xe(R,`/`),K(`/tmp`),K(`/home`),K(`/home/web_user`),(function(){K(`/dev`),Ye(259,{read:()=>0,write:(e,t,n,r)=>r,Va:()=>0}),$e(`/dev/null`,259),Te(1280,De),Te(1536,Oe),$e(`/dev/tty`,1280),$e(`/dev/tty1`,1536);var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(be(e),t=e.byteLength),e[--t]);q(`random`,n),q(`urandom`,n),K(`/dev/shm`),K(`/dev/shm/tmp`)})(),(function(){K(`/proc`);var e=K(`/proc/self`);K(`/proc/self/fd`),Xe({Xa(){var t=Ve(e,`fd`,16895,73);return t.Ma={Va:R.Ma.Va},t.La={lookup(e,t){e=+t;var n=G(e);return e={parent:null,Xa:{Db:`fake`},La:{readlink:()=>n.path},id:e+1},e.parent=e},readdir(){return Array.from(Me.entries()).filter(([,e])=>e).map(([e])=>e.toString())}},t}},`/proc/self/fd`)})(),s.noExitRuntime&&(fe=s.noExitRuntime),s.print&&(ee=s.print),s.printErr&&(v=s.printErr),s.wasmBinary&&(y=s.wasmBinary),s.thisProgram&&(d=s.thisProgram),s.preInit)for(typeof s.preInit==`function`&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.shift()();s.stackSave=()=>Lt(),s.stackRestore=e=>It(e),s.stackAlloc=e=>Q(e),s.cwrap=(e,t,n,r)=>{var i=!n||n.every(e=>e===`number`||e===`boolean`);return t!==`string`&&i&&!r?s[`_`+e]:(...r)=>Tt(e,t,n,r)},s.addFunction=jt,s.removeFunction=Z,s.UTF8ToString=F,s.stringToNewUTF8=Et,s.writeArrayToMemory=(e,t)=>{C.set(e,t)};var Mt,Nt,Pt,Ft,It,Q,Lt,Rt,$,zt={a:(e,t,n,r)=>k(`Assertion failed: ${F(e)}, at: `+[t?F(t):`unknown filename`,n,r?F(r):`unknown function`]),i:function(e,t){try{return e=F(e),at(e,t),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},L:function(e,t,n){try{if(t=F(t),t=Y(e,t),n&-8)return-28;var r=V(t,{ab:!0}).node;return r?(e=``,n&4&&(e+=`r`),n&2&&(e+=`w`),n&1&&(e+=`x`),e&&W(r,e)?-2:0):-44}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},j:function(e,t){try{var n=G(e);return it(n,n.node,t,!1),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},h:function(e){try{var t=G(e);return qe(t,t.node,{timestamp:Date.now(),Lb:!1}),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},b:function(e,t,n){mt=n;try{var r=G(e);switch(t){case 0:var i=ht();if(0>i)break;for(;Me[i];)i++;return Ke(r,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:return i=ht(),r.flags|=i,0;case 12:return i=ht(),T[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},g:function(e,t){try{var n=G(e),r=n.node,i=n.Ma.Ta;return e=i?n:r,i??=r.La.Ta,We(i),pt(t,i(e))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},H:function(e,t){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return-61;var n=G(e);if(0>t||!(n.flags&2097155))throw new B(28);return ot(n,n.node,t),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},G:function(e,t){try{if(t===0)return-28;var n=I(`/`)+1;return t<n?-68:(L(`/`,w,e,t),n)}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},K:function(e,t){try{return e=F(e),pt(t,rt(e,!0))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},C:function(e,t,n){try{return t=F(t),t=Y(e,t),K(t,n),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},J:function(e,t,n,r){try{t=F(t);var i=r&256;return t=Y(e,t,r&4096),pt(n,i?rt(t,!0):rt(t))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},x:function(e,t,n,r){mt=r;try{t=F(t),t=Y(e,t);var i=r?ht():0;return st(t,n,i).fd}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},v:function(e,t,n,r){try{if(t=F(t),t=Y(e,t),0>=r)return-28;var i=V(t).node;if(!i)throw new B(44);if(!i.La.readlink)throw new B(28);var a=i.La.readlink(i),o=Math.min(r,I(a)),s=C[n+o];return L(a,w,n,r+1),C[n+o]=s,o}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},u:function(e){try{return e=F(e),tt(e),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},f:function(e,t){try{return e=F(e),pt(t,rt(e))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},r:function(e,t,n){try{if(t=F(t),t=Y(e,t),n)if(n===512)tt(t);else return-28;else nt(t);return 0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},q:function(e,t,n){try{t=F(t),t=Y(e,t,!0);var r=Date.now(),i,a;if(n){var o=D[n>>2]+4294967296*E[n+4>>2],s=E[n+8>>2];i=s==1073741823?r:s==1073741822?null:1e3*o+s/1e6,n+=16,o=D[n>>2]+4294967296*E[n+4>>2],s=E[n+8>>2],a=s==1073741823?r:s==1073741822?null:1e3*o+s/1e6}else a=i=r;if((a??i)!==null){e=i;var c=V(t,{ab:!0}).node;We(c.La.Ua)(c,{atime:e,mtime:a})}return 0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},m:()=>k(``),l:()=>{fe=!1,gt=0},A:function(e,t){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e),e=new Date(1e3*e),E[t>>2]=e.getSeconds(),E[t+4>>2]=e.getMinutes(),E[t+8>>2]=e.getHours(),E[t+12>>2]=e.getDate(),E[t+16>>2]=e.getMonth(),E[t+20>>2]=e.getFullYear()-1900,E[t+24>>2]=e.getDay();var n=e.getFullYear();E[t+28>>2]=(n%4!=0||n%100==0&&n%400!=0?vt:_t)[e.getMonth()]+e.getDate()-1|0,E[t+36>>2]=-(60*e.getTimezoneOffset()),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();E[t+32>>2]=(n!=r&&e.getTimezoneOffset()==Math.min(r,n))|0},y:function(e,t,n,r,i,a,o){i=-9007199254740992>i||9007199254740992<i?NaN:Number(i);try{var s=G(r);if(t&2&&!(n&2)&&(s.flags&2097155)!=2||(s.flags&2097155)==1)throw new B(2);if(!s.Ma.jb)throw new B(43);if(!e)throw new B(28);var c=s.Ma.jb(s,e,i,t,n),l=c.Xb;return E[a>>2]=c.Eb,D[o>>2]=l,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},z:function(e,t,n,r,i,a){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);try{var o=G(i);if(n&2){if(n=a,(o.node.mode&61440)!=32768)throw new B(43);if(!(r&2)){var s=w.slice(e,e+t);o.Ma.kb&&o.Ma.kb(o,s,n,t,r)}}}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},n:(e,t)=>(yt[e]&&(clearTimeout(yt[e].id),delete yt[e]),t&&(yt[e]={id:setTimeout(()=>{delete yt[e],xt(()=>Ft(e,performance.now()))},t),lc:t}),0),B:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),D[e>>2]=60*Math.max(a,i),E[t>>2]=Number(a!=i),t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`},e=t(a),t=t(i),i<a?(L(e,w,n,17),L(t,w,r,17)):(L(e,w,r,17),L(t,w,n,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:e=>{var t=w.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);a:{r=(Math.min(2147483648,65536*Math.ceil(Math.max(e,r)/65536))-Rt.buffer.byteLength+65535)/65536|0;try{Rt.grow(r),re();var i=1;break a}catch{}i=void 0}if(i)return!0}return!1},E:(e,t)=>{var n=0,r=0,i;for(i of Ct()){var a=t+n;D[e+r>>2]=a,n+=L(i,w,a,1/0)+1,r+=4}return 0},F:(e,t)=>{var n=Ct();D[e>>2]=n.length,e=0;for(var r of n)e+=I(r)+1;return D[t>>2]=e,0},e:function(e){try{return ct(G(e)),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},p:function(e,t){try{var n=G(e);return C[t]=n.tty?2:U(n.mode)?3:(n.mode&61440)==40960?7:4,T[t+2>>1]=0,O[t+8>>3]=BigInt(0),O[t+16>>3]=BigInt(0),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},w:function(e,t,n,r){try{a:{var i=G(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=ut(i,C,s,c,a);if(0>l){var u=-1;break a}if(t+=l,l<c)break;a!==void 0&&(a+=l)}u=t}return D[r>>2]=u,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},D:function(e,t,n,r){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return 61;var i=G(e);return lt(i,t,n),O[r>>3]=BigInt(i.position),i.rb&&t===0&&n===0&&(i.rb=null),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},I:function(e){try{var t=G(e);return t.Ma?.fsync?.(t)}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},t:function(e,t,n,r){try{a:{var i=G(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=dt(i,C,s,c,a);if(0>l){var u=-1;break a}if(t+=l,l<c)break;a!==void 0&&(a+=l)}u=t}return D[r>>2]=u,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},k:bt};function Bt(){function e(){if(s.calledRun=!0,!b){if(!s.noFSInit&&!Pe){var e,t;Pe=!0,e??=s.stdin,t??=s.stdout,n??=s.stderr,e?q(`stdin`,e):et(`/dev/tty`,`/dev/stdin`),t?q(`stdout`,null,t):et(`/dev/tty`,`/dev/stdout`),n?q(`stderr`,null,n):et(`/dev/tty1`,`/dev/stderr`),st(`/dev/stdin`,0),st(`/dev/stdout`,1),st(`/dev/stderr`,1)}if(Vt.N(),Fe=!1,s.onRuntimeInitialized?.(),s.postRun)for(typeof s.postRun==`function`&&(s.postRun=[s.postRun]);s.postRun.length;){var n=s.postRun.shift();le.push(n)}ce(le)}}if(0<j)M=Bt;else{if(s.preRun)for(typeof s.preRun==`function`&&(s.preRun=[s.preRun]);s.preRun.length;)de();ce(ue),0<j?M=Bt:s.setStatus?(s.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>s.setStatus(``),1),e()},1)):e()}}var Vt;return(async function(){function e(e){return e=Vt=e.exports,s._sqlite3_free=e.P,s._sqlite3_value_text=e.Q,s._sqlite3_prepare_v2=e.R,s._sqlite3_step=e.S,s._sqlite3_reset=e.T,s._sqlite3_exec=e.U,s._sqlite3_finalize=e.V,s._sqlite3_column_name=e.W,s._sqlite3_column_text=e.X,s._sqlite3_column_type=e.Y,s._sqlite3_errmsg=e.Z,s._sqlite3_clear_bindings=e._,s._sqlite3_value_blob=e.$,s._sqlite3_value_bytes=e.aa,s._sqlite3_value_double=e.ba,s._sqlite3_value_int=e.ca,s._sqlite3_value_type=e.da,s._sqlite3_result_blob=e.ea,s._sqlite3_result_double=e.fa,s._sqlite3_result_error=e.ga,s._sqlite3_result_int=e.ha,s._sqlite3_result_int64=e.ia,s._sqlite3_result_null=e.ja,s._sqlite3_result_text=e.ka,s._sqlite3_aggregate_context=e.la,s._sqlite3_column_count=e.ma,s._sqlite3_data_count=e.na,s._sqlite3_column_blob=e.oa,s._sqlite3_column_bytes=e.pa,s._sqlite3_column_double=e.qa,s._sqlite3_bind_blob=e.ra,s._sqlite3_bind_double=e.sa,s._sqlite3_bind_int=e.ta,s._sqlite3_bind_text=e.ua,s._sqlite3_bind_parameter_index=e.va,s._sqlite3_sql=e.wa,s._sqlite3_normalized_sql=e.xa,s._sqlite3_changes=e.ya,s._sqlite3_close_v2=e.za,s._sqlite3_create_function_v2=e.Aa,s._sqlite3_update_hook=e.Ba,s._sqlite3_open=e.Ca,Mt=s._malloc=e.Da,Nt=s._free=e.Ea,s._RegisterExtensionFunctions=e.Fa,Pt=e.Ga,Ft=e.Ha,It=e.Ia,Q=e.Ja,Lt=e.Ka,Rt=e.M,$=e.O,re(),j--,s.monitorRunDependencies?.(j),j==0&&M&&(e=M,M=null,e()),Vt}j++,s.monitorRunDependencies?.(j);var t={a:zt};return s.instantiateWasm?new Promise(n=>{s.instantiateWasm(t,(t,r)=>{n(e(t,r))})}):(A??=s.locateFile?s.locateFile(`sql-wasm.wasm`,m):m+`sql-wasm.wasm`,e((await oe(t)).instance))})(),Bt(),a}),r)};typeof t==`object`&&typeof n==`object`?(n.exports=i,n.exports.default=i):typeof define==`function`&&define.amd?define([],function(){return i}):typeof t==`object`&&(t.Module=i)}))(),1);function ee(e,t,n){switch(n.mode){case`list`:return y(e,t,n);case`csv`:return b(e,t,n);case`json`:return w(e,t);case`line`:return T(e,t,n);case`column`:return E(e,t,n);case`table`:return D(e,t,n);case`markdown`:return te(e,t,n);case`tabs`:return ne(e,t,n);case`box`:return O(e,t,n);case`quote`:return re(e,t,n);case`html`:return k(e,t,n);case`ascii`:return ie(e,t,n)}}function v(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString(`utf8`):typeof e==`number`&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,``):String(e)}function y(e,t,n){let r=[];n.header&&e.length>0&&r.push(e.join(n.separator));for(let e of t)r.push(e.map(e=>v(e,n.nullValue)).join(n.separator));return r.length>0?`${r.join(n.newline)}${n.newline}`:``}function b(e,t,n){let r=[];n.header&&e.length>0&&r.push(e.map(x).join(`,`));for(let e of t)r.push(e.map(e=>x(v(e,n.nullValue))).join(`,`));return r.length>0?`${r.join(`
3
3
  `)}
4
4
  `:``}function x(e){return e.includes(`,`)||e.includes(`"`)||e.includes(`'`)||e.includes(`
@@ -34,4 +34,4 @@ Use -help for a list of options.
34
34
  `,exitCode:1};y+=`Error: ${e.error}
35
35
  `,b=!0}else e.columns&&e.rows&&(e.rows.length>0||r.header)&&(y+=ee(e.columns,e.rows,v));if(_.hasModifications&&!r.readonly&&!f&&p&&_.dbBuffer)try{await t.fs.writeFile(p,_.dbBuffer)}catch(e){let t=s(e.message);return{stdout:y,stderr:`sqlite3: failed to write database: ${t}
36
36
  `,exitCode:1}}return{stdout:y,stderr:``,exitCode:b&&r.bail?1:0}}},fe={name:`sqlite3`,flags:[],needsArgs:!0};export{ue as n,fe as r,N as t};
37
- //# sourceMappingURL=chunk-HWBSOZZR-Bw5kf-cE.mjs.map
37
+ //# sourceMappingURL=chunk-HWBSOZZR-BeVrNfQw.mjs.map
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-R6VWJ2ZL-FwG_Za20.mjs";import{i as t,n}from"./chunk-CWQS3NFK-Co4ALolT.mjs";import{n as r,t as i}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{t as a}from"./chunk-IPJHKYVM-C3IodQq7.mjs";import{n as o}from"./chunk-3THT3N7L-DztAF386.mjs";var s={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300},c={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},u={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},d={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},f={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},p={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function m(){return new t(d.TOTAL)}var h=class{int32View;uint8View;dataView;constructor(e){this.int32View=new Int32Array(e),this.uint8View=new Uint8Array(e),this.dataView=new DataView(e)}getOpCode(){return n.load(this.int32View,u.OP_CODE/4)}setOpCode(e){n.store(this.int32View,u.OP_CODE/4,e)}getStatus(){return n.load(this.int32View,u.STATUS/4)}setStatus(e){n.store(this.int32View,u.STATUS/4,e)}getPathLength(){return n.load(this.int32View,u.PATH_LENGTH/4)}setPathLength(e){n.store(this.int32View,u.PATH_LENGTH/4,e)}getDataLength(){return n.load(this.int32View,u.DATA_LENGTH/4)}setDataLength(e){n.store(this.int32View,u.DATA_LENGTH/4,e)}getResultLength(){return n.load(this.int32View,u.RESULT_LENGTH/4)}setResultLength(e){n.store(this.int32View,u.RESULT_LENGTH/4,e)}getErrorCode(){return n.load(this.int32View,u.ERROR_CODE/4)}setErrorCode(e){n.store(this.int32View,u.ERROR_CODE/4,e)}getFlags(){return n.load(this.int32View,u.FLAGS/4)}setFlags(e){n.store(this.int32View,u.FLAGS/4,e)}getMode(){return n.load(this.int32View,u.MODE/4)}setMode(e){n.store(this.int32View,u.MODE/4,e)}getPath(){let e=this.getPathLength(),t=this.uint8View.slice(u.PATH_BUFFER,u.PATH_BUFFER+e);return new TextDecoder().decode(t)}setPath(e){let t=new TextEncoder().encode(e);if(t.length>d.PATH_BUFFER)throw Error(`Path too long: ${t.length} > ${d.PATH_BUFFER}`);this.uint8View.set(t,u.PATH_BUFFER),this.setPathLength(t.length)}getData(){let e=this.getDataLength();return this.uint8View.slice(u.DATA_BUFFER,u.DATA_BUFFER+e)}setData(e){if(e.length>d.DATA_BUFFER)throw Error(`Data too large: ${e.length} > ${d.DATA_BUFFER}`);this.uint8View.set(e,u.DATA_BUFFER),this.setDataLength(e.length)}getDataAsString(){let e=this.getData();return new TextDecoder().decode(e)}setDataFromString(e){let t=new TextEncoder().encode(e);this.setData(t)}getResult(){let e=this.getResultLength();return this.uint8View.slice(u.DATA_BUFFER,u.DATA_BUFFER+e)}setResult(e){if(e.length>d.DATA_BUFFER)throw Error(`Result too large: ${e.length} > ${d.DATA_BUFFER}`);this.uint8View.set(e,u.DATA_BUFFER),this.setResultLength(e.length)}getResultAsString(){let e=this.getResult();return new TextDecoder().decode(e)}setResultFromString(e){let t=new TextEncoder().encode(e);this.setResult(t)}encodeStat(e){this.uint8View[u.DATA_BUFFER+p.IS_FILE]=e.isFile?1:0,this.uint8View[u.DATA_BUFFER+p.IS_DIRECTORY]=e.isDirectory?1:0,this.uint8View[u.DATA_BUFFER+p.IS_SYMLINK]=e.isSymbolicLink?1:0,this.dataView.setInt32(u.DATA_BUFFER+p.MODE,e.mode,!0);let t=Math.min(e.size,2**53-1);this.dataView.setFloat64(u.DATA_BUFFER+p.SIZE,t,!0),this.dataView.setFloat64(u.DATA_BUFFER+p.MTIME,e.mtime.getTime(),!0),this.setResultLength(p.TOTAL)}decodeStat(){return{isFile:this.uint8View[u.DATA_BUFFER+p.IS_FILE]===1,isDirectory:this.uint8View[u.DATA_BUFFER+p.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[u.DATA_BUFFER+p.IS_SYMLINK]===1,mode:this.dataView.getInt32(u.DATA_BUFFER+p.MODE,!0),size:this.dataView.getFloat64(u.DATA_BUFFER+p.SIZE,!0),mtime:new Date(this.dataView.getFloat64(u.DATA_BUFFER+p.MTIME,!0))}}waitForReady(e){return n.wait(this.int32View,u.STATUS/4,c.PENDING,e)}waitForReadyAsync(e){return n.waitAsync(this.int32View,u.STATUS/4,c.PENDING,e)}async waitUntilReady(e){let t=Date.now();for(;;){let r=this.getStatus();if(r===c.READY)return!0;let i=Date.now()-t;if(i>=e)return!1;let a=e-i,o=n.waitAsync(this.int32View,u.STATUS/4,r,a);if(o.async&&await o.value===`timed-out`)return!1}}waitForResult(e){return n.wait(this.int32View,u.STATUS/4,c.READY,e)}notify(){return n.notify(this.int32View,u.STATUS/4)}reset(){this.setOpCode(s.NOOP),this.setStatus(c.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(f.NONE),this.setMode(0)}},g=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;protocol;running=!1;output={stdout:``,stderr:``,exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(e,t,n,r,i=void 0,a=0,o=void 0){this.fs=t,this.cwd=n,this.commandName=r,this.secureFetch=i,this.maxOutputSize=a,this.exec=o,this.protocol=new h(e)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(e){let t=this.remainingMs();if(t<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
1
+ import{t as e}from"./chunk-R6VWJ2ZL-D1Ufj9fh.mjs";import{i as t,n}from"./chunk-CWQS3NFK-BP3kiNgH.mjs";import{n as r,t as i}from"./chunk-A5O5YHGN-C6ngIqYR.mjs";import{t as a}from"./chunk-IPJHKYVM-D6H6ZTtk.mjs";import{n as o}from"./chunk-3THT3N7L-Ce6LrnIA.mjs";var s={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300},c={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},u={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},d={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},f={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},p={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function m(){return new t(d.TOTAL)}var h=class{int32View;uint8View;dataView;constructor(e){this.int32View=new Int32Array(e),this.uint8View=new Uint8Array(e),this.dataView=new DataView(e)}getOpCode(){return n.load(this.int32View,u.OP_CODE/4)}setOpCode(e){n.store(this.int32View,u.OP_CODE/4,e)}getStatus(){return n.load(this.int32View,u.STATUS/4)}setStatus(e){n.store(this.int32View,u.STATUS/4,e)}getPathLength(){return n.load(this.int32View,u.PATH_LENGTH/4)}setPathLength(e){n.store(this.int32View,u.PATH_LENGTH/4,e)}getDataLength(){return n.load(this.int32View,u.DATA_LENGTH/4)}setDataLength(e){n.store(this.int32View,u.DATA_LENGTH/4,e)}getResultLength(){return n.load(this.int32View,u.RESULT_LENGTH/4)}setResultLength(e){n.store(this.int32View,u.RESULT_LENGTH/4,e)}getErrorCode(){return n.load(this.int32View,u.ERROR_CODE/4)}setErrorCode(e){n.store(this.int32View,u.ERROR_CODE/4,e)}getFlags(){return n.load(this.int32View,u.FLAGS/4)}setFlags(e){n.store(this.int32View,u.FLAGS/4,e)}getMode(){return n.load(this.int32View,u.MODE/4)}setMode(e){n.store(this.int32View,u.MODE/4,e)}getPath(){let e=this.getPathLength(),t=this.uint8View.slice(u.PATH_BUFFER,u.PATH_BUFFER+e);return new TextDecoder().decode(t)}setPath(e){let t=new TextEncoder().encode(e);if(t.length>d.PATH_BUFFER)throw Error(`Path too long: ${t.length} > ${d.PATH_BUFFER}`);this.uint8View.set(t,u.PATH_BUFFER),this.setPathLength(t.length)}getData(){let e=this.getDataLength();return this.uint8View.slice(u.DATA_BUFFER,u.DATA_BUFFER+e)}setData(e){if(e.length>d.DATA_BUFFER)throw Error(`Data too large: ${e.length} > ${d.DATA_BUFFER}`);this.uint8View.set(e,u.DATA_BUFFER),this.setDataLength(e.length)}getDataAsString(){let e=this.getData();return new TextDecoder().decode(e)}setDataFromString(e){let t=new TextEncoder().encode(e);this.setData(t)}getResult(){let e=this.getResultLength();return this.uint8View.slice(u.DATA_BUFFER,u.DATA_BUFFER+e)}setResult(e){if(e.length>d.DATA_BUFFER)throw Error(`Result too large: ${e.length} > ${d.DATA_BUFFER}`);this.uint8View.set(e,u.DATA_BUFFER),this.setResultLength(e.length)}getResultAsString(){let e=this.getResult();return new TextDecoder().decode(e)}setResultFromString(e){let t=new TextEncoder().encode(e);this.setResult(t)}encodeStat(e){this.uint8View[u.DATA_BUFFER+p.IS_FILE]=e.isFile?1:0,this.uint8View[u.DATA_BUFFER+p.IS_DIRECTORY]=e.isDirectory?1:0,this.uint8View[u.DATA_BUFFER+p.IS_SYMLINK]=e.isSymbolicLink?1:0,this.dataView.setInt32(u.DATA_BUFFER+p.MODE,e.mode,!0);let t=Math.min(e.size,2**53-1);this.dataView.setFloat64(u.DATA_BUFFER+p.SIZE,t,!0),this.dataView.setFloat64(u.DATA_BUFFER+p.MTIME,e.mtime.getTime(),!0),this.setResultLength(p.TOTAL)}decodeStat(){return{isFile:this.uint8View[u.DATA_BUFFER+p.IS_FILE]===1,isDirectory:this.uint8View[u.DATA_BUFFER+p.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[u.DATA_BUFFER+p.IS_SYMLINK]===1,mode:this.dataView.getInt32(u.DATA_BUFFER+p.MODE,!0),size:this.dataView.getFloat64(u.DATA_BUFFER+p.SIZE,!0),mtime:new Date(this.dataView.getFloat64(u.DATA_BUFFER+p.MTIME,!0))}}waitForReady(e){return n.wait(this.int32View,u.STATUS/4,c.PENDING,e)}waitForReadyAsync(e){return n.waitAsync(this.int32View,u.STATUS/4,c.PENDING,e)}async waitUntilReady(e){let t=Date.now();for(;;){let r=this.getStatus();if(r===c.READY)return!0;let i=Date.now()-t;if(i>=e)return!1;let a=e-i,o=n.waitAsync(this.int32View,u.STATUS/4,r,a);if(o.async&&await o.value===`timed-out`)return!1}}waitForResult(e){return n.wait(this.int32View,u.STATUS/4,c.READY,e)}notify(){return n.notify(this.int32View,u.STATUS/4)}reset(){this.setOpCode(s.NOOP),this.setStatus(c.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(f.NONE),this.setMode(0)}},g=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;protocol;running=!1;output={stdout:``,stderr:``,exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(e,t,n,r,i=void 0,a=0,o=void 0){this.fs=t,this.cwd=n,this.commandName=r,this.secureFetch=i,this.maxOutputSize=a,this.exec=o,this.protocol=new h(e)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(e){let t=this.remainingMs();if(t<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
2
2
  ${this.commandName}: execution timeout exceeded
3
3
  `,Promise.reject(Error(`Operation timed out`));let n=e();return new Promise((e,a)=>{let o=i(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
4
4
  ${this.commandName}: execution timeout exceeded
@@ -8,4 +8,4 @@ ${this.commandName}: execution timeout exceeded
8
8
  ${this.commandName}: execution timeout exceeded
9
9
  `,this.output.exitCode=124;break}let n=this.protocol.getOpCode();await this.handleOperation(n),this.protocol.notify()}return this.output}stop(){this.running=!1}async handleOperation(e){try{switch(e){case s.READ_FILE:await this.handleReadFile();break;case s.WRITE_FILE:await this.handleWriteFile();break;case s.STAT:await this.handleStat();break;case s.LSTAT:await this.handleLstat();break;case s.READDIR:await this.handleReaddir();break;case s.MKDIR:await this.handleMkdir();break;case s.RM:await this.handleRm();break;case s.EXISTS:await this.handleExists();break;case s.APPEND_FILE:await this.handleAppendFile();break;case s.SYMLINK:await this.handleSymlink();break;case s.READLINK:await this.handleReadlink();break;case s.CHMOD:await this.handleChmod();break;case s.REALPATH:await this.handleRealpath();break;case s.RENAME:await this.handleRename();break;case s.COPY_FILE:await this.handleCopyFile();break;case s.WRITE_STDOUT:this.handleWriteStdout();break;case s.WRITE_STDERR:this.handleWriteStderr();break;case s.EXIT:this.handleExit();break;case s.HTTP_REQUEST:await this.handleHttpRequest();break;case s.EXEC_COMMAND:await this.handleExecCommand();break;default:this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setStatus(c.ERROR)}}catch(e){this.setErrorFromException(e)}}resolvePath(e){return this.fs.resolvePath(this.cwd,e)}async handleReadFile(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.readFileBuffer(e);this.protocol.setResult(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleWriteFile(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getData();try{await this.fs.writeFile(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleStat(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.stat(e);this.protocol.encodeStat(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.lstat(e);this.protocol.encodeStat(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.readdir(e);this.protocol.setResultFromString(JSON.stringify(t)),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let e=this.resolvePath(this.protocol.getPath()),t=(this.protocol.getFlags()&f.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(e,{recursive:t}),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRm(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getFlags(),n=(t&f.RECURSIVE)!==0,r=(t&f.FORCE)!==0;try{await this.fs.rm(e,{recursive:n,force:r}),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleExists(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.exists(e);this.protocol.setResult(new Uint8Array([t?1:0])),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getData();try{await this.fs.appendFile(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleSymlink(){let e=this.protocol.getPath(),t=this.protocol.getDataAsString(),n=this.resolvePath(e);try{await this.fs.symlink(t,n),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReadlink(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.readlink(e);this.protocol.setResultFromString(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getMode();try{await this.fs.chmod(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRealpath(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.realpath(e);this.protocol.setResultFromString(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRename(){let e=this.resolvePath(this.protocol.getPath()),t=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.mv(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleCopyFile(){let e=this.resolvePath(this.protocol.getPath()),t=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.cp(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}handleWriteStdout(){let e=this.protocol.getDataAsString();if(!this.tryAppendOutput(`stdout`,e)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(`Output size limit exceeded`),this.protocol.setStatus(c.ERROR);return}this.protocol.setStatus(c.SUCCESS)}handleWriteStderr(){let e=this.protocol.getDataAsString();if(!this.tryAppendOutput(`stderr`,e)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(`Output size limit exceeded`),this.protocol.setStatus(c.ERROR);return}this.protocol.setStatus(c.SUCCESS)}handleExit(){let e=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=e,this.protocol.setStatus(c.SUCCESS),this.running=!1}tryAppendOutput(e,t){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(e===`stdout`?this.output.stdout+=t:this.output.stderr+=t,!0):this.output.stdout.length+this.output.stderr.length+t.length>this.maxOutputSize?!1:(e===`stdout`?this.output.stdout+=t:this.output.stderr+=t,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let e=`${this.commandName}: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
10
10
  `,t=e.length>this.maxOutputSize?e.slice(0,this.maxOutputSize):e;if(this.output.stderr.includes(`total output size exceeded`))return;let n=this.output.stdout.length+this.output.stderr.length+t.length-this.maxOutputSize;if(n>0)if(this.output.stdout.length>=n)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-n);else{let e=n-this.output.stdout.length;this.output.stdout=``,e>=this.output.stderr.length?this.output.stderr=``:this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-e)}this.output.stderr+=t}async handleHttpRequest(){let t=this.secureFetch;if(!t){this.protocol.setErrorCode(l.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString(`Network access not configured. Enable network in Bash options.`),this.protocol.setStatus(c.ERROR);return}let n=this.protocol.getPath(),r=this.protocol.getDataAsString();try{let i=r?JSON.parse(r):{},a=this.remainingMs(),o=await this.raceDeadline(()=>t(n,{method:i.method,headers:i.headers,body:i.body,timeoutMs:a})),s=JSON.stringify({status:o.status,statusText:o.statusText,headers:o.headers,bodyBase64:e(o.body,`base64`),url:o.url});this.protocol.setResultFromString(s),this.protocol.setStatus(c.SUCCESS)}catch(e){let t=o(e instanceof Error?e.message:String(e));this.protocol.setErrorCode(l.NETWORK_ERROR),this.protocol.setResultFromString(t),this.protocol.setStatus(c.ERROR)}}async handleExecCommand(){let e=this.exec;if(!e){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(`Command execution not available in this context.`),this.protocol.setStatus(c.ERROR);return}let t=this.protocol.getPath(),n=this.protocol.getDataAsString(),r=new AbortController;try{let i={cwd:this.cwd,signal:r.signal};if(n){let e=JSON.parse(n);e.stdin&&(i.stdin=e.stdin),e.args&&Array.isArray(e.args)&&(i.args=e.args.map(e=>String(e)),t=a([t]))}let o=await this.raceDeadline(()=>e(t,i)),s=JSON.stringify({stdout:o.stdout,stderr:o.stderr,exitCode:o.exitCode});this.protocol.setResultFromString(s),this.protocol.setStatus(c.SUCCESS)}catch(e){r.abort();let t=e instanceof Error?e.message:String(e);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(t),this.protocol.setStatus(c.ERROR)}}setErrorFromException(e){let t=e instanceof Error?e.message:String(e),n=o(t),r=l.IO_ERROR,i=t.toLowerCase();i.includes(`no such file`)||i.includes(`not found`)||i.includes(`enoent`)?r=l.NOT_FOUND:i.includes(`is a directory`)||i.includes(`eisdir`)?r=l.IS_DIRECTORY:i.includes(`not a directory`)||i.includes(`enotdir`)?r=l.NOT_DIRECTORY:i.includes(`already exists`)||i.includes(`eexist`)?r=l.EXISTS:(i.includes(`permission`)||i.includes(`eperm`)||i.includes(`eacces`))&&(r=l.PERMISSION_DENIED),this.protocol.setErrorCode(r),this.protocol.setResultFromString(n),this.protocol.setStatus(c.ERROR)}};export{m as n,g as t};
11
- //# sourceMappingURL=chunk-I57KEIP3-DwNGEmJW.mjs.map
11
+ //# sourceMappingURL=chunk-I57KEIP3-5RFY25TO.mjs.map
@@ -1,2 +1,2 @@
1
1
  function e(e){return`'${e.replace(/'/g,`'\\''`)}'`}function t(t){return t.map(e).join(` `)}export{t};
2
- //# sourceMappingURL=chunk-IPJHKYVM-C3IodQq7.mjs.map
2
+ //# sourceMappingURL=chunk-IPJHKYVM-D6H6ZTtk.mjs.map
@@ -1,2 +1,2 @@
1
- import{t as e}from"./chunk-YNYSPYQ5-DesxOVHh.mjs";var t=2048,n=new Map;function r(e,r,a){let o=typeof a==`boolean`?{ignoreCase:a}:a??{},s=r;o.stripQuotes&&(s.startsWith(`"`)&&s.endsWith(`"`)||s.startsWith(`'`)&&s.endsWith(`'`))&&(s=s.slice(1,-1));let c=o.ignoreCase?`i:${s}`:s,l=n.get(c);if(!l){if(l=i(s,o.ignoreCase),n.size>=t){let e=n.keys().next().value;e!==void 0&&n.delete(e)}n.set(c,l)}return l.test(e)}function i(t,n){let r=`^`;for(let e=0;e<t.length;e++){let n=t[e];if(n===`*`)r+=`.*`;else if(n===`?`)r+=`.`;else if(n===`[`){let n=e+1;for(;n<t.length&&t[n]!==`]`;)n++;r+=t.slice(e,n+1),e=n}else n===`.`||n===`+`||n===`^`||n===`$`||n===`{`||n===`}`||n===`(`||n===`)`||n===`|`||n===`\\`?r+=`\\${n}`:r+=n}return r+=`$`,e(r,n?`i`:``)}export{r as t};
2
- //# sourceMappingURL=chunk-J642UCRS-DuJ82Ao2.mjs.map
1
+ import{t as e}from"./chunk-YNYSPYQ5-iQGTFdx0.mjs";var t=2048,n=new Map;function r(e,r,a){let o=typeof a==`boolean`?{ignoreCase:a}:a??{},s=r;o.stripQuotes&&(s.startsWith(`"`)&&s.endsWith(`"`)||s.startsWith(`'`)&&s.endsWith(`'`))&&(s=s.slice(1,-1));let c=o.ignoreCase?`i:${s}`:s,l=n.get(c);if(!l){if(l=i(s,o.ignoreCase),n.size>=t){let e=n.keys().next().value;e!==void 0&&n.delete(e)}n.set(c,l)}return l.test(e)}function i(t,n){let r=`^`;for(let e=0;e<t.length;e++){let n=t[e];if(n===`*`)r+=`.*`;else if(n===`?`)r+=`.`;else if(n===`[`){let n=e+1;for(;n<t.length&&t[n]!==`]`;)n++;r+=t.slice(e,n+1),e=n}else n===`.`||n===`+`||n===`^`||n===`$`||n===`{`||n===`}`||n===`(`||n===`)`||n===`|`||n===`\\`?r+=`\\${n}`:r+=n}return r+=`$`,e(r,n?`i`:``)}export{r as t};
2
+ //# sourceMappingURL=chunk-J642UCRS-D87gHOLP.mjs.map
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-YNYSPYQ5-DesxOVHh.mjs";import{t}from"./chunk-IPJHKYVM-C3IodQq7.mjs";import{r as n,t as r}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as i}from"./chunk-X2AJGDEF-BaH6i1Rq.mjs";import{t as a}from"./chunk-J642UCRS-DuJ82Ao2.mjs";import{n as o,r as s,t as c}from"./chunk-EEXR5ZDP-C5AJH114.mjs";function l(t,n){switch(t.type){case`name`:{let e=t.pattern,r=e.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let e=r[1],i=n.name;if(t.ignoreCase){if(!i.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!i.endsWith(e))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:a(n.name,e,t.ignoreCase),pruned:!1,printed:!1}}case`path`:{let e=t.pattern,r=n.relativePath,i=e.split(`/`);for(let e=0;e<i.length-1;e++){let n=i[e];if(n&&n!==`.`&&n!==`..`&&!n.includes(`*`)&&!n.includes(`?`)&&!n.includes(`[`)){let e=`/${n}/`;if(t.ignoreCase){if(!r.toLowerCase().includes(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(e))return{matches:!1,pruned:!1,printed:!1}}}let o=e.match(/\*(\.[a-zA-Z0-9]+)$/);if(o){let e=o[1];if(t.ignoreCase){if(!r.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(e))return{matches:!1,pruned:!1,printed:!1}}return{matches:a(r,e,t.ignoreCase),pruned:!1,printed:!1}}case`regex`:try{let r=t.ignoreCase?`i`:``;return{matches:e(t.pattern,r).test(n.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case`type`:return t.fileType===`f`?{matches:n.isFile,pruned:!1,printed:!1}:t.fileType===`d`?{matches:n.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case`empty`:return{matches:n.isEmpty,pruned:!1,printed:!1};case`mtime`:{let e=(Date.now()-n.mtime)/(1e3*60*60*24),r;return r=t.comparison===`more`?e>t.days:t.comparison===`less`?e<t.days:Math.floor(e)===t.days,{matches:r,pruned:!1,printed:!1}}case`newer`:{let e=n.newerRefTimes.get(t.refPath);return e===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:n.mtime>e,pruned:!1,printed:!1}}case`size`:{let e=t.value;switch(t.unit){case`c`:e=t.value;break;case`k`:e=t.value*1024;break;case`M`:e=t.value*1024*1024;break;case`G`:e=t.value*1024*1024*1024;break;case`b`:e=t.value*512;break}let r;return r=t.comparison===`more`?n.size>e:t.comparison===`less`?n.size<e:t.unit===`b`?Math.ceil(n.size/512)===t.value:n.size===e,{matches:r,pruned:!1,printed:!1}}case`perm`:{let e=n.mode&511,r=t.mode&511,i;return i=t.matchType===`exact`?e===r:t.matchType===`all`?(e&r)===r:(e&r)!==0,{matches:i,pruned:!1,printed:!1}}case`prune`:return{matches:!0,pruned:!0,printed:!1};case`print`:return{matches:!0,pruned:!1,printed:!0};case`not`:{let e=l(t.expr,n);return{matches:!e.matches,pruned:e.pruned,printed:!1}}case`and`:{let e=l(t.left,n);if(!e.matches)return{matches:!1,pruned:e.pruned,printed:!1};let r=l(t.right,n);return{matches:r.matches,pruned:e.pruned||r.pruned,printed:e.printed||r.printed}}case`or`:{let e=l(t.left,n);if(e.matches)return e;let r=l(t.right,n);return{matches:r.matches,pruned:e.pruned||r.pruned,printed:r.printed}}}}function u(e){if(!e)return!1;switch(e.type){case`name`:case`path`:case`regex`:case`type`:case`prune`:case`print`:return!1;case`empty`:case`mtime`:case`newer`:case`size`:case`perm`:return!0;case`not`:return u(e.expr);case`and`:case`or`:return u(e.left)||u(e.right)}}function d(e){if(!e)return!1;switch(e.type){case`empty`:return!0;case`not`:return d(e.expr);case`and`:case`or`:return d(e.left)||d(e.right);default:return!1}}function f(e){let t={terminalDirName:null,requiredExtension:null};if(!e)return t;let n=p(e);if(m(e)&&n.length===1){let e=n[0].split(`/`).filter(e=>e.length>0);if(e.length>=2)for(let n=e.length-2;n>=0;n--){let r=e[n];if(!r.includes(`*`)&&!r.includes(`?`)&&!r.includes(`[`)&&r!==`.`&&r!==`..`){let i=e[n+1];if(i&&(i.includes(`*`)||i.includes(`?`))){t.terminalDirName=r;let e=i.match(/^\*(\.[a-zA-Z0-9]+)$/);e&&(t.requiredExtension=e[1])}break}}}return t}function p(e){let t=[],n=e=>{e.type===`path`?t.push(e.pattern):e.type===`not`?n(e.expr):(e.type===`and`||e.type===`or`)&&(n(e.left),n(e.right))};return n(e),t}function m(e){let t=e=>e.type===`type`&&e.fileType===`f`?!0:e.type===`not`?t(e.expr):e.type===`and`||e.type===`or`?t(e.left)||t(e.right):!1;return t(e)}function h(e){let t=[],n=e=>{e&&(e.type===`newer`?t.push(e.refPath):e.type===`not`?n(e.expr):(e.type===`and`||e.type===`or`)&&(n(e.left),n(e.right)))};return n(e),t}function g(e){if(!e)return!0;switch(e.type){case`name`:case`path`:case`regex`:case`type`:case`prune`:case`print`:return!0;case`empty`:case`mtime`:case`newer`:case`size`:case`perm`:return!1;case`not`:return g(e.expr);case`and`:case`or`:return g(e.left)&&g(e.right)}}function _(t,n,r,i,o){switch(t.type){case`name`:{let e=t.pattern,r=e.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let e=r[1];if(t.ignoreCase){if(!n.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(e))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:a(n,e,t.ignoreCase),pruned:!1,printed:!1}}case`path`:{let e=t.pattern,n=e.split(`/`);for(let e=0;e<n.length-1;e++){let i=n[e];if(i&&i!==`.`&&i!==`..`&&!i.includes(`*`)&&!i.includes(`?`)&&!i.includes(`[`)){let e=`/${i}/`;if(t.ignoreCase){if(!r.toLowerCase().includes(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(e))return{matches:!1,pruned:!1,printed:!1}}}let i=e.match(/\*(\.[a-zA-Z0-9]+)$/);if(i){let e=i[1];if(t.ignoreCase){if(!r.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(e))return{matches:!1,pruned:!1,printed:!1}}return{matches:a(r,e,t.ignoreCase),pruned:!1,printed:!1}}case`regex`:try{let n=t.ignoreCase?`i`:``;return{matches:e(t.pattern,n).test(r),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case`type`:return t.fileType===`f`?{matches:i,pruned:!1,printed:!1}:t.fileType===`d`?{matches:o,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case`prune`:return{matches:!0,pruned:!0,printed:!1};case`print`:return{matches:!0,pruned:!1,printed:!0};case`not`:{let e=_(t.expr,n,r,i,o);return{matches:!e.matches,pruned:e.pruned,printed:!1}}case`and`:{let e=_(t.left,n,r,i,o);if(!e.matches)return{matches:!1,pruned:e.pruned,printed:!1};let a=_(t.right,n,r,i,o);return{matches:a.matches,pruned:e.pruned||a.pruned,printed:e.printed||a.printed}}case`or`:{let e=_(t.left,n,r,i,o);if(e.matches)return e;let a=_(t.right,n,r,i,o);return{matches:a.matches,pruned:e.pruned||a.pruned,printed:a.printed}}default:return{matches:!1,pruned:!1,printed:!1}}}function v(e){if(!e)return!1;switch(e.type){case`prune`:return!0;case`not`:return v(e.expr);case`and`:case`or`:return v(e.left)||v(e.right);default:return!1}}function y(e){switch(e.type){case`name`:case`path`:case`regex`:case`type`:case`prune`:case`print`:return!0;case`empty`:case`mtime`:case`newer`:case`size`:case`perm`:return!1;case`not`:return y(e.expr);case`and`:case`or`:return y(e.left)&&y(e.right)}}function b(e,t){return!e||!t.isDirectory?{shouldPrune:!1}:y(e)?{shouldPrune:l(e,{name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map}).pruned}:x(e,t)}function x(e,t){switch(e.type){case`or`:if(y(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(l(e.left,n).pruned)return{shouldPrune:!0}}return x(e.right,t);case`and`:if(y(e.left)&&y(e.right))return{shouldPrune:l(e,{name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map}).pruned};if(y(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return l(e.left,n).matches?x(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1};case`not`:return{shouldPrune:!1};default:return{shouldPrune:!1}}}function S(e,t){let n=[],r=[],i=t;for(;i<e.length;){let t=e[i];if(t===`(`||t===`\\(`){n.push({type:`lparen`}),i++;continue}if(t===`)`||t===`\\)`){n.push({type:`rparen`}),i++;continue}if(t===`-name`&&i+1<e.length)n.push({type:`expr`,expr:{type:`name`,pattern:e[++i]}});else if(t===`-iname`&&i+1<e.length)n.push({type:`expr`,expr:{type:`name`,pattern:e[++i],ignoreCase:!0}});else if(t===`-path`&&i+1<e.length)n.push({type:`expr`,expr:{type:`path`,pattern:e[++i]}});else if(t===`-ipath`&&i+1<e.length)n.push({type:`expr`,expr:{type:`path`,pattern:e[++i],ignoreCase:!0}});else if(t===`-regex`&&i+1<e.length)n.push({type:`expr`,expr:{type:`regex`,pattern:e[++i]}});else if(t===`-iregex`&&i+1<e.length)n.push({type:`expr`,expr:{type:`regex`,pattern:e[++i],ignoreCase:!0}});else if(t===`-type`&&i+1<e.length){let t=e[++i];if(t===`f`||t===`d`)n.push({type:`expr`,expr:{type:`type`,fileType:t}});else return{expr:null,pathIndex:i,error:`find: Unknown argument to -type: ${t}
1
+ import{t as e}from"./chunk-YNYSPYQ5-iQGTFdx0.mjs";import{t}from"./chunk-IPJHKYVM-D6H6ZTtk.mjs";import{r as n,t as r}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as i}from"./chunk-X2AJGDEF-BaH6i1Rq.mjs";import{t as a}from"./chunk-J642UCRS-D87gHOLP.mjs";import{n as o,r as s,t as c}from"./chunk-EEXR5ZDP-C5AJH114.mjs";function l(t,n){switch(t.type){case`name`:{let e=t.pattern,r=e.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let e=r[1],i=n.name;if(t.ignoreCase){if(!i.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!i.endsWith(e))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:a(n.name,e,t.ignoreCase),pruned:!1,printed:!1}}case`path`:{let e=t.pattern,r=n.relativePath,i=e.split(`/`);for(let e=0;e<i.length-1;e++){let n=i[e];if(n&&n!==`.`&&n!==`..`&&!n.includes(`*`)&&!n.includes(`?`)&&!n.includes(`[`)){let e=`/${n}/`;if(t.ignoreCase){if(!r.toLowerCase().includes(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(e))return{matches:!1,pruned:!1,printed:!1}}}let o=e.match(/\*(\.[a-zA-Z0-9]+)$/);if(o){let e=o[1];if(t.ignoreCase){if(!r.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(e))return{matches:!1,pruned:!1,printed:!1}}return{matches:a(r,e,t.ignoreCase),pruned:!1,printed:!1}}case`regex`:try{let r=t.ignoreCase?`i`:``;return{matches:e(t.pattern,r).test(n.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case`type`:return t.fileType===`f`?{matches:n.isFile,pruned:!1,printed:!1}:t.fileType===`d`?{matches:n.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case`empty`:return{matches:n.isEmpty,pruned:!1,printed:!1};case`mtime`:{let e=(Date.now()-n.mtime)/(1e3*60*60*24),r;return r=t.comparison===`more`?e>t.days:t.comparison===`less`?e<t.days:Math.floor(e)===t.days,{matches:r,pruned:!1,printed:!1}}case`newer`:{let e=n.newerRefTimes.get(t.refPath);return e===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:n.mtime>e,pruned:!1,printed:!1}}case`size`:{let e=t.value;switch(t.unit){case`c`:e=t.value;break;case`k`:e=t.value*1024;break;case`M`:e=t.value*1024*1024;break;case`G`:e=t.value*1024*1024*1024;break;case`b`:e=t.value*512;break}let r;return r=t.comparison===`more`?n.size>e:t.comparison===`less`?n.size<e:t.unit===`b`?Math.ceil(n.size/512)===t.value:n.size===e,{matches:r,pruned:!1,printed:!1}}case`perm`:{let e=n.mode&511,r=t.mode&511,i;return i=t.matchType===`exact`?e===r:t.matchType===`all`?(e&r)===r:(e&r)!==0,{matches:i,pruned:!1,printed:!1}}case`prune`:return{matches:!0,pruned:!0,printed:!1};case`print`:return{matches:!0,pruned:!1,printed:!0};case`not`:{let e=l(t.expr,n);return{matches:!e.matches,pruned:e.pruned,printed:!1}}case`and`:{let e=l(t.left,n);if(!e.matches)return{matches:!1,pruned:e.pruned,printed:!1};let r=l(t.right,n);return{matches:r.matches,pruned:e.pruned||r.pruned,printed:e.printed||r.printed}}case`or`:{let e=l(t.left,n);if(e.matches)return e;let r=l(t.right,n);return{matches:r.matches,pruned:e.pruned||r.pruned,printed:r.printed}}}}function u(e){if(!e)return!1;switch(e.type){case`name`:case`path`:case`regex`:case`type`:case`prune`:case`print`:return!1;case`empty`:case`mtime`:case`newer`:case`size`:case`perm`:return!0;case`not`:return u(e.expr);case`and`:case`or`:return u(e.left)||u(e.right)}}function d(e){if(!e)return!1;switch(e.type){case`empty`:return!0;case`not`:return d(e.expr);case`and`:case`or`:return d(e.left)||d(e.right);default:return!1}}function f(e){let t={terminalDirName:null,requiredExtension:null};if(!e)return t;let n=p(e);if(m(e)&&n.length===1){let e=n[0].split(`/`).filter(e=>e.length>0);if(e.length>=2)for(let n=e.length-2;n>=0;n--){let r=e[n];if(!r.includes(`*`)&&!r.includes(`?`)&&!r.includes(`[`)&&r!==`.`&&r!==`..`){let i=e[n+1];if(i&&(i.includes(`*`)||i.includes(`?`))){t.terminalDirName=r;let e=i.match(/^\*(\.[a-zA-Z0-9]+)$/);e&&(t.requiredExtension=e[1])}break}}}return t}function p(e){let t=[],n=e=>{e.type===`path`?t.push(e.pattern):e.type===`not`?n(e.expr):(e.type===`and`||e.type===`or`)&&(n(e.left),n(e.right))};return n(e),t}function m(e){let t=e=>e.type===`type`&&e.fileType===`f`?!0:e.type===`not`?t(e.expr):e.type===`and`||e.type===`or`?t(e.left)||t(e.right):!1;return t(e)}function h(e){let t=[],n=e=>{e&&(e.type===`newer`?t.push(e.refPath):e.type===`not`?n(e.expr):(e.type===`and`||e.type===`or`)&&(n(e.left),n(e.right)))};return n(e),t}function g(e){if(!e)return!0;switch(e.type){case`name`:case`path`:case`regex`:case`type`:case`prune`:case`print`:return!0;case`empty`:case`mtime`:case`newer`:case`size`:case`perm`:return!1;case`not`:return g(e.expr);case`and`:case`or`:return g(e.left)&&g(e.right)}}function _(t,n,r,i,o){switch(t.type){case`name`:{let e=t.pattern,r=e.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let e=r[1];if(t.ignoreCase){if(!n.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(e))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:a(n,e,t.ignoreCase),pruned:!1,printed:!1}}case`path`:{let e=t.pattern,n=e.split(`/`);for(let e=0;e<n.length-1;e++){let i=n[e];if(i&&i!==`.`&&i!==`..`&&!i.includes(`*`)&&!i.includes(`?`)&&!i.includes(`[`)){let e=`/${i}/`;if(t.ignoreCase){if(!r.toLowerCase().includes(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(e))return{matches:!1,pruned:!1,printed:!1}}}let i=e.match(/\*(\.[a-zA-Z0-9]+)$/);if(i){let e=i[1];if(t.ignoreCase){if(!r.toLowerCase().endsWith(e.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(e))return{matches:!1,pruned:!1,printed:!1}}return{matches:a(r,e,t.ignoreCase),pruned:!1,printed:!1}}case`regex`:try{let n=t.ignoreCase?`i`:``;return{matches:e(t.pattern,n).test(r),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case`type`:return t.fileType===`f`?{matches:i,pruned:!1,printed:!1}:t.fileType===`d`?{matches:o,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case`prune`:return{matches:!0,pruned:!0,printed:!1};case`print`:return{matches:!0,pruned:!1,printed:!0};case`not`:{let e=_(t.expr,n,r,i,o);return{matches:!e.matches,pruned:e.pruned,printed:!1}}case`and`:{let e=_(t.left,n,r,i,o);if(!e.matches)return{matches:!1,pruned:e.pruned,printed:!1};let a=_(t.right,n,r,i,o);return{matches:a.matches,pruned:e.pruned||a.pruned,printed:e.printed||a.printed}}case`or`:{let e=_(t.left,n,r,i,o);if(e.matches)return e;let a=_(t.right,n,r,i,o);return{matches:a.matches,pruned:e.pruned||a.pruned,printed:a.printed}}default:return{matches:!1,pruned:!1,printed:!1}}}function v(e){if(!e)return!1;switch(e.type){case`prune`:return!0;case`not`:return v(e.expr);case`and`:case`or`:return v(e.left)||v(e.right);default:return!1}}function y(e){switch(e.type){case`name`:case`path`:case`regex`:case`type`:case`prune`:case`print`:return!0;case`empty`:case`mtime`:case`newer`:case`size`:case`perm`:return!1;case`not`:return y(e.expr);case`and`:case`or`:return y(e.left)&&y(e.right)}}function b(e,t){return!e||!t.isDirectory?{shouldPrune:!1}:y(e)?{shouldPrune:l(e,{name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map}).pruned}:x(e,t)}function x(e,t){switch(e.type){case`or`:if(y(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(l(e.left,n).pruned)return{shouldPrune:!0}}return x(e.right,t);case`and`:if(y(e.left)&&y(e.right))return{shouldPrune:l(e,{name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map}).pruned};if(y(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return l(e.left,n).matches?x(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1};case`not`:return{shouldPrune:!1};default:return{shouldPrune:!1}}}function S(e,t){let n=[],r=[],i=t;for(;i<e.length;){let t=e[i];if(t===`(`||t===`\\(`){n.push({type:`lparen`}),i++;continue}if(t===`)`||t===`\\)`){n.push({type:`rparen`}),i++;continue}if(t===`-name`&&i+1<e.length)n.push({type:`expr`,expr:{type:`name`,pattern:e[++i]}});else if(t===`-iname`&&i+1<e.length)n.push({type:`expr`,expr:{type:`name`,pattern:e[++i],ignoreCase:!0}});else if(t===`-path`&&i+1<e.length)n.push({type:`expr`,expr:{type:`path`,pattern:e[++i]}});else if(t===`-ipath`&&i+1<e.length)n.push({type:`expr`,expr:{type:`path`,pattern:e[++i],ignoreCase:!0}});else if(t===`-regex`&&i+1<e.length)n.push({type:`expr`,expr:{type:`regex`,pattern:e[++i]}});else if(t===`-iregex`&&i+1<e.length)n.push({type:`expr`,expr:{type:`regex`,pattern:e[++i],ignoreCase:!0}});else if(t===`-type`&&i+1<e.length){let t=e[++i];if(t===`f`||t===`d`)n.push({type:`expr`,expr:{type:`type`,fileType:t}});else return{expr:null,pathIndex:i,error:`find: Unknown argument to -type: ${t}
2
2
  `,actions:[]}}else if(t===`-empty`)n.push({type:`expr`,expr:{type:`empty`}});else if(t===`-mtime`&&i+1<e.length){let t=e[++i],r=`exact`,a=t;t.startsWith(`+`)?(r=`more`,a=t.slice(1)):t.startsWith(`-`)&&(r=`less`,a=t.slice(1));let o=parseInt(a,10);Number.isNaN(o)||n.push({type:`expr`,expr:{type:`mtime`,days:o,comparison:r}})}else if(t===`-newer`&&i+1<e.length){let t=e[++i];n.push({type:`expr`,expr:{type:`newer`,refPath:t}})}else if(t===`-size`&&i+1<e.length){let t=e[++i],r=`exact`,a=t;t.startsWith(`+`)?(r=`more`,a=t.slice(1)):t.startsWith(`-`)&&(r=`less`,a=t.slice(1));let o=a.match(/^(\d+)([ckMGb])?$/);if(o){let e=parseInt(o[1],10),t=o[2]||`b`;n.push({type:`expr`,expr:{type:`size`,value:e,unit:t,comparison:r}})}}else if(t===`-perm`&&i+1<e.length){let t=e[++i],r=`exact`,a=t;t.startsWith(`-`)?(r=`all`,a=t.slice(1)):t.startsWith(`/`)&&(r=`any`,a=t.slice(1));let o=parseInt(a,8);Number.isNaN(o)||n.push({type:`expr`,expr:{type:`perm`,mode:o,matchType:r}})}else if(t===`-prune`)n.push({type:`expr`,expr:{type:`prune`}});else if(t===`-not`||t===`!`)n.push({type:`not`});else if(t===`-o`||t===`-or`)n.push({type:`op`,op:`or`});else if(t===`-a`||t===`-and`)n.push({type:`op`,op:`and`});else if(t===`-maxdepth`||t===`-mindepth`)i++;else if(t!==`-depth`)if(t===`-exec`){let t=[];for(i++;i<e.length&&e[i]!==`;`&&e[i]!==`+`;)t.push(e[i]),i++;if(i>=e.length)return{expr:null,pathIndex:i,error:`find: missing argument to \`-exec'
3
3
  `,actions:[]};let n=e[i]===`+`;r.push({type:`exec`,command:t,batchMode:n})}else if(t===`-print`)n.push({type:`expr`,expr:{type:`print`}}),r.push({type:`print`});else if(t===`-print0`)r.push({type:`print0`});else if(t===`-printf`&&i+1<e.length){let t=e[++i];r.push({type:`printf`,format:t})}else if(t===`-delete`)r.push({type:`delete`});else{if(t.startsWith(`-`))return{expr:null,pathIndex:i,error:`find: unknown predicate '${t}'
4
4
  `,actions:[]};if(n.length===0){i++;continue}break}i++}if(n.length===0)return{expr:null,pathIndex:i,actions:r};let a=C(n);return a.error?{expr:null,pathIndex:i,error:a.error,actions:r}:{expr:a.expr,pathIndex:i,actions:r}}function C(e){let t=0;function n(){let n=r();if(!n)return null;for(;t<e.length;){let i=e[t];if(i.type===`op`&&i.op===`or`){t++;let e=r();if(!e)return n;n={type:`or`,left:n,right:e}}else break}return n}function r(){let n=i();if(!n)return null;for(;t<e.length;){let r=e[t];if(r.type===`op`&&r.op===`and`){t++;let e=i();if(!e)return n;n={type:`and`,left:n,right:e}}else if(r.type===`expr`||r.type===`not`||r.type===`lparen`){let e=i();if(!e)return n;n={type:`and`,left:n,right:e}}else break}return n}function i(){if(t<e.length&&e[t].type===`not`){t++;let e=i();return e?{type:`not`,expr:e}:null}return a()}function a(){if(t>=e.length)return null;let r=e[t];if(r.type===`lparen`){t++;let r=n();return t<e.length&&e[t].type===`rparen`&&t++,r}return r.type===`expr`?(t++,r.expr):(r.type,null)}return{expr:n()}}var w=500;function T(){return{readdirCalls:0,readdirTime:0,statCalls:0,statTime:0,evalCalls:0,evalTime:0,nodeCount:0,batchCount:0,batchTime:0,earlyPrunes:0}}function E(e,t,n){e({category:`find`,name:`summary`,durationMs:n,details:{readdirCalls:t.readdirCalls,readdirTimeMs:t.readdirTime,statCalls:t.statCalls,statTimeMs:t.statTime,evalCalls:t.evalCalls,evalTimeMs:t.evalTime,nodeCount:t.nodeCount,batchCount:t.batchCount,batchTimeMs:t.batchTime,earlyPrunes:t.earlyPrunes,otherTimeMs:n-t.readdirTime-t.statTime-t.evalTime-t.batchTime}})}var D={name:`find`,summary:`search for files in a directory hierarchy`,usage:`find [path...] [expression]`,options:`-name PATTERN file name matches shell pattern PATTERN.-iname PATTERN like -name but case insensitive.-path PATTERN file path matches shell pattern PATTERN.-ipath PATTERN like -path but case insensitive.-regex PATTERN file path matches regular expression PATTERN.-iregex PATTERN like -regex but case insensitive.-type TYPE file is of type: f (regular file), d (directory).-empty file is empty or directory is empty.-mtime N file's data was modified N*24 hours ago.-newer FILE file was modified more recently than FILE.-size N[ckMGb] file uses N units of space (c=bytes, k=KB, M=MB, G=GB, b=512B blocks).-perm MODE file's permission bits are exactly MODE (octal).-perm -MODE all permission bits MODE are set.-perm /MODE any permission bits MODE are set.-maxdepth LEVELS descend at most LEVELS directories.-mindepth LEVELS do not apply tests at levels less than LEVELS.-depth process directory contents before directory itself.-prune do not descend into this directory.-not, ! negate the following expression.-a, -and logical AND (default).-o, -or logical OR.-exec CMD {} ; execute CMD on each file ({} is replaced by filename).-exec CMD {} + execute CMD with multiple files at once.-print print the full file name (default action).-print0 print the full file name followed by a null character.-printf FORMAT print FORMAT with directives: %f %h %p %P %s %d %m %M %t.-delete delete found files/directories. --help display this help and exit`.split(`.`)},O=new Set([`-name`,`-iname`,`-path`,`-ipath`,`-regex`,`-iregex`,`-type`,`-maxdepth`,`-mindepth`,`-mtime`,`-newer`,`-size`,`-perm`]),k={name:`find`,async execute(e,i){if(r(e))return n(D);let a=[],o=null,s=null,c=!1,p=!1;for(let t=0;t<e.length;t++){let n=e[t];if(n===`-maxdepth`&&t+1<e.length)p=!0,o=parseInt(e[++t],10);else if(n===`-mindepth`&&t+1<e.length)p=!0,s=parseInt(e[++t],10);else if(n===`-depth`)p=!0,c=!0;else if(n===`-exec`)for(p=!0,t++;t<e.length&&e[t]!==`;`&&e[t]!==`+`;)t++;else !n.startsWith(`-`)&&n!==`;`&&n!==`+`&&n!==`(`&&n!==`)`&&n!==`\\(`&&n!==`\\)`&&n!==`!`?p||a.push(n):O.has(n)?(p=!0,t++):(n.startsWith(`-`)||n===`(`||n===`\\(`||n===`!`)&&(p=!0)}a.length===0&&a.push(`.`);let{expr:m,error:y,actions:x}=S(e,0);if(y)return{stdout:``,stderr:y,exitCode:1};let C=x.some(e=>e.type===`print`),k=x.length===0,j=[],M=x.some(e=>e.type===`printf`),N=[],P=``,F=0,I=h(m),L=new Map;for(let e of I){let t=i.fs.resolvePath(i.cwd,e);try{let n=await i.fs.stat(t);L.set(e,n.mtime?.getTime()??Date.now())}catch{}}let R=x.some(e=>{if(e.type!==`printf`)return!1;let t=e.format.replace(/%%/g,``);return/%[-+]?[0-9]*\.?[0-9]*(s|m|M|t|T)/.test(t)}),z=u(m)||R,B=d(m),V=f(m),H=v(m),U=g(m),W=typeof i.fs.readdirWithFileTypes==`function`;for(let e of a){let t=function(t){let n=s===null||t.depth>=s,i=!1;if(n&&m!==null){let e=Date.now(),a;a=U?_(m,t.name,t.relativePath,t.isFile,t.isDirectory):l(m,{name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:t.isEmpty,mtime:t.stat?.mtime?.getTime()??Date.now(),size:t.stat?.size??0,mode:t.stat?.mode??420,newerRefTimes:L}),n=a.matches,i=C?a.printed:n,r.evalCalls++,r.evalTime+=Date.now()-e}else n&&(i=!0);return i?{print:!0,printfData:M?{path:t.relativePath,name:t.name,size:t.stat?.size??0,mtime:t.stat?.mtime?.getTime()??Date.now(),mode:t.stat?.mode??420,isDirectory:t.isDirectory,depth:t.depth,startingPoint:e}:null}:{print:!1,printfData:null}};e.length>1&&e.endsWith(`/`)&&(e=e.slice(0,-1));let n=i.fs.resolvePath(i.cwd,e);try{await i.fs.stat(n)}catch{P+=`find: ${e}: No such file or directory
@@ -9,4 +9,4 @@ import{t as e}from"./chunk-YNYSPYQ5-DesxOVHh.mjs";import{t}from"./chunk-IPJHKYVM
9
9
  `,exitCode:1};if(e.batchMode){let n=[];for(let t of e.command)t===`{}`?n.push(...j):n.push(t);let r=await i.exec(t([n[0]]),{cwd:i.cwd,signal:i.signal,args:n.slice(1)});G+=r.stdout,P+=r.stderr,r.exitCode!==0&&(F=r.exitCode)}else for(let n of j){let r=e.command.map(e=>e===`{}`?n:e),a=await i.exec(t([r[0]]),{cwd:i.cwd,signal:i.signal,args:r.slice(1)});G+=a.stdout,P+=a.stderr,a.exitCode!==0&&(F=a.exitCode)}break}else k&&(G=j.length>0?`${j.join(`
10
10
  `)}
11
11
  `:``);return{stdout:G,stderr:P,exitCode:F}}};function A(e,t){let n=s(e),r=``,a=0;for(;a<n.length;)if(n[a]===`%`&&a+1<n.length){if(a++,n[a]===`%`){r+=`%`,a++;continue}let[e,s,l]=c(n,a);if(a+=l,a>=n.length){r+=`%`;break}let u=n[a],d;switch(u){case`f`:d=t.name,a++;break;case`h`:{let e=t.path.lastIndexOf(`/`);d=e>0?t.path.slice(0,e):`.`,a++;break}case`p`:d=t.path,a++;break;case`P`:{let e=t.startingPoint;d=t.path===e?``:t.path.startsWith(`${e}/`)?t.path.slice(e.length+1):e===`.`&&t.path.startsWith(`./`)?t.path.slice(2):t.path,a++;break}case`s`:d=String(t.size),a++;break;case`d`:d=String(t.depth),a++;break;case`m`:d=(t.mode&511).toString(8),a++;break;case`M`:d=i(t.mode,t.isDirectory),a++;break;case`t`:d=j(new Date(t.mtime)),a++;break;case`T`:if(a+1<n.length){let e=n[a+1];d=M(new Date(t.mtime),e),a+=2}else d=`%T`,a++;break;default:r+=`%${e!==0||s!==-1?`${e}.${s}`:``}${u}`,a++;continue}r+=o(d,e,s)}else r+=n[a],a++;return r}function j(e){return`${[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`][e.getDay()]} ${[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][e.getMonth()]} ${String(e.getDate()).padStart(2,` `)} ${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}:${String(e.getSeconds()).padStart(2,`0`)} ${e.getFullYear()}`}function M(e,t){switch(t){case`@`:return String(e.getTime()/1e3);case`Y`:return String(e.getFullYear());case`m`:return String(e.getMonth()+1).padStart(2,`0`);case`d`:return String(e.getDate()).padStart(2,`0`);case`H`:return String(e.getHours()).padStart(2,`0`);case`M`:return String(e.getMinutes()).padStart(2,`0`);case`S`:return String(e.getSeconds()).padStart(2,`0`);case`T`:return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}:${String(e.getSeconds()).padStart(2,`0`)}`;case`F`:return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`;default:return`%T${t}`}}var N={name:`find`,flags:[{flag:`-name`,type:`value`,valueHint:`pattern`},{flag:`-iname`,type:`value`,valueHint:`pattern`},{flag:`-type`,type:`value`,valueHint:`string`},{flag:`-maxdepth`,type:`value`,valueHint:`number`},{flag:`-mindepth`,type:`value`,valueHint:`number`},{flag:`-empty`,type:`boolean`},{flag:`-print`,type:`boolean`},{flag:`-print0`,type:`boolean`}],needsFiles:!0};export{k as n,N as t};
12
- //# sourceMappingURL=chunk-LPQPILI2-CfDX1Tyv.mjs.map
12
+ //# sourceMappingURL=chunk-LPQPILI2-DyyhWSR7.mjs.map
@@ -1,7 +1,7 @@
1
- import{n as e}from"./chunk-3THT3N7L-DztAF386.mjs";import{t}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{t as n}from"./chunk-HWKDQ44K-CPSjqtR_.mjs";var r={recursive:{short:`p`,long:`parents`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},i={name:`mkdir`,async execute(i,a){let o=n(`mkdir`,i,r);if(!o.ok)return o.error;let s=o.result.flags.recursive,c=o.result.flags.verbose,l=o.result.positional;if(l.length===0)return{stdout:``,stderr:`mkdir: missing operand
1
+ import{n as e}from"./chunk-3THT3N7L-Ce6LrnIA.mjs";import{t}from"./chunk-44UOCSGV-uErOrz7G.mjs";import{t as n}from"./chunk-HWKDQ44K-CPSjqtR_.mjs";var r={recursive:{short:`p`,long:`parents`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},i={name:`mkdir`,async execute(i,a){let o=n(`mkdir`,i,r);if(!o.ok)return o.error;let s=o.result.flags.recursive,c=o.result.flags.verbose,l=o.result.positional;if(l.length===0)return{stdout:``,stderr:`mkdir: missing operand
2
2
  `,exitCode:1};let u=``,d=``,f=0;for(let n of l)try{let e=a.fs.resolvePath(a.cwd,n);await a.fs.mkdir(e,{recursive:s}),c&&(u+=`mkdir: created directory '${n}'
3
3
  `)}catch(r){let i=t(r);i.includes(`ENOENT`)||i.includes(`no such file`)?d+=`mkdir: cannot create directory '${n}': No such file or directory
4
4
  `:i.includes(`EEXIST`)||i.includes(`already exists`)?d+=`mkdir: cannot create directory '${n}': File exists
5
5
  `:d+=`mkdir: cannot create directory '${n}': ${e(i)}
6
6
  `,f=1}return{stdout:u,stderr:d,exitCode:f}}},a={name:`mkdir`,flags:[{flag:`-p`,type:`boolean`},{flag:`-v`,type:`boolean`}],needsArgs:!0};export{a as n,i as t};
7
- //# sourceMappingURL=chunk-MDDMCKUK-BrBgeH_z.mjs.map
7
+ //# sourceMappingURL=chunk-MDDMCKUK-poQ25EjI.mjs.map
@@ -1,8 +1,8 @@
1
- import{n as e}from"./chunk-3THT3N7L-DztAF386.mjs";import{t}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{t as n}from"./chunk-HWKDQ44K-CPSjqtR_.mjs";var r={recursive:{short:`r`,long:`recursive`,type:`boolean`},recursiveUpper:{short:`R`,type:`boolean`},force:{short:`f`,long:`force`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},i={name:`rm`,async execute(i,a){let o=n(`rm`,i,r);if(!o.ok)return o.error;let s=o.result.flags.recursive||o.result.flags.recursiveUpper,c=o.result.flags.force,l=o.result.flags.verbose,u=o.result.positional;if(u.length===0)return c?{stdout:``,stderr:``,exitCode:0}:{stdout:``,stderr:`rm: missing operand
1
+ import{n as e}from"./chunk-3THT3N7L-Ce6LrnIA.mjs";import{t}from"./chunk-44UOCSGV-uErOrz7G.mjs";import{t as n}from"./chunk-HWKDQ44K-CPSjqtR_.mjs";var r={recursive:{short:`r`,long:`recursive`,type:`boolean`},recursiveUpper:{short:`R`,type:`boolean`},force:{short:`f`,long:`force`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},i={name:`rm`,async execute(i,a){let o=n(`rm`,i,r);if(!o.ok)return o.error;let s=o.result.flags.recursive||o.result.flags.recursiveUpper,c=o.result.flags.force,l=o.result.flags.verbose,u=o.result.positional;if(u.length===0)return c?{stdout:``,stderr:``,exitCode:0}:{stdout:``,stderr:`rm: missing operand
2
2
  `,exitCode:1};let d=``,f=``,p=0;for(let n of u)try{let e=a.fs.resolvePath(a.cwd,n);if((await a.fs.stat(e)).isDirectory&&!s){f+=`rm: cannot remove '${n}': Is a directory
3
3
  `,p=1;continue}await a.fs.rm(e,{recursive:s,force:c}),l&&(d+=`removed '${n}'
4
4
  `)}catch(r){if(!c){let i=t(r);i.includes(`ENOENT`)||i.includes(`no such file`)?f+=`rm: cannot remove '${n}': No such file or directory
5
5
  `:i.includes(`ENOTEMPTY`)||i.includes(`not empty`)?f+=`rm: cannot remove '${n}': Directory not empty
6
6
  `:f+=`rm: cannot remove '${n}': ${e(i)}
7
7
  `,p=1}}return{stdout:d,stderr:f,exitCode:p}}},a={name:`rm`,flags:[{flag:`-r`,type:`boolean`},{flag:`-R`,type:`boolean`},{flag:`-f`,type:`boolean`},{flag:`-v`,type:`boolean`}],needsArgs:!0};export{i as n,a as t};
8
- //# sourceMappingURL=chunk-MIZPJHVH-D3ET6RI_.mjs.map
8
+ //# sourceMappingURL=chunk-MIZPJHVH-BdoPqh_Y.mjs.map
@@ -1,4 +1,4 @@
1
- import{t as e}from"./chunk-IPJHKYVM-C3IodQq7.mjs";var t=new Map([[`File operations`,[`ls`,`cat`,`head`,`tail`,`wc`,`touch`,`mkdir`,`rm`,`cp`,`mv`,`ln`,`chmod`,`stat`,`readlink`]],[`Text processing`,[`grep`,`sed`,`awk`,`sort`,`uniq`,`cut`,`tr`,`tee`,`diff`]],[`Search`,[`find`]],[`Navigation & paths`,[`pwd`,`basename`,`dirname`,`tree`,`du`]],[`Environment & shell`,[`echo`,`printf`,`env`,`printenv`,`export`,`alias`,`unalias`,`history`,`clear`,`true`,`false`,`bash`,`sh`]],[`Data processing`,[`xargs`,`jq`,`base64`,`date`]],[`Network`,[`curl`,`html-to-markdown`]]]);function n(e){let n=[],r=new Set(e);n.push(`Available commands:
1
+ import{t as e}from"./chunk-IPJHKYVM-D6H6ZTtk.mjs";var t=new Map([[`File operations`,[`ls`,`cat`,`head`,`tail`,`wc`,`touch`,`mkdir`,`rm`,`cp`,`mv`,`ln`,`chmod`,`stat`,`readlink`]],[`Text processing`,[`grep`,`sed`,`awk`,`sort`,`uniq`,`cut`,`tr`,`tee`,`diff`]],[`Search`,[`find`]],[`Navigation & paths`,[`pwd`,`basename`,`dirname`,`tree`,`du`]],[`Environment & shell`,[`echo`,`printf`,`env`,`printenv`,`export`,`alias`,`unalias`,`history`,`clear`,`true`,`false`,`bash`,`sh`]],[`Data processing`,[`xargs`,`jq`,`base64`,`date`]],[`Network`,[`curl`,`html-to-markdown`]]]);function n(e){let n=[],r=new Set(e);n.push(`Available commands:
2
2
  `);let i=[];for(let[e,i]of t){let t=i.filter(e=>r.has(e));if(t.length>0){n.push(` ${e}:`),n.push(` ${t.join(`, `)}
3
3
  `);for(let e of t)r.delete(e)}}for(let e of r)i.push(e);return i.length>0&&(n.push(` Other:`),n.push(` ${i.sort().join(`, `)}
4
4
  `)),n.push(`Use '<command> --help' for details on a specific command.`),`${n.join(`
@@ -13,4 +13,4 @@ Options:
13
13
  If a command name is provided, shows help for that command.
14
14
  Otherwise, lists all available commands.
15
15
  `,stderr:``,exitCode:0};if(t.length>0&&r.exec){let n=t[0];return r.exec(e([n]),{cwd:r.cwd,signal:r.signal,args:[`--help`]})}return{stdout:n(r.getRegisteredCommands?.()??[]),stderr:``,exitCode:0}}},i={name:`help`,flags:[]};export{i as n,r as t};
16
- //# sourceMappingURL=chunk-MLXIYONF-dOe6Iqcc.mjs.map
16
+ //# sourceMappingURL=chunk-MLXIYONF-DwewZM3r.mjs.map
@@ -1,4 +1,4 @@
1
- import{r as e}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{n as t,r as n,t as r}from"./chunk-74CEPOFO-D1bzz49u.mjs";var i={name:`env`,summary:`run a program in a modified environment`,usage:`env [OPTION]... [NAME=VALUE]... [COMMAND [ARG]...]`,options:[`-i, --ignore-environment start with an empty environment`,`-u NAME, --unset=NAME remove NAME from the environment`,` --help display this help and exit`]},a={name:`env`,async execute(a,o){if(r(a))return n(i);let s=!1,c=[],l=new Map,u=-1;for(let e=0;e<a.length;e++){let n=a[e];if(n===`-i`||n===`--ignore-environment`)s=!0;else if(n===`-u`&&e+1<a.length)c.push(a[++e]);else if(n.startsWith(`-u`))c.push(n.slice(2));else if(n.startsWith(`--unset=`))c.push(n.slice(8));else{if(n.startsWith(`--`)&&n!==`--`)return t(`env`,n);if(n.startsWith(`-`)&&n!==`-`){for(let e of n.slice(1))if(e!==`i`&&e!==`u`)return t(`env`,`-${e}`);n.includes(`i`)&&(s=!0)}else if(n.includes(`=`)&&u===-1){let e=n.indexOf(`=`),t=n.slice(0,e),r=n.slice(e+1);l.set(t,r)}else{u=e;break}}}let d;if(s)d=new Map(l);else{d=new Map(o.env);for(let e of c)d.delete(e);for(let[e,t]of l)d.set(e,t)}if(u===-1){let e=[];for(let[t,n]of d)e.push(`${t}=${n}`);return{stdout:e.join(`
1
+ import{r as e}from"./chunk-OJDRYQWQ-DWhg7YHU.mjs";import{n as t,r as n,t as r}from"./chunk-74CEPOFO-D1bzz49u.mjs";var i={name:`env`,summary:`run a program in a modified environment`,usage:`env [OPTION]... [NAME=VALUE]... [COMMAND [ARG]...]`,options:[`-i, --ignore-environment start with an empty environment`,`-u NAME, --unset=NAME remove NAME from the environment`,` --help display this help and exit`]},a={name:`env`,async execute(a,o){if(r(a))return n(i);let s=!1,c=[],l=new Map,u=-1;for(let e=0;e<a.length;e++){let n=a[e];if(n===`-i`||n===`--ignore-environment`)s=!0;else if(n===`-u`&&e+1<a.length)c.push(a[++e]);else if(n.startsWith(`-u`))c.push(n.slice(2));else if(n.startsWith(`--unset=`))c.push(n.slice(8));else{if(n.startsWith(`--`)&&n!==`--`)return t(`env`,n);if(n.startsWith(`-`)&&n!==`-`){for(let e of n.slice(1))if(e!==`i`&&e!==`u`)return t(`env`,`-${e}`);n.includes(`i`)&&(s=!0)}else if(n.includes(`=`)&&u===-1){let e=n.indexOf(`=`),t=n.slice(0,e),r=n.slice(e+1);l.set(t,r)}else{u=e;break}}}let d;if(s)d=new Map(l);else{d=new Map(o.env);for(let e of c)d.delete(e);for(let[e,t]of l)d.set(e,t)}if(u===-1){let e=[];for(let[t,n]of d)e.push(`${t}=${n}`);return{stdout:e.join(`
2
2
  `)+(e.length>0?`
3
3
  `:``),stderr:``,exitCode:0}}if(!o.exec)return{stdout:``,stderr:`env: command execution not supported in this context
4
4
  `,exitCode:1};let f=a.slice(u);return o.exec(`command`,{cwd:o.cwd,env:e(d),replaceEnv:!0,stdin:o.stdin,signal:o.signal,args:f})}},o={name:`printenv`,summary:`print all or part of environment`,usage:`printenv [OPTION]... [VARIABLE]...`,options:[` --help display this help and exit`]},s={name:`printenv`,async execute(e,t){if(r(e))return n(o);let i=e.filter(e=>!e.startsWith(`-`));if(i.length===0){let e=[];for(let[n,r]of t.env)e.push(`${n}=${r}`);return{stdout:e.join(`
@@ -6,4 +6,4 @@ import{r as e}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{n as t,r as n,t as r}fr
6
6
  `:``),stderr:``,exitCode:0}}let a=[],s=0;for(let e of i){let n=t.env.get(e);n===void 0?s=1:a.push(n)}return{stdout:a.join(`
7
7
  `)+(a.length>0?`
8
8
  `:``),stderr:``,exitCode:s}}},c={name:`env`,flags:[{flag:`-i`,type:`boolean`},{flag:`-u`,type:`value`,valueHint:`string`}]},l={name:`printenv`,flags:[]};export{a as i,c as n,l as r,s as t};
9
- //# sourceMappingURL=chunk-NAERJDUW-CYdostkt.mjs.map
9
+ //# sourceMappingURL=chunk-NAERJDUW-BFcmkHme.mjs.map
@@ -1,8 +1,8 @@
1
- import{t as e}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as r}from"./chunk-HWKDQ44K-CPSjqtR_.mjs";var i={name:`cp`,summary:`copy files and directories`,usage:`cp [OPTION]... SOURCE... DEST`,options:[`-r, -R, --recursive copy directories recursively`,`-n, --no-clobber do not overwrite an existing file`,`-p, --preserve preserve file attributes`,`-v, --verbose explain what is being done`,` --help display this help and exit`]},a={recursive:{short:`r`,long:`recursive`,type:`boolean`},recursiveUpper:{short:`R`,type:`boolean`},noClobber:{short:`n`,long:`no-clobber`,type:`boolean`},preserve:{short:`p`,long:`preserve`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},o={name:`cp`,async execute(o,s){if(n(o))return t(i);let c=r(`cp`,o,a);if(!c.ok)return c.error;let l=c.result.flags.recursive||c.result.flags.recursiveUpper,u=c.result.flags.noClobber;c.result.flags.preserve;let d=c.result.flags.verbose,f=c.result.positional;if(f.length<2)return{stdout:``,stderr:`cp: missing destination file operand
1
+ import{t as e}from"./chunk-44UOCSGV-uErOrz7G.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as r}from"./chunk-HWKDQ44K-CPSjqtR_.mjs";var i={name:`cp`,summary:`copy files and directories`,usage:`cp [OPTION]... SOURCE... DEST`,options:[`-r, -R, --recursive copy directories recursively`,`-n, --no-clobber do not overwrite an existing file`,`-p, --preserve preserve file attributes`,`-v, --verbose explain what is being done`,` --help display this help and exit`]},a={recursive:{short:`r`,long:`recursive`,type:`boolean`},recursiveUpper:{short:`R`,type:`boolean`},noClobber:{short:`n`,long:`no-clobber`,type:`boolean`},preserve:{short:`p`,long:`preserve`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},o={name:`cp`,async execute(o,s){if(n(o))return t(i);let c=r(`cp`,o,a);if(!c.ok)return c.error;let l=c.result.flags.recursive||c.result.flags.recursiveUpper,u=c.result.flags.noClobber;c.result.flags.preserve;let d=c.result.flags.verbose,f=c.result.positional;if(f.length<2)return{stdout:``,stderr:`cp: missing destination file operand
2
2
  `,exitCode:1};let p=f.pop()??``,m=f,h=s.fs.resolvePath(s.cwd,p),g=``,_=``,v=0,y=!1;try{y=(await s.fs.stat(h)).isDirectory}catch{}if(m.length>1&&!y)return{stdout:``,stderr:`cp: target '${p}' is not a directory
3
3
  `,exitCode:1};for(let t of m)try{let e=s.fs.resolvePath(s.cwd,t),n=await s.fs.stat(e),r=h;if(y){let e=t.split(`/`).pop()||t;r=h===`/`?`/${e}`:`${h}/${e}`}if(n.isDirectory&&!l){_+=`cp: -r not specified; omitting directory '${t}'
4
4
  `,v=1;continue}if(u)try{await s.fs.stat(r);continue}catch{}await s.fs.cp(e,r,{recursive:l}),d&&(g+=`'${t}' -> '${r}'
5
5
  `)}catch(n){let r=e(n);r.includes(`ENOENT`)||r.includes(`no such file`)?_+=`cp: cannot stat '${t}': No such file or directory
6
6
  `:_+=`cp: cannot copy '${t}': ${r}
7
7
  `,v=1}return{stdout:g,stderr:_,exitCode:v}}},s={name:`cp`,flags:[{flag:`-r`,type:`boolean`},{flag:`-R`,type:`boolean`},{flag:`-n`,type:`boolean`},{flag:`-p`,type:`boolean`},{flag:`-v`,type:`boolean`}],needsArgs:!0,minArgs:2};export{s as n,o as t};
8
- //# sourceMappingURL=chunk-NUYSJFDK-CU1FKadr.mjs.map
8
+ //# sourceMappingURL=chunk-NUYSJFDK-DAvAseHr.mjs.map