just-bash 3.0.3 → 3.2.0

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 (1161) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +72 -9
  3. package/dist/Bash.d.ts +12 -4
  4. package/dist/abort-signals.d.ts +10 -0
  5. package/dist/bin/chunks/alias-3R4G6HQY.js +3 -0
  6. package/dist/bin/chunks/awk2-7UZLEPVX.js +3 -0
  7. package/dist/bin/chunks/base64-W6FVFNXJ.js +3 -0
  8. package/dist/bin/chunks/basename-C4CRGDXP.js +3 -0
  9. package/dist/bin/chunks/bash-CFCBBWVH.js +3 -0
  10. package/dist/bin/chunks/cat-5YECZSFQ.js +3 -0
  11. package/dist/bin/chunks/chmod-45TMYSW2.js +3 -0
  12. package/dist/bin/chunks/chunk-23OI2XDJ.js +20 -0
  13. package/dist/bin/chunks/chunk-2OQ5HPZE.js +7 -0
  14. package/dist/bin/chunks/chunk-2YLY6FJA.js +10 -0
  15. package/dist/bin/chunks/chunk-3HUI54BW.js +143 -0
  16. package/dist/bin/chunks/chunk-3OYRDLJJ.js +101 -0
  17. package/dist/bin/chunks/chunk-3PCPQIUD.js +3 -0
  18. package/dist/bin/chunks/chunk-3VSWQCPN.js +18 -0
  19. package/dist/bin/chunks/chunk-43E7AR6A.js +3 -0
  20. package/dist/bin/chunks/chunk-46CDVHZ3.js +5 -0
  21. package/dist/bin/chunks/chunk-4SQKKW2M.js +3 -0
  22. package/dist/bin/chunks/chunk-5SKEZPTU.js +12 -0
  23. package/dist/bin/chunks/chunk-6D75E4LV.js +3 -0
  24. package/dist/bin/chunks/chunk-6SAZRW7E.js +15 -0
  25. package/dist/bin/chunks/chunk-7FGDUBSN.js +14 -0
  26. package/dist/bin/chunks/chunk-7I6MNC5I.js +3 -0
  27. package/dist/bin/chunks/chunk-B7RRNV3A.js +22 -0
  28. package/dist/bin/chunks/chunk-BCJ42NCM.js +15 -0
  29. package/dist/bin/chunks/chunk-BNYIXXC2.js +3 -0
  30. package/dist/bin/chunks/chunk-BPWZ7ADB.js +8 -0
  31. package/dist/bin/chunks/chunk-BWRQ5HYX.js +9 -0
  32. package/dist/bin/chunks/chunk-CB4SODHK.js +34 -0
  33. package/dist/bin/chunks/chunk-CC2AQ6B7.js +15 -0
  34. package/dist/bin/chunks/chunk-CPKBPQ2C.js +3 -0
  35. package/dist/bin/chunks/chunk-CPTQXTBJ.js +3 -0
  36. package/dist/bin/chunks/chunk-D3MUBZ4P.js +65 -0
  37. package/dist/bin/chunks/chunk-DN2YCFOR.js +3 -0
  38. package/dist/bin/chunks/chunk-DSZQ22OX.js +12 -0
  39. package/dist/bin/chunks/chunk-E5VZGTZ6.js +10 -0
  40. package/dist/bin/chunks/chunk-ETWDDV6I.js +10 -0
  41. package/dist/bin/chunks/chunk-GEUCQ4AB.js +10 -0
  42. package/dist/bin/chunks/chunk-H4BRFPKY.js +3 -0
  43. package/dist/bin/chunks/chunk-IAAPXDHN.js +11 -0
  44. package/dist/bin/chunks/chunk-ISW2U76N.js +17 -0
  45. package/dist/bin/chunks/chunk-JQER3HUP.js +20 -0
  46. package/dist/bin/chunks/chunk-K5KT6DMM.js +4 -0
  47. package/dist/bin/chunks/chunk-KG2KXL4Y.js +3 -0
  48. package/dist/bin/chunks/chunk-LCP3IKI7.js +9 -0
  49. package/dist/bin/chunks/chunk-LGERQ5TD.js +22 -0
  50. package/dist/bin/chunks/chunk-LNFTLSWJ.js +22 -0
  51. package/dist/bin/chunks/chunk-LUHU7UUN.js +7 -0
  52. package/dist/bin/chunks/chunk-LXFMIXGA.js +3 -0
  53. package/dist/bin/chunks/chunk-MYTNZ7MA.js +7 -0
  54. package/dist/bin/chunks/chunk-MZM7RVYU.js +8 -0
  55. package/dist/bin/chunks/chunk-NGD6G5ZG.js +9 -0
  56. package/dist/bin/chunks/chunk-NJ67YJRE.js +6 -0
  57. package/dist/bin/chunks/chunk-NQQ3X7MZ.js +36 -0
  58. package/dist/bin/chunks/chunk-O74FSWB4.js +4 -0
  59. package/dist/bin/chunks/chunk-OKU677H3.js +87 -0
  60. package/dist/bin/chunks/chunk-P6NPCASY.js +11 -0
  61. package/dist/bin/chunks/chunk-PKWK3LQM.js +22 -0
  62. package/dist/bin/chunks/chunk-PQPFDJFF.js +34 -0
  63. package/dist/bin/chunks/chunk-PRKSLEHG.js +291 -0
  64. package/dist/bin/chunks/chunk-PUZGSIMN.js +15 -0
  65. package/dist/bin/chunks/chunk-Q3LE3Y66.js +13 -0
  66. package/dist/bin/chunks/chunk-QAYU7HPM.js +7 -0
  67. package/dist/bin/chunks/chunk-QES5OSUC.js +3 -0
  68. package/dist/bin/chunks/chunk-QF7PPON7.js +16 -0
  69. package/dist/bin/chunks/chunk-QK6BXSHU.js +13 -0
  70. package/dist/bin/chunks/chunk-RYQB6GQ7.js +11 -0
  71. package/dist/bin/chunks/chunk-SSK3N7FN.js +3 -0
  72. package/dist/bin/chunks/chunk-TL4JI2SL.js +38 -0
  73. package/dist/bin/chunks/chunk-TPU3OX2A.js +3 -0
  74. package/dist/bin/chunks/chunk-TW2IJRUF.js +3 -0
  75. package/dist/bin/chunks/chunk-TZ3S7MY6.js +12 -0
  76. package/dist/bin/chunks/chunk-VGR3NA3H.js +13 -0
  77. package/dist/bin/chunks/chunk-VLWZ6L7C.js +4 -0
  78. package/dist/bin/chunks/chunk-VTAIIBJT.js +16 -0
  79. package/dist/bin/chunks/chunk-VTHA5UK5.js +7 -0
  80. package/dist/bin/chunks/chunk-VY2K25J4.js +16 -0
  81. package/dist/bin/chunks/chunk-W4U4QOZF.js +7 -0
  82. package/dist/bin/chunks/chunk-WDV2ECOC.js +3 -0
  83. package/dist/bin/chunks/chunk-WFVCEB5T.js +3 -0
  84. package/dist/bin/chunks/chunk-WSLBBXPJ.js +12 -0
  85. package/dist/bin/chunks/chunk-WWOUFMMY.js +3 -0
  86. package/dist/bin/chunks/chunk-WYTPLN2M.js +11 -0
  87. package/dist/bin/chunks/chunk-X5VUGFUL.js +3 -0
  88. package/dist/bin/chunks/chunk-X63MJBLH.js +26 -0
  89. package/dist/bin/chunks/chunk-XAAXPEOP.js +6 -0
  90. package/dist/bin/chunks/chunk-XEQ7KSRM.js +5 -0
  91. package/dist/bin/chunks/chunk-YIANER7Y.js +8 -0
  92. package/dist/bin/chunks/chunk-YMELOXDK.js +13 -0
  93. package/dist/bin/chunks/chunk-YTL6DXBO.js +11 -0
  94. package/dist/bin/chunks/chunk-YYZSYLJO.js +6 -0
  95. package/dist/bin/chunks/chunk-ZXIW4JPL.js +22 -0
  96. package/dist/bin/chunks/clear-OE52K3TM.js +3 -0
  97. package/dist/bin/chunks/column-7VBJL757.js +3 -0
  98. package/dist/bin/chunks/comm-URDMZCXL.js +3 -0
  99. package/dist/bin/chunks/cp-MF5GADQN.js +3 -0
  100. package/dist/bin/chunks/curl-FS5LAEYI.js +30 -0
  101. package/dist/bin/chunks/cut-QOTYBJJJ.js +3 -0
  102. package/dist/bin/chunks/date-FJUBX7TJ.js +3 -0
  103. package/dist/bin/chunks/diff-YXZZCUSQ.js +3 -0
  104. package/dist/bin/chunks/dirname-TPUFCYF6.js +3 -0
  105. package/dist/bin/chunks/du-A3UGHIKJ.js +3 -0
  106. package/dist/bin/chunks/echo-4OUEL7QB.js +3 -0
  107. package/dist/bin/chunks/env-2TSVF4W7.js +3 -0
  108. package/dist/bin/chunks/expand-P6SNTBGZ.js +3 -0
  109. package/dist/bin/chunks/expr-56X7LYOS.js +3 -0
  110. package/dist/bin/chunks/file-SQSOBJLR.js +3 -0
  111. package/dist/bin/chunks/find-XY2NTAT5.js +3 -0
  112. package/dist/bin/chunks/flag-coverage-WGSE667D.js +3 -0
  113. package/dist/bin/chunks/fold-YEY7X54W.js +3 -0
  114. package/dist/bin/chunks/grep-CMT2H2S7.js +3 -0
  115. package/dist/bin/chunks/gzip-DJSFJOY6.js +3 -0
  116. package/dist/bin/chunks/head-KPRH4HKC.js +3 -0
  117. package/dist/bin/chunks/help-HVIDHJ6M.js +3 -0
  118. package/dist/bin/chunks/history-3HAU45KT.js +3 -0
  119. package/dist/bin/chunks/hostname-2I76DUQL.js +3 -0
  120. package/dist/bin/chunks/html-to-markdown-WUBAMB4O.js +3 -0
  121. package/dist/bin/chunks/join-UQKXU2QP.js +3 -0
  122. package/dist/bin/chunks/jq-ACCMBTSD.js +3 -0
  123. package/dist/bin/chunks/js-exec-4KNUPGHA.js +99 -0
  124. package/dist/bin/chunks/js-exec-worker.js +187 -110
  125. package/dist/bin/chunks/ln-XSDIE6SU.js +3 -0
  126. package/dist/bin/chunks/ls-FTHYNINH.js +3 -0
  127. package/dist/bin/chunks/md5sum-Z6KAYGDK.js +3 -0
  128. package/dist/bin/chunks/mkdir-74BP5NTG.js +3 -0
  129. package/dist/bin/chunks/mv-YG75IRRE.js +3 -0
  130. package/dist/bin/chunks/nl-XHWFVVKH.js +3 -0
  131. package/dist/bin/chunks/od-A7CW5RMS.js +3 -0
  132. package/dist/bin/chunks/paste-YJLYVJMP.js +3 -0
  133. package/dist/bin/chunks/printf-F2KOCULO.js +3 -0
  134. package/dist/bin/chunks/pwd-YKLNXWZI.js +3 -0
  135. package/dist/bin/chunks/python3-AYUQQRCR.js +14 -0
  136. package/dist/bin/chunks/readlink-HMHVGSAM.js +3 -0
  137. package/dist/bin/chunks/rev-CZTQCNOZ.js +3 -0
  138. package/dist/bin/chunks/rg-JRKJ6I4X.js +3 -0
  139. package/dist/bin/chunks/rm-3PLW4O4B.js +3 -0
  140. package/dist/bin/chunks/rmdir-DCJ3XJRR.js +3 -0
  141. package/dist/bin/chunks/sed-QJ2LNV2N.js +3 -0
  142. package/dist/bin/chunks/seq-Q4LZ6EXV.js +3 -0
  143. package/dist/bin/chunks/sha1sum-CATBXX76.js +3 -0
  144. package/dist/bin/chunks/sha256sum-YGSNBVY3.js +3 -0
  145. package/dist/bin/chunks/sleep-FUDWGDCE.js +3 -0
  146. package/dist/bin/chunks/sort-M3DO25D5.js +3 -0
  147. package/dist/bin/chunks/split-7IYQYKOW.js +3 -0
  148. package/dist/bin/chunks/sqlite3-ZXF6BGDW.js +3 -0
  149. package/dist/bin/chunks/sqlite3-worker.js +316 -173
  150. package/dist/bin/chunks/stat-Y5D3VPLG.js +3 -0
  151. package/dist/bin/chunks/strings-J2X2Z6N2.js +3 -0
  152. package/dist/bin/chunks/tac-DG4BMYM5.js +3 -0
  153. package/dist/bin/chunks/tail-QISQLA3I.js +3 -0
  154. package/dist/bin/chunks/tar-TB2XWXF6.js +3 -0
  155. package/dist/bin/chunks/tee-L4HKV5PD.js +3 -0
  156. package/dist/bin/chunks/time-LF7BTSK5.js +3 -0
  157. package/dist/bin/chunks/timeout-TDOV6JDA.js +3 -0
  158. package/dist/bin/chunks/touch-TVQAUQOG.js +3 -0
  159. package/dist/bin/chunks/tr-AR6EK7JH.js +3 -0
  160. package/dist/bin/chunks/tree-ZGP6NPGS.js +3 -0
  161. package/dist/bin/chunks/true-KFTJGQLQ.js +3 -0
  162. package/dist/bin/chunks/undici-JES22UVU.js +141 -0
  163. package/dist/bin/chunks/unexpand-JPOQORZF.js +3 -0
  164. package/dist/bin/chunks/uniq-K5VRDP4Q.js +3 -0
  165. package/dist/bin/chunks/wc-VSQBRD6B.js +3 -0
  166. package/dist/bin/chunks/which-4TPGVSBZ.js +3 -0
  167. package/dist/bin/chunks/whoami-B5HDVKW6.js +3 -0
  168. package/dist/bin/chunks/worker.js +212 -105
  169. package/dist/bin/chunks/xan-D6US4ZGL.js +3 -0
  170. package/dist/bin/chunks/xan-view-QGKWT354.js +3 -0
  171. package/dist/bin/chunks/xargs-HMISWW4I.js +3 -0
  172. package/dist/bin/chunks/yq-EYV7HLKK.js +3 -0
  173. package/dist/bin/just-bash.js +412 -387
  174. package/dist/bin/shell/chunks/alias-3R4G6HQY.js +3 -0
  175. package/dist/bin/shell/chunks/awk2-7UZLEPVX.js +3 -0
  176. package/dist/bin/shell/chunks/base64-W6FVFNXJ.js +3 -0
  177. package/dist/bin/shell/chunks/basename-C4CRGDXP.js +3 -0
  178. package/dist/bin/shell/chunks/bash-CFCBBWVH.js +3 -0
  179. package/dist/bin/shell/chunks/cat-5YECZSFQ.js +3 -0
  180. package/dist/bin/shell/chunks/chmod-45TMYSW2.js +3 -0
  181. package/dist/bin/shell/chunks/chunk-23OI2XDJ.js +20 -0
  182. package/dist/bin/shell/chunks/chunk-2OQ5HPZE.js +7 -0
  183. package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +10 -0
  184. package/dist/bin/shell/chunks/chunk-3HUI54BW.js +143 -0
  185. package/dist/bin/shell/chunks/chunk-3OYRDLJJ.js +101 -0
  186. package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +3 -0
  187. package/dist/bin/shell/chunks/chunk-3VSWQCPN.js +18 -0
  188. package/dist/bin/shell/chunks/chunk-43E7AR6A.js +3 -0
  189. package/dist/bin/shell/chunks/chunk-46CDVHZ3.js +5 -0
  190. package/dist/bin/shell/chunks/chunk-4SQKKW2M.js +3 -0
  191. package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +12 -0
  192. package/dist/bin/shell/chunks/chunk-6D75E4LV.js +3 -0
  193. package/dist/bin/shell/chunks/chunk-6SAZRW7E.js +15 -0
  194. package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +14 -0
  195. package/dist/bin/shell/chunks/chunk-7I6MNC5I.js +3 -0
  196. package/dist/bin/shell/chunks/chunk-B7RRNV3A.js +22 -0
  197. package/dist/bin/shell/chunks/chunk-BCJ42NCM.js +15 -0
  198. package/dist/bin/shell/chunks/chunk-BNYIXXC2.js +3 -0
  199. package/dist/bin/shell/chunks/chunk-BPWZ7ADB.js +8 -0
  200. package/dist/bin/shell/chunks/chunk-BWRQ5HYX.js +9 -0
  201. package/dist/bin/shell/chunks/chunk-CB4SODHK.js +34 -0
  202. package/dist/bin/shell/chunks/chunk-CC2AQ6B7.js +15 -0
  203. package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +3 -0
  204. package/dist/bin/shell/chunks/chunk-CPTQXTBJ.js +3 -0
  205. package/dist/bin/shell/chunks/chunk-D3MUBZ4P.js +65 -0
  206. package/dist/bin/shell/chunks/chunk-DN2YCFOR.js +3 -0
  207. package/dist/bin/shell/chunks/chunk-DSZQ22OX.js +12 -0
  208. package/dist/bin/shell/chunks/chunk-E5VZGTZ6.js +10 -0
  209. package/dist/bin/shell/chunks/chunk-ETWDDV6I.js +10 -0
  210. package/dist/bin/shell/chunks/chunk-GEUCQ4AB.js +10 -0
  211. package/dist/bin/shell/chunks/chunk-H4BRFPKY.js +3 -0
  212. package/dist/bin/shell/chunks/chunk-IAAPXDHN.js +11 -0
  213. package/dist/bin/shell/chunks/chunk-ISW2U76N.js +17 -0
  214. package/dist/bin/shell/chunks/chunk-JQER3HUP.js +20 -0
  215. package/dist/bin/shell/chunks/chunk-K5KT6DMM.js +4 -0
  216. package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +3 -0
  217. package/dist/bin/shell/chunks/chunk-LCP3IKI7.js +9 -0
  218. package/dist/bin/shell/chunks/chunk-LGERQ5TD.js +22 -0
  219. package/dist/bin/shell/chunks/chunk-LNFTLSWJ.js +22 -0
  220. package/dist/bin/shell/chunks/chunk-LUHU7UUN.js +7 -0
  221. package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +3 -0
  222. package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +7 -0
  223. package/dist/bin/shell/chunks/chunk-MZM7RVYU.js +8 -0
  224. package/dist/bin/shell/chunks/chunk-NGD6G5ZG.js +9 -0
  225. package/dist/bin/shell/chunks/chunk-NJ67YJRE.js +6 -0
  226. package/dist/bin/shell/chunks/chunk-NQQ3X7MZ.js +36 -0
  227. package/dist/bin/shell/chunks/chunk-O74FSWB4.js +4 -0
  228. package/dist/bin/shell/chunks/chunk-OKU677H3.js +87 -0
  229. package/dist/bin/shell/chunks/chunk-P6NPCASY.js +11 -0
  230. package/dist/bin/shell/chunks/chunk-PKWK3LQM.js +22 -0
  231. package/dist/bin/shell/chunks/chunk-PQPFDJFF.js +34 -0
  232. package/dist/bin/shell/chunks/chunk-PRKSLEHG.js +291 -0
  233. package/dist/bin/shell/chunks/chunk-PUZGSIMN.js +15 -0
  234. package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +13 -0
  235. package/dist/bin/shell/chunks/chunk-QAYU7HPM.js +7 -0
  236. package/dist/bin/shell/chunks/chunk-QES5OSUC.js +3 -0
  237. package/dist/bin/shell/chunks/chunk-QF7PPON7.js +16 -0
  238. package/dist/bin/shell/chunks/chunk-QK6BXSHU.js +13 -0
  239. package/dist/bin/shell/chunks/chunk-RYQB6GQ7.js +11 -0
  240. package/dist/bin/shell/chunks/chunk-SSK3N7FN.js +3 -0
  241. package/dist/bin/shell/chunks/chunk-TL4JI2SL.js +38 -0
  242. package/dist/bin/shell/chunks/chunk-TPU3OX2A.js +3 -0
  243. package/dist/bin/shell/chunks/chunk-TW2IJRUF.js +3 -0
  244. package/dist/bin/shell/chunks/chunk-TZ3S7MY6.js +12 -0
  245. package/dist/bin/shell/chunks/chunk-VGR3NA3H.js +13 -0
  246. package/dist/bin/shell/chunks/chunk-VLWZ6L7C.js +4 -0
  247. package/dist/bin/shell/chunks/chunk-VTAIIBJT.js +16 -0
  248. package/dist/bin/shell/chunks/chunk-VTHA5UK5.js +7 -0
  249. package/dist/bin/shell/chunks/chunk-VY2K25J4.js +16 -0
  250. package/dist/bin/shell/chunks/chunk-W4U4QOZF.js +7 -0
  251. package/dist/bin/shell/chunks/chunk-WDV2ECOC.js +3 -0
  252. package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +3 -0
  253. package/dist/bin/shell/chunks/chunk-WSLBBXPJ.js +12 -0
  254. package/dist/bin/shell/chunks/chunk-WWOUFMMY.js +3 -0
  255. package/dist/bin/shell/chunks/chunk-WYTPLN2M.js +11 -0
  256. package/dist/bin/shell/chunks/chunk-X5VUGFUL.js +3 -0
  257. package/dist/bin/shell/chunks/chunk-X63MJBLH.js +26 -0
  258. package/dist/bin/shell/chunks/chunk-XAAXPEOP.js +6 -0
  259. package/dist/bin/shell/chunks/chunk-XEQ7KSRM.js +5 -0
  260. package/dist/bin/shell/chunks/chunk-YIANER7Y.js +8 -0
  261. package/dist/bin/shell/chunks/chunk-YMELOXDK.js +13 -0
  262. package/dist/bin/shell/chunks/chunk-YTL6DXBO.js +11 -0
  263. package/dist/bin/shell/chunks/chunk-YYZSYLJO.js +6 -0
  264. package/dist/bin/shell/chunks/chunk-ZXIW4JPL.js +22 -0
  265. package/dist/bin/shell/chunks/clear-OE52K3TM.js +3 -0
  266. package/dist/bin/shell/chunks/column-7VBJL757.js +3 -0
  267. package/dist/bin/shell/chunks/comm-URDMZCXL.js +3 -0
  268. package/dist/bin/shell/chunks/cp-MF5GADQN.js +3 -0
  269. package/dist/bin/shell/chunks/curl-FS5LAEYI.js +30 -0
  270. package/dist/bin/shell/chunks/cut-QOTYBJJJ.js +3 -0
  271. package/dist/bin/shell/chunks/date-FJUBX7TJ.js +3 -0
  272. package/dist/bin/shell/chunks/diff-YXZZCUSQ.js +3 -0
  273. package/dist/bin/shell/chunks/dirname-TPUFCYF6.js +3 -0
  274. package/dist/bin/shell/chunks/du-A3UGHIKJ.js +3 -0
  275. package/dist/bin/shell/chunks/echo-4OUEL7QB.js +3 -0
  276. package/dist/bin/shell/chunks/env-2TSVF4W7.js +3 -0
  277. package/dist/bin/shell/chunks/expand-P6SNTBGZ.js +3 -0
  278. package/dist/bin/shell/chunks/expr-56X7LYOS.js +3 -0
  279. package/dist/bin/shell/chunks/file-SQSOBJLR.js +3 -0
  280. package/dist/bin/shell/chunks/find-XY2NTAT5.js +3 -0
  281. package/dist/bin/shell/chunks/flag-coverage-WGSE667D.js +3 -0
  282. package/dist/bin/shell/chunks/fold-YEY7X54W.js +3 -0
  283. package/dist/bin/shell/chunks/grep-CMT2H2S7.js +3 -0
  284. package/dist/bin/shell/chunks/gzip-DJSFJOY6.js +3 -0
  285. package/dist/bin/shell/chunks/head-KPRH4HKC.js +3 -0
  286. package/dist/bin/shell/chunks/help-HVIDHJ6M.js +3 -0
  287. package/dist/bin/shell/chunks/history-3HAU45KT.js +3 -0
  288. package/dist/bin/shell/chunks/hostname-2I76DUQL.js +3 -0
  289. package/dist/bin/shell/chunks/html-to-markdown-WUBAMB4O.js +3 -0
  290. package/dist/bin/shell/chunks/join-UQKXU2QP.js +3 -0
  291. package/dist/bin/shell/chunks/jq-ACCMBTSD.js +3 -0
  292. package/dist/bin/shell/chunks/js-exec-4KNUPGHA.js +99 -0
  293. package/dist/bin/shell/chunks/ln-XSDIE6SU.js +3 -0
  294. package/dist/bin/shell/chunks/ls-FTHYNINH.js +3 -0
  295. package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +3 -0
  296. package/dist/bin/shell/chunks/mkdir-74BP5NTG.js +3 -0
  297. package/dist/bin/shell/chunks/mv-YG75IRRE.js +3 -0
  298. package/dist/bin/shell/chunks/nl-XHWFVVKH.js +3 -0
  299. package/dist/bin/shell/chunks/od-A7CW5RMS.js +3 -0
  300. package/dist/bin/shell/chunks/paste-YJLYVJMP.js +3 -0
  301. package/dist/bin/shell/chunks/printf-F2KOCULO.js +3 -0
  302. package/dist/bin/shell/chunks/pwd-YKLNXWZI.js +3 -0
  303. package/dist/bin/shell/chunks/python3-AYUQQRCR.js +14 -0
  304. package/dist/bin/shell/chunks/readlink-HMHVGSAM.js +3 -0
  305. package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +3 -0
  306. package/dist/bin/shell/chunks/rg-JRKJ6I4X.js +3 -0
  307. package/dist/bin/shell/chunks/rm-3PLW4O4B.js +3 -0
  308. package/dist/bin/shell/chunks/rmdir-DCJ3XJRR.js +3 -0
  309. package/dist/bin/shell/chunks/sed-QJ2LNV2N.js +3 -0
  310. package/dist/bin/shell/chunks/seq-Q4LZ6EXV.js +3 -0
  311. package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +3 -0
  312. package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +3 -0
  313. package/dist/bin/shell/chunks/sleep-FUDWGDCE.js +3 -0
  314. package/dist/bin/shell/chunks/sort-M3DO25D5.js +3 -0
  315. package/dist/bin/shell/chunks/split-7IYQYKOW.js +3 -0
  316. package/dist/bin/shell/chunks/sqlite3-ZXF6BGDW.js +3 -0
  317. package/dist/bin/shell/chunks/stat-Y5D3VPLG.js +3 -0
  318. package/dist/bin/shell/chunks/strings-J2X2Z6N2.js +3 -0
  319. package/dist/bin/shell/chunks/tac-DG4BMYM5.js +3 -0
  320. package/dist/bin/shell/chunks/tail-QISQLA3I.js +3 -0
  321. package/dist/bin/shell/chunks/tar-TB2XWXF6.js +3 -0
  322. package/dist/bin/shell/chunks/tee-L4HKV5PD.js +3 -0
  323. package/dist/bin/shell/chunks/time-LF7BTSK5.js +3 -0
  324. package/dist/bin/shell/chunks/timeout-TDOV6JDA.js +3 -0
  325. package/dist/bin/shell/chunks/touch-TVQAUQOG.js +3 -0
  326. package/dist/bin/shell/chunks/tr-AR6EK7JH.js +3 -0
  327. package/dist/bin/shell/chunks/tree-ZGP6NPGS.js +3 -0
  328. package/dist/bin/shell/chunks/true-KFTJGQLQ.js +3 -0
  329. package/dist/bin/shell/chunks/undici-JES22UVU.js +141 -0
  330. package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +3 -0
  331. package/dist/bin/shell/chunks/uniq-K5VRDP4Q.js +3 -0
  332. package/dist/bin/shell/chunks/wc-VSQBRD6B.js +3 -0
  333. package/dist/bin/shell/chunks/which-4TPGVSBZ.js +3 -0
  334. package/dist/bin/shell/chunks/whoami-B5HDVKW6.js +3 -0
  335. package/dist/bin/shell/chunks/xan-D6US4ZGL.js +3 -0
  336. package/dist/bin/shell/chunks/xan-view-QGKWT354.js +3 -0
  337. package/dist/bin/shell/chunks/xargs-HMISWW4I.js +3 -0
  338. package/dist/bin/shell/chunks/yq-EYV7HLKK.js +3 -0
  339. package/dist/bin/shell/shell.js +413 -391
  340. package/dist/bounded-builder.d.ts +37 -0
  341. package/dist/browser.d.ts +3 -3
  342. package/dist/bundle/browser.js +869 -830
  343. package/dist/bundle/chunks/alias-T5TO5GWK.js +2 -0
  344. package/dist/bundle/chunks/awk2-IPNBFNH2.js +2 -0
  345. package/dist/bundle/chunks/base64-OXGTKKDA.js +2 -0
  346. package/dist/bundle/chunks/basename-SJZQ5W65.js +2 -0
  347. package/dist/bundle/chunks/bash-HIEWVHJ2.js +2 -0
  348. package/dist/bundle/chunks/cat-636HYSH4.js +2 -0
  349. package/dist/bundle/chunks/chmod-4CIOYX5Q.js +2 -0
  350. package/dist/bundle/chunks/chunk-273265WK.js +6 -0
  351. package/dist/bundle/chunks/chunk-2KNTH3KH.js +9 -0
  352. package/dist/bundle/chunks/chunk-2VWG4LDT.js +11 -0
  353. package/dist/bundle/chunks/chunk-3DHFIWMM.js +15 -0
  354. package/dist/bundle/chunks/chunk-5ATEFZLC.js +4 -0
  355. package/dist/bundle/chunks/chunk-5HXWWNWH.js +11 -0
  356. package/dist/bundle/chunks/chunk-5KGKXQF6.js +142 -0
  357. package/dist/bundle/chunks/chunk-5VCAQBXL.js +17 -0
  358. package/dist/bundle/chunks/chunk-65Z4QURM.js +12 -0
  359. package/dist/bundle/chunks/chunk-6D3WD6YU.js +3 -0
  360. package/dist/bundle/chunks/chunk-6IUGGJ2Y.js +8 -0
  361. package/dist/bundle/chunks/chunk-6R4OQQWP.js +16 -0
  362. package/dist/bundle/chunks/chunk-6WGIZV3E.js +13 -0
  363. package/dist/bundle/chunks/chunk-AFFAMSJT.js +14 -0
  364. package/dist/bundle/chunks/chunk-AH7VTVWU.js +2 -0
  365. package/dist/bundle/chunks/chunk-AI5LSBJC.js +2 -0
  366. package/dist/bundle/chunks/chunk-AMLHAS2N.js +15 -0
  367. package/dist/bundle/chunks/chunk-ANCQ4SCV.js +2 -0
  368. package/dist/bundle/chunks/chunk-B3NGH6KE.js +5 -0
  369. package/dist/bundle/chunks/chunk-B5Z5HTFY.js +14 -0
  370. package/dist/bundle/chunks/chunk-BRJERIF4.js +2 -0
  371. package/dist/bundle/chunks/chunk-CHHWTPDH.js +3 -0
  372. package/dist/bundle/chunks/chunk-CN3HTJTZ.js +11 -0
  373. package/dist/bundle/chunks/chunk-D3W7DTI6.js +9 -0
  374. package/dist/bundle/chunks/chunk-E3D4WVAH.js +21 -0
  375. package/dist/bundle/chunks/chunk-EAQUR2NP.js +25 -0
  376. package/dist/bundle/chunks/chunk-EFORKKSH.js +8 -0
  377. package/dist/bundle/chunks/chunk-EJFBIRMD.js +6 -0
  378. package/dist/bundle/chunks/chunk-ELHOZMBD.js +10 -0
  379. package/dist/bundle/chunks/chunk-EQQGPAXI.js +9 -0
  380. package/dist/bundle/chunks/chunk-EWWPEE2G.js +37 -0
  381. package/dist/bundle/chunks/chunk-FBXMKFE2.js +2 -0
  382. package/dist/bundle/chunks/chunk-FIMO5HLX.js +2 -0
  383. package/dist/bundle/chunks/chunk-FT6ODGOU.js +2 -0
  384. package/dist/bundle/chunks/chunk-G4SEENI7.js +6 -0
  385. package/dist/bundle/chunks/chunk-GN6CQ3J4.js +2 -0
  386. package/dist/bundle/chunks/chunk-HW6ZCMM5.js +9 -0
  387. package/dist/bundle/chunks/chunk-IBRT3OJS.js +2 -0
  388. package/dist/bundle/chunks/chunk-INDA53JL.js +21 -0
  389. package/dist/bundle/chunks/chunk-INHMNORI.js +6 -0
  390. package/dist/bundle/chunks/chunk-J2OBOJ64.js +2 -0
  391. package/dist/bundle/chunks/chunk-JCPCQREJ.js +15 -0
  392. package/dist/bundle/chunks/chunk-JYQ6MII2.js +33 -0
  393. package/dist/bundle/chunks/chunk-K3XJ2WT4.js +2 -0
  394. package/dist/bundle/chunks/chunk-KIGPB52X.js +2 -0
  395. package/dist/bundle/chunks/chunk-KKVPMNSS.js +5 -0
  396. package/dist/bundle/chunks/chunk-LGLR6TFP.js +7 -0
  397. package/dist/bundle/chunks/chunk-LJRVJXUI.js +2 -0
  398. package/dist/bundle/chunks/chunk-LVDUF74R.js +7 -0
  399. package/dist/bundle/chunks/chunk-MAWVZWRK.js +12 -0
  400. package/dist/bundle/chunks/chunk-MF4F4ZPP.js +7 -0
  401. package/dist/bundle/chunks/chunk-MFGH46GH.js +14 -0
  402. package/dist/bundle/chunks/chunk-N4TGZ6H7.js +7 -0
  403. package/dist/bundle/chunks/chunk-NCUTH6QL.js +2 -0
  404. package/dist/bundle/chunks/chunk-NNH4ERNJ.js +100 -0
  405. package/dist/bundle/chunks/chunk-NOPXHH6G.js +290 -0
  406. package/dist/bundle/chunks/chunk-OQ7C4FYO.js +2 -0
  407. package/dist/bundle/chunks/chunk-ORDZCFFT.js +2 -0
  408. package/dist/bundle/chunks/chunk-OTYP7VVT.js +21 -0
  409. package/dist/bundle/chunks/chunk-P5BOIHWV.js +6 -0
  410. package/dist/bundle/chunks/chunk-PJWSSENQ.js +5 -0
  411. package/dist/bundle/chunks/chunk-PMYUC5JF.js +12 -0
  412. package/dist/bundle/chunks/chunk-POIWRLUV.js +6 -0
  413. package/dist/bundle/chunks/chunk-PPDMRIJ7.js +11 -0
  414. package/dist/bundle/chunks/chunk-QTLI5LUD.js +21 -0
  415. package/dist/bundle/chunks/chunk-R2FBRMDU.js +14 -0
  416. package/dist/bundle/chunks/chunk-RAHPENCM.js +35 -0
  417. package/dist/bundle/chunks/chunk-SELXJ5KQ.js +10 -0
  418. package/dist/bundle/chunks/chunk-T2RHALUC.js +64 -0
  419. package/dist/bundle/chunks/chunk-UB6T3UHL.js +8 -0
  420. package/dist/bundle/chunks/chunk-UBTKJ6MG.js +4 -0
  421. package/dist/bundle/chunks/chunk-UHHCL65P.js +3 -0
  422. package/dist/bundle/chunks/chunk-UK4BO5W3.js +2 -0
  423. package/dist/bundle/chunks/chunk-UTKGYVUZ.js +7 -0
  424. package/dist/bundle/chunks/chunk-VECGTAPW.js +10 -0
  425. package/dist/bundle/chunks/chunk-VOSNSQE2.js +2 -0
  426. package/dist/bundle/chunks/chunk-WENIVVEE.js +19 -0
  427. package/dist/bundle/chunks/chunk-WHHRIZS3.js +10 -0
  428. package/dist/bundle/chunks/chunk-WZQNMEQW.js +2 -0
  429. package/dist/bundle/chunks/chunk-XVL654YD.js +33 -0
  430. package/dist/bundle/chunks/chunk-Y3DGIAIG.js +21 -0
  431. package/dist/bundle/chunks/chunk-Y62SXZKJ.js +12 -0
  432. package/dist/bundle/chunks/chunk-YOUUMJLJ.js +10 -0
  433. package/dist/bundle/chunks/chunk-YUSFCOM7.js +2 -0
  434. package/dist/bundle/chunks/clear-KPIUNI6K.js +2 -0
  435. package/dist/bundle/chunks/column-LKMDIDCH.js +2 -0
  436. package/dist/bundle/chunks/comm-DTWKU2MC.js +2 -0
  437. package/dist/bundle/chunks/cp-FKTQRFYJ.js +2 -0
  438. package/dist/bundle/chunks/curl-DEHFBW27.js +29 -0
  439. package/dist/bundle/chunks/cut-RWPUW5FY.js +2 -0
  440. package/dist/bundle/chunks/date-FN2DXAEE.js +2 -0
  441. package/dist/bundle/chunks/diff-CSARC7WF.js +2 -0
  442. package/dist/bundle/chunks/dirname-Z2ZMOOW2.js +2 -0
  443. package/dist/bundle/chunks/du-PR3M44X6.js +2 -0
  444. package/dist/bundle/chunks/echo-HZOVZAPR.js +2 -0
  445. package/dist/bundle/chunks/env-VUUMB47B.js +2 -0
  446. package/dist/bundle/chunks/expand-2BPPGGSM.js +2 -0
  447. package/dist/bundle/chunks/expr-SHRJJ4PX.js +2 -0
  448. package/dist/bundle/chunks/file-YC4YEI4P.js +2 -0
  449. package/dist/bundle/chunks/find-DWWMZFO5.js +2 -0
  450. package/dist/bundle/chunks/flag-coverage-THYQHOT3.js +2 -0
  451. package/dist/bundle/chunks/fold-QJBPHRFJ.js +2 -0
  452. package/dist/bundle/chunks/grep-S6SNTIHZ.js +2 -0
  453. package/dist/bundle/chunks/gzip-BTI6CWY4.js +2 -0
  454. package/dist/bundle/chunks/head-UCOA3VQC.js +2 -0
  455. package/dist/bundle/chunks/help-QDDMBDU7.js +2 -0
  456. package/dist/bundle/chunks/history-3N762S3K.js +2 -0
  457. package/dist/bundle/chunks/hostname-CESD3CQR.js +2 -0
  458. package/dist/bundle/chunks/html-to-markdown-NUF6QEX4.js +2 -0
  459. package/dist/bundle/chunks/join-KQ4Z5OD4.js +2 -0
  460. package/dist/bundle/chunks/jq-D6N4QCAJ.js +2 -0
  461. package/dist/bundle/chunks/js-exec-PNUEDFT5.js +98 -0
  462. package/dist/bundle/chunks/js-exec-worker.js +187 -110
  463. package/dist/bundle/chunks/ln-VYDFOFNO.js +2 -0
  464. package/dist/bundle/chunks/ls-R5CQLZQM.js +2 -0
  465. package/dist/bundle/chunks/md5sum-JEDX55KS.js +2 -0
  466. package/dist/bundle/chunks/mkdir-WDDKK2P3.js +2 -0
  467. package/dist/bundle/chunks/mv-XSJA2FNL.js +2 -0
  468. package/dist/bundle/chunks/nl-RFXH2GNX.js +2 -0
  469. package/dist/bundle/chunks/od-YXD2NNIU.js +2 -0
  470. package/dist/bundle/chunks/paste-ZU3EODNI.js +2 -0
  471. package/dist/bundle/chunks/printf-QHD2JRWQ.js +2 -0
  472. package/dist/bundle/chunks/pwd-76BPYV5F.js +2 -0
  473. package/dist/bundle/chunks/python3-QDNG2UXX.js +13 -0
  474. package/dist/bundle/chunks/readlink-IY6QKK2P.js +2 -0
  475. package/dist/bundle/chunks/rev-EPOS3MFH.js +2 -0
  476. package/dist/bundle/chunks/rg-OUJZ5DH6.js +2 -0
  477. package/dist/bundle/chunks/rm-JQ4GDKDD.js +2 -0
  478. package/dist/bundle/chunks/rmdir-WZKAT6M5.js +2 -0
  479. package/dist/bundle/chunks/sed-TZIPJOGL.js +2 -0
  480. package/dist/bundle/chunks/seq-5R2GKXC6.js +2 -0
  481. package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +2 -0
  482. package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +2 -0
  483. package/dist/bundle/chunks/sleep-VPYWSKDR.js +2 -0
  484. package/dist/bundle/chunks/sort-PV2NEQHF.js +2 -0
  485. package/dist/bundle/chunks/split-KNDNAFPT.js +2 -0
  486. package/dist/bundle/chunks/sqlite3-WWZJZW37.js +2 -0
  487. package/dist/bundle/chunks/sqlite3-worker.js +316 -173
  488. package/dist/bundle/chunks/stat-MLNSW25G.js +2 -0
  489. package/dist/bundle/chunks/strings-WTD7Q2EF.js +2 -0
  490. package/dist/bundle/chunks/tac-YXC4HBTR.js +2 -0
  491. package/dist/bundle/chunks/tail-G3W6PNG3.js +2 -0
  492. package/dist/bundle/chunks/tar-GLX6QUHW.js +2 -0
  493. package/dist/bundle/chunks/tee-OOWSWHRQ.js +2 -0
  494. package/dist/bundle/chunks/time-NERE2JJ2.js +2 -0
  495. package/dist/bundle/chunks/timeout-SYQCWBMZ.js +2 -0
  496. package/dist/bundle/chunks/touch-W4DF6Z4T.js +2 -0
  497. package/dist/bundle/chunks/tr-3KPFH3J4.js +2 -0
  498. package/dist/bundle/chunks/tree-7OOL2MH6.js +2 -0
  499. package/dist/bundle/chunks/true-QUBPEGGU.js +2 -0
  500. package/dist/bundle/chunks/undici-HCLAUJT3.js +140 -0
  501. package/dist/bundle/chunks/unexpand-YD5BWFH4.js +2 -0
  502. package/dist/bundle/chunks/uniq-OVOW532K.js +2 -0
  503. package/dist/bundle/chunks/wc-RUR7HE5O.js +2 -0
  504. package/dist/bundle/chunks/which-UWVKETYW.js +2 -0
  505. package/dist/bundle/chunks/whoami-KR6E7UIR.js +2 -0
  506. package/dist/bundle/chunks/worker.js +212 -105
  507. package/dist/bundle/chunks/xan-KKPV2TJ3.js +2 -0
  508. package/dist/bundle/chunks/xan-view-47P277LZ.js +2 -0
  509. package/dist/bundle/chunks/xargs-L7TJHOJT.js +2 -0
  510. package/dist/bundle/chunks/yq-ZGB3W46S.js +2 -0
  511. package/dist/bundle/index.cjs +1450 -1261
  512. package/dist/bundle/index.js +407 -386
  513. package/dist/commands/alias/alias.d.ts +3 -3
  514. package/dist/commands/awk/awk2.d.ts +3 -3
  515. package/dist/commands/awk/builtins.d.ts +1 -1
  516. package/dist/commands/awk/interpreter/context.d.ts +13 -0
  517. package/dist/commands/awk/lexer.d.ts +2 -1
  518. package/dist/commands/awk/parser2-print.d.ts +3 -0
  519. package/dist/commands/awk/parser2.d.ts +15 -0
  520. package/dist/commands/base64/base64.d.ts +2 -2
  521. package/dist/commands/basename/basename.d.ts +2 -2
  522. package/dist/commands/bash/bash.d.ts +3 -3
  523. package/dist/commands/cat/cat.d.ts +2 -2
  524. package/dist/commands/chmod/chmod.d.ts +2 -2
  525. package/dist/commands/clear/clear.d.ts +2 -2
  526. package/dist/commands/column/column.d.ts +2 -2
  527. package/dist/commands/comm/comm.d.ts +2 -2
  528. package/dist/commands/compression/codec-budget.d.ts +35 -0
  529. package/dist/commands/cp/cp.d.ts +2 -2
  530. package/dist/commands/curl/curl.d.ts +2 -2
  531. package/dist/commands/curl/form.d.ts +3 -1
  532. package/dist/commands/curl/types.d.ts +30 -25
  533. package/dist/commands/cut/cut.d.ts +2 -2
  534. package/dist/commands/date/date.d.ts +2 -2
  535. package/dist/commands/diff/diff.d.ts +2 -2
  536. package/dist/commands/dirname/dirname.d.ts +2 -2
  537. package/dist/commands/du/du.d.ts +2 -2
  538. package/dist/commands/echo/echo.d.ts +2 -2
  539. package/dist/commands/env/env.d.ts +3 -3
  540. package/dist/commands/expand/expand.d.ts +2 -2
  541. package/dist/commands/expand/unexpand.d.ts +2 -2
  542. package/dist/commands/expr/expr.d.ts +2 -2
  543. package/dist/commands/file/file.d.ts +2 -2
  544. package/dist/commands/find/find.d.ts +2 -2
  545. package/dist/commands/find/matcher.d.ts +0 -16
  546. package/dist/commands/find/types.d.ts +3 -2
  547. package/dist/commands/fold/fold.d.ts +2 -2
  548. package/dist/commands/grep/grep.d.ts +4 -4
  549. package/dist/commands/gzip/gzip.d.ts +4 -4
  550. package/dist/commands/head/head-tail-shared.d.ts +2 -2
  551. package/dist/commands/head/head.d.ts +2 -2
  552. package/dist/commands/help/help.d.ts +2 -2
  553. package/dist/commands/history/history.d.ts +2 -2
  554. package/dist/commands/hostname/hostname.d.ts +2 -2
  555. package/dist/commands/html-to-markdown/html-to-markdown.d.ts +2 -2
  556. package/dist/commands/join/join.d.ts +2 -2
  557. package/dist/commands/jq/jq.d.ts +3 -3
  558. package/dist/commands/js-exec/fetch-polyfill.d.ts +1 -1
  559. package/dist/commands/js-exec/js-exec-worker.d.ts +1 -0
  560. package/dist/commands/js-exec/js-exec.d.ts +5 -3
  561. package/dist/commands/ln/ln.d.ts +2 -2
  562. package/dist/commands/ls/ls.d.ts +2 -2
  563. package/dist/commands/md5sum/checksum.d.ts +2 -2
  564. package/dist/commands/md5sum/md5sum.d.ts +2 -2
  565. package/dist/commands/md5sum/sha1sum.d.ts +2 -2
  566. package/dist/commands/md5sum/sha256sum.d.ts +2 -2
  567. package/dist/commands/mkdir/mkdir.d.ts +2 -2
  568. package/dist/commands/mv/mv.d.ts +2 -2
  569. package/dist/commands/nl/nl.d.ts +2 -2
  570. package/dist/commands/od/od.d.ts +2 -2
  571. package/dist/commands/paste/paste.d.ts +2 -2
  572. package/dist/commands/printf/escapes.d.ts +5 -3
  573. package/dist/commands/printf/printf.d.ts +2 -2
  574. package/dist/commands/printf/strftime.d.ts +6 -1
  575. package/dist/commands/pwd/pwd.d.ts +2 -2
  576. package/dist/commands/python3/python3.d.ts +3 -3
  577. package/dist/commands/python3/worker.d.ts +2 -0
  578. package/dist/commands/query-engine/builtins/control-builtins.d.ts +1 -1
  579. package/dist/commands/query-engine/builtins/path-builtins.d.ts +1 -1
  580. package/dist/commands/query-engine/evaluator.d.ts +15 -1
  581. package/dist/commands/query-engine/json-output.d.ts +11 -0
  582. package/dist/commands/query-engine/parser.d.ts +6 -1
  583. package/dist/commands/query-engine/safe-object.d.ts +9 -8
  584. package/dist/commands/query-engine/value-operations.d.ts +4 -1
  585. package/dist/commands/readlink/readlink.d.ts +2 -2
  586. package/dist/commands/registry.d.ts +5 -5
  587. package/dist/commands/rev/rev.d.ts +2 -2
  588. package/dist/commands/rg/rg-search.d.ts +2 -2
  589. package/dist/commands/rg/rg.d.ts +2 -2
  590. package/dist/commands/rm/rm.d.ts +2 -2
  591. package/dist/commands/rmdir/rmdir.d.ts +2 -2
  592. package/dist/commands/search-engine/matcher.d.ts +6 -0
  593. package/dist/commands/sed/lexer.d.ts +3 -1
  594. package/dist/commands/sed/parser.d.ts +4 -1
  595. package/dist/commands/sed/sed.d.ts +2 -2
  596. package/dist/commands/seq/seq.d.ts +2 -2
  597. package/dist/commands/sleep/sleep.d.ts +2 -2
  598. package/dist/commands/sort/sort.d.ts +2 -2
  599. package/dist/commands/split/split.d.ts +2 -2
  600. package/dist/commands/sqlite3/formatters.d.ts +2 -0
  601. package/dist/commands/sqlite3/sqlite3.d.ts +3 -2
  602. package/dist/commands/sqlite3/worker.d.ts +5 -0
  603. package/dist/commands/sqlite3/worker.js +316 -173
  604. package/dist/commands/stat/stat.d.ts +2 -2
  605. package/dist/commands/strings/strings.d.ts +2 -2
  606. package/dist/commands/tac/tac.d.ts +2 -2
  607. package/dist/commands/tail/tail.d.ts +2 -2
  608. package/dist/commands/tar/archive.d.ts +29 -14
  609. package/dist/commands/tar/bzip2-compress.d.ts +2 -1
  610. package/dist/commands/tar/tar.d.ts +2 -2
  611. package/dist/commands/tee/tee.d.ts +2 -2
  612. package/dist/commands/time/time.d.ts +2 -2
  613. package/dist/commands/timeout/timeout.d.ts +2 -2
  614. package/dist/commands/touch/touch.d.ts +2 -2
  615. package/dist/commands/tr/tr.d.ts +2 -2
  616. package/dist/commands/tree/tree.d.ts +2 -2
  617. package/dist/commands/true/true.d.ts +3 -3
  618. package/dist/commands/uniq/uniq.d.ts +2 -2
  619. package/dist/commands/wc/wc.d.ts +2 -2
  620. package/dist/commands/which/which.d.ts +2 -2
  621. package/dist/commands/whoami/whoami.d.ts +2 -2
  622. package/dist/commands/worker-request-controller.d.ts +36 -0
  623. package/dist/commands/xan/aggregation.d.ts +13 -3
  624. package/dist/commands/xan/bounded-output.d.ts +4 -0
  625. package/dist/commands/xan/column-selection.d.ts +2 -1
  626. package/dist/commands/xan/csv.d.ts +29 -4
  627. package/dist/commands/xan/moonblade-parser.d.ts +11 -2
  628. package/dist/commands/xan/moonblade-to-jq.d.ts +2 -2
  629. package/dist/commands/xan/moonblade-tokenizer.d.ts +8 -1
  630. package/dist/commands/xan/xan-agg.d.ts +5 -5
  631. package/dist/commands/xan/xan-columns.d.ts +5 -5
  632. package/dist/commands/xan/xan-core.d.ts +7 -7
  633. package/dist/commands/xan/xan-data.d.ts +8 -8
  634. package/dist/commands/xan/xan-filter.d.ts +5 -5
  635. package/dist/commands/xan/xan-map.d.ts +3 -3
  636. package/dist/commands/xan/xan-reshape.d.ts +6 -6
  637. package/dist/commands/xan/xan-simple.d.ts +7 -7
  638. package/dist/commands/xan/xan-view.d.ts +3 -3
  639. package/dist/commands/xan/xan.d.ts +2 -2
  640. package/dist/commands/xargs/xargs.d.ts +2 -2
  641. package/dist/commands/yq/formats.d.ts +5 -4
  642. package/dist/commands/yq/yq.d.ts +3 -3
  643. package/dist/custom-commands.d.ts +25 -2
  644. package/dist/encoding.d.ts +5 -3
  645. package/dist/execution-output.d.ts +28 -0
  646. package/dist/execution-scope.d.ts +89 -0
  647. package/dist/fatal-execution-error.d.ts +5 -0
  648. package/dist/fs/identity.d.ts +9 -0
  649. package/dist/fs/in-memory-fs/in-memory-fs.d.ts +24 -1
  650. package/dist/fs/interface.d.ts +4 -0
  651. package/dist/fs/overlay-fs/overlay-fs.d.ts +13 -0
  652. package/dist/fs/path-utils.d.ts +2 -0
  653. package/dist/fs/read-write-fs/read-write-fs.d.ts +11 -0
  654. package/dist/fs/real-fs-utils.d.ts +1 -1
  655. package/dist/fs/traversal.d.ts +98 -0
  656. package/dist/index.d.cts +4 -4
  657. package/dist/index.d.ts +4 -4
  658. package/dist/interpreter/alias-expansion.d.ts +4 -0
  659. package/dist/interpreter/builtins/declare-array-parsing.d.ts +6 -2
  660. package/dist/interpreter/builtins/index.d.ts +0 -1
  661. package/dist/interpreter/builtins/variable-assignment.d.ts +4 -1
  662. package/dist/interpreter/conditionals.d.ts +1 -1
  663. package/dist/interpreter/defense-aware-command-context.d.ts +2 -2
  664. package/dist/interpreter/errors.d.ts +7 -17
  665. package/dist/interpreter/expansion/brace-range.d.ts +5 -1
  666. package/dist/interpreter/expansion/pattern-removal.d.ts +2 -3
  667. package/dist/interpreter/expansion/pattern-replacement.d.ts +4 -0
  668. package/dist/interpreter/expansion/tilde.d.ts +2 -0
  669. package/dist/interpreter/helpers/array.d.ts +16 -3
  670. package/dist/interpreter/helpers/bounded-array.d.ts +2 -0
  671. package/dist/interpreter/helpers/condition.d.ts +2 -5
  672. package/dist/interpreter/helpers/ifs.d.ts +3 -3
  673. package/dist/interpreter/helpers/quoting.d.ts +2 -0
  674. package/dist/interpreter/helpers/string-compare.d.ts +1 -1
  675. package/dist/interpreter/interpreter.d.ts +4 -8
  676. package/dist/interpreter/redirections.d.ts +5 -2
  677. package/dist/interpreter/simple-command-assignments.d.ts +7 -0
  678. package/dist/interpreter/state-transaction.d.ts +7 -0
  679. package/dist/interpreter/types.d.ts +24 -8
  680. package/dist/limits.d.ts +76 -17
  681. package/dist/network/dns-pin.d.ts +23 -32
  682. package/dist/network/fetch.d.ts +4 -0
  683. package/dist/network/types.d.ts +10 -1
  684. package/dist/parser/parser.d.ts +5 -2
  685. package/dist/parser/types.d.ts +10 -1
  686. package/dist/sandbox/Sandbox.d.ts +33 -2
  687. package/dist/source-limit.d.ts +2 -0
  688. package/dist/timers.d.ts +12 -0
  689. package/dist/types.d.ts +43 -7
  690. package/dist/utils/file-reader.d.ts +5 -3
  691. package/package.json +10 -5
  692. package/dist/bin/chunks/alias-YRVAW27Y.js +0 -3
  693. package/dist/bin/chunks/awk2-UFCNQFCV.js +0 -3
  694. package/dist/bin/chunks/base64-EGKVQIBC.js +0 -3
  695. package/dist/bin/chunks/basename-F3AQ4KAQ.js +0 -3
  696. package/dist/bin/chunks/bash-BEG4JB7K.js +0 -3
  697. package/dist/bin/chunks/cat-NBL6MU5H.js +0 -3
  698. package/dist/bin/chunks/chmod-S564JCJW.js +0 -3
  699. package/dist/bin/chunks/chunk-2AIXTPH2.js +0 -9
  700. package/dist/bin/chunks/chunk-2GG3NVC4.js +0 -10
  701. package/dist/bin/chunks/chunk-2ZAK22BG.js +0 -9
  702. package/dist/bin/chunks/chunk-3WIMLJM7.js +0 -8
  703. package/dist/bin/chunks/chunk-47WZ2U6M.js +0 -9
  704. package/dist/bin/chunks/chunk-4BNS566Q.js +0 -4
  705. package/dist/bin/chunks/chunk-4J4UC7OD.js +0 -17
  706. package/dist/bin/chunks/chunk-52FZYTIX.js +0 -34
  707. package/dist/bin/chunks/chunk-5KX5YUWT.js +0 -37
  708. package/dist/bin/chunks/chunk-5XSZHUEI.js +0 -15
  709. package/dist/bin/chunks/chunk-6FYCU7QB.js +0 -3
  710. package/dist/bin/chunks/chunk-6JKLDBRW.js +0 -18
  711. package/dist/bin/chunks/chunk-6WJQNLR2.js +0 -7
  712. package/dist/bin/chunks/chunk-7HK63L6Y.js +0 -3
  713. package/dist/bin/chunks/chunk-7NDRU2ZN.js +0 -5
  714. package/dist/bin/chunks/chunk-7VCQWCSH.js +0 -15
  715. package/dist/bin/chunks/chunk-AFAD5U2A.js +0 -8
  716. package/dist/bin/chunks/chunk-AZH64XMJ.js +0 -3
  717. package/dist/bin/chunks/chunk-BPZJYOUA.js +0 -33
  718. package/dist/bin/chunks/chunk-BZP56QBM.js +0 -24
  719. package/dist/bin/chunks/chunk-C6JOQKE2.js +0 -22
  720. package/dist/bin/chunks/chunk-CX5CEEGI.js +0 -11
  721. package/dist/bin/chunks/chunk-D7YFPDMV.js +0 -22
  722. package/dist/bin/chunks/chunk-DHIKZU63.js +0 -3
  723. package/dist/bin/chunks/chunk-DWECIBLJ.js +0 -3
  724. package/dist/bin/chunks/chunk-FEENTUVZ.js +0 -18
  725. package/dist/bin/chunks/chunk-FJABJBIW.js +0 -141
  726. package/dist/bin/chunks/chunk-FYCT4DWY.js +0 -6
  727. package/dist/bin/chunks/chunk-G7ZWT7BT.js +0 -9
  728. package/dist/bin/chunks/chunk-GTO74SFS.js +0 -7
  729. package/dist/bin/chunks/chunk-GXX3QUMM.js +0 -34
  730. package/dist/bin/chunks/chunk-HMCRB24D.js +0 -15
  731. package/dist/bin/chunks/chunk-HWNCK5BB.js +0 -10
  732. package/dist/bin/chunks/chunk-IX7LKVVH.js +0 -15
  733. package/dist/bin/chunks/chunk-J7XTZ47D.js +0 -288
  734. package/dist/bin/chunks/chunk-JDFKEXLG.js +0 -12
  735. package/dist/bin/chunks/chunk-JJC4ENJL.js +0 -13
  736. package/dist/bin/chunks/chunk-JSZBZ2XU.js +0 -3
  737. package/dist/bin/chunks/chunk-JXLDT4KX.js +0 -4
  738. package/dist/bin/chunks/chunk-KMZUSEWI.js +0 -12
  739. package/dist/bin/chunks/chunk-KWCO3YXP.js +0 -17
  740. package/dist/bin/chunks/chunk-LMA4D2KK.js +0 -7
  741. package/dist/bin/chunks/chunk-LNVSXNT7.js +0 -3
  742. package/dist/bin/chunks/chunk-LX2H4DPL.js +0 -6
  743. package/dist/bin/chunks/chunk-MLUOPG3W.js +0 -3
  744. package/dist/bin/chunks/chunk-MNWK4UIM.js +0 -22
  745. package/dist/bin/chunks/chunk-MP77TJMM.js +0 -6
  746. package/dist/bin/chunks/chunk-MTK7VLZG.js +0 -12
  747. package/dist/bin/chunks/chunk-N3FQJLPZ.js +0 -17
  748. package/dist/bin/chunks/chunk-N6YW4W3Z.js +0 -29
  749. package/dist/bin/chunks/chunk-NMMVECGD.js +0 -14
  750. package/dist/bin/chunks/chunk-NXYVRP6D.js +0 -11
  751. package/dist/bin/chunks/chunk-NYIPFY36.js +0 -3
  752. package/dist/bin/chunks/chunk-OVVMB2JI.js +0 -7
  753. package/dist/bin/chunks/chunk-OXZSG3ZZ.js +0 -7
  754. package/dist/bin/chunks/chunk-PKE7GKU5.js +0 -3
  755. package/dist/bin/chunks/chunk-PSJORJRS.js +0 -6
  756. package/dist/bin/chunks/chunk-R36DS2UF.js +0 -20
  757. package/dist/bin/chunks/chunk-RKBWTGBZ.js +0 -7
  758. package/dist/bin/chunks/chunk-RVGYO2OU.js +0 -3
  759. package/dist/bin/chunks/chunk-SF2OLINE.js +0 -12
  760. package/dist/bin/chunks/chunk-TIRU5FOD.js +0 -101
  761. package/dist/bin/chunks/chunk-TKYWUEON.js +0 -13
  762. package/dist/bin/chunks/chunk-UI7CV277.js +0 -20
  763. package/dist/bin/chunks/chunk-UNWZQG7U.js +0 -3
  764. package/dist/bin/chunks/chunk-UOMNSQEZ.js +0 -10
  765. package/dist/bin/chunks/chunk-W5OBQVJ2.js +0 -6
  766. package/dist/bin/chunks/chunk-WDWNEHHE.js +0 -9
  767. package/dist/bin/chunks/chunk-WHUKZ3K3.js +0 -85
  768. package/dist/bin/chunks/chunk-XHCCSVP6.js +0 -9
  769. package/dist/bin/chunks/chunk-XPTYN6UE.js +0 -8
  770. package/dist/bin/chunks/chunk-XRUDFQG5.js +0 -7
  771. package/dist/bin/chunks/chunk-Y2IUEWQD.js +0 -11
  772. package/dist/bin/chunks/chunk-Y5OWCEDV.js +0 -64
  773. package/dist/bin/chunks/chunk-ZFUVUYWG.js +0 -15
  774. package/dist/bin/chunks/chunk-ZZP3RSWL.js +0 -4
  775. package/dist/bin/chunks/clear-FGNEKYDU.js +0 -3
  776. package/dist/bin/chunks/column-QLGOK3XM.js +0 -3
  777. package/dist/bin/chunks/comm-PLYUTVP3.js +0 -3
  778. package/dist/bin/chunks/cp-HYXTMN3D.js +0 -3
  779. package/dist/bin/chunks/curl-DCSPNPEW.js +0 -27
  780. package/dist/bin/chunks/cut-JNQTCQY7.js +0 -3
  781. package/dist/bin/chunks/date-OFYBOAUE.js +0 -3
  782. package/dist/bin/chunks/diff-LZ4WRLIF.js +0 -3
  783. package/dist/bin/chunks/dirname-VCINTLPD.js +0 -3
  784. package/dist/bin/chunks/du-4LRQIGRG.js +0 -3
  785. package/dist/bin/chunks/echo-KCOHTNDF.js +0 -3
  786. package/dist/bin/chunks/env-FNVYNLGB.js +0 -3
  787. package/dist/bin/chunks/expand-CB7FG7LQ.js +0 -3
  788. package/dist/bin/chunks/expr-6A2XZORA.js +0 -3
  789. package/dist/bin/chunks/file-GRZLWDVH.js +0 -3
  790. package/dist/bin/chunks/find-5OZWMYCV.js +0 -3
  791. package/dist/bin/chunks/flag-coverage-H6NG6ZQL.js +0 -3
  792. package/dist/bin/chunks/fold-7YEITA5L.js +0 -3
  793. package/dist/bin/chunks/grep-KKBXRB73.js +0 -3
  794. package/dist/bin/chunks/gzip-ZJP5VIAQ.js +0 -3
  795. package/dist/bin/chunks/head-B6GFQHKF.js +0 -3
  796. package/dist/bin/chunks/help-CGUEOGXQ.js +0 -3
  797. package/dist/bin/chunks/history-AQQWW3QB.js +0 -3
  798. package/dist/bin/chunks/hostname-USNWOQCK.js +0 -3
  799. package/dist/bin/chunks/html-to-markdown-3HJ7L7NL.js +0 -3
  800. package/dist/bin/chunks/join-WRM6S6CO.js +0 -3
  801. package/dist/bin/chunks/jq-33GJJXTL.js +0 -3
  802. package/dist/bin/chunks/js-exec-F7JAZ4ZQ.js +0 -98
  803. package/dist/bin/chunks/ln-LP4HMCSM.js +0 -3
  804. package/dist/bin/chunks/ls-KBNHNZWQ.js +0 -3
  805. package/dist/bin/chunks/md5sum-ZNYCDRQL.js +0 -3
  806. package/dist/bin/chunks/mkdir-P4DKRCDX.js +0 -3
  807. package/dist/bin/chunks/mv-QQK4FQX6.js +0 -3
  808. package/dist/bin/chunks/nl-6TVYE4ZB.js +0 -3
  809. package/dist/bin/chunks/od-Y3E3QXOL.js +0 -3
  810. package/dist/bin/chunks/paste-LYNFXXCM.js +0 -3
  811. package/dist/bin/chunks/printf-MR3FXCDE.js +0 -3
  812. package/dist/bin/chunks/pwd-FCNDA467.js +0 -3
  813. package/dist/bin/chunks/python3-R5OFWJIH.js +0 -13
  814. package/dist/bin/chunks/readlink-25V57VOL.js +0 -3
  815. package/dist/bin/chunks/rev-AJECDD4L.js +0 -3
  816. package/dist/bin/chunks/rg-2YWJS6TE.js +0 -3
  817. package/dist/bin/chunks/rm-ECNUFR66.js +0 -3
  818. package/dist/bin/chunks/rmdir-DLOHIA7Q.js +0 -3
  819. package/dist/bin/chunks/sed-IGRH7EGG.js +0 -3
  820. package/dist/bin/chunks/seq-UXDJE6FB.js +0 -3
  821. package/dist/bin/chunks/sha1sum-5QZSNFY3.js +0 -3
  822. package/dist/bin/chunks/sha256sum-DI7JAVAU.js +0 -3
  823. package/dist/bin/chunks/sleep-RPGCUUGX.js +0 -3
  824. package/dist/bin/chunks/sort-HQPAFL76.js +0 -3
  825. package/dist/bin/chunks/split-F6FSB5KI.js +0 -3
  826. package/dist/bin/chunks/sqlite3-7TRACAE7.js +0 -3
  827. package/dist/bin/chunks/stat-BD6KT3BP.js +0 -3
  828. package/dist/bin/chunks/strings-6PE3YMPO.js +0 -3
  829. package/dist/bin/chunks/tac-NERJXVOM.js +0 -3
  830. package/dist/bin/chunks/tail-24F643A4.js +0 -3
  831. package/dist/bin/chunks/tar-5HK3VMV2.js +0 -3
  832. package/dist/bin/chunks/tee-5B7P2QRJ.js +0 -3
  833. package/dist/bin/chunks/time-FN6VJGRS.js +0 -3
  834. package/dist/bin/chunks/timeout-ZARIAF3K.js +0 -3
  835. package/dist/bin/chunks/touch-DFGSVIX7.js +0 -3
  836. package/dist/bin/chunks/tr-QQZYZ3CH.js +0 -3
  837. package/dist/bin/chunks/tree-6D7SMPUR.js +0 -3
  838. package/dist/bin/chunks/true-SKL4L7JP.js +0 -3
  839. package/dist/bin/chunks/unexpand-3JWOSSBQ.js +0 -3
  840. package/dist/bin/chunks/uniq-Q5UH5NL3.js +0 -3
  841. package/dist/bin/chunks/wc-4HXNTHY3.js +0 -3
  842. package/dist/bin/chunks/which-LCXKCLFC.js +0 -3
  843. package/dist/bin/chunks/whoami-TZDZDU7T.js +0 -3
  844. package/dist/bin/chunks/xan-TSDTZVY3.js +0 -3
  845. package/dist/bin/chunks/xan-view-XBMA362V.js +0 -3
  846. package/dist/bin/chunks/xargs-VTFN762K.js +0 -3
  847. package/dist/bin/chunks/yq-KU5YTNAK.js +0 -3
  848. package/dist/bin/shell/chunks/alias-YRVAW27Y.js +0 -3
  849. package/dist/bin/shell/chunks/awk2-UFCNQFCV.js +0 -3
  850. package/dist/bin/shell/chunks/base64-EGKVQIBC.js +0 -3
  851. package/dist/bin/shell/chunks/basename-F3AQ4KAQ.js +0 -3
  852. package/dist/bin/shell/chunks/bash-BEG4JB7K.js +0 -3
  853. package/dist/bin/shell/chunks/cat-NBL6MU5H.js +0 -3
  854. package/dist/bin/shell/chunks/chmod-S564JCJW.js +0 -3
  855. package/dist/bin/shell/chunks/chunk-2AIXTPH2.js +0 -9
  856. package/dist/bin/shell/chunks/chunk-2GG3NVC4.js +0 -10
  857. package/dist/bin/shell/chunks/chunk-2ZAK22BG.js +0 -9
  858. package/dist/bin/shell/chunks/chunk-3WIMLJM7.js +0 -8
  859. package/dist/bin/shell/chunks/chunk-47WZ2U6M.js +0 -9
  860. package/dist/bin/shell/chunks/chunk-4BNS566Q.js +0 -4
  861. package/dist/bin/shell/chunks/chunk-4J4UC7OD.js +0 -17
  862. package/dist/bin/shell/chunks/chunk-52FZYTIX.js +0 -34
  863. package/dist/bin/shell/chunks/chunk-5KX5YUWT.js +0 -37
  864. package/dist/bin/shell/chunks/chunk-5XSZHUEI.js +0 -15
  865. package/dist/bin/shell/chunks/chunk-6FYCU7QB.js +0 -3
  866. package/dist/bin/shell/chunks/chunk-6JKLDBRW.js +0 -18
  867. package/dist/bin/shell/chunks/chunk-6WJQNLR2.js +0 -7
  868. package/dist/bin/shell/chunks/chunk-7HK63L6Y.js +0 -3
  869. package/dist/bin/shell/chunks/chunk-7NDRU2ZN.js +0 -5
  870. package/dist/bin/shell/chunks/chunk-7VCQWCSH.js +0 -15
  871. package/dist/bin/shell/chunks/chunk-AFAD5U2A.js +0 -8
  872. package/dist/bin/shell/chunks/chunk-AZH64XMJ.js +0 -3
  873. package/dist/bin/shell/chunks/chunk-BPZJYOUA.js +0 -33
  874. package/dist/bin/shell/chunks/chunk-BZP56QBM.js +0 -24
  875. package/dist/bin/shell/chunks/chunk-C6JOQKE2.js +0 -22
  876. package/dist/bin/shell/chunks/chunk-CX5CEEGI.js +0 -11
  877. package/dist/bin/shell/chunks/chunk-D7YFPDMV.js +0 -22
  878. package/dist/bin/shell/chunks/chunk-DHIKZU63.js +0 -3
  879. package/dist/bin/shell/chunks/chunk-DWECIBLJ.js +0 -3
  880. package/dist/bin/shell/chunks/chunk-FEENTUVZ.js +0 -18
  881. package/dist/bin/shell/chunks/chunk-FJABJBIW.js +0 -141
  882. package/dist/bin/shell/chunks/chunk-FYCT4DWY.js +0 -6
  883. package/dist/bin/shell/chunks/chunk-G7ZWT7BT.js +0 -9
  884. package/dist/bin/shell/chunks/chunk-GTO74SFS.js +0 -7
  885. package/dist/bin/shell/chunks/chunk-GXX3QUMM.js +0 -34
  886. package/dist/bin/shell/chunks/chunk-HMCRB24D.js +0 -15
  887. package/dist/bin/shell/chunks/chunk-HWNCK5BB.js +0 -10
  888. package/dist/bin/shell/chunks/chunk-IX7LKVVH.js +0 -15
  889. package/dist/bin/shell/chunks/chunk-J7XTZ47D.js +0 -288
  890. package/dist/bin/shell/chunks/chunk-JDFKEXLG.js +0 -12
  891. package/dist/bin/shell/chunks/chunk-JJC4ENJL.js +0 -13
  892. package/dist/bin/shell/chunks/chunk-JSZBZ2XU.js +0 -3
  893. package/dist/bin/shell/chunks/chunk-JXLDT4KX.js +0 -4
  894. package/dist/bin/shell/chunks/chunk-KMZUSEWI.js +0 -12
  895. package/dist/bin/shell/chunks/chunk-KWCO3YXP.js +0 -17
  896. package/dist/bin/shell/chunks/chunk-LMA4D2KK.js +0 -7
  897. package/dist/bin/shell/chunks/chunk-LNVSXNT7.js +0 -3
  898. package/dist/bin/shell/chunks/chunk-LX2H4DPL.js +0 -6
  899. package/dist/bin/shell/chunks/chunk-MLUOPG3W.js +0 -3
  900. package/dist/bin/shell/chunks/chunk-MNWK4UIM.js +0 -22
  901. package/dist/bin/shell/chunks/chunk-MP77TJMM.js +0 -6
  902. package/dist/bin/shell/chunks/chunk-MTK7VLZG.js +0 -12
  903. package/dist/bin/shell/chunks/chunk-N3FQJLPZ.js +0 -17
  904. package/dist/bin/shell/chunks/chunk-N6YW4W3Z.js +0 -29
  905. package/dist/bin/shell/chunks/chunk-NMMVECGD.js +0 -14
  906. package/dist/bin/shell/chunks/chunk-NXYVRP6D.js +0 -11
  907. package/dist/bin/shell/chunks/chunk-NYIPFY36.js +0 -3
  908. package/dist/bin/shell/chunks/chunk-OVVMB2JI.js +0 -7
  909. package/dist/bin/shell/chunks/chunk-OXZSG3ZZ.js +0 -7
  910. package/dist/bin/shell/chunks/chunk-PKE7GKU5.js +0 -3
  911. package/dist/bin/shell/chunks/chunk-PSJORJRS.js +0 -6
  912. package/dist/bin/shell/chunks/chunk-R36DS2UF.js +0 -20
  913. package/dist/bin/shell/chunks/chunk-RKBWTGBZ.js +0 -7
  914. package/dist/bin/shell/chunks/chunk-RVGYO2OU.js +0 -3
  915. package/dist/bin/shell/chunks/chunk-SF2OLINE.js +0 -12
  916. package/dist/bin/shell/chunks/chunk-TIRU5FOD.js +0 -101
  917. package/dist/bin/shell/chunks/chunk-TKYWUEON.js +0 -13
  918. package/dist/bin/shell/chunks/chunk-UI7CV277.js +0 -20
  919. package/dist/bin/shell/chunks/chunk-UNWZQG7U.js +0 -3
  920. package/dist/bin/shell/chunks/chunk-UOMNSQEZ.js +0 -10
  921. package/dist/bin/shell/chunks/chunk-W5OBQVJ2.js +0 -6
  922. package/dist/bin/shell/chunks/chunk-WDWNEHHE.js +0 -9
  923. package/dist/bin/shell/chunks/chunk-WHUKZ3K3.js +0 -85
  924. package/dist/bin/shell/chunks/chunk-XHCCSVP6.js +0 -9
  925. package/dist/bin/shell/chunks/chunk-XPTYN6UE.js +0 -8
  926. package/dist/bin/shell/chunks/chunk-XRUDFQG5.js +0 -7
  927. package/dist/bin/shell/chunks/chunk-Y2IUEWQD.js +0 -11
  928. package/dist/bin/shell/chunks/chunk-Y5OWCEDV.js +0 -64
  929. package/dist/bin/shell/chunks/chunk-ZFUVUYWG.js +0 -15
  930. package/dist/bin/shell/chunks/chunk-ZZP3RSWL.js +0 -4
  931. package/dist/bin/shell/chunks/clear-FGNEKYDU.js +0 -3
  932. package/dist/bin/shell/chunks/column-QLGOK3XM.js +0 -3
  933. package/dist/bin/shell/chunks/comm-PLYUTVP3.js +0 -3
  934. package/dist/bin/shell/chunks/cp-HYXTMN3D.js +0 -3
  935. package/dist/bin/shell/chunks/curl-DCSPNPEW.js +0 -27
  936. package/dist/bin/shell/chunks/cut-JNQTCQY7.js +0 -3
  937. package/dist/bin/shell/chunks/date-OFYBOAUE.js +0 -3
  938. package/dist/bin/shell/chunks/diff-LZ4WRLIF.js +0 -3
  939. package/dist/bin/shell/chunks/dirname-VCINTLPD.js +0 -3
  940. package/dist/bin/shell/chunks/du-4LRQIGRG.js +0 -3
  941. package/dist/bin/shell/chunks/echo-KCOHTNDF.js +0 -3
  942. package/dist/bin/shell/chunks/env-FNVYNLGB.js +0 -3
  943. package/dist/bin/shell/chunks/expand-CB7FG7LQ.js +0 -3
  944. package/dist/bin/shell/chunks/expr-6A2XZORA.js +0 -3
  945. package/dist/bin/shell/chunks/file-GRZLWDVH.js +0 -3
  946. package/dist/bin/shell/chunks/find-5OZWMYCV.js +0 -3
  947. package/dist/bin/shell/chunks/flag-coverage-H6NG6ZQL.js +0 -3
  948. package/dist/bin/shell/chunks/fold-7YEITA5L.js +0 -3
  949. package/dist/bin/shell/chunks/grep-KKBXRB73.js +0 -3
  950. package/dist/bin/shell/chunks/gzip-ZJP5VIAQ.js +0 -3
  951. package/dist/bin/shell/chunks/head-B6GFQHKF.js +0 -3
  952. package/dist/bin/shell/chunks/help-CGUEOGXQ.js +0 -3
  953. package/dist/bin/shell/chunks/history-AQQWW3QB.js +0 -3
  954. package/dist/bin/shell/chunks/hostname-USNWOQCK.js +0 -3
  955. package/dist/bin/shell/chunks/html-to-markdown-3HJ7L7NL.js +0 -3
  956. package/dist/bin/shell/chunks/join-WRM6S6CO.js +0 -3
  957. package/dist/bin/shell/chunks/jq-33GJJXTL.js +0 -3
  958. package/dist/bin/shell/chunks/js-exec-F7JAZ4ZQ.js +0 -98
  959. package/dist/bin/shell/chunks/ln-LP4HMCSM.js +0 -3
  960. package/dist/bin/shell/chunks/ls-KBNHNZWQ.js +0 -3
  961. package/dist/bin/shell/chunks/md5sum-ZNYCDRQL.js +0 -3
  962. package/dist/bin/shell/chunks/mkdir-P4DKRCDX.js +0 -3
  963. package/dist/bin/shell/chunks/mv-QQK4FQX6.js +0 -3
  964. package/dist/bin/shell/chunks/nl-6TVYE4ZB.js +0 -3
  965. package/dist/bin/shell/chunks/od-Y3E3QXOL.js +0 -3
  966. package/dist/bin/shell/chunks/paste-LYNFXXCM.js +0 -3
  967. package/dist/bin/shell/chunks/printf-MR3FXCDE.js +0 -3
  968. package/dist/bin/shell/chunks/pwd-FCNDA467.js +0 -3
  969. package/dist/bin/shell/chunks/python3-R5OFWJIH.js +0 -13
  970. package/dist/bin/shell/chunks/readlink-25V57VOL.js +0 -3
  971. package/dist/bin/shell/chunks/rev-AJECDD4L.js +0 -3
  972. package/dist/bin/shell/chunks/rg-2YWJS6TE.js +0 -3
  973. package/dist/bin/shell/chunks/rm-ECNUFR66.js +0 -3
  974. package/dist/bin/shell/chunks/rmdir-DLOHIA7Q.js +0 -3
  975. package/dist/bin/shell/chunks/sed-IGRH7EGG.js +0 -3
  976. package/dist/bin/shell/chunks/seq-UXDJE6FB.js +0 -3
  977. package/dist/bin/shell/chunks/sha1sum-5QZSNFY3.js +0 -3
  978. package/dist/bin/shell/chunks/sha256sum-DI7JAVAU.js +0 -3
  979. package/dist/bin/shell/chunks/sleep-RPGCUUGX.js +0 -3
  980. package/dist/bin/shell/chunks/sort-HQPAFL76.js +0 -3
  981. package/dist/bin/shell/chunks/split-F6FSB5KI.js +0 -3
  982. package/dist/bin/shell/chunks/sqlite3-7TRACAE7.js +0 -3
  983. package/dist/bin/shell/chunks/stat-BD6KT3BP.js +0 -3
  984. package/dist/bin/shell/chunks/strings-6PE3YMPO.js +0 -3
  985. package/dist/bin/shell/chunks/tac-NERJXVOM.js +0 -3
  986. package/dist/bin/shell/chunks/tail-24F643A4.js +0 -3
  987. package/dist/bin/shell/chunks/tar-5HK3VMV2.js +0 -3
  988. package/dist/bin/shell/chunks/tee-5B7P2QRJ.js +0 -3
  989. package/dist/bin/shell/chunks/time-FN6VJGRS.js +0 -3
  990. package/dist/bin/shell/chunks/timeout-ZARIAF3K.js +0 -3
  991. package/dist/bin/shell/chunks/touch-DFGSVIX7.js +0 -3
  992. package/dist/bin/shell/chunks/tr-QQZYZ3CH.js +0 -3
  993. package/dist/bin/shell/chunks/tree-6D7SMPUR.js +0 -3
  994. package/dist/bin/shell/chunks/true-SKL4L7JP.js +0 -3
  995. package/dist/bin/shell/chunks/unexpand-3JWOSSBQ.js +0 -3
  996. package/dist/bin/shell/chunks/uniq-Q5UH5NL3.js +0 -3
  997. package/dist/bin/shell/chunks/wc-4HXNTHY3.js +0 -3
  998. package/dist/bin/shell/chunks/which-LCXKCLFC.js +0 -3
  999. package/dist/bin/shell/chunks/whoami-TZDZDU7T.js +0 -3
  1000. package/dist/bin/shell/chunks/xan-TSDTZVY3.js +0 -3
  1001. package/dist/bin/shell/chunks/xan-view-XBMA362V.js +0 -3
  1002. package/dist/bin/shell/chunks/xargs-VTFN762K.js +0 -3
  1003. package/dist/bin/shell/chunks/yq-KU5YTNAK.js +0 -3
  1004. package/dist/bundle/chunks/alias-RTYYYW3D.js +0 -2
  1005. package/dist/bundle/chunks/awk2-SREAOJRG.js +0 -2
  1006. package/dist/bundle/chunks/base64-WIGL46P3.js +0 -2
  1007. package/dist/bundle/chunks/basename-UB3CIYNI.js +0 -2
  1008. package/dist/bundle/chunks/bash-F4KHPMTX.js +0 -2
  1009. package/dist/bundle/chunks/cat-LPZ6XNHG.js +0 -2
  1010. package/dist/bundle/chunks/chmod-TFEPA42X.js +0 -2
  1011. package/dist/bundle/chunks/chunk-27JIFWUR.js +0 -3
  1012. package/dist/bundle/chunks/chunk-2VDTE5BV.js +0 -14
  1013. package/dist/bundle/chunks/chunk-2VJJEDV2.js +0 -8
  1014. package/dist/bundle/chunks/chunk-4I3HOE5Z.js +0 -21
  1015. package/dist/bundle/chunks/chunk-4JLVZKHC.js +0 -8
  1016. package/dist/bundle/chunks/chunk-4WKZNNJK.js +0 -2
  1017. package/dist/bundle/chunks/chunk-55LZFN6S.js +0 -36
  1018. package/dist/bundle/chunks/chunk-5MV7Q5QB.js +0 -5
  1019. package/dist/bundle/chunks/chunk-6L65G6A7.js +0 -17
  1020. package/dist/bundle/chunks/chunk-6NYPZ4NX.js +0 -8
  1021. package/dist/bundle/chunks/chunk-7CSMHFIJ.js +0 -33
  1022. package/dist/bundle/chunks/chunk-AAGO7IQ5.js +0 -11
  1023. package/dist/bundle/chunks/chunk-AFQAPVZ3.js +0 -16
  1024. package/dist/bundle/chunks/chunk-AX2X3SZS.js +0 -11
  1025. package/dist/bundle/chunks/chunk-AXMYAPFA.js +0 -9
  1026. package/dist/bundle/chunks/chunk-BU36VZYL.js +0 -4
  1027. package/dist/bundle/chunks/chunk-BZUGFHVS.js +0 -2
  1028. package/dist/bundle/chunks/chunk-CJFAMHFC.js +0 -7
  1029. package/dist/bundle/chunks/chunk-CN5XGDNN.js +0 -6
  1030. package/dist/bundle/chunks/chunk-CQV3EITV.js +0 -2
  1031. package/dist/bundle/chunks/chunk-DJ7QC6LC.js +0 -140
  1032. package/dist/bundle/chunks/chunk-DVJY2RAX.js +0 -2
  1033. package/dist/bundle/chunks/chunk-EUCNMMRD.js +0 -287
  1034. package/dist/bundle/chunks/chunk-FLMHFDSN.js +0 -5
  1035. package/dist/bundle/chunks/chunk-GE6OQDB2.js +0 -10
  1036. package/dist/bundle/chunks/chunk-GHB6M7KA.js +0 -2
  1037. package/dist/bundle/chunks/chunk-GRQJA2J7.js +0 -21
  1038. package/dist/bundle/chunks/chunk-H2TS57O5.js +0 -5
  1039. package/dist/bundle/chunks/chunk-H7WISVP3.js +0 -6
  1040. package/dist/bundle/chunks/chunk-HAIOEUEV.js +0 -63
  1041. package/dist/bundle/chunks/chunk-HBVMHTO5.js +0 -2
  1042. package/dist/bundle/chunks/chunk-IZ6KBTV7.js +0 -100
  1043. package/dist/bundle/chunks/chunk-JTMQLUCH.js +0 -16
  1044. package/dist/bundle/chunks/chunk-K5JMLDHX.js +0 -13
  1045. package/dist/bundle/chunks/chunk-KAPG5ONA.js +0 -2
  1046. package/dist/bundle/chunks/chunk-KSBHIW2H.js +0 -19
  1047. package/dist/bundle/chunks/chunk-KTL5PAHY.js +0 -5
  1048. package/dist/bundle/chunks/chunk-KTPCYKBB.js +0 -3
  1049. package/dist/bundle/chunks/chunk-KWGBQNTV.js +0 -32
  1050. package/dist/bundle/chunks/chunk-LZUPLYFM.js +0 -6
  1051. package/dist/bundle/chunks/chunk-MFDPAVC6.js +0 -14
  1052. package/dist/bundle/chunks/chunk-MFRETFZB.js +0 -6
  1053. package/dist/bundle/chunks/chunk-MIZIUC5M.js +0 -8
  1054. package/dist/bundle/chunks/chunk-MJLETYZI.js +0 -14
  1055. package/dist/bundle/chunks/chunk-MTHXXA6H.js +0 -6
  1056. package/dist/bundle/chunks/chunk-NGPDJCUE.js +0 -5
  1057. package/dist/bundle/chunks/chunk-OVH44QKR.js +0 -11
  1058. package/dist/bundle/chunks/chunk-PDUL32DM.js +0 -16
  1059. package/dist/bundle/chunks/chunk-PYDWFCTN.js +0 -11
  1060. package/dist/bundle/chunks/chunk-QAJKDPNS.js +0 -2
  1061. package/dist/bundle/chunks/chunk-R4IFXNY5.js +0 -28
  1062. package/dist/bundle/chunks/chunk-R4QNMLOB.js +0 -12
  1063. package/dist/bundle/chunks/chunk-RBQG6ZUG.js +0 -3
  1064. package/dist/bundle/chunks/chunk-RCXNPPJY.js +0 -17
  1065. package/dist/bundle/chunks/chunk-S2BIZAWY.js +0 -7
  1066. package/dist/bundle/chunks/chunk-SAI2SPQQ.js +0 -8
  1067. package/dist/bundle/chunks/chunk-SETW5JBN.js +0 -9
  1068. package/dist/bundle/chunks/chunk-SJYEXC2Z.js +0 -14
  1069. package/dist/bundle/chunks/chunk-SY4HAUHP.js +0 -2
  1070. package/dist/bundle/chunks/chunk-TA74ENH7.js +0 -14
  1071. package/dist/bundle/chunks/chunk-TC2WHAIS.js +0 -2
  1072. package/dist/bundle/chunks/chunk-VACKIICN.js +0 -5
  1073. package/dist/bundle/chunks/chunk-VBLMIJON.js +0 -6
  1074. package/dist/bundle/chunks/chunk-WKPK7M56.js +0 -10
  1075. package/dist/bundle/chunks/chunk-WM5IJFMP.js +0 -8
  1076. package/dist/bundle/chunks/chunk-WPGQVBSY.js +0 -6
  1077. package/dist/bundle/chunks/chunk-WVRWIZF5.js +0 -23
  1078. package/dist/bundle/chunks/chunk-XEKXHOPO.js +0 -2
  1079. package/dist/bundle/chunks/chunk-XPK7ZFVA.js +0 -12
  1080. package/dist/bundle/chunks/chunk-XZUZRAAC.js +0 -10
  1081. package/dist/bundle/chunks/chunk-Y4LIDHSD.js +0 -7
  1082. package/dist/bundle/chunks/chunk-YRNR2VHY.js +0 -21
  1083. package/dist/bundle/chunks/chunk-YS4NUBYX.js +0 -9
  1084. package/dist/bundle/chunks/chunk-YWOZZRSK.js +0 -2
  1085. package/dist/bundle/chunks/chunk-Z3KJQD7F.js +0 -33
  1086. package/dist/bundle/chunks/chunk-ZDIT6ST5.js +0 -7
  1087. package/dist/bundle/chunks/clear-HKGFEOF6.js +0 -2
  1088. package/dist/bundle/chunks/column-PVOEF65J.js +0 -2
  1089. package/dist/bundle/chunks/comm-5QMYEAJL.js +0 -2
  1090. package/dist/bundle/chunks/cp-BISAAS7A.js +0 -2
  1091. package/dist/bundle/chunks/curl-PAWGO3EH.js +0 -26
  1092. package/dist/bundle/chunks/cut-NDMV7SPO.js +0 -2
  1093. package/dist/bundle/chunks/date-XKUEQ4WF.js +0 -2
  1094. package/dist/bundle/chunks/diff-TT4M7WM3.js +0 -2
  1095. package/dist/bundle/chunks/dirname-MPHRFUTI.js +0 -2
  1096. package/dist/bundle/chunks/du-572XNP42.js +0 -2
  1097. package/dist/bundle/chunks/echo-NDWZZHPO.js +0 -2
  1098. package/dist/bundle/chunks/env-DLFRY633.js +0 -2
  1099. package/dist/bundle/chunks/expand-T2TH4TBQ.js +0 -2
  1100. package/dist/bundle/chunks/expr-YLACLCSM.js +0 -2
  1101. package/dist/bundle/chunks/file-IPZJC3FQ.js +0 -2
  1102. package/dist/bundle/chunks/find-T5TGGXUU.js +0 -2
  1103. package/dist/bundle/chunks/flag-coverage-TRYUZMPS.js +0 -2
  1104. package/dist/bundle/chunks/fold-XR2JMFCW.js +0 -2
  1105. package/dist/bundle/chunks/grep-VUESTEZ7.js +0 -2
  1106. package/dist/bundle/chunks/gzip-HF3D26QX.js +0 -2
  1107. package/dist/bundle/chunks/head-AEMOMQSZ.js +0 -2
  1108. package/dist/bundle/chunks/help-HZ6M2CKN.js +0 -2
  1109. package/dist/bundle/chunks/history-WYYKSLSZ.js +0 -2
  1110. package/dist/bundle/chunks/hostname-C4HQXXUP.js +0 -2
  1111. package/dist/bundle/chunks/html-to-markdown-LXXMVQ3V.js +0 -2
  1112. package/dist/bundle/chunks/join-YIABB6WR.js +0 -2
  1113. package/dist/bundle/chunks/jq-3FAAQVR6.js +0 -2
  1114. package/dist/bundle/chunks/js-exec-SR6IMNWM.js +0 -97
  1115. package/dist/bundle/chunks/ln-4LGSXXGD.js +0 -2
  1116. package/dist/bundle/chunks/ls-ZJGQER7M.js +0 -2
  1117. package/dist/bundle/chunks/md5sum-LU7RVIB7.js +0 -2
  1118. package/dist/bundle/chunks/mkdir-MEPGZOB6.js +0 -2
  1119. package/dist/bundle/chunks/mv-W5BIQ646.js +0 -2
  1120. package/dist/bundle/chunks/nl-Q2L5XQWZ.js +0 -2
  1121. package/dist/bundle/chunks/od-RDSM4TQJ.js +0 -2
  1122. package/dist/bundle/chunks/paste-ABCY7E6C.js +0 -2
  1123. package/dist/bundle/chunks/printf-JPOOWRJC.js +0 -2
  1124. package/dist/bundle/chunks/pwd-WE6EN5AV.js +0 -2
  1125. package/dist/bundle/chunks/python3-JPCH6LLN.js +0 -12
  1126. package/dist/bundle/chunks/readlink-OPJF4DL5.js +0 -2
  1127. package/dist/bundle/chunks/rev-GCV6X22K.js +0 -2
  1128. package/dist/bundle/chunks/rg-N5WLPMSA.js +0 -2
  1129. package/dist/bundle/chunks/rm-SSGETQVQ.js +0 -2
  1130. package/dist/bundle/chunks/rmdir-OC4ZLPYA.js +0 -2
  1131. package/dist/bundle/chunks/sed-DX2SGXMF.js +0 -2
  1132. package/dist/bundle/chunks/seq-M5EC7Q57.js +0 -2
  1133. package/dist/bundle/chunks/sha1sum-O6DM3TPQ.js +0 -2
  1134. package/dist/bundle/chunks/sha256sum-WPVZLZPS.js +0 -2
  1135. package/dist/bundle/chunks/sleep-HZ4QEFOK.js +0 -2
  1136. package/dist/bundle/chunks/sort-VW2NIZHW.js +0 -2
  1137. package/dist/bundle/chunks/split-NBMH43M2.js +0 -2
  1138. package/dist/bundle/chunks/sqlite3-UE3PJTDQ.js +0 -2
  1139. package/dist/bundle/chunks/stat-CD34IZ4P.js +0 -2
  1140. package/dist/bundle/chunks/strings-MCXFXPDL.js +0 -2
  1141. package/dist/bundle/chunks/tac-BQ7EDZW2.js +0 -2
  1142. package/dist/bundle/chunks/tail-GJMTLMNE.js +0 -2
  1143. package/dist/bundle/chunks/tar-WIZ3PDF4.js +0 -2
  1144. package/dist/bundle/chunks/tee-SGANDVNY.js +0 -2
  1145. package/dist/bundle/chunks/time-FCZCDIAM.js +0 -2
  1146. package/dist/bundle/chunks/timeout-VDIEAB4R.js +0 -2
  1147. package/dist/bundle/chunks/touch-UA33VN3N.js +0 -2
  1148. package/dist/bundle/chunks/tr-JNNR5JMS.js +0 -2
  1149. package/dist/bundle/chunks/tree-YLD52CNT.js +0 -2
  1150. package/dist/bundle/chunks/true-FHQXJXBE.js +0 -2
  1151. package/dist/bundle/chunks/unexpand-2TKXAENW.js +0 -2
  1152. package/dist/bundle/chunks/uniq-DMFKT3AB.js +0 -2
  1153. package/dist/bundle/chunks/wc-TZFYWFLA.js +0 -2
  1154. package/dist/bundle/chunks/which-XEM24D5D.js +0 -2
  1155. package/dist/bundle/chunks/whoami-XMTX52VE.js +0 -2
  1156. package/dist/bundle/chunks/xan-U6654PZR.js +0 -2
  1157. package/dist/bundle/chunks/xan-view-YATJ4KAA.js +0 -2
  1158. package/dist/bundle/chunks/xargs-VDP7DLOU.js +0 -2
  1159. package/dist/bundle/chunks/yq-ZBXLBSXV.js +0 -2
  1160. package/dist/interpreter/helpers/statements.d.ts +0 -20
  1161. package/dist/interpreter/helpers/tilde.d.ts +0 -13
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as Ue}from"./chunk-BNYIXXC2.js";import{d as Ne}from"./chunk-CPTQXTBJ.js";import{a as Re,b as Pe,c as ge}from"./chunk-MUFNRCMY.js";import{a as re,b as L,c as Le}from"./chunk-DN2YCFOR.js";var We=L(ye=>{ye.read=function(i,e,t,r,n){var o,s,f=n*8-r-1,m=(1<<f)-1,a=m>>1,c=-7,p=t?n-1:0,u=t?-1:1,d=i[e+p];for(p+=u,o=d&(1<<-c)-1,d>>=-c,c+=f;c>0;o=o*256+i[e+p],p+=u,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+i[e+p],p+=u,c-=8);if(o===0)o=1-a;else{if(o===m)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-a}return(d?-1:1)*s*Math.pow(2,o-r)};ye.write=function(i,e,t,r,n,o){var s,f,m,a=o*8-n-1,c=(1<<a)-1,p=c>>1,u=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,b=r?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-s))<1&&(s--,m*=2),s+p>=1?e+=u/m:e+=u*Math.pow(2,1-p),e*m>=2&&(s++,m/=2),s+p>=c?(f=0,s=c):s+p>=1?(f=(e*m-1)*Math.pow(2,n),s=s+p):(f=e*Math.pow(2,p-1)*Math.pow(2,n),s=0));n>=8;i[t+d]=f&255,d+=b,f/=256,n-=8);for(s=s<<n|f,a+=n;a>0;i[t+d]=s&255,d+=b,s/=256,a-=8);i[t+d-b]|=w*128}});var Qe=L((pn,Xe)=>{var H=1e3,J=H*60,X=J*60,$=X*24,Jt=$*7,Xt=$*365.25;Xe.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return Qt(i);if(t==="number"&&isFinite(i))return e.long?Kt(i):Yt(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function Qt(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*Xt;case"weeks":case"week":case"w":return t*Jt;case"days":case"day":case"d":return t*$;case"hours":case"hour":case"hrs":case"hr":case"h":return t*X;case"minutes":case"minute":case"mins":case"min":case"m":return t*J;case"seconds":case"second":case"secs":case"sec":case"s":return t*H;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Yt(i){var e=Math.abs(i);return e>=$?Math.round(i/$)+"d":e>=X?Math.round(i/X)+"h":e>=J?Math.round(i/J)+"m":e>=H?Math.round(i/H)+"s":i+"ms"}function Kt(i){var e=Math.abs(i);return e>=$?fe(i,e,$,"day"):e>=X?fe(i,e,X,"hour"):e>=J?fe(i,e,J,"minute"):e>=H?fe(i,e,H,"second"):i+" ms"}function fe(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var Ce=L((mn,Ye)=>{function ei(i){t.debug=t,t.default=t,t.coerce=m,t.disable=s,t.enable=n,t.enabled=f,t.humanize=Qe(),t.destroy=a,Object.keys(i).forEach(c=>{t[c]=i[c]}),t.names=[],t.skips=[],t.formatters={};function e(c){let p=0;for(let u=0;u<c.length;u++)p=(p<<5)-p+c.charCodeAt(u),p|=0;return t.colors[Math.abs(p)%t.colors.length]}t.selectColor=e;function t(c){let p,u=null,d,b;function w(...T){if(!w.enabled)return;let P=w,te=Number(new Date),Dt=te-(p||te);P.diff=Dt,P.prev=p,P.curr=te,p=te,T[0]=t.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let ie=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(he,Ot)=>{if(he==="%%")return"%";ie++;let Me=t.formatters[Ot];if(typeof Me=="function"){let zt=T[ie];he=Me.call(P,zt),T.splice(ie,1),ie--}return he}),t.formatArgs.call(P,T),(P.log||t.log).apply(P,T)}return w.namespace=c,w.useColors=t.useColors(),w.color=t.selectColor(c),w.extend=r,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(d!==t.namespaces&&(d=t.namespaces,b=t.enabled(c)),b),set:T=>{u=T}}),typeof t.init=="function"&&t.init(w),w}function r(c,p){let u=t(this.namespace+(typeof p>"u"?":":p)+c);return u.log=this.log,u}function n(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let p=(typeof c=="string"?c:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let u of p)u[0]==="-"?t.skips.push(u.slice(1)):t.names.push(u)}function o(c,p){let u=0,d=0,b=-1,w=0;for(;u<c.length;)if(d<p.length&&(p[d]===c[u]||p[d]==="*"))p[d]==="*"?(b=d,w=u,d++):(u++,d++);else if(b!==-1)d=b+1,w++,u=w;else return!1;for(;d<p.length&&p[d]==="*";)d++;return d===p.length}function s(){let c=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),c}function f(c){for(let p of t.skips)if(o(c,p))return!1;for(let p of t.names)if(o(c,p))return!0;return!1}function m(c){return c instanceof Error?c.stack||c.message:c}function a(){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 t.enable(t.load()),t}Ye.exports=ei});var Ke=L((E,pe)=>{E.formatArgs=ii;E.save=ri;E.load=ni;E.useColors=ti;E.storage=oi();E.destroy=(()=>{let i=!1;return()=>{i||(i=!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"];function ti(){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 i;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&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ii(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+pe.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(r=t))}),i.splice(r,0,e)}E.log=console.debug||console.log||(()=>{});function ri(i){try{i?E.storage.setItem("debug",i):E.storage.removeItem("debug")}catch{}}function ni(){let i;try{i=E.storage.getItem("debug")||E.storage.getItem("DEBUG")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}function oi(){try{return localStorage}catch{}}pe.exports=Ce()(E);var{formatters:si}=pe.exports;si.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var tt=L((un,et)=>{"use strict";et.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)}});var nt=L((ln,rt)=>{"use strict";var ai=re("os"),it=re("tty"),v=tt(),{env:y}=process,U;v("no-color")||v("no-colors")||v("color=false")||v("color=never")?U=0:(v("color")||v("colors")||v("color=true")||v("color=always"))&&(U=1);"FORCE_COLOR"in y&&(y.FORCE_COLOR==="true"?U=1:y.FORCE_COLOR==="false"?U=0:U=y.FORCE_COLOR.length===0?1:Math.min(parseInt(y.FORCE_COLOR,10),3));function Se(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Fe(i,e){if(U===0)return 0;if(v("color=16m")||v("color=full")||v("color=truecolor"))return 3;if(v("color=256"))return 2;if(i&&!e&&U===void 0)return 0;let t=U||0;if(y.TERM==="dumb")return t;if(process.platform==="win32"){let r=ai.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in y)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in y)||y.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in y){let r=parseInt((y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)||"COLORTERM"in y?1:t}function ci(i){let e=Fe(i,i&&i.isTTY);return Se(e)}rt.exports={supportsColor:ci,stdout:Se(Fe(!0,it.isatty(1))),stderr:Se(Fe(!0,it.isatty(2)))}});var st=L((k,ue)=>{var fi=re("tty"),me=re("util");k.init=hi;k.log=li;k.formatArgs=mi;k.save=di;k.load=xi;k.useColors=pi;k.destroy=me.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");k.colors=[6,2,3,4,5,1];try{let i=nt();i&&(i.stderr||i).level>=2&&(k.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{}k.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,o)=>o.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function pi(){return"colors"in k.inspectOpts?!!k.inspectOpts.colors:fi.isatty(process.stderr.fd)}function mi(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,n="\x1B[3"+(r<8?r:"8;5;"+r),o=` ${n};1m${e} \x1B[0m`;i[0]=o+i[0].split(`
4
+ `).join(`
5
+ `+o),i.push(n+"m+"+ue.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=ui()+e+" "+i[0]}function ui(){return k.inspectOpts.hideDate?"":new Date().toISOString()+" "}function li(...i){return process.stderr.write(me.formatWithOptions(k.inspectOpts,...i)+`
6
+ `)}function di(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function xi(){return process.env.DEBUG}function hi(i){i.inspectOpts={};let e=Object.keys(k.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=k.inspectOpts[e[t]]}ue.exports=Ce()(k);var{formatters:ot}=ue.exports;ot.o=function(i){return this.inspectOpts.colors=this.useColors,me.inspect(i,this.inspectOpts).split(`
7
+ `).map(e=>e.trim()).join(" ")};ot.O=function(i){return this.inspectOpts.colors=this.useColors,me.inspect(i,this.inspectOpts)}});var at=L((dn,Ee)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ee.exports=Ke():Ee.exports=st()});var Mt="End-Of-Stream",l=class extends Error{constructor(){super(Mt),this.name="EndOfStreamError"}},N=class extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}};var j=class{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){let r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(e.length===0)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),r===0&&!t)throw new l;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){let n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");let o=Math.min(n.length,t);e.set(n.subarray(0,o),r),r+=o,t-=o,o<n.length&&this.peekQueue.push(n.subarray(o))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new N;let n=await this.readFromStream(e.subarray(r),t);if(n===0)break;r+=n}if(!t&&r<e.length)throw new l;return r}};var ne=class extends j{constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}};var Q=class extends ne{async readFromStream(e,t){if(e.length===0)return 0;let r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}};var Z=class extends j{constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){let r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(e.length===0)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){let n=await this.reader.read();if(n.done){this.endOfStream=!0;break}n.value&&(r+=this.writeChunk(e.subarray(r),n.value))}if(!t&&r===0&&this.endOfStream)throw new l;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}};function we(i){try{let e=i.getReader({mode:"byob"});return e instanceof ReadableStreamDefaultReader?new Z(e):new Q(e)}catch(e){if(e instanceof TypeError)return new Z(i.getReader());throw e}}var I=class{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new l;return e.get(r,0)}async peekToken(e,t=this.position){let r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new l;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new l;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new l;return e.get(this.numBuffer,0)}async ignore(e){if(e<0)throw new RangeError("ignore length must be \u2265 0 bytes");if(this.fileInfo.size!==void 0){let t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&t.position!==void 0&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}};var Ut=256e3,oe=class extends I{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){let r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(r.length===0)return 0;let o=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=o,(!t||!t.mayBeLess)&&o<r.length)throw new l;return o}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=0;if(r.position){let o=r.position-this.position;if(o>0){let s=new Uint8Array(r.length+o);return n=await this.peekBuffer(s,{mayBeLess:r.mayBeLess}),e.set(s.subarray(o)),n-o}if(o<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e.subarray(0,r.length),r.mayBeLess)}catch(o){if(t?.mayBeLess&&o instanceof l)return 0;throw o}if(!r.mayBeLess&&n<r.length)throw new l}return n}async ignore(e){if(e<0)throw new RangeError("ignore length must be \u2265 0 bytes");let t=Math.min(Ut,e),r=new Uint8Array(t),n=0;for(;n<e;){let o=e-n,s=await this.readBuffer(r,{length:Math.min(t,o)});if(s<0)return s;n+=s}return n}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}};var se=class extends I{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new l;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};var ae=class extends I{constructor(e,t){super(t),this.blob=e,this.fileInfo={...t?.fileInfo??{},size:e.size,mimeType:e.type}}async readBuffer(e,t){t?.position&&(this.position=t.position);let r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=Math.min(this.blob.size-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new l;let o=await this.blob.slice(r.position,r.position+n).arrayBuffer();return e.set(new Uint8Array(o)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}};function je(i,e){let t=we(i),r=e??{},n=r.onClose;return r.onClose=async()=>{if(await t.close(),n)return n()},new oe(t,r)}function _e(i,e){return new se(i,e)}function $e(i,e){return new ae(i,e)}import{open as Pt}from"node:fs/promises";var V=class i extends I{static async fromFile(e){let t=await Pt(e,"r"),r=await t.stat();return new i(t,{fileInfo:{path:e,size:r.size}})}constructor(e,t){super(t),this.fileHandle=e,this.fileInfo=t.fileInfo}async readBuffer(e,t){let r=this.normalizeOptions(e,t);if(this.position=r.position,r.length===0)return 0;let n=await this.fileHandle.read(e,0,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new l;return n.bytesRead}async peekBuffer(e,t){let r=this.normalizeOptions(e,t),n=await this.fileHandle.read(e,0,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new l;return n.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(e){this.position=e}supportsRandomAccess(){return!0}};var nn=V.fromFile;var Ve=Le(We(),1);var Ge={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},jt={};for(let[i,e]of Object.entries(Ge))jt[e]=Number.parseInt(i,10);var ce;function _t(){if(!(typeof globalThis.TextDecoder>"u"))return ce??(ce=new globalThis.TextDecoder("utf-8"))}var q=32*1024,B=65533;function Ze(i,e="utf-8"){switch(e.toLowerCase()){case"utf-8":case"utf8":{let t=_t();return t?t.decode(i):Wt(i)}case"utf-16le":return Gt(i);case"us-ascii":case"ascii":return Zt(i);case"latin1":case"iso-8859-1":return Vt(i);case"windows-1252":return qt(i);default:throw new RangeError(`Encoding '${e}' not supported`)}}function ke(i,e){e.length!==0&&(i.push(String.fromCharCode.apply(null,e)),e.length=0)}function g(i,e,t){e.push(t),e.length>=q&&ke(i,e)}function $t(i,e,t){if(t<=65535){g(i,e,t);return}t-=65536,g(i,e,55296+(t>>10)),g(i,e,56320+(t&1023))}function Wt(i){let e=[],t=[],r=0;for(i.length>=3&&i[0]===239&&i[1]===187&&i[2]===191&&(r=3);r<i.length;){let n=i[r];if(n<=127){g(e,t,n),r++;continue}if(n<194||n>244){g(e,t,B),r++;continue}if(n<=223){if(r+1>=i.length){g(e,t,B),r++;continue}let c=i[r+1];if((c&192)!==128){g(e,t,B),r++;continue}let p=(n&31)<<6|c&63;g(e,t,p),r+=2;continue}if(n<=239){if(r+2>=i.length){g(e,t,B),r++;continue}let c=i[r+1],p=i[r+2];if(!((c&192)===128&&(p&192)===128&&!(n===224&&c<160)&&!(n===237&&c>=160))){g(e,t,B),r++;continue}let d=(n&15)<<12|(c&63)<<6|p&63;g(e,t,d),r+=3;continue}if(r+3>=i.length){g(e,t,B),r++;continue}let o=i[r+1],s=i[r+2],f=i[r+3];if(!((o&192)===128&&(s&192)===128&&(f&192)===128&&!(n===240&&o<144)&&!(n===244&&o>143))){g(e,t,B),r++;continue}let a=(n&7)<<18|(o&63)<<12|(s&63)<<6|f&63;$t(e,t,a),r+=4}return ke(e,t),e.join("")}function Gt(i){let e=[],t=[],r=i.length,n=0;for(;n+1<r;){let o=i[n]|i[n+1]<<8;if(n+=2,o>=55296&&o<=56319){if(n+1<r){let s=i[n]|i[n+1]<<8;s>=56320&&s<=57343?(g(e,t,o),g(e,t,s),n+=2):g(e,t,B)}else g(e,t,B);continue}if(o>=56320&&o<=57343){g(e,t,B);continue}g(e,t,o)}return n<r&&g(e,t,B),ke(e,t),e.join("")}function Zt(i){let e=[];for(let t=0;t<i.length;t+=q){let r=Math.min(i.length,t+q),n=new Array(r-t);for(let o=t,s=0;o<r;o++,s++)n[s]=i[o]&127;e.push(String.fromCharCode.apply(null,n))}return e.join("")}function Vt(i){let e=[];for(let t=0;t<i.length;t+=q){let r=Math.min(i.length,t+q),n=new Array(r-t);for(let o=t,s=0;o<r;o++,s++)n[s]=i[o];e.push(String.fromCharCode.apply(null,n))}return e.join("")}function qt(i){let e=[],t="";for(let r=0;r<i.length;r++){let n=i[r],o=n>=128&&n<=159?Ge[n]:void 0;t+=o??String.fromCharCode(n),t.length>=q&&(e.push(t),t="")}return t&&e.push(t),e.join("")}function S(i){return new DataView(i.buffer,i.byteOffset)}var qe={len:1,get(i,e){return S(i).getUint8(e)},put(i,e,t){return S(i).setUint8(e,t),e+1}},h={len:2,get(i,e){return S(i).getUint16(e,!0)},put(i,e,t){return S(i).setUint16(e,t,!0),e+2}},_={len:2,get(i,e){return S(i).getUint16(e)},put(i,e,t){return S(i).setUint16(e,t),e+2}};var x={len:4,get(i,e){return S(i).getUint32(e,!0)},put(i,e,t){return S(i).setUint32(e,t,!0),e+4}},be={len:4,get(i,e){return S(i).getUint32(e)},put(i,e,t){return S(i).setUint32(e,t),e+4}};var He={len:4,get(i,e){return S(i).getInt32(e)},put(i,e,t){return S(i).setInt32(e,t),e+4}};var Je={len:8,get(i,e){return S(i).getBigUint64(e,!0)},put(i,e,t){return S(i).setBigUint64(e,t,!0),e+8}};var F=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t=0){let r=e.subarray(t,t+this.len);return Ze(r,this.encoding)}};var mt=Le(at(),1);var W={LocalFileHeader:67324752,DataDescriptor:134695760,CentralFileHeader:33639248,EndOfCentralDirectory:101010256},Te={get(i){return{signature:x.get(i,0),compressedSize:x.get(i,8),uncompressedSize:x.get(i,12)}},len:16},ct={get(i){let e=h.get(i,6);return{signature:x.get(i,0),minVersion:h.get(i,4),dataDescriptor:!!(e&8),compressedMethod:h.get(i,8),compressedSize:x.get(i,18),uncompressedSize:x.get(i,22),filenameLength:h.get(i,26),extraFieldLength:h.get(i,28),filename:null}},len:30},ft={get(i){return{signature:x.get(i,0),nrOfThisDisk:h.get(i,4),nrOfThisDiskWithTheStart:h.get(i,6),nrOfEntriesOnThisDisk:h.get(i,8),nrOfEntriesOfSize:h.get(i,10),sizeOfCd:x.get(i,12),offsetOfStartOfCd:x.get(i,16),zipFileCommentLength:h.get(i,20)}},len:22},pt={get(i){let e=h.get(i,8);return{signature:x.get(i,0),minVersion:h.get(i,6),dataDescriptor:!!(e&8),compressedMethod:h.get(i,10),compressedSize:x.get(i,20),uncompressedSize:x.get(i,24),filenameLength:h.get(i,28),extraFieldLength:h.get(i,30),fileCommentLength:h.get(i,32),relativeOffsetOfLocalHeader:x.get(i,42),filename:null}},len:46};function ut(i){let e=new Uint8Array(x.len);return x.put(e,0,i),e}var D=(0,mt.default)("tokenizer:inflate"),ve=256*1024,gi=ut(W.DataDescriptor),le=ut(W.EndOfCentralDirectory),G=class i{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(ve)}async isZip(){return await this.peekSignature()===W.LocalFileHeader}peekSignature(){return this.tokenizer.peekToken(x)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16*1024,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===le[0]&&r[n+1]===le[1]&&r[n+2]===le[2]&&r[n+3]===le[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess()){D("Cannot reading central-directory without random-read support");return}D("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){D("Central-directory 32-bit signature found");let r=await this.tokenizer.readToken(ft,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let o=0;o<r.nrOfEntriesOfSize;++o){let s=await this.tokenizer.readToken(pt);if(s.signature!==W.CentralFileHeader)throw new Error("Expected Central-File-Header signature");s.filename=await this.tokenizer.readToken(new F(s.filenameLength,"utf-8")),await this.tokenizer.ignore(s.extraFieldLength),await this.tokenizer.ignore(s.fileCommentLength),n.push(s),D(`Add central-directory file-entry: n=${o+1}/${n.length}: filename=${n[o].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{let n=await this.readLocalFileHeader();if(!n)break;let o=e(n);r=!!o.stop;let s;if(await this.tokenizer.ignore(n.extraFieldLength),n.dataDescriptor&&n.compressedSize===0){let f=[],m=ve;D("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let a=-1;for(;a<0&&m===ve;){m=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),a=wi(this.syncBuffer.subarray(0,m),gi);let c=a>=0?a:m;if(o.handler){let p=new Uint8Array(c);await this.tokenizer.readBuffer(p),f.push(p)}else await this.tokenizer.ignore(c)}D(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),o.handler&&await this.inflate(n,yi(f),o.handler)}else o.handler?(D(`Reading compressed-file-data: ${n.compressedSize} bytes`),s=new Uint8Array(n.compressedSize),await this.tokenizer.readBuffer(s),await this.inflate(n,s,o.handler)):(D(`Ignoring compressed-file-data: ${n.compressedSize} bytes`),await this.tokenizer.ignore(n.compressedSize));if(D(`Reading data-descriptor at pos=${this.tokenizer.position}`),n.dataDescriptor&&(await this.tokenizer.readToken(Te)).signature!==134695760)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-Te.len}`)}while(!r)}async iterateOverCentralDirectory(e,t){for(let r of e){let n=t(r);if(n.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);let o=await this.readLocalFileHeader();if(o){await this.tokenizer.ignore(o.extraFieldLength);let s=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(s),await this.inflate(o,s,n.handler)}}if(n.stop)break}}async inflate(e,t,r){if(e.compressedMethod===0)return r(t);if(e.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);D(`Decompress filename=${e.filename}, compressed-size=${t.length}`);let n=await i.decompressDeflateRaw(t);return r(n)}static async decompressDeflateRaw(e){let t=new ReadableStream({start(o){o.enqueue(e),o.close()}}),r=new DecompressionStream("deflate-raw"),n=t.pipeThrough(r);try{let s=await new Response(n).arrayBuffer();return new Uint8Array(s)}catch(o){let s=o instanceof Error?`Failed to deflate ZIP entry: ${o.message}`:"Unknown decompression error in ZIP entry";throw new TypeError(s)}}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(x);if(e===W.LocalFileHeader){let t=await this.tokenizer.readToken(ct);return t.filename=await this.tokenizer.readToken(new F(t.filenameLength,"utf-8")),t}if(e===W.CentralFileHeader)return!1;throw e===3759263696?new Error("Encrypted ZIP"):new Error("Unexpected signature")}};function wi(i,e){let t=i.length,r=e.length;if(r>t)return-1;for(let n=0;n<=t-r;n++){let o=!0;for(let s=0;s<r;s++)if(i[n+s]!==e[s]){o=!1;break}if(o)return n}return-1}function yi(i){let e=i.reduce((n,o)=>n+o.length,0),t=new Uint8Array(e),r=0;for(let n of i)t.set(n,r),r+=n.length;return t}var Y=class{constructor(e){this.tokenizer=e}inflate(){let e=this.tokenizer;return new ReadableStream({async pull(t){let r=new Uint8Array(1024),n=await e.readBuffer(r,{mayBeLess:!0});if(n===0){t.close();return}t.enqueue(r.subarray(0,n))}}).pipeThrough(new DecompressionStream("gzip"))}};var Fn={utf8:new globalThis.TextDecoder("utf8")};var En=new globalThis.TextEncoder;var Tn=Array.from({length:256},(i,e)=>e.toString(16).padStart(2,"0"));function Ae(i){let{byteLength:e}=i;if(e===6)return i.getUint16(0)*2**32+i.getUint32(2);if(e===5)return i.getUint8(0)*2**32+i.getUint32(1);if(e===4)return i.getUint32(0);if(e===3)return i.getUint8(0)*2**16+i.getUint16(1);if(e===2)return i.getUint16(0);if(e===1)return i.getUint8(0)}function lt(i,e){if(e==="utf-16le"){let t=[];for(let r=0;r<i.length;r++){let n=i.charCodeAt(r);t.push(n&255,n>>8&255)}return t}if(e==="utf-16be"){let t=[];for(let r=0;r<i.length;r++){let n=i.charCodeAt(r);t.push(n>>8&255,n&255)}return t}return[...i].map(t=>t.charCodeAt(0))}function dt(i,e=0){let t=Number.parseInt(new F(6).get(i,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(t))return!1;let r=256;for(let n=e;n<e+148;n++)r+=i[n];for(let n=e+156;n<e+512;n++)r+=i[n];return t===r}var xt={get:(i,e)=>i[e+3]&127|i[e+2]<<7|i[e+1]<<14|i[e]<<21,len:4};var ht=["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","jmp","rm","sav","ppsm","ppsx","tar.gz","reg","dat"],gt=["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.ms-powerpoint.slideshow.macroenabled.12","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/vnd.apache.arrow.file","video/mp4","audio/midi","video/matroska","video/webm","video/quicktime","video/vnd.avi","audio/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/j2c","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","text/vtt","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/vnd.apache.parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroenabled.12","application/vnd.ms-word.document.macroenabled.12","application/vnd.ms-word.template.macroenabled.12","application/vnd.ms-powerpoint.template.macroenabled.12","application/vnd.ms-powerpoint.presentation.macroenabled.12","application/java-archive","application/vnd.rn-realmedia","application/x-spss-sav","application/x-ms-regedit","application/x-ft-windows-registry-hive","application/x-jmp-data"];var K=4100,ki=K-2,z=1024*1024,wt=1024,bi=2**31-1,A=16*1024*1024,xe=z,yt=z,Ci=A,Si=1,kt=100,Ie=A,bt=64,Ct=xe,Fi=256,Ei=512,Ti=A,vi=512,Ai=512,St=256,Ft=xe,Et=xe,Ii=xe,Tt=A,Bi=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),Di=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],Oi=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]),M=class extends Error{};function zi(i){let e=i?.streamReader;if(e?.constructor?.name!=="WebStreamByobReader")return i;let{reader:t}=e,r=async()=>{await t.cancel(),t.releaseLock()};return e.close=r,e.abort=async()=>{e.interrupted=!0,await r()},i}function Oe(i,e,t){if(!Number.isFinite(i)||i<0||i>e)throw new M(`${t} has invalid size ${i} (maximum ${e} bytes)`);return i}async function R(i,e,{maximumLength:t=A,reason:r="skip"}={}){let n=Oe(e,t,r);await i.ignore(n)}async function Be(i,e,t,{maximumLength:r=e.length,reason:n="read"}={}){let o=t?.length??e.length,s=Oe(o,r,n);return i.readBuffer(e,{...t,length:s})}async function Mi(i,{maximumLength:e=z}={}){let n=new ReadableStream({start(a){a.enqueue(i),a.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),o=[],s=0;try{for(;;){let{done:a,value:c}=await n.read();if(a)break;if(s+=c.length,s>e)throw await n.cancel(),new Error(`ZIP entry decompressed data exceeds ${e} bytes`);o.push(c)}}finally{n.releaseLock()}let f=new Uint8Array(s),m=0;for(let a of o)f.set(a,m),m+=a.length;return f}var Bt=134695760,de=16,Li=de-1;function Ui(i,e){if(i.length<de)return-1;let t=i.length-de;for(let r=0;r<=t;r++)if(x.get(i,r)===Bt&&x.get(i,r+8)===e+r)return r;return-1}function Ri(i){return(i.codePointAt(0)&32)!==0}function Pi(i,e){let t=new Uint8Array(e),r=0;for(let n of i)t.set(n,r),r+=n.length;return t}async function Ni(i,{shouldBuffer:e,maximumLength:t=z}={}){let{syncBuffer:r}=i,{length:n}=r,o=[],s=0;for(;;){let f=await i.tokenizer.peekBuffer(r,{mayBeLess:!0}),m=Ui(r.subarray(0,f),s),a=m>=0?0:f===n?Math.min(Li,f-1):0,c=m>=0?m:f-a;if(c===0)break;if(s+=c,s>t)throw new Error(`ZIP entry compressed data exceeds ${t} bytes`);if(e){let p=new Uint8Array(c);await i.tokenizer.readBuffer(p),o.push(p)}else await i.tokenizer.ignore(c);if(m>=0)break}if(C(i.tokenizer)||(i.knownSizeDescriptorScannedBytes+=s),!!e)return Pi(o,s)}function ji(i,e){return C(i.tokenizer)?Math.max(0,A-(i.tokenizer.position-e)):Math.max(0,z-i.knownSizeDescriptorScannedBytes)}async function _i(i,e,{shouldBuffer:t,maximumDescriptorLength:r=z}={}){if(e.dataDescriptor&&e.compressedSize===0)return Ni(i,{shouldBuffer:t,maximumLength:r});if(!t){await R(i.tokenizer,e.compressedSize,{maximumLength:C(i.tokenizer)?z:i.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});return}let n=qi(i.tokenizer);if(!Number.isFinite(e.compressedSize)||e.compressedSize<0||e.compressedSize>n)throw new Error(`ZIP entry compressed data exceeds ${n} bytes`);let o=new Uint8Array(e.compressedSize);return await i.tokenizer.readBuffer(o),o}G.prototype.inflate=async function(i,e,t){if(i.compressedMethod===0)return t(e);if(i.compressedMethod!==8)throw new Error(`Unsupported ZIP compression method: ${i.compressedMethod}`);let r=await Mi(e,{maximumLength:z});return t(r)};G.prototype.unzip=async function(i){let e=!1,t=0,r=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(ee(this.tokenizer,r,A))throw new M(`ZIP stream probing exceeds ${A} bytes`);let n=await this.readLocalFileHeader();if(!n)break;if(t++,t>wt)throw new Error(`ZIP entry count exceeds ${wt}`);let o=i(n);e=!!o.stop,await this.tokenizer.ignore(n.extraFieldLength);let s=await _i(this,n,{shouldBuffer:!!o.handler,maximumDescriptorLength:Math.min(z,ji(this,r))});if(o.handler&&await this.inflate(n,s,o.handler),n.dataDescriptor){let f=new Uint8Array(de);if(await this.tokenizer.readBuffer(f),x.get(f,0)!==Bt)throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-f.length}`)}if(ee(this.tokenizer,r,A))throw new M(`ZIP stream probing exceeds ${A} bytes`)}while(!e)};function $i(i,e){let t=i.getReader(),r=0,n=!1,o=!1,s=async f=>{n||o||(o=!0,await t.cancel(f))};return new ReadableStream({async pull(f){if(r>=e){f.close(),await s();return}let{done:m,value:a}=await t.read();if(m||!a){n=!0,f.close();return}let c=e-r;if(a.length>c){f.enqueue(a.subarray(0,c)),r+=c,f.close(),await s();return}f.enqueue(a),r+=a.length},async cancel(f){await s(f)}})}async function ze(i,e){return new De(e).fromBuffer(i)}function vt(i){switch(i=i.toLowerCase(),i){case"application/epub+zip":return{ext:"epub",mime:i};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:i};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:i};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:i};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:i};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:i};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:i};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:i};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:i};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:i};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:i};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:i};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:i};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:i};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:i};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:i};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"};default:}}function O(i,e,t){t={offset:0,...t};for(let[r,n]of e.entries())if(t.mask){if(n!==(t.mask[r]&i[r+t.offset]))return!1}else if(n!==i[r+t.offset])return!1;return!0}function Wi(i){return Number.isFinite(i)?Math.max(1,Math.trunc(i)):K}function Gi(i,e,t){return t===void 0?i.read(e):(t.throwIfAborted(),new Promise((r,n)=>{let o=()=>{t.removeEventListener("abort",s)},s=()=>{let f=t.reason;o(),(async()=>{try{await i.cancel(f)}catch{}})(),n(f)};t.addEventListener("abort",s,{once:!0}),(async()=>{try{let f=await i.read(e);o(),r(f)}catch(f){o(),n(f)}})()}))}function Zi(i){return Number.isFinite(i)?Math.max(0,Math.min(ki,Math.trunc(i))):0}function Vi(i){return Number.isFinite(i)?Math.max(0,i):Number.MAX_SAFE_INTEGER}function C(i){let e=i.fileInfo.size;return!Number.isFinite(e)||e===Number.MAX_SAFE_INTEGER}function ee(i,e,t){return C(i)&&i.position-e>t}function qi(i){let e=i.fileInfo.size,t=Number.isFinite(e)?Math.max(0,e-i.position):Number.MAX_SAFE_INTEGER;return Math.min(t,bi)}function Hi(i){if(i instanceof l||i instanceof M)return!0;if(!(i instanceof Error))return!1;if(Bi.has(i.message)||Oi.has(i.code))return!0;for(let e of Di)if(i.message.startsWith(e))return!0;return!1}function At(i,e=z){let t=[i.compressedSize,i.uncompressedSize];for(let r of t)if(!Number.isFinite(r)||r<0||r>e)return!1;return!0}function Ji(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function Xi(i,e){e.startsWith("word/")&&(i.hasWordDirectory=!0),e.startsWith("ppt/")&&(i.hasPresentationDirectory=!0),e.startsWith("xl/")&&(i.hasSpreadsheetDirectory=!0),e.startsWith("3D/")&&e.endsWith(".model")&&(i.hasThreeDimensionalModelEntry=!0)}function It(i){if(!(!i.hasContentTypesEntry||i.hasUnparseableContentTypes||i.isParsingContentTypes||i.hasParsedContentTypesEntry)){if(i.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(i.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(i.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(i.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function Qi(i){let e=i.indexOf('.main+xml"');if(e===-1){let n="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return i.includes(`ContentType="${n}"`)?n:void 0}let t=i.slice(0,e),r=t.lastIndexOf('"');return t.slice(r+1)}var De=class i{constructor(e){let t=Zi(e?.mpegOffsetTolerance);this.options={...e,mpegOffsetTolerance:t},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(e){return zi(je(e,this.getTokenizerOptions()))}async parseTokenizer(e,t=0){this.detectionReentryCount=t;let r=e.position;for(let n of this.detectors){let o;try{o=await n.detect(e)}catch(s){if(s instanceof l||s instanceof M)return;throw s}if(o)return o;if(r!==e.position)return}}async fromTokenizer(e){try{return await this.parseTokenizer(e)}finally{await e.close()}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t?.length>1)return this.fromTokenizer(_e(t,this.getTokenizerOptions()))}async fromBlob(e){this.options.signal?.throwIfAborted();let t=$e(e,this.getTokenizerOptions());return this.fromTokenizer(t)}async fromStream(e){this.options.signal?.throwIfAborted();let t=this.createTokenizerFromWebStream(e);return this.fromTokenizer(t)}async toDetectionStream(e,t){let r=Wi(t?.sampleSize??K),n,o,s=e.getReader({mode:"byob"});try{let{value:a,done:c}=await Gi(s,new Uint8Array(r),this.options.signal);if(o=a,!c&&a)try{n=await this.fromBuffer(a.subarray(0,r))}catch(p){if(!(p instanceof l))throw p;n=void 0}o=a}finally{s.releaseLock()}let f=new TransformStream({async start(a){a.enqueue(o)},transform(a,c){c.enqueue(a)}}),m=e.pipeThrough(f);return m.fileType=n,m}async detectGzip(e){if(this.gzipProbeDepth>=Si)return{ext:"gz",mime:"application/gzip"};let t=new Y(e),r=$i(t.inflate(),Ci),n=C(e),o,s,f,m;if(n){let a=new AbortController;o=setTimeout(()=>{a.abort(new DOMException(`Operation timed out after ${kt} ms`,"TimeoutError"))},kt),s=this.options.signal===void 0?a.signal:AbortSignal.any([this.options.signal,a.signal]),f=new i({...this.options,signal:s}),f.gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{m=await(f??this).fromStream(r)}catch(a){if(a?.name==="AbortError"&&s?.reason?.name!=="TimeoutError")throw a}finally{clearTimeout(o),n||this.gzipProbeDepth--}return m?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(e,t){return O(this.buffer,e,t)}checkString(e,t){return this.check(lt(e,t?.encoding),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(K),e.fileInfo.size===void 0&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,C(e)&&(await e.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(e);if(await e.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.detectionReentryCount>=St?void 0:(this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(e));if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(e);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await R(e,6,{maximumLength:6,reason:"ID3 header prefix"});let t=await e.readToken(xt),r=C(e);if(!Number.isFinite(t)||t<0||r&&(t>Ie||e.position+t>Ie))return;if(e.position+t>e.fileInfo.size)return r?void 0:{ext:"mp3",mime:"audio/mpeg"};try{await R(e,t,{maximumLength:r?Ie:e.fileInfo.size,reason:"ID3 payload"})}catch(n){if(n instanceof l)return;throw n}return this.detectionReentryCount>=St?void 0:(this.detectionReentryCount++,this.parseTokenizer(e,this.detectionReentryCount))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((this.buffer[0]===67||this.buffer[0]===70)&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let t,r=Ji();try{await new G(e).unzip(n=>{Xi(r,n.filename);let o=n.filename==="[Content_Types].xml",s=It(r);if(!o&&s)return t=s,{stop:!0};switch(n.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return At(n,yt)?{async handler(f){let m=new TextDecoder("utf-8").decode(f).trim();t=vt(m)},stop:!0}:{};case"[Content_Types].xml":return r.hasContentTypesEntry=!0,At(n,yt)?(r.isParsingContentTypes=!0,{async handler(f){let m=new TextDecoder("utf-8").decode(f),a=Qi(m);a&&(t=vt(a)),r.hasParsedContentTypesEntry=!0,r.isParsingContentTypes=!1},stop:!0}):(r.hasUnparseableContentTypes=!0,{});default:return/classes\d*\.dex/.test(n.filename)?(t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})}catch(n){if(!Hi(n))throw n;r.isParsingContentTypes&&(r.isParsingContentTypes=!1,r.hasUnparseableContentTypes=!0)}return t??It(r)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return await e.readBuffer(t),O(t,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:O(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:O(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:O(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:O(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:O(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(this.buffer[2]===3||this.buffer[2]===5||this.buffer[2]===7)&&(this.buffer[3]===4||this.buffer[3]===6||this.buffer[3]===8))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let t=await this.readTiffHeader(!1);if(t)return t}if(this.check([77,77])){let t=await this.readTiffHeader(!0);if(t)return t}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let m=await e.peekNumber(qe),a=128,c=0;for(;(m&a)===0&&a!==0;)++c,a>>=1;let p=new Uint8Array(c+1);return await Be(e,p,void 0,{maximumLength:p.length,reason:"EBML field"}),p}async function r(){let m=await t(),a=await t();a[0]^=128>>a.length-1;let c=Math.min(6,a.length),p=new DataView(m.buffer),u=new DataView(a.buffer,a.length-c,c);return{id:Ae(p),len:Ae(u)}}async function n(m){let a=0;for(;m>0;){if(a++,a>Fi||ee(e,s,A))return;let c=e.position,p=await r();if(p.id===17026){if(p.len>bt)return;let u=Oe(p.len,bt,"EBML DocType");return(await e.readToken(new F(u))).replaceAll(/\00.*$/g,"")}if(C(e)&&(!Number.isFinite(p.len)||p.len<0||p.len>Ct)||(await R(e,p.len,{maximumLength:C(e)?Ct:e.fileInfo.size,reason:"EBML payload"}),--m,e.position<=c))return}}let o=await r(),s=e.position;switch(await n(o.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let t=be.get(this.buffer,4),r=_.get(this.buffer,6);if(t>0&&t<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(r>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(this.buffer[6]===0||this.buffer[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let t=new F(4,"latin1").get(this.buffer,2);if(t.match("^d*")&&t>=1e3&&t<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),await e.readToken(new F(13,"ascii"))==="debian-binary"?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&[`
8
+ `,"\r"," "," ","\0"].some(t=>this.checkString(t,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let t={ext:"png",mime:"image/png"},r={ext:"apng",mime:"image/apng"};await e.ignore(8);async function n(){return{length:await e.readToken(He),type:await e.readToken(new F(4,"latin1"))}}let o=C(e),s=e.position,f=0,m=!1;do{if(f++,f>Ei||ee(e,s,Ti))break;let a=e.position,c=await n();if(c.length<0)return;if(c.type==="IHDR"){if(c.length!==13)return;m=!0}switch(c.type){case"IDAT":return t;case"acTL":return r;default:if(!m&&c.type!=="CgBI")return;if(o&&c.length>Ft)return m&&Ri(c.type)?t:void 0;try{await R(e,c.length+4,{maximumLength:o?Ft+4:e.fileInfo.size,reason:"PNG chunk payload"})}catch(p){if(!o&&(p instanceof M||p instanceof l))return t;throw p}}if(e.position<=a)break}while(e.position+8<e.fileInfo.size);return t}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(this.buffer[8]&96)!==0){let t=new F(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(t){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return t.startsWith("3g")?t.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.checkString(`REGEDIT4\r
9
+ `))return{ext:"reg",mime:"application/x-ms-regedit"};if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){let t=!1;try{async function r(){let f=new Uint8Array(16);return await Be(e,f,void 0,{maximumLength:f.length,reason:"ASF header GUID"}),{id:f,size:Number(await e.readToken(Je))}}await R(e,30,{maximumLength:30,reason:"ASF header prelude"});let n=C(e),o=e.position,s=0;for(;e.position+24<e.fileInfo.size&&(s++,!(s>vi||ee(e,o,A)));){let f=e.position,m=await r(),a=m.size-24;if(!Number.isFinite(a)||a<0){t=!0;break}if(O(m.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let c=new Uint8Array(16);if(a-=await Be(e,c,void 0,{maximumLength:c.length,reason:"ASF stream type GUID"}),O(c,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(O(c,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(n&&a>Et){t=!0;break}if(await R(e,a,{maximumLength:n?Et:e.fileInfo.size,reason:"ASF header payload"}),e.position<=f){t=!0;break}}}catch(r){if(r instanceof l||r instanceof M)C(e)&&(t=!0);else throw r}return t?void 0:{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new F(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("<?xml ",{offset:2,encoding:"utf-16be"})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let t=new DataView(this.buffer.buffer).getUint32(12,!0);if(t>12&&this.buffer.length>=t+16)try{let r=new TextDecoder().decode(this.buffer.subarray(16,t+16));if(JSON.parse(r).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188}))return{ext:"mts",mime:"video/mp2t"};if(this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&dt(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let t="utf-16le";return this.checkString("<?xml ",{offset:2,encoding:t})?{ext:"xml",mime:"application/xml"}:this.check([255,14],{offset:2})&&this.checkString("SketchUp Model",{offset:4,encoding:t})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:this.checkString(`Windows Registry Editor Version 5.00\r
10
+ `,{offset:2,encoding:t})?{ext:"reg",mime:"application/x-ms-regedit"}:void 0}if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async e=>{this.buffer=new Uint8Array(K);let t=Vi(e.fileInfo.size);if(await e.peekBuffer(this.buffer,{length:Math.min(8,t),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,t),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let r=0;r<=this.options.mpegOffsetTolerance;++r){let n=this.scanMpeg(r);if(n)return n}};async readTiffTag(e){let t=await this.tokenizer.readToken(e?_:h);switch(await this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"};default:}}async readTiffIFD(e){let t=await this.tokenizer.readToken(e?_:h);if(!(t>Ai)&&!(C(this.tokenizer)&&2+t*12>Tt))for(let r=0;r<t;++r){let n=await this.readTiffTag(e);if(n)return n}}async readTiffHeader(e){let t={ext:"tif",mime:"image/tiff"},r=(e?_:h).get(this.buffer,2),n=(e?be:x).get(this.buffer,4);if(r===42){if(n>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(n>=8){let f=(e?_:h).get(this.buffer,8),m=(e?_:h).get(this.buffer,10);if(f===28&&m===254||f===31&&m===11)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(C(this.tokenizer)&&n>Ii)return t;let o=C(this.tokenizer)?Tt:this.tokenizer.fileInfo.size;try{await R(this.tokenizer,n,{maximumLength:o,reason:"TIFF IFD offset"})}catch(f){if(f instanceof l)return;throw f}let s;try{s=await this.readTiffIFD(e)}catch(f){if(f instanceof l)return;throw f}return s??t}if(r===43)return t}scanMpeg(e){if(this.check([255,224],{offset:e,mask:[255,224]})){if(this.check([16],{offset:e+1,mask:[22]}))return this.check([8],{offset:e+1,mask:[8]})?{ext:"aac",mime:"audio/aac"}:{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}},Yi=new Set(ht),Ki=new Set(gt);var er={name:"file",summary:"determine file type",usage:"file [OPTION]... FILE...",options:["-b, --brief do not prepend filenames to output","-i, --mime output MIME type strings","-L, --dereference follow symlinks"," --help display this help and exit"]},tr=new Map([[".js",{description:"JavaScript source",mime:"text/javascript"}],[".mjs",{description:"JavaScript module",mime:"text/javascript"}],[".cjs",{description:"CommonJS module",mime:"text/javascript"}],[".ts",{description:"TypeScript source",mime:"text/typescript"}],[".tsx",{description:"TypeScript JSX source",mime:"text/typescript"}],[".jsx",{description:"JavaScript JSX source",mime:"text/javascript"}],[".py",{description:"Python script",mime:"text/x-python"}],[".rb",{description:"Ruby script",mime:"text/x-ruby"}],[".go",{description:"Go source",mime:"text/x-go"}],[".rs",{description:"Rust source",mime:"text/x-rust"}],[".c",{description:"C source",mime:"text/x-c"}],[".h",{description:"C header",mime:"text/x-c"}],[".cpp",{description:"C++ source",mime:"text/x-c++"}],[".hpp",{description:"C++ header",mime:"text/x-c++"}],[".java",{description:"Java source",mime:"text/x-java"}],[".sh",{description:"Bourne-Again shell script",mime:"text/x-shellscript"}],[".bash",{description:"Bourne-Again shell script",mime:"text/x-shellscript"}],[".zsh",{description:"Zsh shell script",mime:"text/x-shellscript"}],[".json",{description:"JSON data",mime:"application/json"}],[".yaml",{description:"YAML data",mime:"text/yaml"}],[".yml",{description:"YAML data",mime:"text/yaml"}],[".xml",{description:"XML document",mime:"application/xml"}],[".csv",{description:"CSV text",mime:"text/csv"}],[".toml",{description:"TOML data",mime:"text/toml"}],[".html",{description:"HTML document",mime:"text/html"}],[".htm",{description:"HTML document",mime:"text/html"}],[".css",{description:"CSS stylesheet",mime:"text/css"}],[".svg",{description:"SVG image",mime:"image/svg+xml"}],[".md",{description:"Markdown document",mime:"text/markdown"}],[".markdown",{description:"Markdown document",mime:"text/markdown"}],[".txt",{description:"ASCII text",mime:"text/plain"}],[".rst",{description:"reStructuredText",mime:"text/x-rst"}],[".env",{description:"ASCII text",mime:"text/plain"}],[".gitignore",{description:"ASCII text",mime:"text/plain"}],[".dockerignore",{description:"ASCII text",mime:"text/plain"}]]),ir=new Map([["jpg","JPEG image data"],["jpeg","JPEG image data"],["png","PNG image data"],["gif","GIF image data"],["webp","WebP image data"],["bmp","PC bitmap"],["ico","MS Windows icon resource"],["tif","TIFF image data"],["tiff","TIFF image data"],["psd","Adobe Photoshop Document"],["avif","AVIF image"],["heic","HEIC image"],["heif","HEIF image"],["jxl","JPEG XL image"],["icns","Mac OS X icon"],["svg","SVG Scalable Vector Graphics image"],["pdf","PDF document"],["epub","EPUB document"],["mobi","Mobipocket E-book"],["djvu","DjVu document"],["zip","Zip archive data"],["gz","gzip compressed data"],["gzip","gzip compressed data"],["bz2","bzip2 compressed data"],["xz","XZ compressed data"],["tar","POSIX tar archive"],["rar","RAR archive data"],["7z","7-zip archive data"],["lz","lzip compressed data"],["lzma","LZMA compressed data"],["zst","Zstandard compressed data"],["cab","Microsoft Cabinet archive"],["ar","Unix ar archive"],["rpm","RPM package"],["deb","Debian binary package"],["apk","Android Package"],["dmg","Apple disk image"],["iso","ISO 9660 CD-ROM filesystem data"],["vhd","Microsoft Virtual Hard Disk"],["vhdx","Microsoft Virtual Hard Disk (new format)"],["qcow2","QEMU QCOW Image"],["mp3","Audio file with ID3"],["m4a","MPEG-4 audio"],["aac","AAC audio"],["wav","RIFF (little-endian) data, WAVE audio"],["flac","FLAC audio bitstream data"],["ogg","Ogg data"],["oga","Ogg audio"],["opus","Ogg Opus audio"],["aiff","AIFF audio"],["wma","Windows Media Audio"],["amr","AMR audio"],["mid","MIDI audio"],["midi","MIDI audio"],["ape","Monkey's Audio"],["mp4","ISO Media, MPEG-4"],["m4v","MPEG-4 video"],["webm","WebM"],["avi","RIFF (little-endian) data, AVI"],["mov","ISO Media, Apple QuickTime movie"],["mkv","Matroska data"],["wmv","Windows Media Video"],["flv","Flash Video"],["3gp","3GPP multimedia"],["3g2","3GPP2 multimedia"],["ogv","Ogg video"],["mts","MPEG transport stream"],["m2ts","MPEG transport stream"],["ts","MPEG transport stream"],["mpg","MPEG video"],["mpeg","MPEG video"],["exe","PE32 executable"],["dll","PE32 DLL"],["elf","ELF executable"],["mach","Mach-O executable"],["wasm","WebAssembly (wasm) binary module"],["dex","Android Dalvik executable"],["class","Java class file"],["swf","Adobe Flash"],["doc","Microsoft Word Document"],["docx","Microsoft Word 2007+ Document"],["xls","Microsoft Excel Spreadsheet"],["xlsx","Microsoft Excel 2007+ Spreadsheet"],["ppt","Microsoft PowerPoint Presentation"],["pptx","Microsoft PowerPoint 2007+ Presentation"],["odt","OpenDocument Text"],["ods","OpenDocument Spreadsheet"],["odp","OpenDocument Presentation"],["ttf","TrueType Font"],["otf","OpenType Font"],["woff","Web Open Font Format"],["woff2","Web Open Font Format 2"],["eot","Embedded OpenType font"],["stl","Stereolithography CAD"],["obj","Wavefront 3D Object"],["gltf","GL Transmission Format"],["glb","GL Transmission Format (binary)"],["sqlite","SQLite 3.x database"],["mdb","Microsoft Access Database"],["xml","XML document"],["json","JSON data"],["macho","Mach-O binary"],["ics","iCalendar data"],["vcf","vCard data"],["msi","Microsoft Installer"],["ps","PostScript"],["ai","Adobe Illustrator"],["indd","Adobe InDesign"],["sketch","Sketch design file"],["fig","Figma design file"],["xd","Adobe XD"],["blend","Blender"],["fbx","Autodesk FBX"],["lnk","MS Windows shortcut"],["alias","Mac OS alias"],["torrent","BitTorrent file"],["pcap","pcap capture file"],["arrow","Apache Arrow"],["parquet","Apache Parquet"]]);function rr(i,e){let t=ir.get(i);if(t)return t;let[r,n]=e.split("/"),o=n?.split("+")[0]?.replace(/-/g," ")||i;switch(r){case"image":return`${o.toUpperCase()} image data`;case"audio":return`${o.toUpperCase()} audio`;case"video":return`${o.toUpperCase()} video`;case"font":return`${o} font`;case"model":return`${o} 3D model`;case"application":return n?.includes("zip")||n?.includes("compressed")?`${o} archive data`:n?.includes("executable")?`${o} executable`:`${i.toUpperCase()} data`;default:return`${i.toUpperCase()} data`}}function nr(i){let e=i.split("/").pop()||i;if(e.startsWith(".")&&!e.includes(".",1))return e;let t=e.lastIndexOf(".");return t===-1||t===0?"":e.slice(t).toLowerCase()}function or(i,e){if(i.startsWith("#!")){let a=i.split(`
11
+ `)[0];return a.includes("python")?{description:"Python script, ASCII text executable",mime:"text/x-python"}:a.includes("node")||a.includes("bun")||a.includes("deno")?{description:"JavaScript script, ASCII text executable",mime:"text/javascript"}:a.includes("bash")?{description:"Bourne-Again shell script, ASCII text executable",mime:"text/x-shellscript"}:a.includes("sh")?{description:"POSIX shell script, ASCII text executable",mime:"text/x-shellscript"}:a.includes("ruby")?{description:"Ruby script, ASCII text executable",mime:"text/x-ruby"}:a.includes("perl")?{description:"Perl script, ASCII text executable",mime:"text/x-perl"}:{description:"script, ASCII text executable",mime:"text/plain"}}let t=i.trimStart();if(t.startsWith("<?xml"))return{description:"XML document",mime:"application/xml"};if(t.startsWith("<!DOCTYPE html")||t.toLowerCase().startsWith("<html"))return{description:"HTML document",mime:"text/html"};let r=i.includes(`\r
12
+ `),n=i.includes("\r")&&!r,o="";r?o=", with CRLF line terminators":n&&(o=", with CR line terminators");let s=nr(e),f=s?tr.get(s):void 0;if(f)return f.mime.startsWith("text/")&&o?{description:`${f.description}${o}`,mime:f.mime}:f;let m=!1;for(let a=0;a<Math.min(i.length,8192);a++)if(i.charCodeAt(a)>127){m=!0;break}return m?{description:`UTF-8 Unicode text${o}`,mime:"text/plain; charset=utf-8"}:{description:`ASCII text${o}`,mime:"text/plain"}}async function sr(i,e){if(e.length===0)return{description:"empty",mime:"inode/x-empty"};let t=await ze(e);if(t)return{description:rr(t.ext,t.mime),mime:t.mime};let r=new TextDecoder("utf-8",{fatal:!1}).decode(e);return or(r,i)}var Zn={name:"file",async execute(i,e){if(Pe(i))return Re(er);let t=!1,r=!1,n=!1,o=[];for(let m of i)if(m.startsWith("--"))if(m==="--brief")t=!0;else if(m==="--mime"||m==="--mime-type")r=!0;else if(m==="--dereference")n=!0;else return ge("file",m);else if(m.startsWith("-")&&m!=="-")for(let a of m.slice(1))if(a==="b")t=!0;else if(a==="i")r=!0;else if(a==="L")n=!0;else return ge("file",`-${a}`);else o.push(m);if(o.length===0)return{stdout:"",stderr:`Usage: file [-bLi] FILE...
13
+ `,exitCode:1};let s=new Ne(Math.min(e.limits.maxOutputSize,e.limits.maxStringLength),"file"),f=0;for(let m of o){e.executionScope?.consumeLimited("file-operands",1,e.limits.maxArrayElements,"file");try{let a=e.fs.resolvePath(e.cwd,m),c=n?await e.fs.stat(a):await e.fs.lstat(a);if(c.isSymbolicLink){let b=await e.fs.readlink(a),w=r?"inode/symlink":`symbolic link to ${b}`;s.append(t?`${w}
14
+ `:`${m}: ${w}
15
+ `);continue}if(c.isDirectory){let b=r?"inode/directory":"directory";s.append(t?`${b}
16
+ `:`${m}: ${b}
17
+ `);continue}let p=await e.fs.readFileBuffer(a);e.executionScope?.consumeInput(p.byteLength,"file");let u=await sr(m,p),d=r?u.mime:u.description;s.append(t?`${d}
18
+ `:`${m}: ${d}
19
+ `)}catch(a){Ue(a),s.append(t?`cannot open
20
+ `:`${m}: cannot open (No such file or directory)
21
+ `),f=1}}return{stdout:s.build(),stderr:"",exitCode:f}}},Vn={name:"file",flags:[{flag:"-b",type:"boolean"},{flag:"-i",type:"boolean"},{flag:"-L",type:"boolean"}],needsArgs:!0};export{Zn as a,Vn as b};
22
+ /*! Bundled license information:
23
+
24
+ ieee754/index.js:
25
+ (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
26
+ */
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as x}from"./chunk-BNYIXXC2.js";import{d as g}from"./chunk-CPTQXTBJ.js";import{l as S}from"./chunk-LCP3IKI7.js";import{e as y}from"./chunk-CPKBPQ2C.js";async function F(a,n){let s="octal",o=[],p=[];for(let t=0;t<a.length;t++){let e=a[t];if(e==="-c")o.push("char");else if(e==="-An"||e==="-A"&&a[t+1]==="n")s="none",e==="-A"&&t++;else if(e==="-t"&&a[t+1]){let r=a[++t];r==="x1"?o.push("hex"):r==="c"?o.push("char"):r.startsWith("o")&&o.push("octal")}else(!e.startsWith("-")||e==="-")&&p.push(e)}o.length===0&&o.push("octal");let m=new g(n.limits.maxInputBytes,"od input"),A=p.length===0?["-"]:p;for(let t of A){if(t==="-"){m.append(n.stdin);continue}let e=t.startsWith("/")?t:`${n.cwd}/${t}`;try{let r=await y(n.fs,e);n.executionScope?.consumeInput(r.length,"od"),m.append(r)}catch(r){return x(r),{stdout:"",stderr:`od: ${t}: No such file or directory
4
+ `,exitCode:1}}}let C=o.includes("char");function $(t){return t===0?" \\0":t===7?" \\a":t===8?" \\b":t===9?" \\t":t===10?" \\n":t===11?" \\v":t===12?" \\f":t===13?" \\r":t>=32&&t<127?` ${String.fromCharCode(t)}`:` ${t.toString(8).padStart(3,"0")}`}function B(t){return C?` ${t.toString(16).padStart(2,"0")}`:` ${t.toString(16).padStart(2,"0")}`}function w(t){return` ${t.toString(8).padStart(3,"0")}`}let i=m.build(),u=16,d=new g(Math.min(n.limits.maxOutputSize,n.limits.maxStringLength),"od"),h=o.length;if(h>0&&i.length>Math.floor(n.limits.maxLoopIterations/h))throw new S(`od: format work limit exceeded (${n.limits.maxLoopIterations})`,"iterations");n.executionScope?.consumeWork(i.length*h,"od formatting");for(let t=0;t<i.length;t+=u)for(let e=0;e<o.length;e++){let r=o[e],l;r==="char"?l=Array.from(i.slice(t,t+u),f=>$(f.charCodeAt(0))):r==="hex"?l=Array.from(i.slice(t,t+u),f=>B(f.charCodeAt(0))):l=Array.from(i.slice(t,t+u),f=>w(f.charCodeAt(0)));let c="";e===0&&s!=="none"?c=`${t.toString(8).padStart(7,"0")} `:(e>0||s==="none")&&(c=s==="none"?"":" "),d.append(c+l.join("")).append(`
5
+ `)}return s!=="none"&&i.length>0&&d.append(i.length.toString(8).padStart(7,"0")).append(`
6
+ `),{stdout:d.build(),stderr:"",exitCode:0}}var H={name:"od",execute:F},W={name:"od",flags:[{flag:"-c",type:"boolean"},{flag:"-A",type:"value",valueHint:"string"},{flag:"-t",type:"value",valueHint:"string"},{flag:"-N",type:"value",valueHint:"number"}],stdinType:"text",needsFiles:!0};export{H as a,W as b};
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as h}from"./chunk-K5KT6DMM.js";import{a as y,b as w,c as g}from"./chunk-MUFNRCMY.js";var $={name:"date",summary:"display the current time in the given FORMAT",usage:"date [OPTION]... [+FORMAT]",options:["-d, --date=STRING display time described by STRING, not 'now'","-u, --utc print Coordinated Universal Time (UTC)","-I, --iso-8601 output date/time in ISO 8601 format","-R, --rfc-email output RFC 5322 date format"," --help display this help and exit"]};function N(e){try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch{return!1}}function S(e,a){let i=new Intl.DateTimeFormat("en-US",{timeZone:a,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),t=o=>i.find(l=>l.type===o)?.value??"00",r=Number.parseInt(t("hour"),10)%24,s=new Date(`${t("year")}-${t("month")}-${t("day")}T${String(r).padStart(2,"0")}:${t("minute")}:${t("second")}Z`);return Number.isNaN(s.getTime())?null:s}function I(e,a){let i=e.match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/);if(!i)return null;let[,t,r,s,o="00",l="00",c="00"]=i,p=new Date(`${t}-${r}-${s}T${o}:${l}:${c}Z`);if(Number.isNaN(p.getTime()))return null;try{let u=p;for(let d=0;d<3;d++){let f=S(u,a);if(f===null)return null;let m=f.getTime()-p.getTime();if(m===0)return u;u=new Date(u.getTime()-m)}return u}catch{return null}}function b(e,a){if(e.startsWith("@")){let r=e.slice(1);if(!/^-?\d+$/.test(r))return null;let s=Number(r);if(!Number.isSafeInteger(s))return null;let o=new Date(s*1e3);return Number.isNaN(o.getTime())?null:o}let i=e.toLowerCase().trim();if(i==="now"||i==="today")return new Date;if(i==="yesterday")return new Date(Date.now()-864e5);if(i==="tomorrow")return new Date(Date.now()+864e5);if(a&&!/Z$/i.test(e)&&!/[+-]\d{2}:?\d{2}$/.test(e)){let r=I(e,a);if(r)return r}let t=new Date(e);return Number.isNaN(t.getTime())?null:t}var x={name:"date",async execute(e,a){if(w(e))return y($);let i=!1,t=null,r=null,s=!1,o=!1;for(let m=0;m<e.length;m++){let n=e[m];if(n==="-u"||n==="--utc")i=!0;else if(n==="-d"||n==="--date")t=e[++m]??"";else if(n.startsWith("--date="))t=n.slice(7);else if(n==="-I"||n==="--iso-8601")s=!0;else if(n==="-R"||n==="--rfc-email")o=!0;else if(n.startsWith("+"))r=n.slice(1);else{if(n.startsWith("--"))return g("date",n);if(n.startsWith("-"))for(let T of n.slice(1))if(T==="u")i=!0;else if(T==="I")s=!0;else if(T==="R")o=!0;else return g("date",`-${T}`)}}let l=a.env.get("TZ");l&&!N(l)&&(l=void 0);let c=i?"UTC":l??"UTC",p=t!==null?b(t,l):new Date;if(!p)return{stdout:"",stderr:`date: invalid date '${t}'
4
+ `,exitCode:1};let u=Math.floor(p.getTime()/1e3),d,f={maxOperations:a.limits.maxLoopIterations,maxOutputBytes:Math.min(a.limits.maxStringLength,a.limits.maxOutputSize)-1};return r?d=h(r,u,c,f):s?d=h("%Y-%m-%dT%H:%M:%S%z",u,c,f):o?d=h("%a, %d %b %Y %H:%M:%S %z",u,c,f):d=h("%a %b %e %H:%M:%S %Z %Y",u,c,f),{stdout:`${d}
5
+ `,stderr:"",exitCode:0}}},z={name:"date",flags:[{flag:"-d",type:"value",valueHint:"string"},{flag:"-u",type:"boolean"},{flag:"-I",type:"boolean"},{flag:"-R",type:"boolean"}]};export{x as a,z as b};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{b as f}from"./chunk-CPKBPQ2C.js";import{a,b as c,c as d}from"./chunk-MUFNRCMY.js";var u={name:"rev",summary:"reverse lines characterwise",usage:"rev [file ...]",description:"Copies the specified files to standard output, reversing the order of characters in every line. If no files are specified, standard input is read.",examples:["echo 'hello' | rev # Output: olleh","rev file.txt # Reverse each line in file"]};function p(r){return Array.from(r).reverse().join("")}var g={name:"rev",execute:async(r,s)=>{if(c(r))return a(u);let o=[];for(let e of r)if(e==="--"){let t=r.indexOf(e);o.push(...r.slice(t+1));break}else{if(e.startsWith("-")&&e!=="-")return d("rev",e);o.push(e)}let n="",l=e=>{let t=e.split(`
4
+ `),i=e.endsWith(`
5
+ `)&&t[t.length-1]==="";return i&&t.pop(),t.map(p).join(`
6
+ `)+(i?`
7
+ `:"")};if(o.length===0){let e=f(s.stdin)??"";n=l(e)}else for(let e of o)if(e==="-"){let t=f(s.stdin)??"";n+=l(t)}else{let t=s.fs.resolvePath(s.cwd,e),i=await s.fs.readFile(t);if(i===null)return{exitCode:1,stdout:n,stderr:`rev: ${e}: No such file or directory
8
+ `};n+=l(i)}return{exitCode:0,stdout:n,stderr:""}}},y={name:"rev",flags:[],stdinType:"text",needsFiles:!0};export{g as a,y as b};
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as k,b as E,c as $,d as Te,e as S,g as C,h as ce}from"./chunk-WDV2ECOC.js";import{a as ue,c as xe}from"./chunk-MROECM42.js";import{a as Ie}from"./chunk-4SQKKW2M.js";import{a as j}from"./chunk-CB4SODHK.js";import{d as G}from"./chunk-CPTQXTBJ.js";import{l as g}from"./chunk-LCP3IKI7.js";import{a as M}from"./chunk-CPKBPQ2C.js";function I(e){return e!==!1&&e!==null}function J(e,n){return JSON.stringify(e)===JSON.stringify(n)}function Y(e,n){return typeof e=="number"&&typeof n=="number"?e-n:typeof e=="string"&&typeof n=="string"?e.localeCompare(n):0}function Me(e,n,t={}){let r=t.maxDepth??2e3,s=C(e),o=[{target:s,source:n,depth:0}];for(;o.length>0;){let h=o.pop();if(!h)break;if(h.depth>r)throw new g(`query depth limit exceeded (${r})`,"recursion");for(let u of Object.keys(h.source)){if(t.visit?.(),!k(u))continue;let f=$(h.target,u)?S(h.target[u]):null,i=S(h.source[u]);if(f&&i){let c=C(f);E(h.target,u,c),o.push({target:c,source:i,depth:h.depth+1})}else E(h.target,u,h.source[u])}}return s}function B(e,n=3e3){if(e===null||typeof e!="object")return 0;if(n<=1)return n;let t=(i,c)=>({value:i,keys:Array.isArray(i)?void 0:Object.keys(i),nextChild:0,pathDepth:c,maxChildDepth:0}),r=i=>i.keys!==void 0?i.keys.length:i.value.length,s=i=>{if(i.keys){let c=i.keys[i.nextChild++];return i.value[c]}return i.value[i.nextChild++]},o=new WeakMap,h=new WeakMap,u=e,f=[t(u,1)];for(o.set(u,"visiting");f.length>0;){let i=f[f.length-1];if(i.nextChild<r(i)){let a=s(i);if(a===null||typeof a!="object")continue;let l=o.get(a);if(l==="visiting")return n;if(l==="done"){let b=h.get(a)??0;if(i.pathDepth+b>=n)return n;i.maxChildDepth=Math.max(i.maxChildDepth,b);continue}let y=i.pathDepth+1;if(y>=n)return n;let m=a;o.set(a,"visiting"),f.push(t(m,y));continue}let c=i.maxChildDepth+1;h.set(i.value,c),o.set(i.value,"done"),f.pop();let p=f.at(-1);if(p)p.maxChildDepth=Math.max(p.maxChildDepth,c);else return c}return 0}function Z(e,n){let t=u=>u===null?0:typeof u=="boolean"?1:typeof u=="number"?2:typeof u=="string"?3:Array.isArray(u)?4:typeof u=="object"?5:6,r=t(e),s=t(n);if(r!==s)return r-s;if(typeof e=="number"&&typeof n=="number")return e-n;if(typeof e=="string"&&typeof n=="string")return e.localeCompare(n);if(typeof e=="boolean"&&typeof n=="boolean")return(e?1:0)-(n?1:0);if(Array.isArray(e)&&Array.isArray(n)){for(let u=0;u<Math.min(e.length,n.length);u++){let f=Z(e[u],n[u]);if(f!==0)return f}return e.length-n.length}let o=S(e),h=S(n);if(o&&h){let u=Object.keys(o).sort(),f=Object.keys(h).sort();for(let i=0;i<Math.min(u.length,f.length);i++){let c=u[i].localeCompare(f[i]);if(c!==0)return c}if(u.length!==f.length)return u.length-f.length;for(let i of u){let c=Z(o[i],h[i]);if(c!==0)return c}}return 0}function v(e,n){if(J(e,n))return!0;if(typeof e=="string"&&typeof n=="string")return e.includes(n);if(Array.isArray(e)&&Array.isArray(n))return n.every(s=>e.some(o=>v(o,s)));let t=S(e),r=S(n);return t&&r?Object.keys(r).every(s=>$(t,s)&&v(t[s],r[s])):!1}function z(e,n,t=1){let r=e.limits.maxArrayElements;if(t<0||n>r-t)throw new g(`query result element limit exceeded (${r})`,"array_elements")}function he(e,n,t,r,s,o,h,u,f,i){switch(n){case"sort":return Array.isArray(e)?[[...e].sort(h)]:[null];case"sort_by":return!Array.isArray(e)||t.length===0?[null]:[[...e].sort((p,a)=>{let l=s(p,t[0],r)[0],y=s(a,t[0],r)[0];return h(l,y)})];case"bsearch":{if(!Array.isArray(e)){let p=e===null?"null":typeof e=="object"?"object":typeof e;throw new Error(`${p} (${JSON.stringify(e)}) cannot be searched from`)}return t.length===0?[null]:s(e,t[0],r).map(p=>{let a=0,l=e.length;for(;a<l;){let y=a+l>>>1;h(e[y],p)<0?a=y+1:l=y}return a<e.length&&h(e[a],p)===0?a:-a-1})}case"unique_by":{if(!Array.isArray(e)||t.length===0)return[null];let c=new Map;for(let a of e){let l=s(a,t[0],r)[0],y=JSON.stringify(l);c.has(y)||c.set(y,{item:a,key:l})}let p=[...c.values()];return p.sort((a,l)=>h(a.key,l.key)),[p.map(a=>a.item)]}case"group_by":{if(!Array.isArray(e)||t.length===0)return[null];let c=new Map;for(let p of e){let a=JSON.stringify(s(p,t[0],r)[0]);c.has(a)||c.set(a,[]),c.get(a)?.push(p)}return[[...c.values()]]}case"max":return Array.isArray(e)&&e.length>0?[e.reduce((c,p)=>h(c,p)>0?c:p)]:[null];case"max_by":return!Array.isArray(e)||e.length===0||t.length===0?[null]:[e.reduce((c,p)=>{let a=s(c,t[0],r)[0],l=s(p,t[0],r)[0];return h(a,l)>0?c:p})];case"min":return Array.isArray(e)&&e.length>0?[e.reduce((c,p)=>h(c,p)<0?c:p)]:[null];case"min_by":return!Array.isArray(e)||e.length===0||t.length===0?[null]:[e.reduce((c,p)=>{let a=s(c,t[0],r)[0],l=s(p,t[0],r)[0];return h(a,l)<0?c:p})];case"add":{let c=p=>{let a=p.filter(l=>l!==null);return a.length===0?null:a.every(l=>typeof l=="number")?a.reduce((l,y)=>l+y,0):a.every(l=>typeof l=="string")?a.join(""):a.every(l=>Array.isArray(l))?a.flat():a.every(l=>l&&typeof l=="object"&&!Array.isArray(l))?xe(...a):null};if(t.length>=1){let p=s(e,t[0],r);return[c(p)]}return Array.isArray(e)?[c(e)]:[null]}case"any":{if(t.length>=2){try{let c=o(e,t[0],r);for(let p of c)if(s(p,t[1],r).some(u))return[!0]}catch(c){if(c instanceof i)throw c}return[!1]}return t.length===1?Array.isArray(e)?[e.some(c=>u(s(c,t[0],r)[0]))]:[!1]:Array.isArray(e)?[e.some(u)]:[!1]}case"all":{if(t.length>=2){try{let c=o(e,t[0],r);for(let p of c)if(!s(p,t[1],r).some(u))return[!1]}catch(c){if(c instanceof i)throw c}return[!0]}return t.length===1?Array.isArray(e)?[e.every(c=>u(s(c,t[0],r)[0]))]:[!0]:Array.isArray(e)?[e.every(u)]:[!0]}case"select":return t.length===0?[e]:s(e,t[0],r).some(u)?[e]:[];case"map":{if(t.length===0||!Array.isArray(e))return[null];z(r,0,e.length);let c=[];for(let p of e){let a=s(p,t[0],r);z(r,c.length,a.length);for(let l of a)c.push(l)}return[c]}case"map_values":{if(t.length===0)return[null];if(Array.isArray(e)){z(r,0,e.length);let c=[];for(let p of e){let a=s(p,t[0],r);z(r,c.length,a.length);for(let l of a)c.push(l)}return[c]}if(e&&typeof e=="object"){let c=Object.create(null),p=Object.keys(e);z(r,0,p.length);for(let a of p){if(!k(a))continue;let l=e[a],y=s(l,t[0],r);y.length>0&&E(c,a,y[0])}return[c]}return[null]}case"has":{if(t.length===0)return[!1];let p=s(e,t[0],r)[0];return Array.isArray(e)&&typeof p=="number"?[p>=0&&p<e.length]:e&&typeof e=="object"&&typeof p=="string"?[Object.hasOwn(e,p)]:[!1]}case"in":{if(t.length===0)return[!1];let p=s(e,t[0],r)[0];return Array.isArray(p)&&typeof e=="number"?[e>=0&&e<p.length]:p&&typeof p=="object"&&typeof e=="string"?[Object.hasOwn(p,e)]:[!1]}case"contains":{if(t.length===0)return[!1];let c=s(e,t[0],r);return[f(e,c[0])]}case"inside":{if(t.length===0)return[!1];let c=s(e,t[0],r);return[f(c[0],e)]}default:return null}}function pe(e,n,t,r,s,o,h,u){switch(n){case"first":if(t.length>0)try{let f=o(e,t[0],r);return f.length>0?[f[0]]:[]}catch(f){if(f instanceof u)throw f;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case"last":if(t.length>0){let f=s(e,t[0],r);return f.length>0?[f[f.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case"nth":{if(t.length<1)return[null];let f=s(e,t[0],r);if(t.length>1){for(let c of f)if(c<0)throw new Error("nth doesn't support negative indices");let i;try{i=o(e,t[1],r)}catch(c){if(c instanceof u)throw c;i=[]}return f.flatMap(c=>{let p=c;return p<i.length?[i[p]]:[]})}return Array.isArray(e)?f.flatMap(i=>{let c=i;if(c<0)throw new Error("nth doesn't support negative indices");return c<e.length?[e[c]]:[null]}):[null]}case"range":{if(t.length===0)return[];let f=r.limits.maxArrayElements,i=(y,m)=>{if(y.length>=f)throw new u(`query result element limit exceeded (${f})`,"array_elements");y.push(m)},c=s(e,t[0],r);if(t.length===1){let y=[];for(let m of c){let b=m;for(let A=0;A<b;A++)i(y,A)}return y}let p=s(e,t[1],r);if(t.length===2){let y=[];for(let m of c)for(let b of p){let A=m,w=b;for(let N=A;N<w;N++)i(y,N)}return y}let a=s(e,t[2],r),l=[];for(let y of c)for(let m of p)for(let b of a){let A=y,w=m,N=b;if(N!==0)if(N>0)for(let O=A;O<w;O+=N)i(l,O);else for(let O=A;O>w;O+=N)i(l,O)}return l}case"limit":return t.length<2?[]:s(e,t[0],r).flatMap(i=>{let c=i;if(c<0)throw new Error("limit doesn't support negative count");if(c===0)return[];let p;try{p=o(e,t[1],r)}catch(a){if(a instanceof u)throw a;p=[]}return p.slice(0,c)});case"isempty":{if(t.length<1)return[!0];try{return[o(e,t[0],r).length===0]}catch(f){if(f instanceof u)throw f;return[!0]}}case"isvalid":{if(t.length<1)return[!0];try{return[s(e,t[0],r).length>0]}catch(f){if(f instanceof u)throw f;return[!1]}}case"skip":return t.length<2?[]:s(e,t[0],r).flatMap(i=>{let c=i;if(c<0)throw new Error("skip doesn't support negative count");return s(e,t[1],r).slice(c)});case"until":{if(t.length<2)return[e];let f=e,i=r.limits.maxIterations;for(let c=0;c<i;c++){if(s(f,t[0],r).some(h))return[f];let a=s(f,t[1],r);if(a.length===0)return[f];f=a[0]}throw new u(`jq until: too many iterations (${i}), increase executionLimits.maxJqIterations`,"iterations")}case"while":{if(t.length<2)return[e];let f=[],i=e,c=r.limits.maxIterations;for(let p=0;p<c&&s(i,t[0],r).some(h);p++){f.push(i);let l=s(i,t[1],r);if(l.length===0)break;i=l[0]}if(f.length>=c)throw new u(`jq while: too many iterations (${c}), increase executionLimits.maxJqIterations`,"iterations");return f}case"repeat":{if(t.length===0)return[e];let f=[],i=e,c=r.limits.maxIterations;for(let p=0;p<c;p++){f.push(i);let a=s(i,t[0],r);if(a.length===0)break;i=a[0]}if(f.length>=c)throw new u(`jq repeat: too many iterations (${c}), increase executionLimits.maxJqIterations`,"iterations");return f}default:return null}}var je="%Y-%m-%dT%H:%M:%SZ";function ae(e,n){if(!Number.isFinite(e)||Math.abs(e)>864e10)throw new Error(`${n} timestamp is outside the supported range`);return new Date(e*1e3)}function Pe(e){let n=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(!n)return null;let[,t,r,s,o,h,u]=n.map(Number),f=Date.UTC(t,r-1,s,o,h,u);if(!Number.isFinite(f))return null;let i=new Date(f);return i.getUTCFullYear()!==t||i.getUTCMonth()!==r-1||i.getUTCDate()!==s||i.getUTCHours()!==o||i.getUTCMinutes()!==h||i.getUTCSeconds()!==u?null:i}function le(e,n,t,r,s){switch(n){case"now":return[Date.now()/1e3];case"gmtime":{if(typeof e!="number")return[null];let o=ae(e,"gmtime"),h=o.getUTCFullYear(),u=o.getUTCMonth(),f=o.getUTCDate(),i=o.getUTCHours(),c=o.getUTCMinutes(),p=o.getUTCSeconds(),a=o.getUTCDay(),l=Date.UTC(h,0,1),y=Math.floor((o.getTime()-l)/(1440*60*1e3));return[[h,u,f,i,c,p,a,y]]}case"mktime":{if(!Array.isArray(e))throw new Error("mktime requires parsed datetime inputs");let[o,h,u,f=0,i=0,c=0]=e;if(typeof o!="number"||typeof h!="number")throw new Error("mktime requires parsed datetime inputs");let p=Date.UTC(o,h,u??1,f??0,i??0,c??0);return[Math.floor(p/1e3)]}case"strftime":{if(t.length===0)return[null];let h=s(e,t[0],r)[0];if(typeof h!="string")throw new Error("strftime/1 requires a string format");let u;if(typeof e=="number")u=ae(e,"strftime");else if(Array.isArray(e)){let[a,l,y,m=0,b=0,A=0]=e;if(typeof a!="number"||typeof l!="number")throw new Error("strftime/1 requires parsed datetime inputs");u=new Date(Date.UTC(a,l,y??1,m??0,b??0,A??0))}else throw new Error("strftime/1 requires parsed datetime inputs");let f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],c=(a,l=2)=>String(a).padStart(l,"0");return[h.replace(/%Y/g,String(u.getUTCFullYear())).replace(/%m/g,c(u.getUTCMonth()+1)).replace(/%d/g,c(u.getUTCDate())).replace(/%H/g,c(u.getUTCHours())).replace(/%M/g,c(u.getUTCMinutes())).replace(/%S/g,c(u.getUTCSeconds())).replace(/%A/g,f[u.getUTCDay()]).replace(/%B/g,i[u.getUTCMonth()]).replace(/%Z/g,"UTC").replace(/%%/g,"%")]}case"strptime":{if(t.length===0)return[null];if(typeof e!="string")throw new Error("strptime/1 requires a string input");let h=s(e,t[0],r)[0];if(typeof h!="string")throw new Error("strptime/1 requires a string format");if(h!==je)throw new Error(`strptime format is not supported: ${h}`);let u=Pe(e);if(u){let f=u.getUTCFullYear(),i=u.getUTCMonth(),c=u.getUTCDate(),p=u.getUTCHours(),a=u.getUTCMinutes(),l=u.getUTCSeconds(),y=u.getUTCDay(),m=Date.UTC(f,0,1),b=Math.floor((u.getTime()-m)/(1440*60*1e3));return[[f,i,c,p,a,l,y,b]]}throw new Error(`Cannot parse date: ${e}`)}case"fromdate":{if(typeof e!="string")throw new Error("fromdate requires a string input");let o=Pe(e);if(!o)throw new Error(`date "${e}" does not match format "${je}"`);return[Math.floor(o.getTime()/1e3)]}case"todate":{if(typeof e!="number")throw new Error("todate requires a number input");return[ae(e,"todate").toISOString().replace(/\.\d{3}Z$/,"Z")]}default:return null}}var ze=2e3;function We(e){let n=[];for(let r=0;r<e.length;r+=32768){let s=Math.min(r+32768,e.length),o="";for(let h=r;h<s;h++)o+=String.fromCharCode(e[h]);n.push(o)}return n.join("")}function Xe(e){let n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}function ye(e,n,t){switch(n){case"@base64":if(typeof e=="string"){if(typeof Buffer<"u")return[Buffer.from(e,"utf-8").toString("base64")];let r=new TextEncoder().encode(e);return[btoa(We(r))]}return[null];case"@base64d":if(typeof e=="string"){if(typeof Buffer<"u")return[Buffer.from(e,"base64").toString("utf-8")];let r=Xe(atob(e));return[new TextDecoder("utf-8",{fatal:!1}).decode(r)]}return[null];case"@uri":return typeof e=="string"?[encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")]:[null];case"@urid":return typeof e=="string"?[decodeURIComponent(e)]:[null];case"@csv":return Array.isArray(e)?[e.map(s=>{if(s===null)return"";if(typeof s=="boolean")return s?"true":"false";if(typeof s=="number")return String(s);let o=String(s);return o.includes(",")||o.includes('"')||o.includes(`
4
+ `)||o.includes("\r")?`"${o.replace(/"/g,'""')}"`:o}).join(",")]:[null];case"@tsv":return Array.isArray(e)?[e.map(r=>String(r??"").replace(/\t/g,"\\t").replace(/\n/g,"\\n")).join(" ")]:[null];case"@json":{let r=t??ze;return B(e,r+1)>r?[null]:[JSON.stringify(e)]}case"@html":return typeof e=="string"?[e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")]:[null];case"@sh":return typeof e=="string"?[`'${e.replace(/'/g,"'\\''")}'`]:[null];case"@text":return typeof e=="string"?[e]:e==null?[""]:[String(e)];default:return null}}function me(e,n,t,r,s,o){switch(n){case"index":return t.length===0?[null]:s(e,t[0],r).map(u=>{if(typeof e=="string"&&typeof u=="string"){if(u===""&&e==="")return null;let f=e.indexOf(u);return f>=0?f:null}if(Array.isArray(e)){if(Array.isArray(u)){for(let i=0;i<=e.length-u.length;i++){let c=!0;for(let p=0;p<u.length;p++)if(!o(e[i+p],u[p])){c=!1;break}if(c)return i}return null}let f=e.findIndex(i=>o(i,u));return f>=0?f:null}return null});case"rindex":return t.length===0?[null]:s(e,t[0],r).map(u=>{if(typeof e=="string"&&typeof u=="string"){let f=e.lastIndexOf(u);return f>=0?f:null}if(Array.isArray(e)){if(Array.isArray(u)){for(let f=e.length-u.length;f>=0;f--){let i=!0;for(let c=0;c<u.length;c++)if(!o(e[f+c],u[c])){i=!1;break}if(i)return f}return null}for(let f=e.length-1;f>=0;f--)if(o(e[f],u))return f;return null}return null});case"indices":return t.length===0?[[]]:s(e,t[0],r).map(u=>{let f=[];if(typeof e=="string"&&typeof u=="string"){let i=e.indexOf(u);for(;i!==-1;)f.push(i),i=e.indexOf(u,i+1)}else if(Array.isArray(e))if(Array.isArray(u)){let i=u.length;if(i===0)for(let c=0;c<=e.length;c++)f.push(c);else for(let c=0;c<=e.length-i;c++){let p=!0;for(let a=0;a<i;a++)if(!o(e[c+a],u[a])){p=!1;break}p&&f.push(c)}}else for(let i=0;i<e.length;i++)o(e[i],u)&&f.push(i);return f});default:return null}}function de(e,n,t,r,s){switch(n){case"fabs":case"abs":return typeof e=="number"?[Math.abs(e)]:typeof e=="string"?[e]:[null];case"exp10":return typeof e=="number"?[10**e]:[null];case"exp2":return typeof e=="number"?[2**e]:[null];case"pow":{if(t.length<2)return[null];let o=s(e,t[0],r),h=s(e,t[1],r),u=o[0],f=h[0];return typeof u!="number"||typeof f!="number"?[null]:[u**f]}case"atan2":{if(t.length<2)return[null];let o=s(e,t[0],r),h=s(e,t[1],r),u=o[0],f=h[0];return typeof u!="number"||typeof f!="number"?[null]:[Math.atan2(u,f)]}case"hypot":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.hypot(e,o)]}case"fma":{if(typeof e!="number"||t.length<2)return[null];let o=s(e,t[0],r)[0],h=s(e,t[1],r)[0];return[e*o+h]}case"copysign":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.sign(o)*Math.abs(e)]}case"drem":case"remainder":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[e-Math.round(e/o)*o]}case"fdim":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.max(0,e-o)]}case"fmax":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.max(e,o)]}case"fmin":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.min(e,o)]}case"ldexp":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[e*2**o]}case"scalbn":case"scalbln":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[e*2**o]}case"nearbyint":return typeof e=="number"?[Math.round(e)]:[null];case"logb":return typeof e=="number"?[Math.floor(Math.log2(Math.abs(e)))]:[null];case"significand":if(typeof e=="number"){let o=Math.floor(Math.log2(Math.abs(e)));return[e/2**o]}return[null];case"frexp":if(typeof e=="number"){if(e===0)return[[0,0]];let o=Math.floor(Math.log2(Math.abs(e)))+1;return[[e/2**o,o]]}return[null];case"modf":if(typeof e=="number"){let o=Math.trunc(e);return[[e-o,o]]}return[null];default:return null}}function V(e){let n=e.limits.maxIterations;return{maxDepth:e.limits.maxDepth,maxResults:e.limits.maxArrayElements,maxIterations:n}}function H(e){throw new g(e,"array_elements")}function ge(e,n){let t=1;for(let r of e){if(!Number.isSafeInteger(r)||r<0)throw new Error("combinations requires finite array lengths");r!==0&&t>Math.floor(n/r)&&H(`query combination limit exceeded (${n})`),t*=r}return t}function be(e,n,t,r,s,o,h,u){switch(n){case"recurse":{let f=[],i=V(r),c=t.length>=2?t[1]:null,p=[{value:e,depth:0}],a=0;for(;p.length>0;){let l=p.pop();if(!l)break;if(++a>i.maxIterations)throw new g(`query iteration limit exceeded (${i.maxIterations})`,"iterations");if(l.depth>i.maxDepth)throw new g(`query depth limit exceeded (${i.maxDepth})`,"recursion");if(c&&!s(l.value,c,r).some(o))continue;f.length>=i.maxResults&&H(`query result element limit exceeded (${i.maxResults})`),f.push(l.value);let y=[];t.length===0?Array.isArray(l.value)?y=l.value:l.value&&typeof l.value=="object"&&(y=Object.keys(l.value).map(m=>l.value[m])):y=s(l.value,t[0],r).filter(m=>m!=null),p.length>i.maxResults-y.length&&H(`query traversal queue limit exceeded (${i.maxResults})`);for(let m=y.length-1;m>=0;m--)p.push({value:y[m],depth:l.depth+1})}return f}case"recurse_down":return u(e,"recurse",t,r);case"walk":{if(t.length===0)return[e];let f=V(r),i=new WeakSet,c=new WeakMap,p=[{value:e,depth:0,expanded:!1}],a=e,l=0;for(;p.length>0;){let y=p.pop();if(!y)break;if(++l>f.maxIterations)throw new g(`query iteration limit exceeded (${f.maxIterations})`,"iterations");if(y.depth>f.maxDepth)throw new g(`query depth limit exceeded (${f.maxDepth})`,"recursion");let m=y.value!==null&&typeof y.value=="object"?y.value:null;if(!y.expanded&&m){if(i.has(m))continue;i.add(m),p.push({...y,expanded:!0});let w=S(y.value),N=Array.isArray(y.value)?y.value:Object.keys(w??{}).map(O=>w?.[O]);p.length>f.maxResults-N.length&&H(`query traversal queue limit exceeded (${f.maxResults})`);for(let O=N.length-1;O>=0;O--)p.push({value:N[O],depth:y.depth+1,expanded:!1});continue}let b=y.value;if(Array.isArray(y.value))b=y.value.map(w=>w!==null&&typeof w=="object"?c.get(w)??w:w);else if(m){let w=Object.create(null),N=S(y.value);for(let O of Object.keys(N??{})){if(!k(O))continue;let L=N?.[O];E(w,O,L!==null&&typeof L=="object"?c.get(L)??L:L)}b=w}let A=s(b,t[0],r)[0];m&&c.set(m,A),y.depth===0&&(a=A)}return[a]}case"transpose":{if(!Array.isArray(e))return[null];if(e.length===0)return[[]];let f=V(r),i=0;for(let p of e)Array.isArray(p)&&(i=Math.max(i,p.length));ge([e.length,i],f.maxResults);let c=[];for(let p=0;p<i;p++)c.push(e.map(a=>Array.isArray(a)?a[p]:null));return[c]}case"combinations":{if(t.length>0){let y=s(e,t[0],r)[0];if(!Array.isArray(e))return[];if(!Number.isFinite(y)||!Number.isSafeInteger(y)||y<0)throw new Error("combinations length must be a finite non-negative integer");let m=V(r);if(y>m.maxDepth||y>m.maxResults)throw new g(`query depth limit exceeded (${m.maxDepth})`,"recursion");if(y===0)return m.maxResults<1&&H("query combination limit exceeded (0)"),[[]];let b=ge(Array.from({length:y},()=>e.length),m.maxResults);if(b===0)return[];let A=[],w=new Array(y).fill(0);for(let N=0;N<b;N++){A.push(w.map(O=>e[O]));for(let O=y-1;O>=0&&(w[O]++,!(w[O]<e.length));O--)w[O]=0}return A}if(!Array.isArray(e))return[];if(e.length===0)return V(r).maxResults<1&&H("query combination limit exceeded (0)"),[[]];for(let l of e)if(!Array.isArray(l))return[];let f=V(r),i=e;if(i.length>f.maxDepth)throw new g(`query depth limit exceeded (${f.maxDepth})`,"recursion");let c=ge(i.map(l=>l.length),f.maxResults);if(c===0)return[];let p=[],a=new Array(i.length).fill(0);for(let l=0;l<c;l++){p.push(a.map((y,m)=>i[m][y]));for(let y=i.length-1;y>=0&&(a[y]++,!(a[y]<i[y].length));y--)a[y]=0}return p}case"parent":{if(r.root===void 0||r.currentPath===void 0)return[];let f=r.currentPath;if(f.length===0)return[];let i=t.length>0?s(e,t[0],r)[0]:1;if(i>=0){if(i>f.length)return[];let c=f.slice(0,f.length-i);return[h(r.root,c)]}else{let c=-i-1;if(c>=f.length)return[e];let p=f.slice(0,c);return[h(r.root,p)]}}case"parents":{if(r.root===void 0||r.currentPath===void 0)return[[]];let f=r.currentPath,i=[];for(let c=f.length-1;c>=0;c--)i.push(h(r.root,f.slice(0,c)));return[i]}case"root":return r.root!==void 0?[r.root]:[];default:return null}}var Ae=2e3;function T(e){return e.limits.maxArrayElements}function ee(e,n){let t=T(e);if(n>=t)throw new g(`query result element limit exceeded (${t})`,"array_elements")}function Ge(e,n){let t=n.limits.maxDepth??Ae;if(e.length>t)throw new g(`query depth limit exceeded (${t})`,"recursion");let r=n.limits.maxArrayElements;for(let s of e)if(typeof s=="number"){if(!Number.isSafeInteger(s)||s<0||s>=r)throw new g(`query array index limit exceeded (${r})`,"array_elements")}else if(typeof s!="string")throw new Error("stream path components must be strings or integers")}function we(e,n,t,r,s){switch(n){case"keys":return Array.isArray(e)?[e.map((o,h)=>h)]:e&&typeof e=="object"?[Object.keys(e).sort()]:[null];case"keys_unsorted":return Array.isArray(e)?[e.map((o,h)=>h)]:e&&typeof e=="object"?[Object.keys(e)]:[null];case"length":return typeof e=="string"?[e.length]:Array.isArray(e)?[e.length]:e&&typeof e=="object"?[Object.keys(e).length]:e===null?[0]:typeof e=="number"?[Math.abs(e)]:[null];case"utf8bytelength":{if(typeof e=="string")return[M(e)];let o=e===null?"null":Array.isArray(e)?"array":typeof e,h=o==="array"||o==="object"?JSON.stringify(e):String(e);throw new Error(`${o} (${h}) only strings have UTF-8 byte length`)}case"to_entries":{let o=S(e);if(o){let h=Object.keys(o);if(h.length>T(r))throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");return[h.map(u=>{let f=Object.create(null);return E(f,"key",u),E(f,"value",o[u]),f})]}return[null]}case"from_entries":if(Array.isArray(e)){let o=Object.create(null);for(let h of e){let u=S(h);if(u){let f=u.key??u.Key??u.name??u.Name??u.k,i=u.value??u.Value??u.v;if(f!==void 0){let c=String(f);k(c)&&E(o,c,i)}}}return[o]}return[null];case"with_entries":{if(t.length===0)return[e];let o=S(e);if(o){let h=Object.keys(o);if(h.length>T(r))throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");let u=[];for(let i of h){let c=Object.create(null);E(c,"key",i),E(c,"value",o[i]);let p=s(c,t[0],r);if(u.length>T(r)-p.length)throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");for(let a of p)u.push(a)}let f=Object.create(null);for(let i of u){let c=S(i);if(c){let p=c.key??c.name??c.k,a=c.value??c.v;if(p!==void 0){let l=String(p);k(l)&&E(f,l,a)}}}return[f]}return[null]}case"reverse":return Array.isArray(e)?[[...e].reverse()]:typeof e=="string"?[e.split("").reverse().join("")]:[null];case"flatten":return Array.isArray(e)?(t.length>0?s(e,t[0],r):[Number.POSITIVE_INFINITY]).map(h=>{let u=h;if(u<0)throw new Error("flatten depth must not be negative");return e.flat(u)}):[null];case"unique":if(Array.isArray(e)){let o=new Set,h=[];for(let u of e){let f=JSON.stringify(u);o.has(f)||(o.add(f),h.push(u))}return[h]}return[null];case"tojson":case"tojsonstream":{let o=r.limits.maxDepth??Ae;return B(e,o+1)>o?[null]:[JSON.stringify(e)]}case"fromjson":{if(typeof e=="string"){let o=e.trim().toLowerCase();if(o==="nan")return[Number.NaN];if(o==="inf"||o==="infinity")return[Number.POSITIVE_INFINITY];if(o==="-inf"||o==="-infinity")return[Number.NEGATIVE_INFINITY];try{return[Te(JSON.parse(e),{maxDepth:r.limits.maxDepth,maxElements:r.limits.maxArrayElements})]}catch(h){throw h instanceof g?h:new Error(`Invalid JSON: ${e}`)}}return[e]}case"tostring":return typeof e=="string"?[e]:[JSON.stringify(e)];case"tonumber":if(typeof e=="number")return[e];if(typeof e=="string"){let o=Number(e);if(Number.isNaN(o))throw new Error(`${JSON.stringify(e)} cannot be parsed as a number`);return[o]}throw new Error(`${typeof e} cannot be parsed as a number`);case"toboolean":{if(typeof e=="boolean")return[e];if(typeof e=="string"){if(e==="true")return[!0];if(e==="false")return[!1];throw new Error(`string (${JSON.stringify(e)}) cannot be parsed as a boolean`)}let o=e===null?"null":Array.isArray(e)?"array":typeof e,h=o==="array"||o==="object"?JSON.stringify(e):String(e);throw new Error(`${o} (${h}) cannot be parsed as a boolean`)}case"tostream":{let o=[],h=r.limits.maxDepth??Ae,u=[{value:e,path:[]}],f=new WeakSet,i=0;for(;u.length>0;){let c=u.pop();if(!c)break;if(++i>r.limits.maxIterations)throw new g(`query iteration limit exceeded (${r.limits.maxIterations})`,"iterations");if(c.path.length>h)throw new g(`query depth limit exceeded (${h})`,"recursion");let p=c.value;if(p===null||typeof p!="object")ee(r,o.length),o.push([c.path,p]);else if(Array.isArray(p)){if(f.has(p))throw new g("cyclic value cannot be converted to a stream","recursion");if(f.add(p),p.length===0)ee(r,o.length),o.push([c.path,[]]);else{if(u.length>T(r)-p.length)throw new g(`query traversal queue limit exceeded (${T(r)})`,"array_elements");for(let a=p.length-1;a>=0;a--)u.push({value:p[a],path:[...c.path,a]})}}else{if(f.has(p))throw new g("cyclic value cannot be converted to a stream","recursion");f.add(p);let a=Object.keys(p);if(a.length===0)ee(r,o.length),o.push([c.path,Object.create(null)]);else{if(u.length>T(r)-a.length)throw new g(`query traversal queue limit exceeded (${T(r)})`,"array_elements");for(let l=a.length-1;l>=0;l--){let y=a[l];u.push({value:p[y],path:[...c.path,y]})}}}}return ee(r,o.length),o.push([[]]),o}case"fromstream":{if(t.length===0)return[e];let o=s(e,t[0],r);if(o.length>T(r))throw new g(`query stream item limit exceeded (${T(r)})`,"array_elements");let h=null,u=0;for(let f of o){if(!Array.isArray(f)||f.length===1&&Array.isArray(f[0])&&f[0].length===0||f.length!==2)continue;let[i,c]=f;if(!Array.isArray(i))continue;if(Ge(i,r),i.length===0){h=c;continue}h===null&&(h=typeof i[0]=="number"?[]:Object.create(null));let p=h;for(let l=0;l<i.length-1;l++){let y=i[l],m=i[l+1];if(Array.isArray(p)&&typeof y=="number"){let b=y+1-p.length;if(b>r.limits.maxIterations-u)throw new g(`query iteration limit exceeded (${r.limits.maxIterations})`,"iterations");for(u+=Math.max(0,b);p.length<=y;)p.push(null);p[y]===null&&(p[y]=typeof m=="number"?[]:Object.create(null)),p=p[y]}else{let b=S(p);if(b){let A=String(y);if(!k(A))continue;(b[A]===null||b[A]===void 0)&&E(b,A,typeof m=="number"?[]:Object.create(null)),p=b[A]}}}let a=i[i.length-1];if(Array.isArray(p)&&typeof a=="number"){let l=a+1-p.length;if(l>r.limits.maxIterations-u)throw new g(`query iteration limit exceeded (${r.limits.maxIterations})`,"iterations");for(u+=Math.max(0,l);p.length<=a;)p.push(null);p[a]=c}else{let l=S(p);if(l){let y=String(a);k(y)&&E(l,y,c)}}}return[h]}case"truncate_stream":{let o=typeof e=="number"?Math.floor(e):0;if(t.length===0)return[];let h=[],u=s(e,t[0],r);for(let f of u)if(Array.isArray(f)){if(f.length===1&&Array.isArray(f[0])){let i=f[0];i.length>o&&h.push([i.slice(o)]);continue}if(f.length===2&&Array.isArray(f[0])){let i=f[0],c=f[1];i.length>o&&h.push([i.slice(o),c])}}return h}default:return null}}function Le(e,n){if(!Array.isArray(e))throw new Error("path must be an array");let t=n.limits.maxDepth;if(e.length>t)throw new g(`query depth limit exceeded (${t})`,"recursion");let r=n.limits.maxArrayElements,s=0;for(let o of e)if(typeof o=="number"){if(!Number.isSafeInteger(o)||o<0||o>=r)throw new g(`query array index limit exceeded (${r})`,"array_elements");let h=o+1;if(s>r-h)throw new g(`query cumulative array allocation limit exceeded (${r})`,"array_elements");s+=h}else if(typeof o!="string")throw new Error("path components must be strings or integers");return R(n,s+e.length),e}function _e(e,n,t){let r=[],s=[{value:e,path:[],isRoot:!0}];for(;s.length>0;){let o=s.pop();if(!o)break;if(R(n),o.path.length>n.limits.maxDepth)throw new g(`query depth limit exceeded (${n.limits.maxDepth})`,"recursion");if(!(o.value!==null&&typeof o.value=="object")){(t||!o.isRoot)&&(D(n,r.length),r.push(o.path));continue}!t&&!o.isRoot&&(D(n,r.length),r.push(o.path));let u=Array.isArray(o.value)?o.value.map((f,i)=>[i,f]):Object.keys(o.value).map(f=>[f,o.value[f]]);D(n,r.length,s.length+u.length);for(let f=u.length-1;f>=0;f--){let[i,c]=u[f],p=[...o.path,i];s.push({value:c,path:p,isRoot:!1})}}return r}function Ee(e,n,t,r,s,o,h,u,f,i){switch(n){case"getpath":{if(t.length===0)return[null];let c=s(e,t[0],r),p=[];for(let a of c){let l=a,y=e;for(let m of l){if(y==null){y=null;break}if(Array.isArray(y)&&typeof m=="number")y=y[m];else if(typeof m=="string"){let b=S(y);if(!b||!Object.hasOwn(b,m)){y=null;break}y=b[m]}else{y=null;break}}p.push(y)}return p}case"setpath":{if(t.length<2)return[null];let c=s(e,t[0],r),p=Le(c[0],r),l=s(e,t[1],r)[0];return[h(e,p,l)]}case"delpaths":{if(t.length===0)return[e];let p=s(e,t[0],r)[0],a=e;for(let l of p.sort((y,m)=>m.length-y.length))a=u(a,l);return[a]}case"path":{if(t.length===0)return[[]];let c=[];return i(e,t[0],r,[],c),c}case"del":return t.length===0?[e]:[f(e,t[0],r)];case"pick":{if(t.length===0)return[null];let c=[];for(let a of t)i(e,a,r,[],c);let p=null;for(let a of c){for(let y of a)if(typeof y=="number"&&y<0)throw new Error("Out of bounds negative array index");Le(a,r);let l=e;for(let y of a){if(l==null)break;if(Array.isArray(l)&&typeof y=="number")l=l[y];else if(typeof y=="string"){let m=S(l);if(!m||!Object.hasOwn(m,y)){l=null;break}l=m[y]}else{l=null;break}}p=h(p,a,l)}return[p]}case"paths":{let c=_e(e,r,!1);return t.length>0?c.filter(p=>{let a=e;for(let y of p)if(Array.isArray(a)&&typeof y=="number")a=a[y];else if(typeof y=="string"){let m=S(a);if(!m||!Object.hasOwn(m,y))return!1;a=m[y]}else return!1;return s(a,t[0],r).some(o)}):c}case"leaf_paths":return _e(e,r,!0);default:return null}}function ke(e,n,t,r,s,o){switch(n){case"IN":{if(t.length===0)return[!1];if(t.length===1){let i=s(e,t[0],r);for(let c of i)if(o(e,c))return[!0];return[!1]}let h=s(e,t[0],r),u=s(e,t[1],r),f=new Set(u.map(i=>JSON.stringify(i)));for(let i of h)if(f.has(JSON.stringify(i)))return[!0];return[!1]}case"INDEX":{if(t.length===0)return[Object.create(null)];if(t.length===1){let f=s(e,t[0],r),i=Object.create(null);for(let c of f){let p=String(c);k(p)&&E(i,p,c)}return[i]}if(t.length===2){let f=s(e,t[0],r),i=Object.create(null);for(let c of f){let p=s(c,t[1],r);if(p.length>0){let a=String(p[0]);k(a)&&E(i,a,c)}}return[i]}let h=s(e,t[0],r),u=Object.create(null);for(let f of h){let i=s(f,t[1],r),c=s(f,t[2],r);if(i.length>0&&c.length>0){let p=String(i[0]);k(p)&&E(u,p,c[0])}}return[u]}case"JOIN":{if(t.length<2)return[null];let h=S(s(e,t[0],r)[0]);if(!h)return[null];if(!Array.isArray(e))return[null];let u=[];for(let f of e){let i=s(f,t[1],r),c=i.length>0?String(i[0]):"",p=$(h,c)?h[c]:null;u.push([f,p])}return[u]}default:return null}}function Be(e){return e.limits.maxArrayElements}function $e(e){return Math.min(e.limits.maxStringLength,e.limits.maxOutputSize)}function U(e,n){let t=Be(e);if(!Number.isSafeInteger(n)||n<0||n>t)throw new g(`query result element limit exceeded (${t})`,"array_elements")}function Ze(e,n,t){if(e==="")return n===""?0:1;if(n==="")return e.length;let r=1,s=0;for(;;){let o=e.indexOf(n,s);if(o<0||(r++,r>t))return r;s=o+n.length}}function Se(e,n,t,r,s){switch(n){case"join":{if(!Array.isArray(e))return[null];let o=t.length>0?s(e,t[0],r):[""];for(let h of e)if(Array.isArray(h)||h!==null&&typeof h=="object")throw new Error("cannot join: contains arrays or objects");return U(r,o.length),o.map(h=>{let u=String(h),f=0;for(let i=0;i<e.length;i++){let c=e[i]===null?"":typeof e[i]=="string"?e[i]:String(e[i]);if(f+=M(c),i>0&&(f+=M(u)),f>$e(r))throw new g(`query string size limit exceeded (${$e(r)} bytes)`,"string_length")}return e.map(i=>i===null?"":typeof i=="string"?i:String(i)).join(u)})}case"split":{if(typeof e!="string"||t.length===0)return[null];let o=s(e,t[0],r),h=String(o[0]);return U(r,Ze(e,h,Be(r))),[e.split(h)]}case"splits":{if(typeof e!="string"||t.length===0)return[];let o=s(e,t[0],r),h=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"g",f=j(h,u.includes("g")?u:`${u}g`),i=1;for(let p of f.matchAll(e))i+=Math.max(1,p.length),U(r,i);let c=f.split(e);return U(r,c.length),c}catch(u){if(u instanceof g)throw u;return[]}}case"scan":{if(typeof e!="string"||t.length===0)return[];let o=s(e,t[0],r),h=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"",f=j(h,u.includes("g")?u:`${u}g`),i=[];for(let c of f.matchAll(e))U(r,i.length+1),c.length>1?(U(r,c.length-1),i.push(c.slice(1))):i.push(c[0]);return i}catch(u){if(u instanceof g)throw u;return[]}}case"test":{if(typeof e!="string"||t.length===0)return[!1];let o=s(e,t[0],r),h=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"";return[j(h,u).test(e)]}catch{return[!1]}}case"match":{if(typeof e!="string"||t.length===0)return[null];let o=s(e,t[0],r),h=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"",i=j(h,`${u}d`).exec(e);if(!i)return[];let c=i.indices;return[{offset:i.index,length:i[0].length,string:i[0],captures:i.slice(1).map((p,a)=>({offset:c?.[a+1]?.[0]??null,length:p?.length??0,string:p??"",name:null}))}]}catch{return[null]}}case"capture":{if(typeof e!="string"||t.length===0)return[null];let o=s(e,t[0],r),h=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"",i=j(h,u).match(e);return!i||!i.groups?[Object.create(null)]:[i.groups]}catch{return[null]}}case"sub":{if(typeof e!="string"||t.length<2)return[null];let o=s(e,t[0],r),h=s(e,t[1],r),u=String(o[0]),f=String(h[0]);try{let i=t.length>2?String(s(e,t[2],r)[0]):"";return[j(u,i).replace(e,f)]}catch{return[e]}}case"gsub":{if(typeof e!="string"||t.length<2)return[null];let o=s(e,t[0],r),h=s(e,t[1],r),u=String(o[0]),f=String(h[0]);try{let i=t.length>2?String(s(e,t[2],r)[0]):"g",c=i.includes("g")?i:`${i}g`;return[j(u,c).replace(e,f)]}catch{return[e]}}case"ascii_downcase":return typeof e=="string"?[e.replace(/[A-Z]/g,o=>String.fromCharCode(o.charCodeAt(0)+32))]:[null];case"ascii_upcase":return typeof e=="string"?[e.replace(/[a-z]/g,o=>String.fromCharCode(o.charCodeAt(0)-32))]:[null];case"ltrimstr":{if(typeof e!="string"||t.length===0)return[e];let o=s(e,t[0],r),h=String(o[0]);return[e.startsWith(h)?e.slice(h.length):e]}case"rtrimstr":{if(typeof e!="string"||t.length===0)return[e];let o=s(e,t[0],r),h=String(o[0]);return h===""?[e]:[e.endsWith(h)?e.slice(0,-h.length):e]}case"trimstr":{if(typeof e!="string"||t.length===0)return[e];let o=s(e,t[0],r),h=String(o[0]);if(h==="")return[e];let u=e;return u.startsWith(h)&&(u=u.slice(h.length)),u.endsWith(h)&&(u=u.slice(0,-h.length)),[u]}case"trim":if(typeof e=="string")return[e.trim()];throw new Error("trim input must be a string");case"ltrim":if(typeof e=="string")return[e.trimStart()];throw new Error("trim input must be a string");case"rtrim":if(typeof e=="string")return[e.trimEnd()];throw new Error("trim input must be a string");case"startswith":{if(typeof e!="string"||t.length===0)return[!1];let o=s(e,t[0],r);return[e.startsWith(String(o[0]))]}case"endswith":{if(typeof e!="string"||t.length===0)return[!1];let o=s(e,t[0],r);return[e.endsWith(String(o[0]))]}case"ascii":return typeof e=="string"&&e.length>0?[e.charCodeAt(0)]:[null];case"explode":if(typeof e=="string"){let o=0;for(let h of e)o++,U(r,o);return[Array.from(e).map(h=>h.codePointAt(0))]}return[null];case"implode":if(!Array.isArray(e))throw new Error("implode input must be an array");return[e.map(u=>{if(typeof u=="string")throw new Error(`string (${JSON.stringify(u)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof u!="number"||Number.isNaN(u))throw new Error("number (null) can't be imploded, unicode codepoint needs to be numeric");let f=Math.trunc(u);return f<0||f>1114111||f>=55296&&f<=57343?String.fromCodePoint(65533):String.fromCodePoint(f)}).join("")];default:return null}}function Oe(e,n){switch(n){case"type":return e===null?["null"]:Array.isArray(e)?["array"]:typeof e=="boolean"?["boolean"]:typeof e=="number"?["number"]:typeof e=="string"?["string"]:typeof e=="object"?["object"]:["null"];case"infinite":return[Number.POSITIVE_INFINITY];case"nan":return[Number.NaN];case"isinfinite":return[typeof e=="number"&&!Number.isFinite(e)];case"isnan":return[typeof e=="number"&&Number.isNaN(e)];case"isnormal":return[typeof e=="number"&&Number.isFinite(e)&&e!==0];case"isfinite":return[typeof e=="number"&&Number.isFinite(e)];case"numbers":return typeof e=="number"?[e]:[];case"strings":return typeof e=="string"?[e]:[];case"booleans":return typeof e=="boolean"?[e]:[];case"nulls":return e===null?[e]:[];case"arrays":return Array.isArray(e)?[e]:[];case"objects":return e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"iterables":return Array.isArray(e)||e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"scalars":return!Array.isArray(e)&&!(e&&typeof e=="object")?[e]:[];case"values":return e===null?[]:[e];case"not":return e===!1||e===null?[!0]:[!1];case"null":return[null];case"true":return[!0];case"false":return[!1];case"empty":return[];default:return null}}function te(e,n,t){if(n.length===0)return t;let[r,...s]=n;if(typeof r=="number"){if(e&&typeof e=="object"&&!Array.isArray(e))throw new Error("Cannot index object with number");if(r>536870911)throw new Error("Array index too large");if(r<0)throw new Error("Out of bounds negative array index");let i=Array.isArray(e)?[...e]:[];for(;i.length<=r;)i.push(null);return i[r]=te(i[r],s,t),i}if(Array.isArray(e))throw new Error("Cannot index array with string");if(!k(r))return e??Object.create(null);let o=S(e),h=o?C(o):Object.create(null),u=Object.hasOwn(h,r)?h[r]:void 0;return E(h,r,te(u,s,t)),h}function re(e,n){if(n.length===0)return null;if(n.length===1){let s=n[0];if(Array.isArray(e)&&typeof s=="number"){let o=[...e];return o.splice(s,1),o}if(e&&typeof e=="object"&&!Array.isArray(e)){let o=String(s);if(!k(o))return e;let h=C(e);return delete h[o],h}return e}let[t,...r]=n;if(Array.isArray(e)&&typeof t=="number"){let s=[...e];return s[t]=re(s[t],r),s}if(e&&typeof e=="object"&&!Array.isArray(e)){let s=String(t);if(!k(s))return e;let o=C(e);return Object.hasOwn(o,s)&&E(o,s,re(o[s],r)),o}return e}var Q=class e extends Error{label;partialResults;constructor(n,t=[]){super(`break ${n}`),this.label=n,this.partialResults=t,this.name="BreakError"}withPrependedResults(n){return new e(this.label,[...n,...this.partialResults])}},ie=class extends Error{value;constructor(n){super(typeof n=="string"?n:JSON.stringify(n)),this.value=n,this.name="JqError"}},ve=1e4,Ue=10*1024*1024,Ke=2e3,et=new Map([["floor",Math.floor],["ceil",Math.ceil],["round",Math.round],["sqrt",Math.sqrt],["log",Math.log],["log10",Math.log10],["log2",Math.log2],["exp",Math.exp],["sin",Math.sin],["cos",Math.cos],["tan",Math.tan],["asin",Math.asin],["acos",Math.acos],["atan",Math.atan],["sinh",Math.sinh],["cosh",Math.cosh],["tanh",Math.tanh],["asinh",Math.asinh],["acosh",Math.acosh],["atanh",Math.atanh],["cbrt",Math.cbrt],["expm1",Math.expm1],["log1p",Math.log1p],["trunc",Math.trunc]]);function F(e,n){return new g(e,n)}function R(e,n=1){if(!Number.isSafeInteger(n)||n<0||e.budget.operations>e.limits.maxIterations-n)throw F(`query evaluation: too many iterations (${e.limits.maxIterations})`,"iterations");e.budget.operations+=n}function D(e,n,t=1){let r=e.limits.maxArrayElements;if(!Number.isSafeInteger(n)||!Number.isSafeInteger(t)||n<0||t<0||n>r-t)throw F(`query result element limit exceeded (${r})`,"array_elements")}function q(e,n,t){D(e,n.length,t.length);for(let r of t)n.push(r)}function x(e,n,t){let r=[];for(let s of n){R(e);let o=t(s);q(e,r,o)}return r}function tt(e){return{vars:new Map,limits:{maxIterations:e?.limits?.maxIterations??ve,maxDepth:e?.limits?.maxDepth??Ke,maxStringLength:e?.limits?.maxStringLength??Ue,maxOutputSize:e?.limits?.maxOutputSize??Ue,maxArrayElements:e?.limits?.maxArrayElements??1e5},env:e?.env,coverage:e?.coverage,requireDefenseContext:e?.requireDefenseContext,defenseContextChecked:!1,budget:e?.budget??{operations:0,callDepth:0}}}function se(e,n,t){let r=new Map(e.vars);return r.set(n,t),{vars:r,limits:e.limits,env:e.env,requireDefenseContext:e.requireDefenseContext,defenseContextChecked:e.defenseContextChecked,root:e.root,currentPath:e.currentPath,funcs:e.funcs,labels:e.labels,coverage:e.coverage,budget:e.budget}}function W(e,n,t){switch(n.type){case"var":return se(e,n.name,t);case"array":{if(!Array.isArray(t))return null;let r=e;for(let s=0;s<n.elements.length;s++){let o=n.elements[s],h=s<t.length?t[s]:null,u=W(r,o,h);if(u===null)return null;r=u}return r}case"object":{let r=S(t);if(!r)return null;let s=e;for(let o of n.fields){let h;if(typeof o.key=="string")h=o.key;else{let i=d(t,o.key,e);if(i.length===0)return null;h=String(i[0])}let u=$(r,h)?r[h]:null;o.keyVar&&(s=se(s,o.keyVar,u));let f=W(s,o.pattern,u);if(f===null)return null;s=f}return s}}}function rt(e,n){let t=e;for(let r of n)if(t&&typeof t=="object")if(Array.isArray(t))if(typeof r=="number")t=t[r];else return;else{let s=S(t);if(s&&typeof r=="string"&&Object.hasOwn(s,r))t=s[r];else return}else return;return t}function P(e){if(e.type==="Identity")return[];if(e.type==="Field"){let n=e.base?P(e.base):[];return n===null?null:[...n,e.name]}if(e.type==="Index"&&e.index.type==="Literal"){let n=e.base?P(e.base):[];if(n===null)return null;let t=e.index.value;return typeof t=="number"||typeof t=="string"?[...n,t]:null}if(e.type==="Pipe"){let n=P(e.left);return n===null?null:Ne(n,e.right)}if(e.type==="Call"){if(e.name==="parent"||e.name==="root")return null;if(e.name==="first"&&e.args.length===0)return[0];if(e.name==="last"&&e.args.length===0)return[-1]}return null}function Ne(e,n){if(n.type==="Call"){if(n.name==="parent"){let t=1;if(n.args.length>0&&n.args[0].type==="Literal"){let r=n.args[0].value;typeof r=="number"&&(t=r)}if(t>=0)return e.slice(0,Math.max(0,e.length-t));{let r=-t-1;return e.slice(0,Math.min(r,e.length))}}if(n.name==="root")return[]}if(n.type==="Field"){let t=P(n);if(t!==null)return[...e,...t]}if(n.type==="Index"&&n.index.type==="Literal"){let t=P(n);if(t!==null)return[...e,...t]}if(n.type==="Pipe"){let t=Ne(e,n.left);return t===null?null:Ne(t,n.right)}return n.type==="Identity"?e:null}function qe(e,n,t){if(n.type==="Comma"){let r=[];try{let s=d(e,n.left,t);q(t,r,s)}catch(s){if(s instanceof g)throw s;if(r.length>0)return r;throw new Error("evaluation failed")}try{let s=d(e,n.right,t);q(t,r,s)}catch(s){if(s instanceof g)throw s;return r}return r}return d(e,n,t)}function d(e,n,t){let r=t&&"vars"in t?t:tt(t);if(r.defenseContextChecked||(Ie(r.requireDefenseContext,"query-engine","evaluation"),r={...r,defenseContextChecked:!0}),r.root===void 0&&(r={...r,root:e,currentPath:[]}),R(r),r.budget.callDepth++,r.budget.callDepth>r.limits.maxDepth)throw r.budget.callDepth--,F(`query depth limit exceeded (${r.limits.maxDepth})`,"recursion");try{let s=nt(e,n,r);return D(r,0,s.length),s}finally{r.budget.callDepth--}}function nt(e,n,t){switch(t.coverage?.hit(`jq:node:${n.type}`),n.type){case"Identity":return[e];case"Field":{let r=n.base?d(e,n.base,t):[e];return x(t,r,s=>{let o=S(s);if(o){if(!Object.hasOwn(o,n.name))return[null];let u=o[n.name];return[u===void 0?null:u]}if(s===null)return[null];let h=Array.isArray(s)?"array":typeof s;throw new Error(`Cannot index ${h} with string "${n.name}"`)})}case"Index":{let r=n.base?d(e,n.base,t):[e];return x(t,r,s=>{let o=d(s,n.index,t);return x(t,o,h=>{if(typeof h=="number"&&Array.isArray(s)){if(Number.isNaN(h))return[null];let u=Math.trunc(h),f=u<0?s.length+u:u;return f>=0&&f<s.length?[s[f]]:[null]}if(typeof h=="string"){let u=S(s);return!u||!Object.hasOwn(u,h)?[null]:[u[h]]}return[null]})})}case"Slice":{let r=n.base?d(e,n.base,t):[e];return x(t,r,s=>{if(s===null)return[null];if(!Array.isArray(s)&&typeof s!="string")throw new Error(`Cannot slice ${typeof s} (${JSON.stringify(s)})`);let o=s.length,h=n.start?d(e,n.start,t):[0],u=n.end?d(e,n.end,t):[o];return D(t,0,h.length*u.length),x(t,h,f=>u.map(i=>{let c=f,p=i,a=Number.isNaN(c)?0:Number.isInteger(c)?c:Math.floor(c),l=Number.isNaN(p)?o:Number.isInteger(p)?p:Math.ceil(p),y=Fe(a,o),m=Fe(l,o);return Array.isArray(s),s.slice(y,m)}))})}case"Iterate":{let r=n.base?d(e,n.base,t):[e];return x(t,r,s=>Array.isArray(s)?s:s&&typeof s=="object"?Object.values(s):[])}case"Pipe":{let r=d(e,n.left,t),s=P(n.left),o=[];for(let h of r)try{if(s!==null){let u={...t,currentPath:[...t.currentPath??[],...s]},f=d(h,n.right,u);q(t,o,f)}else{let u=d(h,n.right,t);q(t,o,u)}}catch(u){throw u instanceof Q?u.withPrependedResults(o):u}return o}case"Comma":{let r=d(e,n.left,t),s=d(e,n.right,t);return D(t,r.length,s.length),[...r,...s]}case"Literal":return[n.value];case"Array":return n.elements?[d(e,n.elements,t)]:[[]];case"Object":{let r=[Object.create(null)];for(let s of n.entries){let o=typeof s.key=="string"?[s.key]:d(e,s.key,t),h=d(e,s.value,t),u=[],f=o.filter(p=>typeof p=="string"&&k(p)).length,i=f+(o.length-f),c=r.length*i*h.length;D(t,0,c);for(let p of r)for(let a of o){if(typeof a!="string"){let l=a===null?"null":Array.isArray(a)?"array":typeof a;throw new Error(`Cannot use ${l} (${JSON.stringify(a)}) as object key`)}if(!k(a)){for(let l of h)u.push(C(p));continue}for(let l of h){let y=C(p);E(y,a,l),u.push(y)}}r.length=0,q(t,r,u)}return r}case"Paren":return d(e,n.expr,t);case"BinaryOp":return ot(e,n.op,n.left,n.right,t);case"UnaryOp":return d(e,n.operand,t).map(s=>{if(n.op==="-"){if(typeof s=="number")return-s;if(typeof s=="string"){let o=h=>h.length>5?`"${h.slice(0,3)}...`:JSON.stringify(h);throw new Error(`string (${o(s)}) cannot be negated`)}return null}return n.op==="not"?!I(s):null});case"Cond":{let r=d(e,n.cond,t);return x(t,r,s=>{if(I(s))return d(e,n.then,t);for(let o of n.elifs)if(d(e,o.cond,t).some(I))return d(e,o.then,t);return n.else?d(e,n.else,t):[e]})}case"Try":try{return d(e,n.body,t)}catch(r){if(r instanceof g)throw r;if(n.catch){let s=r instanceof ie?r.value:r instanceof Error?r.message:String(r);return d(s,n.catch,t)}return[]}case"Call":return Je(e,n.name,n.args,t);case"VarBind":{let r=d(e,n.value,t);return x(t,r,s=>{let o=null,h=[];if(n.pattern?h.push(n.pattern):n.name&&h.push({type:"var",name:n.name}),n.alternatives)for(let u of n.alternatives)h.push(u);for(let u of h)if(o=W(t,u,s),o!==null)break;return o===null?[]:d(e,n.body,o)})}case"VarRef":{if(n.name==="$ENV")return[t.env?ue(t.env):Object.create(null)];let r=t.vars.get(n.name);return r!==void 0?[r]:[null]}case"Recurse":{let r=[],s=new WeakSet,o=[{val:e,depth:0}];for(;o.length>0;){let h=o.pop();if(!h)break;let{val:u,depth:f}=h;if(R(t),f>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");if(u&&typeof u=="object"){if(s.has(u))continue;s.add(u)}if(D(t,r.length),r.push(u),Array.isArray(u))for(let i=u.length-1;i>=0;i--)o.push({val:u[i],depth:f+1});else if(u&&typeof u=="object"){let i=Object.keys(u);for(let c=i.length-1;c>=0;c--)o.push({val:u[i[c]],depth:f+1})}}return r}case"Optional":try{return d(e,n.expr,t)}catch(r){if(r instanceof g)throw r;return[]}case"StringInterp":{let r=new G(t.limits.maxStringLength,"query string interpolation",()=>new g(`string size limit exceeded (${t.limits.maxStringLength} bytes)`,"string_length"));for(let s of n.parts){if(typeof s=="string"){r.append(s);continue}let o=d(e,s,t);for(let h of o){if(R(t),B(h,t.limits.maxDepth+1)>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");r.append(typeof h=="string"?h:JSON.stringify(h))}}return[r.build()]}case"UpdateOp":return[it(e,n.path,n.op,n.value,t)];case"Reduce":{let r=d(e,n.expr,t),s=d(e,n.init,t)[0],o=t.limits.maxDepth??Ke;for(let h of r){let u;if(n.pattern){if(u=W(t,n.pattern,h),u===null)continue}else u=se(t,n.varName,h);if(s=d(s,n.update,u)[0],B(s,o+1)>o)return[null]}return[s]}case"Foreach":{let r=d(e,n.expr,t),s=d(e,n.init,t)[0],o=[];for(let h of r)try{let u;if(n.pattern){if(u=W(t,n.pattern,h),u===null)continue}else u=se(t,n.varName,h);if(s=d(s,n.update,u)[0],n.extract){let f=d(s,n.extract,u);q(t,o,f)}else D(t,o.length),o.push(s)}catch(u){throw u instanceof Q?u.withPrependedResults(o):u}return o}case"Label":try{return d(e,n.body,{...t,labels:new Set([...t.labels??[],n.name])})}catch(r){if(r instanceof Q&&r.label===n.name)return r.partialResults;throw r}case"Break":throw new Q(n.name);case"Def":{let r=new Map(t.funcs??[]),s=`${n.name}/${n.params.length}`;r.set(s,{params:n.params,body:n.funcBody,closure:new Map(t.funcs??[])});let o={...t,funcs:r};return d(e,n.body,o)}default:{let r=n;throw new Error(`Unknown AST node type: ${r.type}`)}}}function Fe(e,n){return e<0?Math.max(0,n+e):Math.min(e,n)}function it(e,n,t,r,s){function o(f,i){switch(t){case"=":return i;case"|=":return d(f,r,s)[0]??null;case"+=":return typeof f=="number"&&typeof i=="number"||typeof f=="string"&&typeof i=="string"?f+i:Array.isArray(f)&&Array.isArray(i)?(D(s,f.length,i.length),[...f,...i]):f&&i&&typeof f=="object"&&typeof i=="object"?ce(f,i):i;case"-=":return typeof f=="number"&&typeof i=="number"?f-i:f;case"*=":return typeof f=="number"&&typeof i=="number"?f*i:f;case"/=":return typeof f=="number"&&typeof i=="number"?f/i:f;case"%=":return typeof f=="number"&&typeof i=="number"?f%i:f;case"//=":return f===null||f===!1?i:f;default:return i}}function h(f,i,c){switch(i.type){case"Identity":return c(f);case"Field":{if(!k(i.name))return f;if(i.base)return h(f,i.base,p=>{if(p&&typeof p=="object"&&!Array.isArray(p)){let a=C(p),l=Object.hasOwn(a,i.name)?a[i.name]:void 0;return E(a,i.name,c(l)),a}return p});if(f&&typeof f=="object"&&!Array.isArray(f)){let p=C(f),a=Object.hasOwn(p,i.name)?p[i.name]:void 0;return E(p,i.name,c(a)),p}return f}case"Index":{let a=d(e,i.index,s)[0];if(typeof a=="number"&&Number.isNaN(a))throw new Error("Cannot set array element at NaN index");if(typeof a=="number"&&!Number.isFinite(a))throw new Error("array index must be finite");if(typeof a=="number"&&!Number.isInteger(a)&&(a=Math.trunc(a)),i.base)return h(f,i.base,l=>{if(typeof a=="number"&&Array.isArray(l)){let y=[...l],m=a<0?y.length+a:a;if(m>=0){D(s,0,m+1),y.length<=m&&(y.length=m+1);for(let b=l.length;b<m;b++)y[b]=null;y[m]=c(y[m])}return y}if(typeof a=="string"&&l&&typeof l=="object"&&!Array.isArray(l)){if(!k(a))return l;let y=C(l),m=Object.hasOwn(y,a)?y[a]:void 0;return E(y,a,c(m)),y}return l});if(typeof a=="number"){if(!Number.isSafeInteger(a)||a>536870911)throw new Error("Array index too large");if(a<0&&(!f||!Array.isArray(f)))throw new Error("Out of bounds negative array index");if(Array.isArray(f)){let y=[...f],m=a<0?y.length+a:a;if(m>=0){D(s,0,m+1),y.length<=m&&(y.length=m+1);for(let b=f.length;b<m;b++)y[b]=null;y[m]=c(y[m])}return y}if(f==null){D(s,0,a+1);let y=new Array(a+1).fill(null);return y[a]=c(null),y}return f}if(typeof a=="string"&&f&&typeof f=="object"&&!Array.isArray(f)){if(!k(a))return f;let l=C(f),y=Object.hasOwn(l,a)?l[a]:void 0;return E(l,a,c(y)),l}return f}case"Iterate":{let p=a=>{if(Array.isArray(a)){D(s,0,a.length);let l=[];for(let y of a)R(s),l.push(c(y));return l}if(a&&typeof a=="object"){let l=Object.create(null);for(let[y,m]of Object.entries(a))k(y)&&E(l,y,c(m));return l}return a};return i.base?h(f,i.base,p):p(f)}case"Pipe":{let p=h(f,i.left,a=>a);return h(p,i.right,c)}default:return c(f)}}return h(e,n,f=>{if(t==="|=")return o(f,f);let i=d(e,r,s);return o(f,i[0]??null)})}function st(e,n,t){function r(o,h,u){switch(h.type){case"Identity":return u;case"Field":{if(!k(h.name))return o;if(h.base){let f=d(o,h.base,t)[0],i=r(f,{type:"Field",name:h.name},u);return r(o,h.base,i)}if(o&&typeof o=="object"&&!Array.isArray(o)){let f=C(o);return E(f,h.name,u),f}return o}case"Index":{if(h.base){let c=d(o,h.base,t)[0],p=r(c,{type:"Index",index:h.index},u);return r(o,h.base,p)}let i=d(e,h.index,t)[0];if(typeof i=="number"&&Array.isArray(o)){let c=[...o],p=i<0?c.length+i:i;return p>=0&&p<c.length&&(c[p]=u),c}if(typeof i=="string"&&o&&typeof o=="object"&&!Array.isArray(o)){if(!k(i))return o;let c=C(o);return E(c,i,u),c}return o}default:return o}}function s(o,h){switch(h.type){case"Identity":return null;case"Field":{if(!k(h.name))return o;if(h.base){let f=d(o,h.base,t)[0];if(f==null)return o;let i=s(f,{type:"Field",name:h.name});return r(o,h.base,i)}if(o&&typeof o=="object"&&!Array.isArray(o)){if(!k(h.name))return o;let f=C(o);return delete f[h.name],f}return o}case"Index":{if(h.base){let c=d(o,h.base,t)[0];if(c==null)return o;let p=s(c,{type:"Index",index:h.index});return r(o,h.base,p)}let i=d(e,h.index,t)[0];if(typeof i=="number"&&Array.isArray(o)){let c=[...o],p=i<0?c.length+i:i;return p>=0&&p<c.length&&c.splice(p,1),c}if(typeof i=="string"&&o&&typeof o=="object"&&!Array.isArray(o)){if(!k(i))return o;let c=C(o);return delete c[i],c}return o}case"Iterate":return Array.isArray(o)?[]:o&&typeof o=="object"?Object.create(null):o;case"Pipe":{let c=function(l,y,m){switch(y.type){case"Identity":return m;case"Field":{if(!k(y.name))return l;if(l&&typeof l=="object"&&!Array.isArray(l)){let b=C(l);return E(b,y.name,m),b}return l}case"Index":{let A=d(e,y.index,t)[0];if(typeof A=="number"&&Array.isArray(l)){let w=[...l],N=A<0?w.length+A:A;return N>=0&&N<w.length&&(w[N]=m),w}if(typeof A=="string"&&l&&typeof l=="object"&&!Array.isArray(l)){if(!k(A))return l;let w=C(l);return E(w,A,m),w}return l}case"Pipe":{let b=d(l,y.left,t)[0],A=c(b,y.right,m);return c(l,y.left,A)}default:return l}};var u=c;let f=h.left,i=h.right,p=d(o,f,t)[0];if(p==null)return o;let a=s(p,i);return c(o,f,a)}default:return o}}return s(e,n)}function ot(e,n,t,r,s){if(n==="and"){let f=d(e,t,s);return x(s,f,i=>{if(!I(i))return[!1];let c=d(e,r,s);return x(s,c,p=>[I(p)])})}if(n==="or"){let f=d(e,t,s);return x(s,f,i=>{if(I(i))return[!0];let c=d(e,r,s);return x(s,c,p=>[I(p)])})}if(n==="//"){let i=d(e,t,s).filter(c=>c!=null&&c!==!1);return i.length>0?i:d(e,r,s)}let o=d(e,t,s),h=d(e,r,s),u=o.length*h.length;return D(s,0,u),R(s,u),o.flatMap(f=>h.map(i=>{switch(n){case"+":if(f===null)return i;if(i===null)return f;if(typeof f=="number"&&typeof i=="number")return f+i;if(typeof f=="string"&&typeof i=="string"){let c=s.limits.maxStringLength;if(M(f)+M(i)>c)throw new g(`string size limit exceeded (${c} bytes)`,"string_length");return f+i}return Array.isArray(f)&&Array.isArray(i)?(D(s,f.length,i.length),[...f,...i]):f&&i&&typeof f=="object"&&typeof i=="object"&&!Array.isArray(f)&&!Array.isArray(i)?ce(f,i):null;case"-":if(typeof f=="number"&&typeof i=="number")return f-i;if(Array.isArray(f)&&Array.isArray(i)){let c=new Set(i.map(p=>JSON.stringify(p)));return f.filter(p=>!c.has(JSON.stringify(p)))}if(typeof f=="string"&&typeof i=="string"){let c=p=>p.length>10?`"${p.slice(0,10)}...`:JSON.stringify(p);throw new Error(`string (${c(f)}) and string (${c(i)}) cannot be subtracted`)}return null;case"*":if(typeof f=="number"&&typeof i=="number")return f*i;if(typeof f=="string"&&typeof i=="number"){if(!Number.isFinite(i))throw new Error(`invalid string repetition count: ${i}`);let c=Math.trunc(i);if(c<0)return null;let p=M(f),a=s.limits.maxStringLength;if(p>0&&c>Math.floor(a/p))throw new g(`string size limit exceeded (${a} bytes)`,"string_length");return f.repeat(c)}{let c=S(f),p=S(i);if(c&&p)return Me(c,p,{maxDepth:s.limits.maxDepth,visit:()=>R(s)})}return null;case"/":if(typeof f=="number"&&typeof i=="number"){if(i===0)throw new Error(`number (${f}) and number (${i}) cannot be divided because the divisor is zero`);return f/i}return typeof f=="string"&&typeof i=="string"?f.split(i):null;case"%":if(typeof f=="number"&&typeof i=="number"){if(i===0)throw new Error(`number (${f}) and number (${i}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(f)&&!Number.isNaN(f)?!Number.isFinite(i)&&!Number.isNaN(i)&&f<0&&i>0?-1:0:f%i}return null;case"==":return J(f,i);case"!=":return!J(f,i);case"<":return Y(f,i)<0;case"<=":return Y(f,i)<=0;case">":return Y(f,i)>0;case">=":return Y(f,i)>=0;default:return null}}))}function Je(e,n,t,r){let s=et.get(n);if(s)return typeof e=="number"?[s(e)]:[null];let o=de(e,n,t,r,d);if(o!==null)return o;let h=Se(e,n,t,r,d);if(h!==null)return h;let u=le(e,n,t,r,d);if(u!==null)return u;let f=ye(e,n,r.limits.maxDepth);if(f!==null)return f;let i=Oe(e,n);if(i!==null)return i;let c=we(e,n,t,r,d);if(c!==null)return c;let p=he(e,n,t,r,d,qe,Z,I,v,g);if(p!==null)return p;let a=Ee(e,n,t,r,d,I,te,re,st,ne);if(a!==null)return a;let l=me(e,n,t,r,d,J);if(l!==null)return l;let y=pe(e,n,t,r,d,qe,I,g);if(y!==null)return y;let m=be(e,n,t,r,d,I,rt,Je);if(m!==null)return m;let b=ke(e,n,t,r,d,J);if(b!==null)return b;switch(n){case"builtins":return[["add/0","all/0","all/1","all/2","any/0","any/1","any/2","arrays/0","ascii/0","ascii_downcase/0","ascii_upcase/0","booleans/0","bsearch/1","builtins/0","combinations/0","combinations/1","contains/1","debug/0","del/1","delpaths/1","empty/0","env/0","error/0","error/1","explode/0","first/0","first/1","flatten/0","flatten/1","floor/0","from_entries/0","fromdate/0","fromjson/0","getpath/1","gmtime/0","group_by/1","gsub/2","gsub/3","has/1","implode/0","IN/1","IN/2","INDEX/1","INDEX/2","index/1","indices/1","infinite/0","inside/1","isempty/1","isnan/0","isnormal/0","isvalid/1","iterables/0","join/1","keys/0","keys_unsorted/0","last/0","last/1","length/0","limit/2","ltrimstr/1","map/1","map_values/1","match/1","match/2","max/0","max_by/1","min/0","min_by/1","mktime/0","modulemeta/1","nan/0","not/0","nth/1","nth/2","null/0","nulls/0","numbers/0","objects/0","path/1","paths/0","paths/1","pick/1","range/1","range/2","range/3","recurse/0","recurse/1","recurse_down/0","repeat/1","reverse/0","rindex/1","rtrimstr/1","scalars/0","scan/1","scan/2","select/1","setpath/2","skip/2","sort/0","sort_by/1","split/1","splits/1","splits/2","sqrt/0","startswith/1","strftime/1","strings/0","strptime/1","sub/2","sub/3","test/1","test/2","to_entries/0","toboolean/0","todate/0","tojson/0","tostream/0","fromstream/1","truncate_stream/1","tonumber/0","tostring/0","transpose/0","trim/0","ltrim/0","rtrim/0","type/0","unique/0","unique_by/1","until/2","utf8bytelength/0","values/0","walk/1","while/2","with_entries/1"]];case"error":{let A=t.length>0?d(e,t[0],r)[0]:e;throw new ie(A)}case"env":return[r.env?ue(r.env):Object.create(null)];case"debug":return[e];case"input_line_number":return[1];default:{let A=`${n}/${t.length}`,w=r.funcs?.get(A);if(w){let N=w.closure??r.funcs??new Map,O=new Map(N);O.set(A,w);for(let X=0;X<w.params.length;X++){let Ye=w.params[X],Re=t[X];if(Re){let _=d(e,Re,r),K;if(_.length===0)K={type:"Call",name:"empty",args:[]};else if(_.length===1)K={type:"Literal",value:_[0]};else{K={type:"Literal",value:_[_.length-1]};for(let fe=_.length-2;fe>=0;fe--)K={type:"Comma",left:{type:"Literal",value:_[fe]},right:K}}O.set(`${Ye}/0`,{params:[],body:K})}}let L={...r,funcs:O};return d(e,w.body,L)}throw new Error(`Unknown function: ${n}`)}}}function ne(e,n,t,r,s){if(R(t),r.length>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");let o=f=>{if(f.length>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");D(t,s.length),s.push(f)};if(n.type==="Comma"){let f=n;ne(e,f.left,t,r,s),ne(e,f.right,t,r,s);return}let h=P(n);if(h!==null){o([...r,...h]);return}if(n.type==="Iterate"){if(Array.isArray(e))for(let f=0;f<e.length;f++)R(t),o([...r,f]);else if(e&&typeof e=="object")for(let f of Object.keys(e))R(t),o([...r,f]);return}if(n.type==="Recurse"){let f=[{value:e,path:[]}];for(;f.length>0;){let i=f.pop();if(!i)break;if(R(t),o([...r,...i.path]),i.value&&typeof i.value=="object"){let c=Array.isArray(i.value)?i.value.map((p,a)=>[a,p]):Object.keys(i.value).map(p=>[p,i.value[p]]);D(t,0,f.length+c.length);for(let p=c.length-1;p>=0;p--){let[a,l]=c[p];f.push({value:l,path:[...i.path,a]})}}}return}if(n.type==="Pipe"){let f=P(n.left);if(f!==null){let i=d(e,n.left,t);for(let c of i)ne(c,n.right,t,[...r,...f],s);return}}d(e,n,t).length>0&&o(r)}var Ve=new Map([["and","AND"],["or","OR"],["not","NOT"],["if","IF"],["then","THEN"],["elif","ELIF"],["else","ELSE"],["end","END"],["as","AS"],["try","TRY"],["catch","CATCH"],["true","TRUE"],["false","FALSE"],["null","NULL"],["reduce","REDUCE"],["foreach","FOREACH"],["label","LABEL"],["break","BREAK"],["def","DEF"]]),oe=new Set(Ve.values());function He(e){let n=[],t=0,r=(i=0)=>e[t+i],s=()=>e[t++],o=()=>t>=e.length,h=i=>i>="0"&&i<="9",u=i=>i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="_",f=i=>u(i)||h(i);for(;!o();){let i=t,c=s();if(!(c===" "||c===" "||c===`
5
+ `||c==="\r")){if(c==="#"){for(;!o()&&r()!==`
6
+ `;)s();continue}if(c==="."&&r()==="."){s(),n.push({type:"DOTDOT",pos:i});continue}if(c==="="&&r()==="="){s(),n.push({type:"EQ",pos:i});continue}if(c==="!"&&r()==="="){s(),n.push({type:"NE",pos:i});continue}if(c==="<"&&r()==="="){s(),n.push({type:"LE",pos:i});continue}if(c===">"&&r()==="="){s(),n.push({type:"GE",pos:i});continue}if(c==="/"&&r()==="/"){s(),r()==="="?(s(),n.push({type:"UPDATE_ALT",pos:i})):n.push({type:"ALT",pos:i});continue}if(c==="+"&&r()==="="){s(),n.push({type:"UPDATE_ADD",pos:i});continue}if(c==="-"&&r()==="="){s(),n.push({type:"UPDATE_SUB",pos:i});continue}if(c==="*"&&r()==="="){s(),n.push({type:"UPDATE_MUL",pos:i});continue}if(c==="/"&&r()==="="){s(),n.push({type:"UPDATE_DIV",pos:i});continue}if(c==="%"&&r()==="="){s(),n.push({type:"UPDATE_MOD",pos:i});continue}if(c==="="&&r()!=="="){n.push({type:"ASSIGN",pos:i});continue}if(c==="."){n.push({type:"DOT",pos:i});continue}if(c==="|"){r()==="="?(s(),n.push({type:"UPDATE_PIPE",pos:i})):n.push({type:"PIPE",pos:i});continue}if(c===","){n.push({type:"COMMA",pos:i});continue}if(c===":"){n.push({type:"COLON",pos:i});continue}if(c===";"){n.push({type:"SEMICOLON",pos:i});continue}if(c==="("){n.push({type:"LPAREN",pos:i});continue}if(c===")"){n.push({type:"RPAREN",pos:i});continue}if(c==="["){n.push({type:"LBRACKET",pos:i});continue}if(c==="]"){n.push({type:"RBRACKET",pos:i});continue}if(c==="{"){n.push({type:"LBRACE",pos:i});continue}if(c==="}"){n.push({type:"RBRACE",pos:i});continue}if(c==="?"){n.push({type:"QUESTION",pos:i});continue}if(c==="+"){n.push({type:"PLUS",pos:i});continue}if(c==="-"){n.push({type:"MINUS",pos:i});continue}if(c==="*"){n.push({type:"STAR",pos:i});continue}if(c==="/"){n.push({type:"SLASH",pos:i});continue}if(c==="%"){n.push({type:"PERCENT",pos:i});continue}if(c==="<"){n.push({type:"LT",pos:i});continue}if(c===">"){n.push({type:"GT",pos:i});continue}if(h(c)){let p=c;for(;!o()&&(h(r())||r()==="."||r()==="e"||r()==="E");)(r()==="e"||r()==="E")&&(e[t+1]==="+"||e[t+1]==="-")&&(p+=s()),p+=s();n.push({type:"NUMBER",value:Number(p),pos:i});continue}if(c==='"'){let p="",a=0;for(;!o();){let l=r();if(a===0&&l==='"')break;if(a===0&&l==="\\"){if(s(),o())break;let y=s();switch(y){case"n":p+=`
7
+ `;break;case"r":p+="\r";break;case"t":p+=" ";break;case"\\":p+="\\";break;case'"':p+='"';break;case"(":p+="\\(",a=1;break;default:p+=y}continue}if(a>0){if(l==='"'){for(p+=s();!o();){let y=r();if(y==="\\"){p+=s(),o()||(p+=s());continue}if(p+=s(),y==='"')break}continue}l==="("?a++:l===")"&&a--,p+=s();continue}p+=s()}o()||s(),n.push({type:"STRING",value:p,pos:i});continue}if(u(c)||c==="$"||c==="@"){let p=c;for(;!o()&&f(r());)p+=s();let a=Ve.get(p);a?n.push({type:a,value:p,pos:i}):n.push({type:"IDENT",value:p,pos:i});continue}throw new Error(`Unexpected character '${c}' at position ${i}`)}}return n.push({type:"EOF",pos:t}),n}var Ce=class e{maxDepth;tokens;pos=0;depth;constructor(n,t,r=0){this.maxDepth=t,this.tokens=n,this.depth=r}peek(n=0){return this.tokens[this.pos+n]??{type:"EOF",pos:-1}}advance(){return this.tokens[this.pos++]}check(n){return this.peek().type===n}match(...n){for(let t of n)if(this.check(t))return this.advance();return null}expect(n,t){if(!this.check(n))throw new Error(`${t} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}withDepth(n){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return n()}finally{this.depth--}}isFieldNameAfterDot(n=0){let t=this.peek(n),r=this.peek(n+1);return r.type==="STRING"?!0:r.type==="IDENT"||oe.has(r.type)?r.pos===t.pos+1:!1}isIdentLike(){let n=this.peek().type;return n==="IDENT"||oe.has(n)}consumeFieldNameAfterDot(n){let t=this.peek();return t.type==="STRING"?this.advance().value:(t.type==="IDENT"||oe.has(t.type))&&t.pos===n.pos+1?this.advance().value:null}parse(){let n=this.parseExpr();if(!this.check("EOF"))throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return n}parseExpr(){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return this.parsePipe()}finally{this.depth--}}parsePattern(){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return this.parsePatternInner()}finally{this.depth--}}parsePatternInner(){if(this.match("LBRACKET")){let r=[];if(!this.check("RBRACKET"))for(r.push(this.parsePattern());this.match("COMMA")&&!this.check("RBRACKET");)r.push(this.parsePattern());return this.expect("RBRACKET","Expected ']' after array pattern"),{type:"array",elements:r}}if(this.match("LBRACE")){let r=[];if(!this.check("RBRACE"))for(r.push(this.parsePatternField());this.match("COMMA")&&!this.check("RBRACE");)r.push(this.parsePatternField());return this.expect("RBRACE","Expected '}' after object pattern"),{type:"object",fields:r}}let n=this.expect("IDENT","Expected variable name in pattern"),t=n.value;if(!t.startsWith("$"))throw new Error(`Variable name must start with $ at position ${n.pos}`);return{type:"var",name:t}}parsePatternField(){if(this.match("LPAREN")){let t=this.parseExpr();this.expect("RPAREN","Expected ')' after computed key"),this.expect("COLON","Expected ':' after computed key");let r=this.parsePattern();return{key:t,pattern:r}}let n=this.peek();if(n.type==="IDENT"||oe.has(n.type)){let t=n.value;if(t.startsWith("$")){if(this.advance(),this.match("COLON")){let r=this.parsePattern();return{key:t.slice(1),pattern:r,keyVar:t}}return{key:t.slice(1),pattern:{type:"var",name:t}}}if(this.advance(),this.match("COLON")){let r=this.parsePattern();return{key:t,pattern:r}}return{key:t,pattern:{type:"var",name:`$${t}`}}}throw new Error(`Expected field name in object pattern at position ${n.pos}`)}parsePipe(){let n=this.parseComma();for(;this.match("PIPE");){let t=this.parseComma();n={type:"Pipe",left:n,right:t}}return n}parseComma(){let n=this.parseVarBind();for(;this.match("COMMA");){let t=this.parseVarBind();n={type:"Comma",left:n,right:t}}return n}parseVarBind(){let n=this.parseUpdate();if(this.match("AS")){let t=this.parsePattern(),r=[];for(;this.check("QUESTION")&&this.peekAhead(1)?.type==="ALT";)this.advance(),this.advance(),r.push(this.parsePattern());this.expect("PIPE","Expected '|' after variable binding");let s=this.parseExpr();return t.type==="var"&&r.length===0?{type:"VarBind",name:t.name,value:n,body:s}:{type:"VarBind",name:t.type==="var"?t.name:"",value:n,body:s,pattern:t.type!=="var"?t:void 0,alternatives:r.length>0?r:void 0}}return n}peekAhead(n){let t=this.pos+n;return t<this.tokens.length?this.tokens[t]:void 0}parseUpdate(){let n=this.parseAlt(),t=new Map([["ASSIGN","="],["UPDATE_ADD","+="],["UPDATE_SUB","-="],["UPDATE_MUL","*="],["UPDATE_DIV","/="],["UPDATE_MOD","%="],["UPDATE_ALT","//="],["UPDATE_PIPE","|="]]),r=this.match("ASSIGN","UPDATE_ADD","UPDATE_SUB","UPDATE_MUL","UPDATE_DIV","UPDATE_MOD","UPDATE_ALT","UPDATE_PIPE");if(r){let s=this.withDepth(()=>this.parseVarBind()),o=t.get(r.type);if(o)return{type:"UpdateOp",op:o,path:n,value:s}}return n}parseAlt(){let n=this.parseOr();for(;this.match("ALT");){let t=this.parseOr();n={type:"BinaryOp",op:"//",left:n,right:t}}return n}parseOr(){let n=this.parseAnd();for(;this.match("OR");){let t=this.parseAnd();n={type:"BinaryOp",op:"or",left:n,right:t}}return n}parseAnd(){let n=this.parseNot();for(;this.match("AND");){let t=this.parseNot();n={type:"BinaryOp",op:"and",left:n,right:t}}return n}parseNot(){return this.parseComparison()}parseComparison(){let n=this.parseAddSub(),t=new Map([["EQ","=="],["NE","!="],["LT","<"],["LE","<="],["GT",">"],["GE",">="]]),r=this.match("EQ","NE","LT","LE","GT","GE");if(r){let s=t.get(r.type);if(s){let o=this.parseAddSub();n={type:"BinaryOp",op:s,left:n,right:o}}}return n}parseAddSub(){let n=this.parseMulDiv();for(;;)if(this.match("PLUS")){let t=this.parseMulDiv();n={type:"BinaryOp",op:"+",left:n,right:t}}else if(this.match("MINUS")){let t=this.parseMulDiv();n={type:"BinaryOp",op:"-",left:n,right:t}}else break;return n}parseMulDiv(){let n=this.parseUnary();for(;;)if(this.match("STAR")){let t=this.parseUnary();n={type:"BinaryOp",op:"*",left:n,right:t}}else if(this.match("SLASH")){let t=this.parseUnary();n={type:"BinaryOp",op:"/",left:n,right:t}}else if(this.match("PERCENT")){let t=this.parseUnary();n={type:"BinaryOp",op:"%",left:n,right:t}}else break;return n}parseUnary(){let n=0;for(;this.match("MINUS");)if(n++,this.depth+n>this.maxDepth)throw new Error(`query parse depth limit exceeded (${this.maxDepth})`);let t=this.parsePostfix();for(;n-- >0;)t={type:"UnaryOp",op:"-",operand:t};return t}parsePostfix(){let n=this.parsePrimary();for(;;)if(this.match("QUESTION"))n={type:"Optional",expr:n};else if(this.check("DOT")&&this.isFieldNameAfterDot())this.advance(),n={type:"Field",name:this.advance().value,base:n};else if(this.check("LBRACKET"))if(this.advance(),this.match("RBRACKET"))n={type:"Iterate",base:n};else if(this.check("COLON")){this.advance();let t=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),n={type:"Slice",end:t,base:n}}else{let t=this.parseExpr();if(this.match("COLON")){let r=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),n={type:"Slice",start:t,end:r,base:n}}else this.expect("RBRACKET","Expected ']'"),n={type:"Index",index:t,base:n}}else break;return n}parsePrimary(){if(this.match("DOTDOT"))return{type:"Recurse"};if(this.check("DOT")){let n=this.advance();if(this.check("LBRACKET")){if(this.advance(),this.match("RBRACKET"))return{type:"Iterate"};if(this.check("COLON")){this.advance();let s=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",end:s}}let r=this.parseExpr();if(this.match("COLON")){let s=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",start:r,end:s}}return this.expect("RBRACKET","Expected ']'"),{type:"Index",index:r}}let t=this.consumeFieldNameAfterDot(n);return t!==null?{type:"Field",name:t}:{type:"Identity"}}if(this.match("TRUE"))return{type:"Literal",value:!0};if(this.match("FALSE"))return{type:"Literal",value:!1};if(this.match("NULL"))return{type:"Literal",value:null};if(this.check("NUMBER"))return{type:"Literal",value:this.advance().value};if(this.check("STRING")){let t=this.advance().value;return t.includes("\\(")?this.parseStringInterpolation(t):{type:"Literal",value:t}}if(this.match("LBRACKET")){if(this.match("RBRACKET"))return{type:"Array"};let n=this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Array",elements:n}}if(this.match("LBRACE"))return this.parseObjectConstruction();if(this.match("LPAREN")){let n=this.parseExpr();return this.expect("RPAREN","Expected ')'"),{type:"Paren",expr:n}}if(this.match("IF"))return this.parseIf();if(this.match("TRY")){let n=this.withDepth(()=>this.parsePostfix()),t;return this.match("CATCH")&&(t=this.withDepth(()=>this.parsePostfix())),{type:"Try",body:n,catch:t}}if(this.match("REDUCE")){let n=this.parseAddSub();this.expect("AS","Expected 'as' after reduce expression");let t=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let r=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let s=this.parseExpr();this.expect("RPAREN","Expected ')' after update expression");let o=t.type==="var"?t.name:"";return{type:"Reduce",expr:n,varName:o,init:r,update:s,pattern:t.type!=="var"?t:void 0}}if(this.match("FOREACH")){let n=this.parseAddSub();this.expect("AS","Expected 'as' after foreach expression");let t=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let r=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let s=this.parseExpr(),o;this.match("SEMICOLON")&&(o=this.parseExpr()),this.expect("RPAREN","Expected ')' after expressions");let h=t.type==="var"?t.name:"";return{type:"Foreach",expr:n,varName:h,init:r,update:s,extract:o,pattern:t.type!=="var"?t:void 0}}if(this.match("LABEL")){let n=this.expect("IDENT","Expected label name (e.g., $out)"),t=n.value;if(!t.startsWith("$"))throw new Error(`Label name must start with $ at position ${n.pos}`);this.expect("PIPE","Expected '|' after label name");let r=this.parseExpr();return{type:"Label",name:t,body:r}}if(this.match("BREAK")){let n=this.expect("IDENT","Expected label name to break to"),t=n.value;if(!t.startsWith("$"))throw new Error(`Break label must start with $ at position ${n.pos}`);return{type:"Break",name:t}}if(this.match("DEF")){let t=this.expect("IDENT","Expected function name after def").value,r=[];if(this.match("LPAREN")){if(!this.check("RPAREN")){let h=this.expect("IDENT","Expected parameter name");for(r.push(h.value);this.match("SEMICOLON");){let u=this.expect("IDENT","Expected parameter name");r.push(u.value)}}this.expect("RPAREN","Expected ')' after parameters")}this.expect("COLON","Expected ':' after function name");let s=this.parseExpr();this.expect("SEMICOLON","Expected ';' after function body");let o=this.parseExpr();return{type:"Def",name:t,params:r,funcBody:s,body:o}}if(this.match("NOT"))return{type:"Call",name:"not",args:[]};if(this.check("IDENT")){let t=this.advance().value;if(t.startsWith("$"))return{type:"VarRef",name:t};if(this.match("LPAREN")){let r=[];if(!this.check("RPAREN"))for(r.push(this.parseExpr());this.match("SEMICOLON");)r.push(this.parseExpr());return this.expect("RPAREN","Expected ')'"),{type:"Call",name:t,args:r}}return{type:"Call",name:t,args:[]}}throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return this.parseObjectConstructionInner()}finally{this.depth--}}parseObjectConstructionInner(){let n=[];if(!this.check("RBRACE"))do{let t,r;if(this.match("LPAREN"))t=this.parseExpr(),this.expect("RPAREN","Expected ')'"),this.expect("COLON","Expected ':'"),r=this.parseObjectValue();else if(this.isIdentLike()){let s=this.advance().value;this.match("COLON")?(t=s,r=this.parseObjectValue()):(t=s,r={type:"Field",name:s})}else if(this.check("STRING"))t=this.advance().value,this.expect("COLON","Expected ':'"),r=this.parseObjectValue();else throw new Error(`Expected object key at position ${this.peek().pos}`);n.push({key:t,value:r})}while(this.match("COMMA"));return this.expect("RBRACE","Expected '}'"),{type:"Object",entries:n}}parseObjectValue(){let n=this.parseVarBind();for(;this.match("PIPE");){let t=this.parseVarBind();n={type:"Pipe",left:n,right:t}}return n}parseIf(){let n=this.parseExpr();this.expect("THEN","Expected 'then'");let t=this.parseExpr(),r=[];for(;this.match("ELIF");){let o=this.parseExpr();this.expect("THEN","Expected 'then' after elif");let h=this.parseExpr();r.push({cond:o,then:h})}let s;return this.match("ELSE")&&(s=this.parseExpr()),this.expect("END","Expected 'end'"),{type:"Cond",cond:n,then:t,elifs:r,else:s}}parseStringInterpolation(n){let t=[],r="",s=0;for(;s<n.length;)if(n[s]==="\\"&&n[s+1]==="("){r&&(t.push(r),r=""),s+=2;let o=1,h="";for(;s<n.length&&o>0;){let i=n[s];if(i==='"'){for(h+=i,s++;s<n.length;){let c=n[s];if(c==="\\"){h+=c,s++,s<n.length&&(h+=n[s],s++);continue}if(h+=c,s++,c==='"')break}continue}i==="("?o++:i===")"&&o--,o>0&&(h+=i),s++}let u=He(h),f=new e(u,this.maxDepth,this.depth);t.push(f.parse())}else r+=n[s],s++;return r&&t.push(r),{type:"StringInterp",parts:t}}};function hr(e,n={}){let t=n.maxDepth??256,r=n.maxTokens??1e5,s=n.maxSourceLength??1048576;if(e.length>s)throw new Error(`query source length limit exceeded (${s} characters)`);if(e.length+1>r)throw new Error(`query token limit exceeded (${r})`);let o=He(e);return new Ce(o,t).parse()}function gr(e,n,t={}){let r=new G(n,"query JSON output",()=>new g(`output size limit exceeded (${n} bytes)`,t.limitKind??"output_size"));return De(r,e,t,0),r.build()}function De(e,n,t,r){if(n==null){e.append("null");return}if(typeof n=="boolean"){e.append(String(n));return}if(typeof n=="number"){e.append(Number.isFinite(n)?String(n):"null");return}if(typeof n=="string"){t.raw&&r===0?e.append(n):Qe(e,n);return}let s=t.compact??!1,o=t.indent??2,h=t.useTab?" ":" ".repeat(o);if(Array.isArray(n)){e.append("[");for(let f=0;f<n.length;f++)e.append(s?f===0?"":",":f===0?`
8
+ `:`,
9
+ `),s||e.repeat(h,r+1),De(e,n[f],t,r+1);!s&&n.length>0&&e.append(`
10
+ `).repeat(h,r),e.append("]");return}let u=Object.keys(n);t.sortKeys&&(u=u.sort()),e.append("{");for(let f=0;f<u.length;f++){let i=u[f];e.append(s?f===0?"":",":f===0?`
11
+ `:`,
12
+ `),s||e.repeat(h,r+1),Qe(e,i),e.append(s?":":": "),De(e,n[i],t,r+1)}!s&&u.length>0&&e.append(`
13
+ `).repeat(h,r),e.append("}")}function Qe(e,n){e.append('"');let t=0;for(let r=0;r<n.length;r++){let s=n.charCodeAt(r),o="";s===34?o='\\"':s===92?o="\\\\":s===8?o="\\b":s===9?o="\\t":s===10?o="\\n":s===12?o="\\f":s===13?o="\\r":s<32&&(o=`\\u${s.toString(16).padStart(4,"0")}`),o&&(e.append(n.slice(t,r)).append(o),t=r+1)}e.append(n.slice(t)).append('"')}export{B as a,d as b,hr as c,gr as d};
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as p}from"./chunk-PBOVSFTJ.js";import{a as m,b as g,c as h}from"./chunk-MUFNRCMY.js";var y={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},v={name:"ln",async execute(n,s){if(g(n))return m(y);let l=!1,f=!1,d=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")l=!0,t++;else if(e==="-f"||e==="--force")f=!0,t++;else if(e==="-v"||e==="--verbose")d=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(l=!0),e.includes("f")&&(f=!0),e.includes("v")&&(d=!0),t++;else if(e==="--"){t++;break}else return h("ln",e)}let i=n.slice(t);if(i.length<2)return{stdout:"",stderr:`ln: missing file operand
4
+ `,exitCode:1};if(i.length>2)return{stdout:"",stderr:`ln: extra operand '${i[2]}'
5
+ `,exitCode:1};let r=i[0],o=i[1],a=s.fs.resolvePath(s.cwd,o);if(await s.fs.exists(a))if(f)try{await s.fs.rm(a,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${o}': Permission denied
6
+ `,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${l?"symbolic ":""}link '${o}': File exists
7
+ `,exitCode:1};try{if(l)await s.fs.symlink(r,a);else{let e=s.fs.resolvePath(s.cwd,r);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${r}': No such file or directory
8
+ `,exitCode:1};await s.fs.link(e,a)}}catch(e){let c=e;return c.message.includes("EPERM")?{stdout:"",stderr:`ln: '${r}': hard link not allowed for directory
9
+ `,exitCode:1}:{stdout:"",stderr:`ln: ${p(c.message)}
10
+ `,exitCode:1}}let u="";return d&&(u=`'${o}' -> '${r}'
11
+ `),{stdout:u,stderr:"",exitCode:0}}},x={name:"ln",flags:[{flag:"-s",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{v as a,x as b};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{c as m}from"./chunk-O74FSWB4.js";import{b as d}from"./chunk-CPKBPQ2C.js";import{a as y}from"./chunk-NE4R2FVV.js";import{a as f,b as g}from"./chunk-MUFNRCMY.js";var T={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},w={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},$={name:"uniq",async execute(p,h){if(g(p))return f(T);let o=y("uniq",p,w);if(!o.ok)return o.error;let{count:q,duplicatesOnly:b,uniqueOnly:C,ignoreCase:a}=o.result.flags,x=o.result.positional,r=await m(h,x,{cmdName:"uniq"});if(!r.ok)return r.error;let t=(a?d(r.content):r.content).split(`
4
+ `);if(t.length>0&&t[t.length-1]===""&&t.pop(),t.length===0)return{stdout:"",stderr:"",exitCode:0};let n=[],i=t[0],s=1,O=(e,u)=>a?e.toLowerCase()===u.toLowerCase():e===u;for(let e=1;e<t.length;e++)O(t[e],i)?s++:(n.push({line:i,count:s}),i=t[e],s=1);n.push({line:i,count:s});let c=n;b?c=n.filter(e=>e.count>1):C&&(c=n.filter(e=>e.count===1));let l="";for(let{line:e,count:u}of c)q?l+=`${String(u).padStart(4)} ${e}
5
+ `:l+=`${e}
6
+ `;return a?{stdout:l,stderr:"",exitCode:0}:{stdout:l,stderr:"",exitCode:0,stdoutKind:"bytes",stdoutEncoding:"binary"}}},k={name:"uniq",flags:[{flag:"-c",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-u",type:"boolean"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{$ as a,k as b};
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as A}from"./chunk-BNYIXXC2.js";import{l as f}from"./chunk-LCP3IKI7.js";import{a as z,b as T}from"./chunk-CPKBPQ2C.js";import{a as _}from"./chunk-PBOVSFTJ.js";import{a as B}from"./chunk-NE4R2FVV.js";import{a as M,b as q}from"./chunk-MUFNRCMY.js";var L={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
4
+ a-z character range
5
+ [:alnum:] all letters and digits
6
+ [:alpha:] all letters
7
+ [:digit:] all digits
8
+ [:lower:] all lowercase letters
9
+ [:upper:] all uppercase letters
10
+ [:space:] all whitespace
11
+ [:blank:] horizontal whitespace
12
+ [:punct:] all punctuation
13
+ [:print:] all printable characters
14
+ [:graph:] all printable characters except space
15
+ [:cntrl:] all control characters
16
+ [:xdigit:] all hexadecimal digits
17
+ \\n, \\t, \\r escape sequences`},$=new Map([["[:alnum:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"],["[:alpha:]","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"],["[:blank:]"," "],["[:cntrl:]",Array.from({length:32},(o,n)=>String.fromCharCode(n)).join("").concat("\x7F")],["[:digit:]","0123456789"],["[:graph:]",Array.from({length:94},(o,n)=>String.fromCharCode(33+n)).join("")],["[:lower:]","abcdefghijklmnopqrstuvwxyz"],["[:print:]",Array.from({length:95},(o,n)=>String.fromCharCode(32+n)).join("")],["[:punct:]","!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"],["[:space:]",`
18
+ \r\f\v`],["[:upper:]","ABCDEFGHIJKLMNOPQRSTUVWXYZ"],["[:xdigit:]","0123456789ABCDEFabcdef"]]);function F(o,n,c,u){let g="",t=0,a=e=>{if(e.length>n-g.length)throw new f(`tr: expanded SET exceeds string length limit (${n})`,"string_length");g+=e},h=(e=1)=>{if(e>c-u.iterations)throw new f(`tr: SET expansion iteration limit exceeded (${c})`,"iterations");u.iterations+=e};for(;t<o.length;){if(h(),o[t]==="["&&o[t+1]===":"){let e=!1;for(let[l,d]of $)if(o.slice(t).startsWith(l)){a(d),t+=l.length,e=!0;break}if(e)continue}if(o[t]==="\\"&&t+1<o.length){let e=o[t+1];a(e==="n"?`
19
+ `:e==="t"?" ":e==="r"?"\r":e),t+=2;continue}if(t+2<o.length&&o[t+1]==="-"){let e=o.charCodeAt(t),l=o.charCodeAt(t+2),d=l>=e?l-e+1:0;if(h(d),d>n-g.length)throw new f(`tr: expanded SET exceeds string length limit (${n})`,"string_length");for(let m=e;m<=l;m++)g+=String.fromCharCode(m);t+=3;continue}a(o[t]),t++}return g}var k={complement:{short:"c",long:"complement",type:"boolean"},complementUpper:{short:"C",type:"boolean"},delete:{short:"d",long:"delete",type:"boolean"},squeeze:{short:"s",long:"squeeze-repeats",type:"boolean"}},v={name:"tr",async execute(o,n){if(q(o))return M(L);let c=B("tr",o,k);if(!c.ok)return c.error;let u=c.result.flags.complement||c.result.flags.complementUpper,g=c.result.flags.delete,t=c.result.flags.squeeze,a=c.result.positional;if(a.length<1)return{stdout:"",stderr:`tr: missing operand
20
+ `,exitCode:1};if(!g&&!t&&a.length<2)return{stdout:"",stderr:`tr: missing operand after SET1
21
+ `,exitCode:1};let h,e,l=Math.min(n.limits.maxInputBytes,n.limits.maxStringLength),d=n.limits.maxLoopIterations,m=n.limits.maxArrayElements,S=Math.min(n.limits.maxOutputSize,n.limits.maxStringLength);try{let r={iterations:0};h=F(a[0],l,d,r),e=a.length>1?F(a[1],l,d,r):""}catch(r){return A(r),{stdout:"",stderr:`${_(r.message)}
22
+ `,exitCode:1}}if(n.stdin.length>l)throw new f(`tr: input size limit exceeded (${l} bytes)`,"string_length");let y=T(n.stdin);if(h.length>m||e.length>m)throw new f(`tr: array element limit exceeded (${m})`,"array_elements");let w=new Set(h),I=new Set(e),C=r=>{let s=w.has(r);return u?!s:s},E="",b=0,x=r=>{let s=z(r);if(s>S-b)throw new f(`tr: output size limit exceeded (${S} bytes)`,"output_size");E+=r,b+=s};if(g)for(let r of y)C(r)||x(r);else if(t&&a.length===1){let r="";for(let s of y)C(s)&&s===r||(x(s),r=s)}else{let r="",s=p=>{t&&I.has(p)&&p===r||(x(p),r=p)};if(u){let p=e.length>0?e[e.length-1]:"";for(let i of y)w.has(i)?s(i):s(p)}else{let p=new Map;for(let i=0;i<h.length;i++){let O=i<e.length?e[i]:e[e.length-1];p.set(h[i],O)}for(let i of y)s(p.get(i)??i)}}return{stdout:E,stderr:"",exitCode:0}}},W={name:"tr",flags:[{flag:"-c",type:"boolean"},{flag:"-C",type:"boolean"},{flag:"-d",type:"boolean"},{flag:"-s",type:"boolean"}],stdinType:"text",needsArgs:!0};export{v as a,W as b};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a,b}from"./chunk-KUMHQGUR.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as clearCommand,b as flagsForFuzzing};