just-binary 2.9.8 → 3.0.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.
- package/README.md +12 -3
- package/dist/Bash.d.ts +5 -2
- package/dist/bin/chunks/alias-DRSSCAUM.js +2 -0
- package/dist/bin/chunks/awk2-GM5WBRLU.js +2 -0
- package/dist/bin/chunks/base64-KLZ4B6VS.js +2 -0
- package/dist/bin/chunks/basename-XCXGYZPS.js +2 -0
- package/dist/bin/chunks/bash-U2E2FSIE.js +2 -0
- package/dist/bin/chunks/bytes-C34BYEMS.js +2 -0
- package/dist/bin/chunks/cat-D4E4FTXJ.js +2 -0
- package/dist/bin/chunks/chmod-OY5CP5QF.js +2 -0
- package/dist/bin/chunks/chunk-23CC4423.js +287 -0
- package/dist/bin/chunks/chunk-23EV7RYO.js +10 -0
- package/dist/bin/chunks/chunk-2IOUIOWE.js +12 -0
- package/dist/bin/chunks/chunk-3VDZW42W.js +5 -0
- package/dist/bin/chunks/chunk-444WPTN5.js +8 -0
- package/dist/bin/chunks/chunk-446TXLPR.js +9 -0
- package/dist/bin/chunks/chunk-44ROJVH3.js +6 -0
- package/dist/bin/chunks/chunk-463VWH7H.js +2 -0
- package/dist/bin/chunks/chunk-4VVLCPRH.js +8 -0
- package/dist/bin/chunks/chunk-4W52T6KS.js +63 -0
- package/dist/bin/chunks/chunk-5IL5CXJC.js +3 -0
- package/dist/bin/chunks/chunk-5KQNIOZS.js +84 -0
- package/dist/bin/chunks/chunk-66PXNTAV.js +2 -0
- package/dist/bin/chunks/chunk-67SBKZZD.js +9 -0
- package/dist/bin/chunks/chunk-6U6CK6V4.js +16 -0
- package/dist/bin/chunks/chunk-7J7OY2YE.js +12 -0
- package/dist/bin/chunks/chunk-7VWUKGDV.js +4 -0
- package/dist/bin/chunks/chunk-7YOACDUK.js +140 -0
- package/dist/bin/chunks/chunk-AN2KBMAK.js +12 -0
- package/dist/bin/chunks/chunk-AZQ66C5R.js +14 -0
- package/dist/bin/chunks/chunk-B4GXMUCA.js +20 -0
- package/dist/bin/chunks/chunk-BXOX2H2G.js +22 -0
- package/dist/bin/chunks/chunk-CAXM2HMK.js +2 -0
- package/dist/bin/chunks/chunk-CD3NCHIB.js +7 -0
- package/dist/bin/chunks/chunk-CE2ILL65.js +9 -0
- package/dist/bin/chunks/chunk-D34QBGQ3.js +7 -0
- package/dist/bin/chunks/chunk-D44C6YVE.js +6 -0
- package/dist/bin/chunks/chunk-DFAHK2EQ.js +23 -0
- package/dist/bin/chunks/chunk-DMTOGHTU.js +6 -0
- package/dist/bin/chunks/chunk-ECBMSCPX.js +5 -0
- package/dist/bin/chunks/chunk-EHJW6FCX.js +36 -0
- package/dist/bin/chunks/chunk-EXCMJ23H.js +100 -0
- package/dist/bin/chunks/chunk-FVFLR7NF.js +21 -0
- package/dist/bin/chunks/chunk-FZXGAGSU.js +33 -0
- package/dist/bin/chunks/chunk-GIVPKQT5.js +16 -0
- package/dist/bin/chunks/chunk-GUZJZK5O.js +2 -0
- package/dist/bin/chunks/chunk-HEO6EBJ2.js +14 -0
- package/dist/bin/chunks/chunk-HT4IVOYZ.js +7 -0
- package/dist/bin/chunks/chunk-HY6WUGWS.js +10 -0
- package/dist/bin/chunks/chunk-HZM5PBQF.js +8 -0
- package/dist/bin/chunks/chunk-I2N72LXH.js +9 -0
- package/dist/bin/chunks/chunk-IAUA3FL7.js +8 -0
- package/dist/bin/chunks/chunk-IPWJZ22H.js +14 -0
- package/dist/bin/chunks/chunk-IQY3I4OH.js +2 -0
- package/dist/bin/chunks/chunk-JU5KTPFP.js +17 -0
- package/dist/bin/chunks/chunk-KAWPUEQM.js +3 -0
- package/dist/bin/chunks/chunk-L2KFCEBW.js +13 -0
- package/dist/bin/chunks/chunk-LVSKOXVG.js +5 -0
- package/dist/bin/chunks/chunk-MPX22C7Y.js +5 -0
- package/dist/bin/chunks/chunk-N7P3SUNH.js +6 -0
- package/dist/bin/chunks/chunk-NNVWOCET.js +2 -0
- package/dist/bin/chunks/chunk-NSSLXYEG.js +8 -0
- package/dist/bin/chunks/chunk-OH3VVXF7.js +3 -0
- package/dist/bin/chunks/chunk-PKKBPSVJ.js +7 -0
- package/dist/bin/chunks/chunk-PRQYRYWV.js +3 -0
- package/dist/bin/chunks/chunk-PYIWPSII.js +32 -0
- package/dist/bin/chunks/chunk-PZ46XEZ4.js +2 -0
- package/dist/bin/chunks/chunk-Q2BKN6MV.js +11 -0
- package/dist/bin/chunks/chunk-QFPJQSDK.js +7 -0
- package/dist/bin/chunks/chunk-QKQUVK53.js +10 -0
- package/dist/bin/chunks/chunk-QXOUI5BS.js +11 -0
- package/dist/bin/chunks/chunk-RAL2LVDX.js +7 -0
- package/dist/bin/chunks/chunk-RAUBS6MJ.js +2 -0
- package/dist/bin/chunks/chunk-RFIBBYTO.js +6 -0
- package/dist/bin/chunks/chunk-RIV3HSPK.js +19 -0
- package/dist/bin/chunks/chunk-RMG637UR.js +26 -0
- package/dist/bin/chunks/chunk-RUESYAVK.js +2 -0
- package/dist/bin/chunks/chunk-RUNWFUUE.js +7 -0
- package/dist/bin/chunks/chunk-RX4PT2U7.js +9 -0
- package/dist/bin/chunks/chunk-RZ6FAJ25.js +18 -0
- package/dist/bin/chunks/chunk-SDTTNNEH.js +23 -0
- package/dist/bin/chunks/chunk-SL4D2YES.js +4 -0
- package/dist/bin/chunks/chunk-SZM4GZ4H.js +2 -0
- package/dist/bin/chunks/chunk-TACNCKUC.js +21 -0
- package/dist/bin/chunks/chunk-U4LP6WPJ.js +11 -0
- package/dist/bin/chunks/chunk-UAZICDKU.js +5 -0
- package/dist/bin/chunks/chunk-V3N6H3L5.js +9 -0
- package/dist/bin/chunks/chunk-VWJBSJYM.js +2 -0
- package/dist/bin/chunks/chunk-WXI44VNZ.js +5 -0
- package/dist/bin/chunks/chunk-X7PEK6W7.js +13 -0
- package/dist/bin/chunks/chunk-XB426ZI7.js +3 -0
- package/dist/bin/chunks/chunk-XILOLP4K.js +8 -0
- package/dist/bin/chunks/chunk-XRZNW2KP.js +7 -0
- package/dist/bin/chunks/chunk-YER5PEKD.js +2 -0
- package/dist/bin/chunks/chunk-YG67AAKF.js +5 -0
- package/dist/bin/chunks/chunk-YGAHXCGB.js +13 -0
- package/dist/bin/chunks/chunk-YJFLWG5Q.js +73 -0
- package/dist/bin/chunks/chunk-Z72PSRMX.js +3 -0
- package/dist/bin/chunks/chunk-Z73LISDU.js +16 -0
- package/dist/bin/chunks/chunk-ZZPPBMHW.js +14 -0
- package/dist/bin/chunks/clear-P5EG7Z6I.js +2 -0
- package/dist/bin/chunks/column-5CUPANJY.js +2 -0
- package/dist/bin/chunks/comm-LMDA7QZC.js +2 -0
- package/dist/bin/chunks/cp-7TMSGOID.js +2 -0
- package/dist/bin/chunks/curl-P6DHVAKR.js +26 -0
- package/dist/bin/chunks/cut-P6LPALWP.js +2 -0
- package/dist/bin/chunks/date-KYJ2OPHH.js +2 -0
- package/dist/bin/chunks/diff-SGBANTKE.js +2 -0
- package/dist/bin/chunks/dirname-3LHNBKNB.js +2 -0
- package/dist/bin/chunks/du-DEYTW2KI.js +2 -0
- package/dist/bin/chunks/echo-5EBIR54T.js +2 -0
- package/dist/bin/chunks/env-PWRJFDWL.js +2 -0
- package/dist/bin/chunks/expand-672ZQYZF.js +2 -0
- package/dist/bin/chunks/expansion-OPTOOC4Q.js +2 -0
- package/dist/bin/chunks/expr-SWYNZXDP.js +2 -0
- package/dist/bin/chunks/file-MIXTZ4NP.js +2 -0
- package/dist/bin/chunks/find-BXGQE44U.js +2 -0
- package/dist/bin/chunks/flag-coverage-7AQE3UPG.js +2 -0
- package/dist/bin/chunks/fold-SK55D7OX.js +2 -0
- package/dist/bin/chunks/grep-6OXCYWRV.js +2 -0
- package/dist/bin/chunks/gzip-PT23FGTW.js +2 -0
- package/dist/bin/chunks/head-YZQN4BHR.js +2 -0
- package/dist/bin/chunks/help-R7JNUPU2.js +2 -0
- package/dist/bin/chunks/history-W57S3E3C.js +2 -0
- package/dist/bin/chunks/hostname-NPAYFT3O.js +2 -0
- package/dist/bin/chunks/html-to-markdown-2AHE4ET2.js +2 -0
- package/dist/bin/chunks/join-ZK67SMQ3.js +2 -0
- package/dist/bin/chunks/jq-2BGA6KZ3.js +2 -0
- package/dist/bin/chunks/ln-PZ7JHGH2.js +2 -0
- package/dist/bin/chunks/ls-SLO257WP.js +2 -0
- package/dist/bin/chunks/md5sum-WYOOUOWI.js +2 -0
- package/dist/bin/chunks/mkdir-EOATYYLD.js +2 -0
- package/dist/bin/chunks/mv-QUAFQDCT.js +2 -0
- package/dist/bin/chunks/nl-WZC4GKMG.js +2 -0
- package/dist/bin/chunks/od-IMVAQQIR.js +2 -0
- package/dist/bin/chunks/paste-6XYPZQXQ.js +2 -0
- package/dist/bin/chunks/printf-OCMANWQ5.js +2 -0
- package/dist/bin/chunks/pwd-PQGDLYLZ.js +2 -0
- package/dist/bin/chunks/python3-HNLPOBYQ.js +14 -0
- package/dist/bin/chunks/readlink-F66ORZVY.js +2 -0
- package/dist/bin/chunks/rev-67WGH7WN.js +2 -0
- package/dist/bin/chunks/rg-D5WXPSFJ.js +2 -0
- package/dist/bin/chunks/rm-BZWDOVUX.js +2 -0
- package/dist/bin/chunks/rmdir-5MNK2AUK.js +2 -0
- package/dist/bin/chunks/sed-HN3E3YFB.js +2 -0
- package/dist/bin/chunks/seq-6C6VEGIG.js +2 -0
- package/dist/bin/chunks/sha1sum-Y2J25KOM.js +2 -0
- package/dist/bin/chunks/sha256sum-NFAAGL44.js +2 -0
- package/dist/bin/chunks/sleep-CPJ3WJE7.js +2 -0
- package/dist/bin/chunks/sort-FT4OVPSS.js +2 -0
- package/dist/bin/chunks/split-AXXLODUK.js +2 -0
- package/dist/bin/chunks/sqlite3-DUARNSNG.js +2 -0
- package/dist/bin/chunks/stat-6QXPS4BF.js +2 -0
- package/dist/bin/chunks/strings-7CJI5ESD.js +2 -0
- package/dist/bin/chunks/tac-Q5VNKVXE.js +2 -0
- package/dist/bin/chunks/tail-EI24LQBP.js +2 -0
- package/dist/bin/chunks/tar-M7QCUJ4B.js +2 -0
- package/dist/bin/chunks/tee-6TEQ3DXN.js +2 -0
- package/dist/bin/chunks/time-GJWZLHLN.js +2 -0
- package/dist/bin/chunks/timeout-LPVVIBNB.js +2 -0
- package/dist/bin/chunks/touch-J6X4OW3P.js +2 -0
- package/dist/bin/chunks/tr-2C3Q77EZ.js +2 -0
- package/dist/bin/chunks/tree-RLXLQJVI.js +2 -0
- package/dist/bin/chunks/true-ZPDUMWHQ.js +2 -0
- package/dist/bin/chunks/unexpand-AUQHJMGI.js +2 -0
- package/dist/bin/chunks/uniq-C3ZUQTF4.js +2 -0
- package/dist/bin/chunks/wc-NNQHXBLM.js +2 -0
- package/dist/bin/chunks/which-QKNHOQPQ.js +2 -0
- package/dist/bin/chunks/whoami-KIB3RVBF.js +2 -0
- package/dist/bin/chunks/xan-BGDVQKRZ.js +2 -0
- package/dist/bin/chunks/xan-view-GTANKIPW.js +2 -0
- package/dist/bin/chunks/xargs-I7QRUR36.js +2 -0
- package/dist/bin/chunks/yq-W7OKSS7Z.js +2 -0
- package/dist/bin/just-bash.js +290 -290
- package/dist/bin/shell/chunks/alias-DRSSCAUM.js +2 -0
- package/dist/bin/shell/chunks/awk2-GM5WBRLU.js +2 -0
- package/dist/bin/shell/chunks/base64-KLZ4B6VS.js +2 -0
- package/dist/bin/shell/chunks/basename-XCXGYZPS.js +2 -0
- package/dist/bin/shell/chunks/bash-U2E2FSIE.js +2 -0
- package/dist/bin/shell/chunks/bytes-C34BYEMS.js +2 -0
- package/dist/bin/shell/chunks/cat-D4E4FTXJ.js +2 -0
- package/dist/bin/shell/chunks/chmod-OY5CP5QF.js +2 -0
- package/dist/bin/shell/chunks/chunk-23CC4423.js +287 -0
- package/dist/bin/shell/chunks/chunk-23EV7RYO.js +10 -0
- package/dist/bin/shell/chunks/chunk-2IOUIOWE.js +12 -0
- package/dist/bin/shell/chunks/chunk-3VDZW42W.js +5 -0
- package/dist/bin/shell/chunks/chunk-444WPTN5.js +8 -0
- package/dist/bin/shell/chunks/chunk-446TXLPR.js +9 -0
- package/dist/bin/shell/chunks/chunk-44ROJVH3.js +6 -0
- package/dist/bin/shell/chunks/chunk-463VWH7H.js +2 -0
- package/dist/bin/shell/chunks/chunk-4VVLCPRH.js +8 -0
- package/dist/bin/shell/chunks/chunk-4W52T6KS.js +63 -0
- package/dist/bin/shell/chunks/chunk-5IL5CXJC.js +3 -0
- package/dist/bin/shell/chunks/chunk-5KQNIOZS.js +84 -0
- package/dist/bin/shell/chunks/chunk-66PXNTAV.js +2 -0
- package/dist/bin/shell/chunks/chunk-67SBKZZD.js +9 -0
- package/dist/bin/shell/chunks/chunk-6U6CK6V4.js +16 -0
- package/dist/bin/shell/chunks/chunk-7J7OY2YE.js +12 -0
- package/dist/bin/shell/chunks/chunk-7VWUKGDV.js +4 -0
- package/dist/bin/shell/chunks/chunk-7YOACDUK.js +140 -0
- package/dist/bin/shell/chunks/chunk-AN2KBMAK.js +12 -0
- package/dist/bin/shell/chunks/chunk-AZQ66C5R.js +14 -0
- package/dist/bin/shell/chunks/chunk-B4GXMUCA.js +20 -0
- package/dist/bin/shell/chunks/chunk-BXOX2H2G.js +22 -0
- package/dist/bin/shell/chunks/chunk-CAXM2HMK.js +2 -0
- package/dist/bin/shell/chunks/chunk-CD3NCHIB.js +7 -0
- package/dist/bin/shell/chunks/chunk-CE2ILL65.js +9 -0
- package/dist/bin/shell/chunks/chunk-D34QBGQ3.js +7 -0
- package/dist/bin/shell/chunks/chunk-D44C6YVE.js +6 -0
- package/dist/bin/shell/chunks/chunk-DFAHK2EQ.js +23 -0
- package/dist/bin/shell/chunks/chunk-DMTOGHTU.js +6 -0
- package/dist/bin/shell/chunks/chunk-ECBMSCPX.js +5 -0
- package/dist/bin/shell/chunks/chunk-EHJW6FCX.js +36 -0
- package/dist/bin/shell/chunks/chunk-EXCMJ23H.js +100 -0
- package/dist/bin/shell/chunks/chunk-FVFLR7NF.js +21 -0
- package/dist/bin/shell/chunks/chunk-FZXGAGSU.js +33 -0
- package/dist/bin/shell/chunks/chunk-GIVPKQT5.js +16 -0
- package/dist/bin/shell/chunks/chunk-GUZJZK5O.js +2 -0
- package/dist/bin/shell/chunks/chunk-HEO6EBJ2.js +14 -0
- package/dist/bin/shell/chunks/chunk-HT4IVOYZ.js +7 -0
- package/dist/bin/shell/chunks/chunk-HY6WUGWS.js +10 -0
- package/dist/bin/shell/chunks/chunk-HZM5PBQF.js +8 -0
- package/dist/bin/shell/chunks/chunk-I2N72LXH.js +9 -0
- package/dist/bin/shell/chunks/chunk-IAUA3FL7.js +8 -0
- package/dist/bin/shell/chunks/chunk-IPWJZ22H.js +14 -0
- package/dist/bin/shell/chunks/chunk-IQY3I4OH.js +2 -0
- package/dist/bin/shell/chunks/chunk-JU5KTPFP.js +17 -0
- package/dist/bin/shell/chunks/chunk-KAWPUEQM.js +3 -0
- package/dist/bin/shell/chunks/chunk-L2KFCEBW.js +13 -0
- package/dist/bin/shell/chunks/chunk-LVSKOXVG.js +5 -0
- package/dist/bin/shell/chunks/chunk-MPX22C7Y.js +5 -0
- package/dist/bin/shell/chunks/chunk-N7P3SUNH.js +6 -0
- package/dist/bin/shell/chunks/chunk-NNVWOCET.js +2 -0
- package/dist/bin/shell/chunks/chunk-NSSLXYEG.js +8 -0
- package/dist/bin/shell/chunks/chunk-OH3VVXF7.js +3 -0
- package/dist/bin/shell/chunks/chunk-PKKBPSVJ.js +7 -0
- package/dist/bin/shell/chunks/chunk-PRQYRYWV.js +3 -0
- package/dist/bin/shell/chunks/chunk-PYIWPSII.js +32 -0
- package/dist/bin/shell/chunks/chunk-PZ46XEZ4.js +2 -0
- package/dist/bin/shell/chunks/chunk-Q2BKN6MV.js +11 -0
- package/dist/bin/shell/chunks/chunk-QFPJQSDK.js +7 -0
- package/dist/bin/shell/chunks/chunk-QKQUVK53.js +10 -0
- package/dist/bin/shell/chunks/chunk-QXOUI5BS.js +11 -0
- package/dist/bin/shell/chunks/chunk-RAL2LVDX.js +7 -0
- package/dist/bin/shell/chunks/chunk-RAUBS6MJ.js +2 -0
- package/dist/bin/shell/chunks/chunk-RFIBBYTO.js +6 -0
- package/dist/bin/shell/chunks/chunk-RIV3HSPK.js +19 -0
- package/dist/bin/shell/chunks/chunk-RMG637UR.js +26 -0
- package/dist/bin/shell/chunks/chunk-RUESYAVK.js +2 -0
- package/dist/bin/shell/chunks/chunk-RUNWFUUE.js +7 -0
- package/dist/bin/shell/chunks/chunk-RX4PT2U7.js +9 -0
- package/dist/bin/shell/chunks/chunk-RZ6FAJ25.js +18 -0
- package/dist/bin/shell/chunks/chunk-SDTTNNEH.js +23 -0
- package/dist/bin/shell/chunks/chunk-SL4D2YES.js +4 -0
- package/dist/bin/shell/chunks/chunk-SZM4GZ4H.js +2 -0
- package/dist/bin/shell/chunks/chunk-TACNCKUC.js +21 -0
- package/dist/bin/shell/chunks/chunk-U4LP6WPJ.js +11 -0
- package/dist/bin/shell/chunks/chunk-UAZICDKU.js +5 -0
- package/dist/bin/shell/chunks/chunk-V3N6H3L5.js +9 -0
- package/dist/bin/shell/chunks/chunk-VWJBSJYM.js +2 -0
- package/dist/bin/shell/chunks/chunk-WXI44VNZ.js +5 -0
- package/dist/bin/shell/chunks/chunk-X7PEK6W7.js +13 -0
- package/dist/bin/shell/chunks/chunk-XB426ZI7.js +3 -0
- package/dist/bin/shell/chunks/chunk-XILOLP4K.js +8 -0
- package/dist/bin/shell/chunks/chunk-XRZNW2KP.js +7 -0
- package/dist/bin/shell/chunks/chunk-YER5PEKD.js +2 -0
- package/dist/bin/shell/chunks/chunk-YG67AAKF.js +5 -0
- package/dist/bin/shell/chunks/chunk-YGAHXCGB.js +13 -0
- package/dist/bin/shell/chunks/chunk-YJFLWG5Q.js +73 -0
- package/dist/bin/shell/chunks/chunk-Z72PSRMX.js +3 -0
- package/dist/bin/shell/chunks/chunk-Z73LISDU.js +16 -0
- package/dist/bin/shell/chunks/chunk-ZZPPBMHW.js +14 -0
- package/dist/bin/shell/chunks/clear-P5EG7Z6I.js +2 -0
- package/dist/bin/shell/chunks/column-5CUPANJY.js +2 -0
- package/dist/bin/shell/chunks/comm-LMDA7QZC.js +2 -0
- package/dist/bin/shell/chunks/cp-7TMSGOID.js +2 -0
- package/dist/bin/shell/chunks/curl-P6DHVAKR.js +26 -0
- package/dist/bin/shell/chunks/cut-P6LPALWP.js +2 -0
- package/dist/bin/shell/chunks/date-KYJ2OPHH.js +2 -0
- package/dist/bin/shell/chunks/diff-SGBANTKE.js +2 -0
- package/dist/bin/shell/chunks/dirname-3LHNBKNB.js +2 -0
- package/dist/bin/shell/chunks/du-DEYTW2KI.js +2 -0
- package/dist/bin/shell/chunks/echo-5EBIR54T.js +2 -0
- package/dist/bin/shell/chunks/env-PWRJFDWL.js +2 -0
- package/dist/bin/shell/chunks/expand-672ZQYZF.js +2 -0
- package/dist/bin/shell/chunks/expansion-OPTOOC4Q.js +2 -0
- package/dist/bin/shell/chunks/expr-SWYNZXDP.js +2 -0
- package/dist/bin/shell/chunks/file-MIXTZ4NP.js +2 -0
- package/dist/bin/shell/chunks/find-BXGQE44U.js +2 -0
- package/dist/bin/shell/chunks/flag-coverage-7AQE3UPG.js +2 -0
- package/dist/bin/shell/chunks/fold-SK55D7OX.js +2 -0
- package/dist/bin/shell/chunks/grep-6OXCYWRV.js +2 -0
- package/dist/bin/shell/chunks/gzip-PT23FGTW.js +2 -0
- package/dist/bin/shell/chunks/head-YZQN4BHR.js +2 -0
- package/dist/bin/shell/chunks/help-R7JNUPU2.js +2 -0
- package/dist/bin/shell/chunks/history-W57S3E3C.js +2 -0
- package/dist/bin/shell/chunks/hostname-NPAYFT3O.js +2 -0
- package/dist/bin/shell/chunks/html-to-markdown-2AHE4ET2.js +2 -0
- package/dist/bin/shell/chunks/join-ZK67SMQ3.js +2 -0
- package/dist/bin/shell/chunks/jq-2BGA6KZ3.js +2 -0
- package/dist/bin/shell/chunks/ln-PZ7JHGH2.js +2 -0
- package/dist/bin/shell/chunks/ls-SLO257WP.js +2 -0
- package/dist/bin/shell/chunks/md5sum-WYOOUOWI.js +2 -0
- package/dist/bin/shell/chunks/mkdir-EOATYYLD.js +2 -0
- package/dist/bin/shell/chunks/mv-QUAFQDCT.js +2 -0
- package/dist/bin/shell/chunks/nl-WZC4GKMG.js +2 -0
- package/dist/bin/shell/chunks/od-IMVAQQIR.js +2 -0
- package/dist/bin/shell/chunks/paste-6XYPZQXQ.js +2 -0
- package/dist/bin/shell/chunks/printf-OCMANWQ5.js +2 -0
- package/dist/bin/shell/chunks/pwd-PQGDLYLZ.js +2 -0
- package/dist/bin/shell/chunks/python3-HNLPOBYQ.js +14 -0
- package/dist/bin/shell/chunks/readlink-F66ORZVY.js +2 -0
- package/dist/bin/shell/chunks/rev-67WGH7WN.js +2 -0
- package/dist/bin/shell/chunks/rg-D5WXPSFJ.js +2 -0
- package/dist/bin/shell/chunks/rm-BZWDOVUX.js +2 -0
- package/dist/bin/shell/chunks/rmdir-5MNK2AUK.js +2 -0
- package/dist/bin/shell/chunks/sed-HN3E3YFB.js +2 -0
- package/dist/bin/shell/chunks/seq-6C6VEGIG.js +2 -0
- package/dist/bin/shell/chunks/sha1sum-Y2J25KOM.js +2 -0
- package/dist/bin/shell/chunks/sha256sum-NFAAGL44.js +2 -0
- package/dist/bin/shell/chunks/sleep-CPJ3WJE7.js +2 -0
- package/dist/bin/shell/chunks/sort-FT4OVPSS.js +2 -0
- package/dist/bin/shell/chunks/split-AXXLODUK.js +2 -0
- package/dist/bin/shell/chunks/sqlite3-DUARNSNG.js +2 -0
- package/dist/bin/shell/chunks/stat-6QXPS4BF.js +2 -0
- package/dist/bin/shell/chunks/strings-7CJI5ESD.js +2 -0
- package/dist/bin/shell/chunks/tac-Q5VNKVXE.js +2 -0
- package/dist/bin/shell/chunks/tail-EI24LQBP.js +2 -0
- package/dist/bin/shell/chunks/tar-M7QCUJ4B.js +2 -0
- package/dist/bin/shell/chunks/tee-6TEQ3DXN.js +2 -0
- package/dist/bin/shell/chunks/time-GJWZLHLN.js +2 -0
- package/dist/bin/shell/chunks/timeout-LPVVIBNB.js +2 -0
- package/dist/bin/shell/chunks/touch-J6X4OW3P.js +2 -0
- package/dist/bin/shell/chunks/tr-2C3Q77EZ.js +2 -0
- package/dist/bin/shell/chunks/tree-RLXLQJVI.js +2 -0
- package/dist/bin/shell/chunks/true-ZPDUMWHQ.js +2 -0
- package/dist/bin/shell/chunks/unexpand-AUQHJMGI.js +2 -0
- package/dist/bin/shell/chunks/uniq-C3ZUQTF4.js +2 -0
- package/dist/bin/shell/chunks/wc-NNQHXBLM.js +2 -0
- package/dist/bin/shell/chunks/which-QKNHOQPQ.js +2 -0
- package/dist/bin/shell/chunks/whoami-KIB3RVBF.js +2 -0
- package/dist/bin/shell/chunks/xan-BGDVQKRZ.js +2 -0
- package/dist/bin/shell/chunks/xan-view-GTANKIPW.js +2 -0
- package/dist/bin/shell/chunks/xargs-I7QRUR36.js +2 -0
- package/dist/bin/shell/chunks/yq-W7OKSS7Z.js +2 -0
- package/dist/bin/shell/shell.js +303 -303
- package/dist/bundle/browser.js +841 -833
- package/dist/bundle/chunks/alias-JHV3WNPA.js +1 -0
- package/dist/bundle/chunks/awk2-LA5EZ6UJ.js +1 -0
- package/dist/bundle/chunks/base64-DP3BVL7J.js +1 -0
- package/dist/bundle/chunks/basename-NCIQLNXY.js +1 -0
- package/dist/bundle/chunks/bash-CN3UUJ3N.js +1 -0
- package/dist/bundle/chunks/bytes-JUNATFIO.js +1 -0
- package/dist/bundle/chunks/cat-KHANCARN.js +1 -0
- package/dist/bundle/chunks/chmod-A3HCFC4L.js +1 -0
- package/dist/bundle/chunks/chunk-26DNZXYZ.js +23 -0
- package/dist/bundle/chunks/chunk-26VNLF3H.js +6 -0
- package/dist/bundle/chunks/chunk-2AMXQD57.js +11 -0
- package/dist/bundle/chunks/chunk-2OIUNVMP.js +10 -0
- package/dist/bundle/chunks/chunk-2V4QPJXQ.js +19 -0
- package/dist/bundle/chunks/chunk-2WN53CVO.js +15 -0
- package/dist/bundle/chunks/chunk-3ANOKDIL.js +5 -0
- package/dist/bundle/chunks/chunk-3P5XOPF6.js +1 -0
- package/dist/bundle/chunks/chunk-4PFDHMBC.js +8 -0
- package/dist/bundle/chunks/chunk-53I2XH4A.js +9 -0
- package/dist/bundle/chunks/chunk-5BF5Z7CI.js +1 -0
- package/dist/bundle/chunks/chunk-5J57FRET.js +4 -0
- package/dist/bundle/chunks/chunk-5PIFIDMP.js +13 -0
- package/dist/bundle/chunks/chunk-5PV2QBWC.js +5 -0
- package/dist/bundle/chunks/chunk-6V537K6X.js +1 -0
- package/dist/bundle/chunks/chunk-72YPFG2Z.js +5 -0
- package/dist/bundle/chunks/chunk-7USKQKOT.js +1 -0
- package/dist/bundle/chunks/chunk-ATPJVO6F.js +8 -0
- package/dist/bundle/chunks/chunk-BJQMZYH3.js +22 -0
- package/dist/bundle/chunks/chunk-BQFHZOZH.js +99 -0
- package/dist/bundle/chunks/chunk-BTTTDUMD.js +1 -0
- package/dist/bundle/chunks/chunk-BXVXYDEI.js +286 -0
- package/dist/bundle/chunks/chunk-C325X4RB.js +7 -0
- package/dist/bundle/chunks/chunk-C44B5265.js +2 -0
- package/dist/bundle/chunks/chunk-D3IE6KOV.js +21 -0
- package/dist/bundle/chunks/chunk-D4LWWAJ2.js +6 -0
- package/dist/bundle/chunks/chunk-DEQBZDPB.js +1 -0
- package/dist/bundle/chunks/chunk-DNPCEBCN.js +2 -0
- package/dist/bundle/chunks/chunk-E7BAZEZG.js +32 -0
- package/dist/bundle/chunks/chunk-EHRCEDXN.js +13 -0
- package/dist/bundle/chunks/chunk-EHY6GWKP.js +8 -0
- package/dist/bundle/chunks/chunk-F77E6PCM.js +7 -0
- package/dist/bundle/chunks/chunk-GET3OC3O.js +8 -0
- package/dist/bundle/chunks/chunk-GMCBEP44.js +16 -0
- package/dist/bundle/chunks/chunk-GNXHG75U.js +1 -0
- package/dist/bundle/chunks/chunk-GQSJJXDG.js +3 -0
- package/dist/bundle/chunks/chunk-H5X25CTO.js +6 -0
- package/dist/bundle/chunks/chunk-IAFRFK2O.js +9 -0
- package/dist/bundle/chunks/chunk-INJTM5VR.js +5 -0
- package/dist/bundle/chunks/chunk-J7YL5K5B.js +2 -0
- package/dist/bundle/chunks/chunk-JJ5E4XJI.js +13 -0
- package/dist/bundle/chunks/chunk-JMFP263D.js +1 -0
- package/dist/bundle/chunks/chunk-JSLN56GJ.js +7 -0
- package/dist/bundle/chunks/chunk-K374E7Q4.js +8 -0
- package/dist/bundle/chunks/chunk-K7ZRPFN6.js +6 -0
- package/dist/bundle/chunks/chunk-KBCEHRTU.js +4 -0
- package/dist/bundle/chunks/chunk-KM46TYGR.js +4 -0
- package/dist/bundle/chunks/chunk-KRXVUD4L.js +4 -0
- package/dist/bundle/chunks/chunk-LBJIRX7Z.js +6 -0
- package/dist/bundle/chunks/chunk-MIFIRXNI.js +1 -0
- package/dist/bundle/chunks/chunk-MOCB6GPI.js +62 -0
- package/dist/bundle/chunks/chunk-OYIATQ5V.js +6 -0
- package/dist/bundle/chunks/chunk-OZ76IUC5.js +10 -0
- package/dist/bundle/chunks/chunk-PEPBD26Q.js +2 -0
- package/dist/bundle/chunks/chunk-PES2WOIM.js +15 -0
- package/dist/bundle/chunks/chunk-PLMPLLOW.js +12 -0
- package/dist/bundle/chunks/chunk-PQPG4QOY.js +22 -0
- package/dist/bundle/chunks/chunk-PUUP54QP.js +9 -0
- package/dist/bundle/chunks/chunk-Q5XZ24VX.js +6 -0
- package/dist/bundle/chunks/chunk-QOFUETQV.js +4 -0
- package/dist/bundle/chunks/chunk-QPHABKP3.js +11 -0
- package/dist/bundle/chunks/chunk-RTGKIAVM.js +6 -0
- package/dist/bundle/chunks/chunk-RZ4GSKWY.js +7 -0
- package/dist/bundle/chunks/chunk-SF2462OV.js +3 -0
- package/dist/bundle/chunks/chunk-SJ7F47VW.js +6 -0
- package/dist/bundle/chunks/chunk-SMOO4IXI.js +1 -0
- package/dist/bundle/chunks/chunk-SPETXYUM.js +20 -0
- package/dist/bundle/chunks/chunk-SYTEZ2Y4.js +5 -0
- package/dist/bundle/chunks/chunk-TOK4OQFP.js +13 -0
- package/dist/bundle/chunks/chunk-U5Z7TJRO.js +11 -0
- package/dist/bundle/chunks/chunk-U6GF4IJH.js +72 -0
- package/dist/bundle/chunks/chunk-UBLR5ACC.js +1 -0
- package/dist/bundle/chunks/chunk-ULK572PS.js +7 -0
- package/dist/bundle/chunks/chunk-URMOT4S7.js +4 -0
- package/dist/bundle/chunks/chunk-USGCTFXK.js +2 -0
- package/dist/bundle/chunks/chunk-VKPVP3LD.js +4 -0
- package/dist/bundle/chunks/chunk-W4YQKIRV.js +35 -0
- package/dist/bundle/chunks/chunk-WMCZEPWH.js +8 -0
- package/dist/bundle/chunks/chunk-WTT2UCIA.js +20 -0
- package/dist/bundle/chunks/chunk-WVUVOYGQ.js +10 -0
- package/dist/bundle/chunks/chunk-XXS34VJC.js +12 -0
- package/dist/bundle/chunks/chunk-XZMBEDQL.js +7 -0
- package/dist/bundle/chunks/chunk-XZZ3XIZH.js +15 -0
- package/dist/bundle/chunks/chunk-YANZPHZ3.js +31 -0
- package/dist/bundle/chunks/chunk-YJHMB6QD.js +17 -0
- package/dist/bundle/chunks/chunk-YR4NQYT4.js +1 -0
- package/dist/bundle/chunks/chunk-YZPQ2W3A.js +139 -0
- package/dist/bundle/chunks/chunk-Z6DABRIE.js +12 -0
- package/dist/bundle/chunks/chunk-ZEHOKNGQ.js +2 -0
- package/dist/bundle/chunks/chunk-ZILSBZZ6.js +4 -0
- package/dist/bundle/chunks/clear-7SIFUXVD.js +1 -0
- package/dist/bundle/chunks/column-OUJRIWLX.js +1 -0
- package/dist/bundle/chunks/comm-47FVEMHB.js +1 -0
- package/dist/bundle/chunks/cp-FD6I3O6B.js +1 -0
- package/dist/bundle/chunks/curl-3MHMRKXA.js +25 -0
- package/dist/bundle/chunks/cut-LQZW2NZP.js +1 -0
- package/dist/bundle/chunks/date-MHLQVLQZ.js +1 -0
- package/dist/bundle/chunks/diff-7ZYMEVUP.js +1 -0
- package/dist/bundle/chunks/dirname-IVA4YYRE.js +1 -0
- package/dist/bundle/chunks/du-H4GJHM4R.js +1 -0
- package/dist/bundle/chunks/echo-ZPFMTGPQ.js +1 -0
- package/dist/bundle/chunks/env-ZCKP6263.js +1 -0
- package/dist/bundle/chunks/expand-Y7EMR5BJ.js +1 -0
- package/dist/bundle/chunks/expansion-GYIQOAHW.js +1 -0
- package/dist/bundle/chunks/expr-WDFXVU43.js +1 -0
- package/dist/bundle/chunks/file-7WSECN2B.js +1 -0
- package/dist/bundle/chunks/find-BYG3GTNV.js +1 -0
- package/dist/bundle/chunks/flag-coverage-VMMEL7EH.js +1 -0
- package/dist/bundle/chunks/fold-6O4H3AW4.js +1 -0
- package/dist/bundle/chunks/grep-KLQ4A2OH.js +1 -0
- package/dist/bundle/chunks/gzip-OUHELY5D.js +1 -0
- package/dist/bundle/chunks/head-CIKXFGO5.js +1 -0
- package/dist/bundle/chunks/help-B2UCSYQN.js +1 -0
- package/dist/bundle/chunks/history-N2VRLHEO.js +1 -0
- package/dist/bundle/chunks/hostname-W7U3GOEK.js +1 -0
- package/dist/bundle/chunks/html-to-markdown-ZDG5GHHM.js +1 -0
- package/dist/bundle/chunks/join-CFMKSF44.js +1 -0
- package/dist/bundle/chunks/jq-BE76GAFF.js +1 -0
- package/dist/bundle/chunks/ln-N3OWFM3J.js +1 -0
- package/dist/bundle/chunks/ls-JAO4QNWZ.js +1 -0
- package/dist/bundle/chunks/md5sum-ZK2D5HMO.js +1 -0
- package/dist/bundle/chunks/mkdir-O74MZREV.js +1 -0
- package/dist/bundle/chunks/mv-66ALAQRO.js +1 -0
- package/dist/bundle/chunks/nl-JSPXHHOM.js +1 -0
- package/dist/bundle/chunks/od-NUINXLUX.js +1 -0
- package/dist/bundle/chunks/paste-Y7CG4TKC.js +1 -0
- package/dist/bundle/chunks/printf-223LFYZL.js +1 -0
- package/dist/bundle/chunks/pwd-BP6H5JPD.js +1 -0
- package/dist/bundle/chunks/python3-2KEMASKS.js +13 -0
- package/dist/bundle/chunks/readlink-JL7TKP5U.js +1 -0
- package/dist/bundle/chunks/rev-UN4ZHPP5.js +1 -0
- package/dist/bundle/chunks/rg-PML6WNNK.js +1 -0
- package/dist/bundle/chunks/rm-NIZVTCU7.js +1 -0
- package/dist/bundle/chunks/rmdir-LGJXG7S3.js +1 -0
- package/dist/bundle/chunks/sed-JJ3WRWYT.js +1 -0
- package/dist/bundle/chunks/seq-UCWX6HDA.js +1 -0
- package/dist/bundle/chunks/sha1sum-BB464H3H.js +1 -0
- package/dist/bundle/chunks/sha256sum-PPJUHZ6A.js +1 -0
- package/dist/bundle/chunks/sleep-YQMDXMVK.js +1 -0
- package/dist/bundle/chunks/sort-BNPU2P3T.js +1 -0
- package/dist/bundle/chunks/split-SVMZIFGF.js +1 -0
- package/dist/bundle/chunks/sqlite3-PZGLI6XB.js +1 -0
- package/dist/bundle/chunks/stat-2CKLARLN.js +1 -0
- package/dist/bundle/chunks/strings-LG7URPXR.js +1 -0
- package/dist/bundle/chunks/tac-NXGTFB5T.js +1 -0
- package/dist/bundle/chunks/tail-GJ536HFQ.js +1 -0
- package/dist/bundle/chunks/tar-3KCFO6WZ.js +1 -0
- package/dist/bundle/chunks/tee-PJ6B6JJF.js +1 -0
- package/dist/bundle/chunks/time-IENYNVU4.js +1 -0
- package/dist/bundle/chunks/timeout-SXUKTL7R.js +1 -0
- package/dist/bundle/chunks/touch-7BNOFP74.js +1 -0
- package/dist/bundle/chunks/tr-TB6CSIUV.js +1 -0
- package/dist/bundle/chunks/tree-4XRVONUX.js +1 -0
- package/dist/bundle/chunks/true-4UI5ZW75.js +1 -0
- package/dist/bundle/chunks/unexpand-LDC3OTY4.js +1 -0
- package/dist/bundle/chunks/uniq-ZHYLWEFM.js +1 -0
- package/dist/bundle/chunks/wc-PWYVRT3X.js +1 -0
- package/dist/bundle/chunks/which-EIT2IJGG.js +1 -0
- package/dist/bundle/chunks/whoami-QZJHAL2R.js +1 -0
- package/dist/bundle/chunks/xan-JDD2TEQH.js +1 -0
- package/dist/bundle/chunks/xan-view-WKPGEZFG.js +1 -0
- package/dist/bundle/chunks/xargs-CB3LOKW5.js +1 -0
- package/dist/bundle/chunks/yq-JFXSVU6G.js +1 -0
- package/dist/bundle/index.js +289 -289
- package/dist/commands/head/head-tail-shared.d.ts +4 -3
- package/dist/commands/search-engine/index.d.ts +1 -0
- package/dist/commands/search-engine/stream-matcher.d.ts +31 -0
- package/dist/fs/encoding.d.ts +23 -7
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +9 -25
- package/dist/fs/interface.d.ts +24 -117
- package/dist/fs/mountable-fs/mountable-fs.d.ts +3 -2
- package/dist/fs/overlay-fs/overlay-fs.d.ts +10 -4
- package/dist/fs/read-write-fs/read-write-fs.d.ts +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/interpreter/builtin-dispatch.d.ts +5 -4
- package/dist/interpreter/builtins/eval.d.ts +2 -1
- package/dist/interpreter/builtins/mapfile.d.ts +1 -1
- package/dist/interpreter/builtins/read.d.ts +1 -1
- package/dist/interpreter/control-flow.d.ts +2 -1
- package/dist/interpreter/errors.d.ts +20 -25
- package/dist/interpreter/functions.d.ts +2 -1
- package/dist/interpreter/helpers/loop.d.ts +4 -3
- package/dist/interpreter/helpers/result.d.ts +18 -32
- package/dist/interpreter/helpers/statements.d.ts +4 -3
- package/dist/interpreter/interpreter.d.ts +2 -4
- package/dist/interpreter/pipeline-execution.d.ts +2 -1
- package/dist/interpreter/subshell-group.d.ts +4 -3
- package/dist/interpreter/types.d.ts +4 -3
- package/dist/test-utils.d.ts +2 -3
- package/dist/types.d.ts +19 -91
- package/dist/utils/binary-string.d.ts +1 -0
- package/dist/utils/bytes.d.ts +0 -2
- package/dist/utils/stream.d.ts +65 -0
- package/package.json +31 -29
- package/dist/bin/chunks/alias-23G4Q2RS.js +0 -2
- package/dist/bin/chunks/awk2-Z6VRXKAK.js +0 -2
- package/dist/bin/chunks/base64-DNX4WCIO.js +0 -2
- package/dist/bin/chunks/basename-MPQ7M4RF.js +0 -2
- package/dist/bin/chunks/bash-OQ32Y5I6.js +0 -2
- package/dist/bin/chunks/bytes-6YUZMX3P.js +0 -2
- package/dist/bin/chunks/cat-CL5ISR5P.js +0 -2
- package/dist/bin/chunks/chmod-R6IWRSKZ.js +0 -2
- package/dist/bin/chunks/chunk-227L3ACM.js +0 -23
- package/dist/bin/chunks/chunk-2QA4P6HI.js +0 -12
- package/dist/bin/chunks/chunk-3MFM4GSH.js +0 -36
- package/dist/bin/chunks/chunk-3UP5LXDO.js +0 -3
- package/dist/bin/chunks/chunk-47P7JSQI.js +0 -2
- package/dist/bin/chunks/chunk-4KBTPDQB.js +0 -3
- package/dist/bin/chunks/chunk-4UK2MV3F.js +0 -13
- package/dist/bin/chunks/chunk-563AO4OL.js +0 -7
- package/dist/bin/chunks/chunk-5HDWUXRX.js +0 -7
- package/dist/bin/chunks/chunk-5MCFI6LE.js +0 -5
- package/dist/bin/chunks/chunk-6CZOPIZD.js +0 -6
- package/dist/bin/chunks/chunk-6FNFX5GG.js +0 -5
- package/dist/bin/chunks/chunk-6NYIHYDY.js +0 -7
- package/dist/bin/chunks/chunk-6Y4TKR73.js +0 -16
- package/dist/bin/chunks/chunk-7C7WEK46.js +0 -23
- package/dist/bin/chunks/chunk-7TNGQWY6.js +0 -6
- package/dist/bin/chunks/chunk-7UAWRBQS.js +0 -9
- package/dist/bin/chunks/chunk-ARGU3OIG.js +0 -17
- package/dist/bin/chunks/chunk-BA3A5BYZ.js +0 -3
- package/dist/bin/chunks/chunk-BB7T22CF.js +0 -140
- package/dist/bin/chunks/chunk-BY24LKGP.js +0 -8
- package/dist/bin/chunks/chunk-CRHN4WNQ.js +0 -63
- package/dist/bin/chunks/chunk-ELZHJGI7.js +0 -10
- package/dist/bin/chunks/chunk-F46CSMUF.js +0 -2
- package/dist/bin/chunks/chunk-FQX4G5RH.js +0 -7
- package/dist/bin/chunks/chunk-G43H2WGH.js +0 -17
- package/dist/bin/chunks/chunk-GMJWC3MC.js +0 -12
- package/dist/bin/chunks/chunk-HVDU57EV.js +0 -16
- package/dist/bin/chunks/chunk-HWGK3XW7.js +0 -6
- package/dist/bin/chunks/chunk-HYR7G7KS.js +0 -3
- package/dist/bin/chunks/chunk-I2225JSU.js +0 -14
- package/dist/bin/chunks/chunk-I2FUQZXU.js +0 -11
- package/dist/bin/chunks/chunk-IBHPKKIT.js +0 -10
- package/dist/bin/chunks/chunk-IKNNFJNZ.js +0 -14
- package/dist/bin/chunks/chunk-INPUJM7Y.js +0 -8
- package/dist/bin/chunks/chunk-IOBKPMWJ.js +0 -9
- package/dist/bin/chunks/chunk-IYSA2L6A.js +0 -13
- package/dist/bin/chunks/chunk-JMLNX7GE.js +0 -287
- package/dist/bin/chunks/chunk-K6DD7NH3.js +0 -9
- package/dist/bin/chunks/chunk-KFLJ4EMB.js +0 -4
- package/dist/bin/chunks/chunk-KOMDAXHM.js +0 -7
- package/dist/bin/chunks/chunk-KV7ZTM2R.js +0 -11
- package/dist/bin/chunks/chunk-LCCVVEJA.js +0 -10
- package/dist/bin/chunks/chunk-LUPJK5US.js +0 -84
- package/dist/bin/chunks/chunk-LWF3XDOC.js +0 -32
- package/dist/bin/chunks/chunk-LXNARM2C.js +0 -9
- package/dist/bin/chunks/chunk-LXZS3X5T.js +0 -9
- package/dist/bin/chunks/chunk-M4ICSCXT.js +0 -100
- package/dist/bin/chunks/chunk-MEBZXRGE.js +0 -5
- package/dist/bin/chunks/chunk-MSPSS36S.js +0 -16
- package/dist/bin/chunks/chunk-N335RIGZ.js +0 -20
- package/dist/bin/chunks/chunk-N5KGQWJH.js +0 -5
- package/dist/bin/chunks/chunk-NDHTQE5T.js +0 -8
- package/dist/bin/chunks/chunk-NF5G7X3O.js +0 -7
- package/dist/bin/chunks/chunk-NGKNJ6V2.js +0 -11
- package/dist/bin/chunks/chunk-OKQ6RACF.js +0 -73
- package/dist/bin/chunks/chunk-PBY7XGZ6.js +0 -8
- package/dist/bin/chunks/chunk-PHHNNFRS.js +0 -6
- package/dist/bin/chunks/chunk-PO6Y7TWQ.js +0 -6
- package/dist/bin/chunks/chunk-Q4TLKLIZ.js +0 -12
- package/dist/bin/chunks/chunk-QS6LP3E3.js +0 -6
- package/dist/bin/chunks/chunk-QT2GMJRJ.js +0 -8
- package/dist/bin/chunks/chunk-QUVW3R4I.js +0 -5
- package/dist/bin/chunks/chunk-QUYWT2TY.js +0 -21
- package/dist/bin/chunks/chunk-QWUII542.js +0 -2
- package/dist/bin/chunks/chunk-R5EQDD5Y.js +0 -13
- package/dist/bin/chunks/chunk-RQSPCXDR.js +0 -2
- package/dist/bin/chunks/chunk-RTC6C5QW.js +0 -2
- package/dist/bin/chunks/chunk-S5W2KVHC.js +0 -2
- package/dist/bin/chunks/chunk-SDXDICI4.js +0 -2
- package/dist/bin/chunks/chunk-SX7TI7Q2.js +0 -3
- package/dist/bin/chunks/chunk-TDJ55L4A.js +0 -16
- package/dist/bin/chunks/chunk-TNPUAMV3.js +0 -8
- package/dist/bin/chunks/chunk-TSGSFBQI.js +0 -14
- package/dist/bin/chunks/chunk-U5ZE562V.js +0 -2
- package/dist/bin/chunks/chunk-UIMH6I3G.js +0 -33
- package/dist/bin/chunks/chunk-UXPY5T2P.js +0 -9
- package/dist/bin/chunks/chunk-V5I6PHN2.js +0 -14
- package/dist/bin/chunks/chunk-VOTJNR36.js +0 -5
- package/dist/bin/chunks/chunk-W5XFREQC.js +0 -3
- package/dist/bin/chunks/chunk-X2MOXVGO.js +0 -26
- package/dist/bin/chunks/chunk-XOGQUO62.js +0 -2
- package/dist/bin/chunks/chunk-Y57BDPQ5.js +0 -6
- package/dist/bin/chunks/chunk-YE6KXFFU.js +0 -2
- package/dist/bin/chunks/chunk-YEPWKN4F.js +0 -3
- package/dist/bin/chunks/chunk-ZEDWVSUZ.js +0 -19
- package/dist/bin/chunks/chunk-ZI4TTZL5.js +0 -21
- package/dist/bin/chunks/chunk-ZZVIGHYS.js +0 -7
- package/dist/bin/chunks/clear-27OP2FQZ.js +0 -2
- package/dist/bin/chunks/column-FJNKONCJ.js +0 -2
- package/dist/bin/chunks/comm-5FNEJE7X.js +0 -2
- package/dist/bin/chunks/cp-LVKHKFHQ.js +0 -2
- package/dist/bin/chunks/curl-S4FJSZA5.js +0 -26
- package/dist/bin/chunks/cut-UXU6PNTT.js +0 -2
- package/dist/bin/chunks/date-GGPTXVUT.js +0 -2
- package/dist/bin/chunks/diff-3V3FOITV.js +0 -2
- package/dist/bin/chunks/dirname-455JDV2M.js +0 -2
- package/dist/bin/chunks/du-WUEAQO2W.js +0 -2
- package/dist/bin/chunks/echo-HBXOI5TQ.js +0 -2
- package/dist/bin/chunks/env-MXFHTVHS.js +0 -2
- package/dist/bin/chunks/expand-F4FM4ML2.js +0 -2
- package/dist/bin/chunks/expansion-7AYBVOIQ.js +0 -2
- package/dist/bin/chunks/expr-5ZKR5ER5.js +0 -2
- package/dist/bin/chunks/file-BFN7BKUR.js +0 -2
- package/dist/bin/chunks/find-W4BCEJEC.js +0 -2
- package/dist/bin/chunks/flag-coverage-DBKGNLJO.js +0 -2
- package/dist/bin/chunks/fold-AE57YLOS.js +0 -2
- package/dist/bin/chunks/grep-I63BWUKL.js +0 -2
- package/dist/bin/chunks/gzip-X5IDXWZE.js +0 -2
- package/dist/bin/chunks/head-TBQETLQX.js +0 -2
- package/dist/bin/chunks/help-HGMKZ2GW.js +0 -2
- package/dist/bin/chunks/history-2DYRIL3U.js +0 -2
- package/dist/bin/chunks/hostname-RWEPTCXH.js +0 -2
- package/dist/bin/chunks/html-to-markdown-2VQWCEKU.js +0 -2
- package/dist/bin/chunks/join-TRRWQBEU.js +0 -2
- package/dist/bin/chunks/jq-NFKKH27D.js +0 -2
- package/dist/bin/chunks/ln-BSEVUP2J.js +0 -2
- package/dist/bin/chunks/ls-IJLTWVOI.js +0 -2
- package/dist/bin/chunks/md5sum-ZIQHOC4K.js +0 -2
- package/dist/bin/chunks/mkdir-KYFAO2SF.js +0 -2
- package/dist/bin/chunks/mv-TWM2PA7Q.js +0 -2
- package/dist/bin/chunks/nl-XLF2HFST.js +0 -2
- package/dist/bin/chunks/od-BOM6JPTH.js +0 -2
- package/dist/bin/chunks/paste-FUGXVGJX.js +0 -2
- package/dist/bin/chunks/printf-XUGNJ3QM.js +0 -2
- package/dist/bin/chunks/pwd-RZG6GZEU.js +0 -2
- package/dist/bin/chunks/python3-PIXJS3YM.js +0 -14
- package/dist/bin/chunks/readlink-4SOSIDHE.js +0 -2
- package/dist/bin/chunks/rev-5E5UGSUZ.js +0 -2
- package/dist/bin/chunks/rg-4YJSQZN7.js +0 -2
- package/dist/bin/chunks/rm-3PFOF4E3.js +0 -2
- package/dist/bin/chunks/rmdir-CSK7CGH5.js +0 -2
- package/dist/bin/chunks/sed-XBCUZMEP.js +0 -2
- package/dist/bin/chunks/seq-H7ID4VMK.js +0 -2
- package/dist/bin/chunks/sha1sum-EDQNYXXH.js +0 -2
- package/dist/bin/chunks/sha256sum-APTG6DO2.js +0 -2
- package/dist/bin/chunks/sleep-PNT7KILS.js +0 -2
- package/dist/bin/chunks/sort-ELAGZUES.js +0 -2
- package/dist/bin/chunks/split-QGXYUWBC.js +0 -2
- package/dist/bin/chunks/sqlite3-ELLMKNNJ.js +0 -2
- package/dist/bin/chunks/stat-Q2TZRKO3.js +0 -2
- package/dist/bin/chunks/strings-IGEGP5QX.js +0 -2
- package/dist/bin/chunks/tac-VOEDJLLG.js +0 -2
- package/dist/bin/chunks/tail-JOQASWMV.js +0 -2
- package/dist/bin/chunks/tar-2UVSVD3P.js +0 -2
- package/dist/bin/chunks/tee-IQLEDZOQ.js +0 -2
- package/dist/bin/chunks/time-VRCJK2LI.js +0 -2
- package/dist/bin/chunks/timeout-A36YWZWR.js +0 -2
- package/dist/bin/chunks/touch-5ECNQNBP.js +0 -2
- package/dist/bin/chunks/tr-AVALLN54.js +0 -2
- package/dist/bin/chunks/tree-UFM5EDXS.js +0 -2
- package/dist/bin/chunks/true-BU5JSAAW.js +0 -2
- package/dist/bin/chunks/unexpand-TDRWZW5F.js +0 -2
- package/dist/bin/chunks/uniq-IKBUNAMN.js +0 -2
- package/dist/bin/chunks/wc-2R4RS2SX.js +0 -2
- package/dist/bin/chunks/which-6UVGMXDF.js +0 -2
- package/dist/bin/chunks/whoami-N6TLTETT.js +0 -2
- package/dist/bin/chunks/xan-JX5QUK32.js +0 -2
- package/dist/bin/chunks/xan-view-NFMUMJ7Z.js +0 -2
- package/dist/bin/chunks/xargs-4MYN4U3C.js +0 -2
- package/dist/bin/chunks/yq-EHDQVD7S.js +0 -2
- package/dist/bin/shell/chunks/alias-23G4Q2RS.js +0 -2
- package/dist/bin/shell/chunks/awk2-Z6VRXKAK.js +0 -2
- package/dist/bin/shell/chunks/base64-DNX4WCIO.js +0 -2
- package/dist/bin/shell/chunks/basename-MPQ7M4RF.js +0 -2
- package/dist/bin/shell/chunks/bash-OQ32Y5I6.js +0 -2
- package/dist/bin/shell/chunks/bytes-6YUZMX3P.js +0 -2
- package/dist/bin/shell/chunks/cat-CL5ISR5P.js +0 -2
- package/dist/bin/shell/chunks/chmod-R6IWRSKZ.js +0 -2
- package/dist/bin/shell/chunks/chunk-227L3ACM.js +0 -23
- package/dist/bin/shell/chunks/chunk-2QA4P6HI.js +0 -12
- package/dist/bin/shell/chunks/chunk-3MFM4GSH.js +0 -36
- package/dist/bin/shell/chunks/chunk-3UP5LXDO.js +0 -3
- package/dist/bin/shell/chunks/chunk-47P7JSQI.js +0 -2
- package/dist/bin/shell/chunks/chunk-4KBTPDQB.js +0 -3
- package/dist/bin/shell/chunks/chunk-4UK2MV3F.js +0 -13
- package/dist/bin/shell/chunks/chunk-563AO4OL.js +0 -7
- package/dist/bin/shell/chunks/chunk-5HDWUXRX.js +0 -7
- package/dist/bin/shell/chunks/chunk-5MCFI6LE.js +0 -5
- package/dist/bin/shell/chunks/chunk-6CZOPIZD.js +0 -6
- package/dist/bin/shell/chunks/chunk-6FNFX5GG.js +0 -5
- package/dist/bin/shell/chunks/chunk-6NYIHYDY.js +0 -7
- package/dist/bin/shell/chunks/chunk-6Y4TKR73.js +0 -16
- package/dist/bin/shell/chunks/chunk-7C7WEK46.js +0 -23
- package/dist/bin/shell/chunks/chunk-7TNGQWY6.js +0 -6
- package/dist/bin/shell/chunks/chunk-7UAWRBQS.js +0 -9
- package/dist/bin/shell/chunks/chunk-ARGU3OIG.js +0 -17
- package/dist/bin/shell/chunks/chunk-BA3A5BYZ.js +0 -3
- package/dist/bin/shell/chunks/chunk-BB7T22CF.js +0 -140
- package/dist/bin/shell/chunks/chunk-BY24LKGP.js +0 -8
- package/dist/bin/shell/chunks/chunk-CRHN4WNQ.js +0 -63
- package/dist/bin/shell/chunks/chunk-ELZHJGI7.js +0 -10
- package/dist/bin/shell/chunks/chunk-F46CSMUF.js +0 -2
- package/dist/bin/shell/chunks/chunk-FQX4G5RH.js +0 -7
- package/dist/bin/shell/chunks/chunk-G43H2WGH.js +0 -17
- package/dist/bin/shell/chunks/chunk-GMJWC3MC.js +0 -12
- package/dist/bin/shell/chunks/chunk-HVDU57EV.js +0 -16
- package/dist/bin/shell/chunks/chunk-HWGK3XW7.js +0 -6
- package/dist/bin/shell/chunks/chunk-HYR7G7KS.js +0 -3
- package/dist/bin/shell/chunks/chunk-I2225JSU.js +0 -14
- package/dist/bin/shell/chunks/chunk-I2FUQZXU.js +0 -11
- package/dist/bin/shell/chunks/chunk-IBHPKKIT.js +0 -10
- package/dist/bin/shell/chunks/chunk-IKNNFJNZ.js +0 -14
- package/dist/bin/shell/chunks/chunk-INPUJM7Y.js +0 -8
- package/dist/bin/shell/chunks/chunk-IOBKPMWJ.js +0 -9
- package/dist/bin/shell/chunks/chunk-IYSA2L6A.js +0 -13
- package/dist/bin/shell/chunks/chunk-JMLNX7GE.js +0 -287
- package/dist/bin/shell/chunks/chunk-K6DD7NH3.js +0 -9
- package/dist/bin/shell/chunks/chunk-KFLJ4EMB.js +0 -4
- package/dist/bin/shell/chunks/chunk-KOMDAXHM.js +0 -7
- package/dist/bin/shell/chunks/chunk-KV7ZTM2R.js +0 -11
- package/dist/bin/shell/chunks/chunk-LCCVVEJA.js +0 -10
- package/dist/bin/shell/chunks/chunk-LUPJK5US.js +0 -84
- package/dist/bin/shell/chunks/chunk-LWF3XDOC.js +0 -32
- package/dist/bin/shell/chunks/chunk-LXNARM2C.js +0 -9
- package/dist/bin/shell/chunks/chunk-LXZS3X5T.js +0 -9
- package/dist/bin/shell/chunks/chunk-M4ICSCXT.js +0 -100
- package/dist/bin/shell/chunks/chunk-MEBZXRGE.js +0 -5
- package/dist/bin/shell/chunks/chunk-MSPSS36S.js +0 -16
- package/dist/bin/shell/chunks/chunk-N335RIGZ.js +0 -20
- package/dist/bin/shell/chunks/chunk-N5KGQWJH.js +0 -5
- package/dist/bin/shell/chunks/chunk-NDHTQE5T.js +0 -8
- package/dist/bin/shell/chunks/chunk-NF5G7X3O.js +0 -7
- package/dist/bin/shell/chunks/chunk-NGKNJ6V2.js +0 -11
- package/dist/bin/shell/chunks/chunk-OKQ6RACF.js +0 -73
- package/dist/bin/shell/chunks/chunk-PBY7XGZ6.js +0 -8
- package/dist/bin/shell/chunks/chunk-PHHNNFRS.js +0 -6
- package/dist/bin/shell/chunks/chunk-PO6Y7TWQ.js +0 -6
- package/dist/bin/shell/chunks/chunk-Q4TLKLIZ.js +0 -12
- package/dist/bin/shell/chunks/chunk-QS6LP3E3.js +0 -6
- package/dist/bin/shell/chunks/chunk-QT2GMJRJ.js +0 -8
- package/dist/bin/shell/chunks/chunk-QUVW3R4I.js +0 -5
- package/dist/bin/shell/chunks/chunk-QUYWT2TY.js +0 -21
- package/dist/bin/shell/chunks/chunk-QWUII542.js +0 -2
- package/dist/bin/shell/chunks/chunk-R5EQDD5Y.js +0 -13
- package/dist/bin/shell/chunks/chunk-RQSPCXDR.js +0 -2
- package/dist/bin/shell/chunks/chunk-RTC6C5QW.js +0 -2
- package/dist/bin/shell/chunks/chunk-S5W2KVHC.js +0 -2
- package/dist/bin/shell/chunks/chunk-SDXDICI4.js +0 -2
- package/dist/bin/shell/chunks/chunk-SX7TI7Q2.js +0 -3
- package/dist/bin/shell/chunks/chunk-TDJ55L4A.js +0 -16
- package/dist/bin/shell/chunks/chunk-TNPUAMV3.js +0 -8
- package/dist/bin/shell/chunks/chunk-TSGSFBQI.js +0 -14
- package/dist/bin/shell/chunks/chunk-U5ZE562V.js +0 -2
- package/dist/bin/shell/chunks/chunk-UIMH6I3G.js +0 -33
- package/dist/bin/shell/chunks/chunk-UXPY5T2P.js +0 -9
- package/dist/bin/shell/chunks/chunk-V5I6PHN2.js +0 -14
- package/dist/bin/shell/chunks/chunk-VOTJNR36.js +0 -5
- package/dist/bin/shell/chunks/chunk-W5XFREQC.js +0 -3
- package/dist/bin/shell/chunks/chunk-X2MOXVGO.js +0 -26
- package/dist/bin/shell/chunks/chunk-XOGQUO62.js +0 -2
- package/dist/bin/shell/chunks/chunk-Y57BDPQ5.js +0 -6
- package/dist/bin/shell/chunks/chunk-YE6KXFFU.js +0 -2
- package/dist/bin/shell/chunks/chunk-YEPWKN4F.js +0 -3
- package/dist/bin/shell/chunks/chunk-ZEDWVSUZ.js +0 -19
- package/dist/bin/shell/chunks/chunk-ZI4TTZL5.js +0 -21
- package/dist/bin/shell/chunks/chunk-ZZVIGHYS.js +0 -7
- package/dist/bin/shell/chunks/clear-27OP2FQZ.js +0 -2
- package/dist/bin/shell/chunks/column-FJNKONCJ.js +0 -2
- package/dist/bin/shell/chunks/comm-5FNEJE7X.js +0 -2
- package/dist/bin/shell/chunks/cp-LVKHKFHQ.js +0 -2
- package/dist/bin/shell/chunks/curl-S4FJSZA5.js +0 -26
- package/dist/bin/shell/chunks/cut-UXU6PNTT.js +0 -2
- package/dist/bin/shell/chunks/date-GGPTXVUT.js +0 -2
- package/dist/bin/shell/chunks/diff-3V3FOITV.js +0 -2
- package/dist/bin/shell/chunks/dirname-455JDV2M.js +0 -2
- package/dist/bin/shell/chunks/du-WUEAQO2W.js +0 -2
- package/dist/bin/shell/chunks/echo-HBXOI5TQ.js +0 -2
- package/dist/bin/shell/chunks/env-MXFHTVHS.js +0 -2
- package/dist/bin/shell/chunks/expand-F4FM4ML2.js +0 -2
- package/dist/bin/shell/chunks/expansion-7AYBVOIQ.js +0 -2
- package/dist/bin/shell/chunks/expr-5ZKR5ER5.js +0 -2
- package/dist/bin/shell/chunks/file-BFN7BKUR.js +0 -2
- package/dist/bin/shell/chunks/find-W4BCEJEC.js +0 -2
- package/dist/bin/shell/chunks/flag-coverage-DBKGNLJO.js +0 -2
- package/dist/bin/shell/chunks/fold-AE57YLOS.js +0 -2
- package/dist/bin/shell/chunks/grep-I63BWUKL.js +0 -2
- package/dist/bin/shell/chunks/gzip-X5IDXWZE.js +0 -2
- package/dist/bin/shell/chunks/head-TBQETLQX.js +0 -2
- package/dist/bin/shell/chunks/help-HGMKZ2GW.js +0 -2
- package/dist/bin/shell/chunks/history-2DYRIL3U.js +0 -2
- package/dist/bin/shell/chunks/hostname-RWEPTCXH.js +0 -2
- package/dist/bin/shell/chunks/html-to-markdown-2VQWCEKU.js +0 -2
- package/dist/bin/shell/chunks/join-TRRWQBEU.js +0 -2
- package/dist/bin/shell/chunks/jq-NFKKH27D.js +0 -2
- package/dist/bin/shell/chunks/ln-BSEVUP2J.js +0 -2
- package/dist/bin/shell/chunks/ls-IJLTWVOI.js +0 -2
- package/dist/bin/shell/chunks/md5sum-ZIQHOC4K.js +0 -2
- package/dist/bin/shell/chunks/mkdir-KYFAO2SF.js +0 -2
- package/dist/bin/shell/chunks/mv-TWM2PA7Q.js +0 -2
- package/dist/bin/shell/chunks/nl-XLF2HFST.js +0 -2
- package/dist/bin/shell/chunks/od-BOM6JPTH.js +0 -2
- package/dist/bin/shell/chunks/paste-FUGXVGJX.js +0 -2
- package/dist/bin/shell/chunks/printf-XUGNJ3QM.js +0 -2
- package/dist/bin/shell/chunks/pwd-RZG6GZEU.js +0 -2
- package/dist/bin/shell/chunks/python3-PIXJS3YM.js +0 -14
- package/dist/bin/shell/chunks/readlink-4SOSIDHE.js +0 -2
- package/dist/bin/shell/chunks/rev-5E5UGSUZ.js +0 -2
- package/dist/bin/shell/chunks/rg-4YJSQZN7.js +0 -2
- package/dist/bin/shell/chunks/rm-3PFOF4E3.js +0 -2
- package/dist/bin/shell/chunks/rmdir-CSK7CGH5.js +0 -2
- package/dist/bin/shell/chunks/sed-XBCUZMEP.js +0 -2
- package/dist/bin/shell/chunks/seq-H7ID4VMK.js +0 -2
- package/dist/bin/shell/chunks/sha1sum-EDQNYXXH.js +0 -2
- package/dist/bin/shell/chunks/sha256sum-APTG6DO2.js +0 -2
- package/dist/bin/shell/chunks/sleep-PNT7KILS.js +0 -2
- package/dist/bin/shell/chunks/sort-ELAGZUES.js +0 -2
- package/dist/bin/shell/chunks/split-QGXYUWBC.js +0 -2
- package/dist/bin/shell/chunks/sqlite3-ELLMKNNJ.js +0 -2
- package/dist/bin/shell/chunks/stat-Q2TZRKO3.js +0 -2
- package/dist/bin/shell/chunks/strings-IGEGP5QX.js +0 -2
- package/dist/bin/shell/chunks/tac-VOEDJLLG.js +0 -2
- package/dist/bin/shell/chunks/tail-JOQASWMV.js +0 -2
- package/dist/bin/shell/chunks/tar-2UVSVD3P.js +0 -2
- package/dist/bin/shell/chunks/tee-IQLEDZOQ.js +0 -2
- package/dist/bin/shell/chunks/time-VRCJK2LI.js +0 -2
- package/dist/bin/shell/chunks/timeout-A36YWZWR.js +0 -2
- package/dist/bin/shell/chunks/touch-5ECNQNBP.js +0 -2
- package/dist/bin/shell/chunks/tr-AVALLN54.js +0 -2
- package/dist/bin/shell/chunks/tree-UFM5EDXS.js +0 -2
- package/dist/bin/shell/chunks/true-BU5JSAAW.js +0 -2
- package/dist/bin/shell/chunks/unexpand-TDRWZW5F.js +0 -2
- package/dist/bin/shell/chunks/uniq-IKBUNAMN.js +0 -2
- package/dist/bin/shell/chunks/wc-2R4RS2SX.js +0 -2
- package/dist/bin/shell/chunks/which-6UVGMXDF.js +0 -2
- package/dist/bin/shell/chunks/whoami-N6TLTETT.js +0 -2
- package/dist/bin/shell/chunks/xan-JX5QUK32.js +0 -2
- package/dist/bin/shell/chunks/xan-view-NFMUMJ7Z.js +0 -2
- package/dist/bin/shell/chunks/xargs-4MYN4U3C.js +0 -2
- package/dist/bin/shell/chunks/yq-EHDQVD7S.js +0 -2
- package/dist/bundle/chunks/alias-T2KDAHDL.js +0 -1
- package/dist/bundle/chunks/awk2-UIH6CPHX.js +0 -1
- package/dist/bundle/chunks/base64-RY5JPAQL.js +0 -1
- package/dist/bundle/chunks/basename-QT55QR7O.js +0 -1
- package/dist/bundle/chunks/bash-BZZ6TUGW.js +0 -1
- package/dist/bundle/chunks/bytes-W6ESHQ7F.js +0 -1
- package/dist/bundle/chunks/cat-WUR2OJUG.js +0 -1
- package/dist/bundle/chunks/chmod-LTQYKUUW.js +0 -1
- package/dist/bundle/chunks/chunk-24BT6QUB.js +0 -11
- package/dist/bundle/chunks/chunk-274QVGRQ.js +0 -2
- package/dist/bundle/chunks/chunk-2IKXAFP4.js +0 -11
- package/dist/bundle/chunks/chunk-2IO54DPD.js +0 -1
- package/dist/bundle/chunks/chunk-2VAJD54D.js +0 -13
- package/dist/bundle/chunks/chunk-34P4G5H7.js +0 -5
- package/dist/bundle/chunks/chunk-3OY3UJDR.js +0 -62
- package/dist/bundle/chunks/chunk-3R6EWKMD.js +0 -13
- package/dist/bundle/chunks/chunk-3SPSXVPQ.js +0 -2
- package/dist/bundle/chunks/chunk-43RXAZRC.js +0 -7
- package/dist/bundle/chunks/chunk-47LWQIG6.js +0 -15
- package/dist/bundle/chunks/chunk-4L3Y4LKT.js +0 -5
- package/dist/bundle/chunks/chunk-4LYDOEQ6.js +0 -4
- package/dist/bundle/chunks/chunk-4Q5DFBVQ.js +0 -6
- package/dist/bundle/chunks/chunk-4R5AUIZ4.js +0 -6
- package/dist/bundle/chunks/chunk-4UTZCT3W.js +0 -2
- package/dist/bundle/chunks/chunk-5FDLF2FN.js +0 -5
- package/dist/bundle/chunks/chunk-5HJSZMTG.js +0 -1
- package/dist/bundle/chunks/chunk-5NR6JZM4.js +0 -12
- package/dist/bundle/chunks/chunk-5PL72KVW.js +0 -7
- package/dist/bundle/chunks/chunk-6BM2WKUH.js +0 -23
- package/dist/bundle/chunks/chunk-6HLDZZOT.js +0 -4
- package/dist/bundle/chunks/chunk-7VHVF5PX.js +0 -20
- package/dist/bundle/chunks/chunk-A3YV3X3J.js +0 -6
- package/dist/bundle/chunks/chunk-AJNR4FJT.js +0 -8
- package/dist/bundle/chunks/chunk-AMQM5ZPF.js +0 -1
- package/dist/bundle/chunks/chunk-BCDE2QUY.js +0 -1
- package/dist/bundle/chunks/chunk-BVFIC7R6.js +0 -4
- package/dist/bundle/chunks/chunk-CC4HUWHZ.js +0 -4
- package/dist/bundle/chunks/chunk-CNCKROJZ.js +0 -10
- package/dist/bundle/chunks/chunk-CSFZQCAK.js +0 -139
- package/dist/bundle/chunks/chunk-CU7G2LMR.js +0 -1
- package/dist/bundle/chunks/chunk-CZP7PMAG.js +0 -4
- package/dist/bundle/chunks/chunk-D2OUCFAU.js +0 -8
- package/dist/bundle/chunks/chunk-DQXLKPVQ.js +0 -7
- package/dist/bundle/chunks/chunk-E6IR6BWV.js +0 -286
- package/dist/bundle/chunks/chunk-ELZ2RVIZ.js +0 -11
- package/dist/bundle/chunks/chunk-EVNUXIEZ.js +0 -2
- package/dist/bundle/chunks/chunk-F6FQRFZU.js +0 -6
- package/dist/bundle/chunks/chunk-FAECBHMR.js +0 -2
- package/dist/bundle/chunks/chunk-FBOLGXN4.js +0 -16
- package/dist/bundle/chunks/chunk-FNIOXBJW.js +0 -9
- package/dist/bundle/chunks/chunk-GD5SDRL7.js +0 -5
- package/dist/bundle/chunks/chunk-GEAGCSIY.js +0 -31
- package/dist/bundle/chunks/chunk-GI2KN5IL.js +0 -22
- package/dist/bundle/chunks/chunk-GOG2LNAH.js +0 -9
- package/dist/bundle/chunks/chunk-H2ENJVUI.js +0 -10
- package/dist/bundle/chunks/chunk-HDNR2KMO.js +0 -13
- package/dist/bundle/chunks/chunk-HJ37IXKX.js +0 -12
- package/dist/bundle/chunks/chunk-I36BZMR3.js +0 -1
- package/dist/bundle/chunks/chunk-I6YSZMB6.js +0 -15
- package/dist/bundle/chunks/chunk-IXD4Z54Z.js +0 -8
- package/dist/bundle/chunks/chunk-J44PYBAW.js +0 -2
- package/dist/bundle/chunks/chunk-JDREUEBG.js +0 -9
- package/dist/bundle/chunks/chunk-KA244HSE.js +0 -5
- package/dist/bundle/chunks/chunk-KKZJ6K7R.js +0 -8
- package/dist/bundle/chunks/chunk-KZ3P3SVS.js +0 -22
- package/dist/bundle/chunks/chunk-LIVSDOY2.js +0 -1
- package/dist/bundle/chunks/chunk-LX7SQKLW.js +0 -15
- package/dist/bundle/chunks/chunk-M5O5DYR7.js +0 -1
- package/dist/bundle/chunks/chunk-MML7K3J2.js +0 -6
- package/dist/bundle/chunks/chunk-N4GRDEVJ.js +0 -5
- package/dist/bundle/chunks/chunk-NPZMNEW5.js +0 -6
- package/dist/bundle/chunks/chunk-O7N2RCS7.js +0 -1
- package/dist/bundle/chunks/chunk-OSYLT4VG.js +0 -4
- package/dist/bundle/chunks/chunk-OXRHP7HO.js +0 -3
- package/dist/bundle/chunks/chunk-OZOS3R6K.js +0 -99
- package/dist/bundle/chunks/chunk-OZQ4AW5X.js +0 -8
- package/dist/bundle/chunks/chunk-PNGAWBIZ.js +0 -10
- package/dist/bundle/chunks/chunk-PPUKM2B7.js +0 -13
- package/dist/bundle/chunks/chunk-PTELGM2J.js +0 -7
- package/dist/bundle/chunks/chunk-Q3TLRYBC.js +0 -72
- package/dist/bundle/chunks/chunk-Q5AOYNOX.js +0 -6
- package/dist/bundle/chunks/chunk-QEKGAAIL.js +0 -1
- package/dist/bundle/chunks/chunk-QIL3FXIC.js +0 -6
- package/dist/bundle/chunks/chunk-QNZEO23C.js +0 -8
- package/dist/bundle/chunks/chunk-R4IVADTA.js +0 -7
- package/dist/bundle/chunks/chunk-RK57WTFF.js +0 -12
- package/dist/bundle/chunks/chunk-RU5M6ZRS.js +0 -4
- package/dist/bundle/chunks/chunk-SBVBPPEQ.js +0 -5
- package/dist/bundle/chunks/chunk-SP22LBKJ.js +0 -20
- package/dist/bundle/chunks/chunk-UKS3AEEA.js +0 -32
- package/dist/bundle/chunks/chunk-UYR5HJI6.js +0 -7
- package/dist/bundle/chunks/chunk-V6ANTLBA.js +0 -15
- package/dist/bundle/chunks/chunk-VLGZJRPG.js +0 -16
- package/dist/bundle/chunks/chunk-VZUQMDOT.js +0 -2
- package/dist/bundle/chunks/chunk-XDQU6V6S.js +0 -19
- package/dist/bundle/chunks/chunk-XRVUJRYI.js +0 -35
- package/dist/bundle/chunks/clear-NLKZY76S.js +0 -1
- package/dist/bundle/chunks/column-S7P64XRJ.js +0 -1
- package/dist/bundle/chunks/comm-FPLN4BYY.js +0 -1
- package/dist/bundle/chunks/cp-W5HXJH5J.js +0 -1
- package/dist/bundle/chunks/curl-UFR6W4B6.js +0 -25
- package/dist/bundle/chunks/cut-VNFQFCA7.js +0 -1
- package/dist/bundle/chunks/date-EDSSFONA.js +0 -1
- package/dist/bundle/chunks/diff-RR5VJXIT.js +0 -1
- package/dist/bundle/chunks/dirname-V7Z24BGZ.js +0 -1
- package/dist/bundle/chunks/du-QKRPQIMY.js +0 -1
- package/dist/bundle/chunks/echo-TR3BM2AJ.js +0 -1
- package/dist/bundle/chunks/env-SVQBHVZF.js +0 -1
- package/dist/bundle/chunks/expand-ZVCJ72RF.js +0 -1
- package/dist/bundle/chunks/expansion-OBOJBZTH.js +0 -1
- package/dist/bundle/chunks/expr-QRA5KFYV.js +0 -1
- package/dist/bundle/chunks/file-TORG4IVZ.js +0 -1
- package/dist/bundle/chunks/find-NAGPRRQ7.js +0 -1
- package/dist/bundle/chunks/flag-coverage-FMTW4YWD.js +0 -1
- package/dist/bundle/chunks/fold-L4U6GS2N.js +0 -1
- package/dist/bundle/chunks/grep-D6AI423Z.js +0 -1
- package/dist/bundle/chunks/gzip-4EFUBHN7.js +0 -1
- package/dist/bundle/chunks/head-KBQT2JAC.js +0 -1
- package/dist/bundle/chunks/help-F3TJS3LS.js +0 -1
- package/dist/bundle/chunks/history-OKEAINJD.js +0 -1
- package/dist/bundle/chunks/hostname-AGIPNJOC.js +0 -1
- package/dist/bundle/chunks/html-to-markdown-P2LSCPVF.js +0 -1
- package/dist/bundle/chunks/join-FTSZAZYU.js +0 -1
- package/dist/bundle/chunks/jq-TNIKCGGT.js +0 -1
- package/dist/bundle/chunks/ln-BWYUCELO.js +0 -1
- package/dist/bundle/chunks/ls-6BM6G675.js +0 -1
- package/dist/bundle/chunks/md5sum-ALFVDB3W.js +0 -1
- package/dist/bundle/chunks/mkdir-I3BZBLTZ.js +0 -1
- package/dist/bundle/chunks/mv-76WRD5SE.js +0 -1
- package/dist/bundle/chunks/nl-77Q7V2GV.js +0 -1
- package/dist/bundle/chunks/od-AA6TIC6A.js +0 -1
- package/dist/bundle/chunks/paste-C6JKQOHO.js +0 -1
- package/dist/bundle/chunks/printf-WOYMDX2I.js +0 -1
- package/dist/bundle/chunks/pwd-BE3B3ZPG.js +0 -1
- package/dist/bundle/chunks/python3-QFUFNW7I.js +0 -13
- package/dist/bundle/chunks/readlink-QI6K7ZZX.js +0 -1
- package/dist/bundle/chunks/rev-2FZQEIQG.js +0 -1
- package/dist/bundle/chunks/rg-CNS6SD3V.js +0 -1
- package/dist/bundle/chunks/rm-JMWEKCU4.js +0 -1
- package/dist/bundle/chunks/rmdir-5HDB4IQ7.js +0 -1
- package/dist/bundle/chunks/sed-CSUGXVBJ.js +0 -1
- package/dist/bundle/chunks/seq-UP62NDEL.js +0 -1
- package/dist/bundle/chunks/sha1sum-XXYTWQIW.js +0 -1
- package/dist/bundle/chunks/sha256sum-GD6AFWG3.js +0 -1
- package/dist/bundle/chunks/sleep-225KIGXI.js +0 -1
- package/dist/bundle/chunks/sort-BIWEEIVX.js +0 -1
- package/dist/bundle/chunks/split-QUFGLTTX.js +0 -1
- package/dist/bundle/chunks/sqlite3-3ZFEGTQ7.js +0 -1
- package/dist/bundle/chunks/stat-DIMPSC6S.js +0 -1
- package/dist/bundle/chunks/strings-LECMRXOT.js +0 -1
- package/dist/bundle/chunks/tac-A6JKZKWL.js +0 -1
- package/dist/bundle/chunks/tail-YGDXZZGG.js +0 -1
- package/dist/bundle/chunks/tar-7KN7KZ6S.js +0 -1
- package/dist/bundle/chunks/tee-J4MBDQJZ.js +0 -1
- package/dist/bundle/chunks/time-CVS7ESWV.js +0 -1
- package/dist/bundle/chunks/timeout-UX2PSLYJ.js +0 -1
- package/dist/bundle/chunks/touch-ATQADRUQ.js +0 -1
- package/dist/bundle/chunks/tr-QVFN4YWH.js +0 -1
- package/dist/bundle/chunks/tree-IY7WNFVF.js +0 -1
- package/dist/bundle/chunks/true-AKKYE7WM.js +0 -1
- package/dist/bundle/chunks/unexpand-2WTX7UPB.js +0 -1
- package/dist/bundle/chunks/uniq-XS6VGRO2.js +0 -1
- package/dist/bundle/chunks/wc-22EISCPD.js +0 -1
- package/dist/bundle/chunks/which-IWHCX6SW.js +0 -1
- package/dist/bundle/chunks/whoami-HCON4D7C.js +0 -1
- package/dist/bundle/chunks/xan-XDECJHII.js +0 -1
- package/dist/bundle/chunks/xan-view-IJ4EABH7.js +0 -1
- package/dist/bundle/chunks/xargs-5MMN7C6P.js +0 -1
- package/dist/bundle/chunks/yq-LQX5YIGM.js +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as b,b as g,c as O,d as k,e as X}from"./chunk-UYBH3FNE.js";import{a as G,c as ht}from"./chunk-F46CSMUF.js";import{a as S}from"./chunk-SE4C7FJY.js";import{k as P}from"./chunk-QT2GMJRJ.js";function W(t,r,e,n,p,i,u,c,s,f){switch(r){case"sort":return Array.isArray(t)?[[...t].sort(u)]:[null];case"sort_by":return!Array.isArray(t)||e.length===0?[null]:[[...t].sort((h,y)=>{let a=p(h,e[0],n)[0],l=p(y,e[0],n)[0];return u(a,l)})];case"bsearch":{if(!Array.isArray(t)){let h=t===null?"null":typeof t=="object"?"object":typeof t;throw new Error(`${h} (${JSON.stringify(t)}) cannot be searched from`)}return e.length===0?[null]:p(t,e[0],n).map(h=>{let y=0,a=t.length;for(;y<a;){let l=y+a>>>1;u(t[l],h)<0?y=l+1:a=l}return y<t.length&&u(t[y],h)===0?y:-y-1})}case"unique_by":{if(!Array.isArray(t)||e.length===0)return[null];let o=new Map;for(let y of t){let a=p(y,e[0],n)[0],l=JSON.stringify(a);o.has(l)||o.set(l,{item:y,key:a})}let h=[...o.values()];return h.sort((y,a)=>u(y.key,a.key)),[h.map(y=>y.item)]}case"group_by":{if(!Array.isArray(t)||e.length===0)return[null];let o=new Map;for(let h of t){let y=JSON.stringify(p(h,e[0],n)[0]);o.has(y)||o.set(y,[]),o.get(y)?.push(h)}return[[...o.values()]]}case"max":return Array.isArray(t)&&t.length>0?[t.reduce((o,h)=>u(o,h)>0?o:h)]:[null];case"max_by":return!Array.isArray(t)||t.length===0||e.length===0?[null]:[t.reduce((o,h)=>{let y=p(o,e[0],n)[0],a=p(h,e[0],n)[0];return u(y,a)>0?o:h})];case"min":return Array.isArray(t)&&t.length>0?[t.reduce((o,h)=>u(o,h)<0?o:h)]:[null];case"min_by":return!Array.isArray(t)||t.length===0||e.length===0?[null]:[t.reduce((o,h)=>{let y=p(o,e[0],n)[0],a=p(h,e[0],n)[0];return u(y,a)<0?o:h})];case"add":{let o=h=>{let y=h.filter(a=>a!==null);return y.length===0?null:y.every(a=>typeof a=="number")?y.reduce((a,l)=>a+l,0):y.every(a=>typeof a=="string")?y.join(""):y.every(a=>Array.isArray(a))?y.flat():y.every(a=>a&&typeof a=="object"&&!Array.isArray(a))?ht(...y):null};if(e.length>=1){let h=p(t,e[0],n);return[o(h)]}return Array.isArray(t)?[o(t)]:[null]}case"any":{if(e.length>=2){try{let o=i(t,e[0],n);for(let h of o)if(p(h,e[1],n).some(c))return[!0]}catch(o){if(o instanceof f)throw o}return[!1]}return e.length===1?Array.isArray(t)?[t.some(o=>c(p(o,e[0],n)[0]))]:[!1]:Array.isArray(t)?[t.some(c)]:[!1]}case"all":{if(e.length>=2){try{let o=i(t,e[0],n);for(let h of o)if(!p(h,e[1],n).some(c))return[!1]}catch(o){if(o instanceof f)throw o}return[!0]}return e.length===1?Array.isArray(t)?[t.every(o=>c(p(o,e[0],n)[0]))]:[!0]:Array.isArray(t)?[t.every(c)]:[!0]}case"select":return e.length===0?[t]:p(t,e[0],n).some(c)?[t]:[];case"map":return e.length===0||!Array.isArray(t)?[null]:[t.flatMap(h=>p(h,e[0],n))];case"map_values":{if(e.length===0)return[null];if(Array.isArray(t))return[t.flatMap(o=>p(o,e[0],n))];if(t&&typeof t=="object"){let o=Object.create(null);for(let[h,y]of Object.entries(t)){if(!b(h))continue;let a=p(y,e[0],n);a.length>0&&g(o,h,a[0])}return[o]}return[null]}case"has":{if(e.length===0)return[!1];let h=p(t,e[0],n)[0];return Array.isArray(t)&&typeof h=="number"?[h>=0&&h<t.length]:t&&typeof t=="object"&&typeof h=="string"?[O(t,h)]:[!1]}case"in":{if(e.length===0)return[!1];let h=p(t,e[0],n)[0];return Array.isArray(h)&&typeof t=="number"?[t>=0&&t<h.length]:h&&typeof h=="object"&&typeof t=="string"?[O(h,t)]:[!1]}case"contains":{if(e.length===0)return[!1];let o=p(t,e[0],n);return[s(t,o[0])]}case"inside":{if(e.length===0)return[!1];let o=p(t,e[0],n);return[s(o[0],t)]}default:return null}}function Q(t,r,e,n,p,i,u,c){switch(r){case"first":if(e.length>0)try{let s=i(t,e[0],n);return s.length>0?[s[0]]:[]}catch(s){if(s instanceof c)throw s;return[]}return Array.isArray(t)&&t.length>0?[t[0]]:[null];case"last":if(e.length>0){let s=p(t,e[0],n);return s.length>0?[s[s.length-1]]:[]}return Array.isArray(t)&&t.length>0?[t[t.length-1]]:[null];case"nth":{if(e.length<1)return[null];let s=p(t,e[0],n);if(e.length>1){for(let o of s)if(o<0)throw new Error("nth doesn't support negative indices");let f;try{f=i(t,e[1],n)}catch(o){if(o instanceof c)throw o;f=[]}return s.flatMap(o=>{let h=o;return h<f.length?[f[h]]:[]})}return Array.isArray(t)?s.flatMap(f=>{let o=f;if(o<0)throw new Error("nth doesn't support negative indices");return o<t.length?[t[o]]:[null]}):[null]}case"range":{if(e.length===0)return[];let s=p(t,e[0],n);if(e.length===1){let y=[];for(let a of s){let l=a;for(let m=0;m<l;m++)y.push(m)}return y}let f=p(t,e[1],n);if(e.length===2){let y=[];for(let a of s)for(let l of f){let m=a,A=l;for(let E=m;E<A;E++)y.push(E)}return y}let o=p(t,e[2],n),h=[];for(let y of s)for(let a of f)for(let l of o){let m=y,A=a,E=l;if(E!==0)if(E>0)for(let w=m;w<A;w+=E)h.push(w);else for(let w=m;w>A;w+=E)h.push(w)}return h}case"limit":return e.length<2?[]:p(t,e[0],n).flatMap(f=>{let o=f;if(o<0)throw new Error("limit doesn't support negative count");if(o===0)return[];let h;try{h=i(t,e[1],n)}catch(y){if(y instanceof c)throw y;h=[]}return h.slice(0,o)});case"isempty":{if(e.length<1)return[!0];try{return[i(t,e[0],n).length===0]}catch(s){if(s instanceof c)throw s;return[!0]}}case"isvalid":{if(e.length<1)return[!0];try{return[p(t,e[0],n).length>0]}catch(s){if(s instanceof c)throw s;return[!1]}}case"skip":return e.length<2?[]:p(t,e[0],n).flatMap(f=>{let o=f;if(o<0)throw new Error("skip doesn't support negative count");return p(t,e[1],n).slice(o)});case"until":{if(e.length<2)return[t];let s=t,f=n.limits.maxIterations;for(let o=0;o<f;o++){if(p(s,e[0],n).some(u))return[s];let y=p(s,e[1],n);if(y.length===0)return[s];s=y[0]}throw new c(`jq until: too many iterations (${f}), increase executionLimits.maxJqIterations`,"iterations")}case"while":{if(e.length<2)return[t];let s=[],f=t,o=n.limits.maxIterations;for(let h=0;h<o&&p(f,e[0],n).some(u);h++){s.push(f);let a=p(f,e[1],n);if(a.length===0)break;f=a[0]}if(s.length>=o)throw new c(`jq while: too many iterations (${o}), increase executionLimits.maxJqIterations`,"iterations");return s}case"repeat":{if(e.length===0)return[t];let s=[],f=t,o=n.limits.maxIterations;for(let h=0;h<o;h++){s.push(f);let y=p(f,e[0],n);if(y.length===0)break;f=y[0]}if(s.length>=o)throw new c(`jq repeat: too many iterations (${o}), increase executionLimits.maxJqIterations`,"iterations");return s}default:return null}}function Z(t,r,e,n,p){switch(r){case"now":return[Date.now()/1e3];case"gmtime":{if(typeof t!="number")return[null];let i=new Date(t*1e3),u=i.getUTCFullYear(),c=i.getUTCMonth(),s=i.getUTCDate(),f=i.getUTCHours(),o=i.getUTCMinutes(),h=i.getUTCSeconds(),y=i.getUTCDay(),a=Date.UTC(u,0,1),l=Math.floor((i.getTime()-a)/(1440*60*1e3));return[[u,c,s,f,o,h,y,l]]}case"mktime":{if(!Array.isArray(t))throw new Error("mktime requires parsed datetime inputs");let[i,u,c,s=0,f=0,o=0]=t;if(typeof i!="number"||typeof u!="number")throw new Error("mktime requires parsed datetime inputs");let h=Date.UTC(i,u,c??1,s??0,f??0,o??0);return[Math.floor(h/1e3)]}case"strftime":{if(e.length===0)return[null];let u=p(t,e[0],n)[0];if(typeof u!="string")throw new Error("strftime/1 requires a string format");let c;if(typeof t=="number")c=new Date(t*1e3);else if(Array.isArray(t)){let[y,a,l,m=0,A=0,E=0]=t;if(typeof y!="number"||typeof a!="number")throw new Error("strftime/1 requires parsed datetime inputs");c=new Date(Date.UTC(y,a,l??1,m??0,A??0,E??0))}else throw new Error("strftime/1 requires parsed datetime inputs");let s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"],o=(y,a=2)=>String(y).padStart(a,"0");return[u.replace(/%Y/g,String(c.getUTCFullYear())).replace(/%m/g,o(c.getUTCMonth()+1)).replace(/%d/g,o(c.getUTCDate())).replace(/%H/g,o(c.getUTCHours())).replace(/%M/g,o(c.getUTCMinutes())).replace(/%S/g,o(c.getUTCSeconds())).replace(/%A/g,s[c.getUTCDay()]).replace(/%B/g,f[c.getUTCMonth()]).replace(/%Z/g,"UTC").replace(/%%/g,"%")]}case"strptime":{if(e.length===0)return[null];if(typeof t!="string")throw new Error("strptime/1 requires a string input");let u=p(t,e[0],n)[0];if(typeof u!="string")throw new Error("strptime/1 requires a string format");if(u==="%Y-%m-%dT%H:%M:%SZ"){let s=t.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(s){let[,f,o,h,y,a,l]=s.map(Number),m=new Date(Date.UTC(f,o-1,h,y,a,l)),A=m.getUTCDay(),E=Date.UTC(f,0,1),w=Math.floor((m.getTime()-E)/(1440*60*1e3));return[[f,o-1,h,y,a,l,A,w]]}}let c=new Date(t);if(!Number.isNaN(c.getTime())){let s=c.getUTCFullYear(),f=c.getUTCMonth(),o=c.getUTCDate(),h=c.getUTCHours(),y=c.getUTCMinutes(),a=c.getUTCSeconds(),l=c.getUTCDay(),m=Date.UTC(s,0,1),A=Math.floor((c.getTime()-m)/(1440*60*1e3));return[[s,f,o,h,y,a,l,A]]}throw new Error(`Cannot parse date: ${t}`)}case"fromdate":{if(typeof t!="string")throw new Error("fromdate requires a string input");let i=new Date(t);if(Number.isNaN(i.getTime()))throw new Error(`date "${t}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(i.getTime()/1e3)]}case"todate":{if(typeof t!="number")throw new Error("todate requires a number input");return[new Date(t*1e3).toISOString().replace(/\.\d{3}Z$/,"Z")]}default:return null}}function N(t){return t!==!1&&t!==null}function R(t,r){return JSON.stringify(t)===JSON.stringify(r)}function D(t,r){return typeof t=="number"&&typeof r=="number"?t-r:typeof t=="string"&&typeof r=="string"?t.localeCompare(r):0}function z(t,r){let e=k(t);for(let n of Object.keys(r))b(n)&&(O(e,n)&&e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])&&r[n]&&typeof r[n]=="object"&&!Array.isArray(r[n])?g(e,n,z(e[n],r[n])):g(e,n,r[n]));return e}function M(t,r=3e3){let e=0,n=t;for(;e<r;)if(Array.isArray(n)){if(n.length===0)return e+1;n=n[0],e++}else if(n!==null&&typeof n=="object"){let p=Object.keys(n);if(p.length===0)return e+1;n=n[p[0]],e++}else return e;return e}function L(t,r){let e=i=>i===null?0:typeof i=="boolean"?1:typeof i=="number"?2:typeof i=="string"?3:Array.isArray(i)?4:typeof i=="object"?5:6,n=e(t),p=e(r);if(n!==p)return n-p;if(typeof t=="number"&&typeof r=="number")return t-r;if(typeof t=="string"&&typeof r=="string")return t.localeCompare(r);if(typeof t=="boolean"&&typeof r=="boolean")return(t?1:0)-(r?1:0);if(Array.isArray(t)&&Array.isArray(r)){for(let i=0;i<Math.min(t.length,r.length);i++){let u=L(t[i],r[i]);if(u!==0)return u}return t.length-r.length}if(t&&r&&typeof t=="object"&&typeof r=="object"){let i=t,u=r,c=Object.keys(i).sort(),s=Object.keys(u).sort();for(let f=0;f<Math.min(c.length,s.length);f++){let o=c[f].localeCompare(s[f]);if(o!==0)return o}if(c.length!==s.length)return c.length-s.length;for(let f of c){let o=L(i[f],u[f]);if(o!==0)return o}}return 0}function _(t,r){if(R(t,r))return!0;if(typeof t=="string"&&typeof r=="string")return t.includes(r);if(Array.isArray(t)&&Array.isArray(r))return r.every(e=>t.some(n=>_(n,e)));if(t&&r&&typeof t=="object"&&typeof r=="object"&&!Array.isArray(t)&&!Array.isArray(r)){let e=t,n=r;return Object.keys(n).every(p=>O(e,p)&&_(e[p],n[p]))}return!1}var Et=2e3;function v(t,r,e){switch(r){case"@base64":return typeof t=="string"?typeof Buffer<"u"?[Buffer.from(t,"utf-8").toString("base64")]:[btoa(t)]:[null];case"@base64d":return typeof t=="string"?typeof Buffer<"u"?[Buffer.from(t,"base64").toString("utf-8")]:[atob(t)]:[null];case"@uri":return typeof t=="string"?[encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")]:[null];case"@urid":return typeof t=="string"?[decodeURIComponent(t)]:[null];case"@csv":return Array.isArray(t)?[t.map(p=>{if(p===null)return"";if(typeof p=="boolean")return p?"true":"false";if(typeof p=="number")return String(p);let i=String(p);return i.includes(",")||i.includes('"')||i.includes(`
|
|
3
|
-
`)||i.includes("\r")?`"${i.replace(/"/g,'""')}"`:i}).join(",")]:[null];case"@tsv":return Array.isArray(t)?[t.map(n=>String(n??"").replace(/\t/g,"\\t").replace(/\n/g,"\\n")).join(" ")]:[null];case"@json":{let n=e??Et;return M(t,n+1)>n?[null]:[JSON.stringify(t)]}case"@html":return typeof t=="string"?[t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")]:[null];case"@sh":return typeof t=="string"?[`'${t.replace(/'/g,"'\\''")}'`]:[null];case"@text":return typeof t=="string"?[t]:t==null?[""]:[String(t)];default:return null}}function tt(t,r,e,n,p,i){switch(r){case"index":return e.length===0?[null]:p(t,e[0],n).map(c=>{if(typeof t=="string"&&typeof c=="string"){if(c===""&&t==="")return null;let s=t.indexOf(c);return s>=0?s:null}if(Array.isArray(t)){if(Array.isArray(c)){for(let f=0;f<=t.length-c.length;f++){let o=!0;for(let h=0;h<c.length;h++)if(!i(t[f+h],c[h])){o=!1;break}if(o)return f}return null}let s=t.findIndex(f=>i(f,c));return s>=0?s:null}return null});case"rindex":return e.length===0?[null]:p(t,e[0],n).map(c=>{if(typeof t=="string"&&typeof c=="string"){let s=t.lastIndexOf(c);return s>=0?s:null}if(Array.isArray(t)){if(Array.isArray(c)){for(let s=t.length-c.length;s>=0;s--){let f=!0;for(let o=0;o<c.length;o++)if(!i(t[s+o],c[o])){f=!1;break}if(f)return s}return null}for(let s=t.length-1;s>=0;s--)if(i(t[s],c))return s;return null}return null});case"indices":return e.length===0?[[]]:p(t,e[0],n).map(c=>{let s=[];if(typeof t=="string"&&typeof c=="string"){let f=t.indexOf(c);for(;f!==-1;)s.push(f),f=t.indexOf(c,f+1)}else if(Array.isArray(t))if(Array.isArray(c)){let f=c.length;if(f===0)for(let o=0;o<=t.length;o++)s.push(o);else for(let o=0;o<=t.length-f;o++){let h=!0;for(let y=0;y<f;y++)if(!i(t[o+y],c[y])){h=!1;break}h&&s.push(o)}}else for(let f=0;f<t.length;f++)i(t[f],c)&&s.push(f);return s});default:return null}}function et(t,r,e,n,p){switch(r){case"fabs":case"abs":return typeof t=="number"?[Math.abs(t)]:typeof t=="string"?[t]:[null];case"exp10":return typeof t=="number"?[10**t]:[null];case"exp2":return typeof t=="number"?[2**t]:[null];case"pow":{if(e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=i[0],s=u[0];return typeof c!="number"||typeof s!="number"?[null]:[c**s]}case"atan2":{if(e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=i[0],s=u[0];return typeof c!="number"||typeof s!="number"?[null]:[Math.atan2(c,s)]}case"hypot":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.hypot(t,i)]}case"fma":{if(typeof t!="number"||e.length<2)return[null];let i=p(t,e[0],n)[0],u=p(t,e[1],n)[0];return[t*i+u]}case"copysign":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.sign(i)*Math.abs(t)]}case"drem":case"remainder":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[t-Math.round(t/i)*i]}case"fdim":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.max(0,t-i)]}case"fmax":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.max(t,i)]}case"fmin":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[Math.min(t,i)]}case"ldexp":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[t*2**i]}case"scalbn":case"scalbln":{if(typeof t!="number"||e.length===0)return[null];let i=p(t,e[0],n)[0];return[t*2**i]}case"nearbyint":return typeof t=="number"?[Math.round(t)]:[null];case"logb":return typeof t=="number"?[Math.floor(Math.log2(Math.abs(t)))]:[null];case"significand":if(typeof t=="number"){let i=Math.floor(Math.log2(Math.abs(t)));return[t/2**i]}return[null];case"frexp":if(typeof t=="number"){if(t===0)return[[0,0]];let i=Math.floor(Math.log2(Math.abs(t)))+1;return[[t/2**i,i]]}return[null];case"modf":if(typeof t=="number"){let i=Math.trunc(t);return[[t-i,i]]}return[null];default:return null}}function rt(t,r,e,n,p,i,u,c){switch(r){case"recurse":{if(e.length===0){let a=[],l=m=>{if(a.push(m),Array.isArray(m))for(let A of m)l(A);else if(m&&typeof m=="object")for(let A of Object.keys(m))l(m[A])};return l(t),a}let s=[],f=e.length>=2?e[1]:null,o=1e4,h=0,y=a=>{if(h++>o||f&&!p(a,f,n).some(i))return;s.push(a);let l=p(a,e[0],n);for(let m of l)m!=null&&y(m)};return y(t),s}case"recurse_down":return c(t,"recurse",e,n);case"walk":{if(e.length===0)return[t];let s=new WeakSet,f=o=>{if(o&&typeof o=="object"){if(s.has(o))return o;s.add(o)}let h;if(Array.isArray(o))h=o.map(f);else if(o&&typeof o=="object"){let a=Object.create(null);for(let[l,m]of Object.entries(o))b(l)&&g(a,l,f(m));h=a}else h=o;return p(h,e[0],n)[0]};return[f(t)]}case"transpose":{if(!Array.isArray(t))return[null];if(t.length===0)return[[]];let s=Math.max(...t.map(o=>Array.isArray(o)?o.length:0)),f=[];for(let o=0;o<s;o++)f.push(t.map(h=>Array.isArray(h)?h[o]:null));return[f]}case"combinations":{if(e.length>0){let h=p(t,e[0],n)[0];if(!Array.isArray(t)||h<0)return[];if(h===0)return[[]];let y=[],a=(l,m)=>{if(m===h){y.push([...l]);return}for(let A of t)l.push(A),a(l,m+1),l.pop()};return a([],0),y}if(!Array.isArray(t))return[];if(t.length===0)return[[]];for(let o of t)if(!Array.isArray(o))return[];let s=[],f=(o,h)=>{if(o===t.length){s.push([...h]);return}let y=t[o];for(let a of y)h.push(a),f(o+1,h),h.pop()};return f(0,[]),s}case"parent":{if(n.root===void 0||n.currentPath===void 0)return[];let s=n.currentPath;if(s.length===0)return[];let f=e.length>0?p(t,e[0],n)[0]:1;if(f>=0){if(f>s.length)return[];let o=s.slice(0,s.length-f);return[u(n.root,o)]}else{let o=-f-1;if(o>=s.length)return[t];let h=s.slice(0,o);return[u(n.root,h)]}}case"parents":{if(n.root===void 0||n.currentPath===void 0)return[[]];let s=n.currentPath,f=[];for(let o=s.length-1;o>=0;o--)f.push(u(n.root,s.slice(0,o)));return[f]}case"root":return n.root!==void 0?[n.root]:[];default:return null}}var wt=2e3;function nt(t,r,e,n,p){switch(r){case"keys":return Array.isArray(t)?[t.map((i,u)=>u)]:t&&typeof t=="object"?[Object.keys(t).sort()]:[null];case"keys_unsorted":return Array.isArray(t)?[t.map((i,u)=>u)]:t&&typeof t=="object"?[Object.keys(t)]:[null];case"length":return typeof t=="string"?[t.length]:Array.isArray(t)?[t.length]:t&&typeof t=="object"?[Object.keys(t).length]:t===null?[0]:typeof t=="number"?[Math.abs(t)]:[null];case"utf8bytelength":{if(typeof t=="string")return[new TextEncoder().encode(t).length];let i=t===null?"null":Array.isArray(t)?"array":typeof t,u=i==="array"||i==="object"?JSON.stringify(t):String(t);throw new Error(`${i} (${u}) only strings have UTF-8 byte length`)}case"to_entries":return t&&typeof t=="object"&&!Array.isArray(t)?[Object.entries(t).map(([i,u])=>({key:i,value:u}))]:[null];case"from_entries":if(Array.isArray(t)){let i=Object.create(null);for(let u of t)if(u&&typeof u=="object"){let c=u,s=c.key??c.Key??c.name??c.Name??c.k,f=c.value??c.Value??c.v;if(s!==void 0){let o=String(s);b(o)&&g(i,o,f)}}return[i]}return[null];case"with_entries":{if(e.length===0)return[t];if(t&&typeof t=="object"&&!Array.isArray(t)){let u=Object.entries(t).map(([s,f])=>({key:s,value:f})).flatMap(s=>p(s,e[0],n)),c=Object.create(null);for(let s of u)if(s&&typeof s=="object"){let f=s,o=f.key??f.name??f.k,h=f.value??f.v;if(o!==void 0){let y=String(o);b(y)&&g(c,y,h)}}return[c]}return[null]}case"reverse":return Array.isArray(t)?[[...t].reverse()]:typeof t=="string"?[t.split("").reverse().join("")]:[null];case"flatten":return Array.isArray(t)?(e.length>0?p(t,e[0],n):[Number.POSITIVE_INFINITY]).map(u=>{let c=u;if(c<0)throw new Error("flatten depth must not be negative");return t.flat(c)}):[null];case"unique":if(Array.isArray(t)){let i=new Set,u=[];for(let c of t){let s=JSON.stringify(c);i.has(s)||(i.add(s),u.push(c))}return[u]}return[null];case"tojson":case"tojsonstream":{let i=n.limits.maxDepth??wt;return M(t,i+1)>i?[null]:[JSON.stringify(t)]}case"fromjson":{if(typeof t=="string"){let i=t.trim().toLowerCase();if(i==="nan")return[Number.NaN];if(i==="inf"||i==="infinity")return[Number.POSITIVE_INFINITY];if(i==="-inf"||i==="-infinity")return[Number.NEGATIVE_INFINITY];try{return[JSON.parse(t)]}catch{throw new Error(`Invalid JSON: ${t}`)}}return[t]}case"tostring":return typeof t=="string"?[t]:[JSON.stringify(t)];case"tonumber":if(typeof t=="number")return[t];if(typeof t=="string"){let i=Number(t);if(Number.isNaN(i))throw new Error(`${JSON.stringify(t)} cannot be parsed as a number`);return[i]}throw new Error(`${typeof t} cannot be parsed as a number`);case"toboolean":{if(typeof t=="boolean")return[t];if(typeof t=="string"){if(t==="true")return[!0];if(t==="false")return[!1];throw new Error(`string (${JSON.stringify(t)}) cannot be parsed as a boolean`)}let i=t===null?"null":Array.isArray(t)?"array":typeof t,u=i==="array"||i==="object"?JSON.stringify(t):String(t);throw new Error(`${i} (${u}) cannot be parsed as a boolean`)}case"tostream":{let i=[],u=(c,s)=>{if(c===null||typeof c!="object")i.push([s,c]);else if(Array.isArray(c))if(c.length===0)i.push([s,[]]);else for(let f=0;f<c.length;f++)u(c[f],[...s,f]);else{let f=Object.keys(c);if(f.length===0)i.push([s,Object.create(null)]);else for(let o of f)u(c[o],[...s,o])}};return u(t,[]),i.push([[]]),i}case"fromstream":{if(e.length===0)return[t];let i=p(t,e[0],n),u=null;for(let c of i){if(!Array.isArray(c)||c.length===1&&Array.isArray(c[0])&&c[0].length===0||c.length!==2)continue;let[s,f]=c;if(!Array.isArray(s))continue;if(s.length===0){u=f;continue}u===null&&(u=typeof s[0]=="number"?[]:{});let o=u;for(let y=0;y<s.length-1;y++){let a=s[y],l=s[y+1];if(Array.isArray(o)&&typeof a=="number"){for(;o.length<=a;)o.push(null);o[a]===null&&(o[a]=typeof l=="number"?[]:{}),o=o[a]}else if(o&&typeof o=="object"&&!Array.isArray(o)){let m=String(a);if(!b(m))continue;let A=o;(A[m]===null||A[m]===void 0)&&g(A,m,typeof l=="number"?[]:{}),o=A[m]}}let h=s[s.length-1];if(Array.isArray(o)&&typeof h=="number"){for(;o.length<=h;)o.push(null);o[h]=f}else if(o&&typeof o=="object"&&!Array.isArray(o)){let y=String(h);b(y)&&g(o,y,f)}}return[u]}case"truncate_stream":{let i=typeof t=="number"?Math.floor(t):0;if(e.length===0)return[];let u=[],c=p(t,e[0],n);for(let s of c)if(Array.isArray(s)){if(s.length===1&&Array.isArray(s[0])){let f=s[0];f.length>i&&u.push([f.slice(i)]);continue}if(s.length===2&&Array.isArray(s[0])){let f=s[0],o=s[1];f.length>i&&u.push([f.slice(i),o])}}return u}default:return null}}function st(t,r,e,n,p,i,u,c,s,f){switch(r){case"getpath":{if(e.length===0)return[null];let o=p(t,e[0],n),h=[];for(let y of o){let a=y,l=t;for(let m of a){if(l==null){l=null;break}if(Array.isArray(l)&&typeof m=="number")l=l[m];else if(typeof l=="object"&&typeof m=="string"){let A=l;if(!Object.hasOwn(A,m)){l=null;break}l=A[m]}else{l=null;break}}h.push(l)}return h}case"setpath":{if(e.length<2)return[null];let h=p(t,e[0],n)[0],a=p(t,e[1],n)[0];return[u(t,h,a)]}case"delpaths":{if(e.length===0)return[t];let h=p(t,e[0],n)[0],y=t;for(let a of h.sort((l,m)=>m.length-l.length))y=c(y,a);return[y]}case"path":{if(e.length===0)return[[]];let o=[];return f(t,e[0],n,[],o),o}case"del":return e.length===0?[t]:[s(t,e[0],n)];case"pick":{if(e.length===0)return[null];let o=[];for(let y of e)f(t,y,n,[],o);let h=null;for(let y of o){for(let l of y)if(typeof l=="number"&&l<0)throw new Error("Out of bounds negative array index");let a=t;for(let l of y){if(a==null)break;if(Array.isArray(a)&&typeof l=="number")a=a[l];else if(typeof a=="object"&&typeof l=="string"){let m=a;if(!Object.hasOwn(m,l)){a=null;break}a=m[l]}else{a=null;break}}h=u(h,y,a)}return[h]}case"paths":{let o=[],h=(y,a)=>{if(y&&typeof y=="object")if(Array.isArray(y))for(let l=0;l<y.length;l++)o.push([...a,l]),h(y[l],[...a,l]);else for(let l of Object.keys(y))o.push([...a,l]),h(y[l],[...a,l])};return h(t,[]),e.length>0?o.filter(y=>{let a=t;for(let m of y)if(Array.isArray(a)&&typeof m=="number")a=a[m];else if(a&&typeof a=="object"&&typeof m=="string"){let A=a;if(!Object.hasOwn(A,m))return!1;a=A[m]}else return!1;return p(a,e[0],n).some(i)}):o}case"leaf_paths":{let o=[],h=(y,a)=>{if(y===null||typeof y!="object")o.push(a);else if(Array.isArray(y))for(let l=0;l<y.length;l++)h(y[l],[...a,l]);else for(let l of Object.keys(y))h(y[l],[...a,l])};return h(t,[]),o}default:return null}}function it(t,r,e,n,p,i){switch(r){case"IN":{if(e.length===0)return[!1];if(e.length===1){let f=p(t,e[0],n);for(let o of f)if(i(t,o))return[!0];return[!1]}let u=p(t,e[0],n),c=p(t,e[1],n),s=new Set(c.map(f=>JSON.stringify(f)));for(let f of u)if(s.has(JSON.stringify(f)))return[!0];return[!1]}case"INDEX":{if(e.length===0)return[{}];if(e.length===1){let s=p(t,e[0],n),f=Object.create(null);for(let o of s){let h=String(o);b(h)&&g(f,h,o)}return[f]}if(e.length===2){let s=p(t,e[0],n),f=Object.create(null);for(let o of s){let h=p(o,e[1],n);if(h.length>0){let y=String(h[0]);b(y)&&g(f,y,o)}}return[f]}let u=p(t,e[0],n),c=Object.create(null);for(let s of u){let f=p(s,e[1],n),o=p(s,e[2],n);if(f.length>0&&o.length>0){let h=String(f[0]);b(h)&&g(c,h,o[0])}}return[c]}case"JOIN":{if(e.length<2)return[null];let u=p(t,e[0],n)[0];if(!u||typeof u!="object"||Array.isArray(u))return[null];let c=u;if(!Array.isArray(t))return[null];let s=[];for(let f of t){let o=p(f,e[1],n),h=o.length>0?String(o[0]):"",y=O(c,h)?c[h]:null;s.push([f,y])}return[s]}default:return null}}function ot(t,r,e,n,p){switch(r){case"join":{if(!Array.isArray(t))return[null];let i=e.length>0?p(t,e[0],n):[""];for(let u of t)if(Array.isArray(u)||u!==null&&typeof u=="object")throw new Error("cannot join: contains arrays or objects");return i.map(u=>t.map(c=>c===null?"":typeof c=="string"?c:String(c)).join(String(u)))}case"split":{if(typeof t!="string"||e.length===0)return[null];let i=p(t,e[0],n),u=String(i[0]);return[t.split(u)]}case"splits":{if(typeof t!="string"||e.length===0)return[];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"g";return S(u,c.includes("g")?c:`${c}g`).split(t)}catch{return[]}}case"scan":{if(typeof t!="string"||e.length===0)return[];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"";return[...S(u,c.includes("g")?c:`${c}g`).matchAll(t)].map(o=>o.length>1?o.slice(1):o[0])}catch{return[]}}case"test":{if(typeof t!="string"||e.length===0)return[!1];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"";return[S(u,c).test(t)]}catch{return[!1]}}case"match":{if(typeof t!="string"||e.length===0)return[null];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"",f=S(u,`${c}d`).exec(t);if(!f)return[];let o=f.indices;return[{offset:f.index,length:f[0].length,string:f[0],captures:f.slice(1).map((h,y)=>({offset:o?.[y+1]?.[0]??null,length:h?.length??0,string:h??"",name:null}))}]}catch{return[null]}}case"capture":{if(typeof t!="string"||e.length===0)return[null];let i=p(t,e[0],n),u=String(i[0]);try{let c=e.length>1?String(p(t,e[1],n)[0]):"",f=S(u,c).match(t);return!f||!f.groups?[{}]:[f.groups]}catch{return[null]}}case"sub":{if(typeof t!="string"||e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=String(i[0]),s=String(u[0]);try{let f=e.length>2?String(p(t,e[2],n)[0]):"";return[S(c,f).replace(t,s)]}catch{return[t]}}case"gsub":{if(typeof t!="string"||e.length<2)return[null];let i=p(t,e[0],n),u=p(t,e[1],n),c=String(i[0]),s=String(u[0]);try{let f=e.length>2?String(p(t,e[2],n)[0]):"g",o=f.includes("g")?f:`${f}g`;return[S(c,o).replace(t,s)]}catch{return[t]}}case"ascii_downcase":return typeof t=="string"?[t.replace(/[A-Z]/g,i=>String.fromCharCode(i.charCodeAt(0)+32))]:[null];case"ascii_upcase":return typeof t=="string"?[t.replace(/[a-z]/g,i=>String.fromCharCode(i.charCodeAt(0)-32))]:[null];case"ltrimstr":{if(typeof t!="string"||e.length===0)return[t];let i=p(t,e[0],n),u=String(i[0]);return[t.startsWith(u)?t.slice(u.length):t]}case"rtrimstr":{if(typeof t!="string"||e.length===0)return[t];let i=p(t,e[0],n),u=String(i[0]);return u===""?[t]:[t.endsWith(u)?t.slice(0,-u.length):t]}case"trimstr":{if(typeof t!="string"||e.length===0)return[t];let i=p(t,e[0],n),u=String(i[0]);if(u==="")return[t];let c=t;return c.startsWith(u)&&(c=c.slice(u.length)),c.endsWith(u)&&(c=c.slice(0,-u.length)),[c]}case"trim":if(typeof t=="string")return[t.trim()];throw new Error("trim input must be a string");case"ltrim":if(typeof t=="string")return[t.trimStart()];throw new Error("trim input must be a string");case"rtrim":if(typeof t=="string")return[t.trimEnd()];throw new Error("trim input must be a string");case"startswith":{if(typeof t!="string"||e.length===0)return[!1];let i=p(t,e[0],n);return[t.startsWith(String(i[0]))]}case"endswith":{if(typeof t!="string"||e.length===0)return[!1];let i=p(t,e[0],n);return[t.endsWith(String(i[0]))]}case"ascii":return typeof t=="string"&&t.length>0?[t.charCodeAt(0)]:[null];case"explode":return typeof t=="string"?[Array.from(t).map(i=>i.codePointAt(0))]:[null];case"implode":if(!Array.isArray(t))throw new Error("implode input must be an array");return[t.map(c=>{if(typeof c=="string")throw new Error(`string (${JSON.stringify(c)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof c!="number"||Number.isNaN(c))throw new Error("number (null) can't be imploded, unicode codepoint needs to be numeric");let s=Math.trunc(c);return s<0||s>1114111||s>=55296&&s<=57343?String.fromCodePoint(65533):String.fromCodePoint(s)}).join("")];default:return null}}function ft(t,r){switch(r){case"type":return t===null?["null"]:Array.isArray(t)?["array"]:typeof t=="boolean"?["boolean"]:typeof t=="number"?["number"]:typeof t=="string"?["string"]:typeof t=="object"?["object"]:["null"];case"infinite":return[Number.POSITIVE_INFINITY];case"nan":return[Number.NaN];case"isinfinite":return[typeof t=="number"&&!Number.isFinite(t)];case"isnan":return[typeof t=="number"&&Number.isNaN(t)];case"isnormal":return[typeof t=="number"&&Number.isFinite(t)&&t!==0];case"isfinite":return[typeof t=="number"&&Number.isFinite(t)];case"numbers":return typeof t=="number"?[t]:[];case"strings":return typeof t=="string"?[t]:[];case"booleans":return typeof t=="boolean"?[t]:[];case"nulls":return t===null?[t]:[];case"arrays":return Array.isArray(t)?[t]:[];case"objects":return t&&typeof t=="object"&&!Array.isArray(t)?[t]:[];case"iterables":return Array.isArray(t)||t&&typeof t=="object"&&!Array.isArray(t)?[t]:[];case"scalars":return!Array.isArray(t)&&!(t&&typeof t=="object")?[t]:[];case"values":return t===null?[]:[t];case"not":return t===!1||t===null?[!0]:[!1];case"null":return[null];case"true":return[!0];case"false":return[!1];case"empty":return[];default:return null}}function $(t,r,e){if(r.length===0)return e;let[n,...p]=r;if(typeof n=="number"){if(t&&typeof t=="object"&&!Array.isArray(t))throw new Error("Cannot index object with number");if(n>536870911)throw new Error("Array index too large");if(n<0)throw new Error("Out of bounds negative array index");let s=Array.isArray(t)?[...t]:[];for(;s.length<=n;)s.push(null);return s[n]=$(s[n],p,e),s}if(Array.isArray(t))throw new Error("Cannot index array with string");if(!b(n))return t??Object.create(null);let i=t&&typeof t=="object"&&!Array.isArray(t)?k(t):Object.create(null),u=Object.hasOwn(i,n)?i[n]:void 0;return g(i,n,$(u,p,e)),i}function F(t,r){if(r.length===0)return null;if(r.length===1){let p=r[0];if(Array.isArray(t)&&typeof p=="number"){let i=[...t];return i.splice(p,1),i}if(t&&typeof t=="object"&&!Array.isArray(t)){let i=String(p);if(!b(i))return t;let u=k(t);return delete u[i],u}return t}let[e,...n]=r;if(Array.isArray(t)&&typeof e=="number"){let p=[...t];return p[e]=F(p[e],n),p}if(t&&typeof t=="object"&&!Array.isArray(t)){let p=String(e);if(!b(p))return t;let i=k(t);return Object.hasOwn(i,p)&&g(i,p,F(i[p],n)),i}return t}var I=class t extends Error{label;partialResults;constructor(r,e=[]){super(`break ${r}`),this.label=r,this.partialResults=e,this.name="BreakError"}withPrependedResults(r){return new t(this.label,[...r,...this.partialResults])}},V=class extends Error{value;constructor(r){super(typeof r=="string"?r:JSON.stringify(r)),this.value=r,this.name="JqError"}},kt=1e4,lt=2e3,Nt=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 Ot(t){return{vars:new Map,limits:{maxIterations:t?.limits?.maxIterations??kt,maxDepth:t?.limits?.maxDepth??lt},env:t?.env,coverage:t?.coverage}}function J(t,r,e){let n=new Map(t.vars);return n.set(r,e),{vars:n,limits:t.limits,env:t.env,root:t.root,currentPath:t.currentPath,funcs:t.funcs,labels:t.labels,coverage:t.coverage}}function B(t,r,e){switch(r.type){case"var":return J(t,r.name,e);case"array":{if(!Array.isArray(e))return null;let n=t;for(let p=0;p<r.elements.length;p++){let i=r.elements[p],u=p<e.length?e[p]:null,c=B(n,i,u);if(c===null)return null;n=c}return n}case"object":{if(e===null||typeof e!="object"||Array.isArray(e))return null;let n=e,p=t;for(let i of r.fields){let u;if(typeof i.key=="string")u=i.key;else{let f=d(e,i.key,t);if(f.length===0)return null;u=String(f[0])}let c=O(n,u)?n[u]:null;i.keyVar&&(p=J(p,i.keyVar,c));let s=B(p,i.pattern,c);if(s===null)return null;p=s}return p}}}function St(t,r){let e=t;for(let n of r)if(e&&typeof e=="object")if(Array.isArray(e))if(typeof n=="number")e=e[n];else return;else{let p=e;if(typeof n=="string"&&Object.hasOwn(p,n))e=p[n];else return}else return;return e}function T(t){if(t.type==="Identity")return[];if(t.type==="Field"){let r=t.base?T(t.base):[];return r===null?null:[...r,t.name]}if(t.type==="Index"&&t.index.type==="Literal"){let r=t.base?T(t.base):[];if(r===null)return null;let e=t.index.value;return typeof e=="number"||typeof e=="string"?[...r,e]:null}if(t.type==="Pipe"){let r=T(t.left);return r===null?null:ct(r,t.right)}if(t.type==="Call"){if(t.name==="parent"||t.name==="root")return null;if(t.name==="first"&&t.args.length===0)return[0];if(t.name==="last"&&t.args.length===0)return[-1]}return null}function ct(t,r){if(r.type==="Call"){if(r.name==="parent"){let e=1;if(r.args.length>0&&r.args[0].type==="Literal"){let n=r.args[0].value;typeof n=="number"&&(e=n)}if(e>=0)return t.slice(0,Math.max(0,t.length-e));{let n=-e-1;return t.slice(0,Math.min(n,t.length))}}if(r.name==="root")return[]}if(r.type==="Field"){let e=T(r);if(e!==null)return[...t,...e]}if(r.type==="Index"&&r.index.type==="Literal"){let e=T(r);if(e!==null)return[...t,...e]}if(r.type==="Pipe"){let e=ct(t,r.left);return e===null?null:ct(e,r.right)}return r.type==="Identity"?t:null}function yt(t,r,e){if(r.type==="Comma"){let n=[];try{n.push(...d(t,r.left,e))}catch(p){if(p instanceof P)throw p;if(n.length>0)return n;throw new Error("evaluation failed")}try{n.push(...d(t,r.right,e))}catch(p){if(p instanceof P)throw p;return n}return n}return d(t,r,e)}function d(t,r,e){let n=e&&"vars"in e?e:Ot(e);switch(n.root===void 0&&(n={...n,root:t,currentPath:[]}),n.coverage?.hit(`jq:node:${r.type}`),r.type){case"Identity":return[t];case"Field":return(r.base?d(t,r.base,n):[t]).flatMap(i=>{if(i&&typeof i=="object"&&!Array.isArray(i)){let c=i;if(!Object.hasOwn(c,r.name))return[null];let s=c[r.name];return[s===void 0?null:s]}if(i===null)return[null];let u=Array.isArray(i)?"array":typeof i;throw new Error(`Cannot index ${u} with string "${r.name}"`)});case"Index":return(r.base?d(t,r.base,n):[t]).flatMap(i=>d(i,r.index,n).flatMap(c=>{if(typeof c=="number"&&Array.isArray(i)){if(Number.isNaN(c))return[null];let s=Math.trunc(c),f=s<0?i.length+s:s;return f>=0&&f<i.length?[i[f]]:[null]}if(typeof c=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){let s=i;return Object.hasOwn(s,c)?[s[c]]:[null]}return[null]}));case"Slice":return(r.base?d(t,r.base,n):[t]).flatMap(i=>{if(i===null)return[null];if(!Array.isArray(i)&&typeof i!="string")throw new Error(`Cannot slice ${typeof i} (${JSON.stringify(i)})`);let u=i.length,c=r.start?d(t,r.start,n):[0],s=r.end?d(t,r.end,n):[u];return c.flatMap(f=>s.map(o=>{let h=f,y=o,a=Number.isNaN(h)?0:Number.isInteger(h)?h:Math.floor(h),l=Number.isNaN(y)?u:Number.isInteger(y)?y:Math.ceil(y),m=at(a,u),A=at(l,u);return Array.isArray(i),i.slice(m,A)}))});case"Iterate":return(r.base?d(t,r.base,n):[t]).flatMap(i=>Array.isArray(i)?i:i&&typeof i=="object"?Object.values(i):[]);case"Pipe":{let p=d(t,r.left,n),i=T(r.left),u=[];for(let c of p)try{if(i!==null){let s={...n,currentPath:[...n.currentPath??[],...i]};u.push(...d(c,r.right,s))}else u.push(...d(c,r.right,n))}catch(s){throw s instanceof I?s.withPrependedResults(u):s}return u}case"Comma":{let p=d(t,r.left,n),i=d(t,r.right,n);return[...p,...i]}case"Literal":return[r.value];case"Array":return r.elements?[d(t,r.elements,n)]:[[]];case"Object":{let p=[Object.create(null)];for(let i of r.entries){let u=typeof i.key=="string"?[i.key]:d(t,i.key,n),c=d(t,i.value,n),s=[];for(let f of p)for(let o of u){if(typeof o!="string"){let h=o===null?"null":Array.isArray(o)?"array":typeof o;throw new Error(`Cannot use ${h} (${JSON.stringify(o)}) as object key`)}if(!b(o)){for(let h of c)s.push(k(f));continue}for(let h of c){let y=k(f);g(y,o,h),s.push(y)}}p.length=0,p.push(...s)}return p}case"Paren":return d(t,r.expr,n);case"BinaryOp":return jt(t,r.op,r.left,r.right,n);case"UnaryOp":return d(t,r.operand,n).map(i=>{if(r.op==="-"){if(typeof i=="number")return-i;if(typeof i=="string"){let u=c=>c.length>5?`"${c.slice(0,3)}...`:JSON.stringify(c);throw new Error(`string (${u(i)}) cannot be negated`)}return null}return r.op==="not"?!N(i):null});case"Cond":return d(t,r.cond,n).flatMap(i=>{if(N(i))return d(t,r.then,n);for(let u of r.elifs)if(d(t,u.cond,n).some(N))return d(t,u.then,n);return r.else?d(t,r.else,n):[t]});case"Try":try{return d(t,r.body,n)}catch(p){if(r.catch){let i=p instanceof V?p.value:p instanceof Error?p.message:String(p);return d(i,r.catch,n)}return[]}case"Call":return mt(t,r.name,r.args,n);case"VarBind":return d(t,r.value,n).flatMap(i=>{let u=null,c=[];r.pattern?c.push(r.pattern):r.name&&c.push({type:"var",name:r.name}),r.alternatives&&c.push(...r.alternatives);for(let s of c)if(u=B(n,s,i),u!==null)break;return u===null?[]:d(t,r.body,u)});case"VarRef":{if(r.name==="$ENV")return[n.env?G(n.env):Object.create(null)];let p=n.vars.get(r.name);return p!==void 0?[p]:[null]}case"Recurse":{let p=[],i=new WeakSet,u=c=>{if(c&&typeof c=="object"){if(i.has(c))return;i.add(c)}if(p.push(c),Array.isArray(c))for(let s of c)u(s);else if(c&&typeof c=="object")for(let s of Object.keys(c))u(c[s])};return u(t),p}case"Optional":try{return d(t,r.expr,n)}catch{return[]}case"StringInterp":return[r.parts.map(i=>typeof i=="string"?i:d(t,i,n).map(c=>typeof c=="string"?c:JSON.stringify(c)).join("")).join("")];case"UpdateOp":return[Tt(t,r.path,r.op,r.value,n)];case"Reduce":{let p=d(t,r.expr,n),i=d(t,r.init,n)[0],u=n.limits.maxDepth??lt;for(let c of p){let s;if(r.pattern){if(s=B(n,r.pattern,c),s===null)continue}else s=J(n,r.varName,c);if(i=d(i,r.update,s)[0],M(i,u+1)>u)return[null]}return[i]}case"Foreach":{let p=d(t,r.expr,n),i=d(t,r.init,n)[0],u=[];for(let c of p)try{let s;if(r.pattern){if(s=B(n,r.pattern,c),s===null)continue}else s=J(n,r.varName,c);if(i=d(i,r.update,s)[0],r.extract){let f=d(i,r.extract,s);u.push(...f)}else u.push(i)}catch(s){throw s instanceof I?s.withPrependedResults(u):s}return u}case"Label":try{return d(t,r.body,{...n,labels:new Set([...n.labels??[],r.name])})}catch(p){if(p instanceof I&&p.label===r.name)return p.partialResults;throw p}case"Break":throw new I(r.name);case"Def":{let p=new Map(n.funcs??[]),i=`${r.name}/${r.params.length}`;p.set(i,{params:r.params,body:r.funcBody,closure:new Map(n.funcs??[])});let u={...n,funcs:p};return d(t,r.body,u)}default:{let p=r;throw new Error(`Unknown AST node type: ${p.type}`)}}}function at(t,r){return t<0?Math.max(0,r+t):Math.min(t,r)}function Tt(t,r,e,n,p){function i(s,f){switch(e){case"=":return f;case"|=":return d(s,n,p)[0]??null;case"+=":return typeof s=="number"&&typeof f=="number"||typeof s=="string"&&typeof f=="string"?s+f:Array.isArray(s)&&Array.isArray(f)?[...s,...f]:s&&f&&typeof s=="object"&&typeof f=="object"?X(s,f):f;case"-=":return typeof s=="number"&&typeof f=="number"?s-f:s;case"*=":return typeof s=="number"&&typeof f=="number"?s*f:s;case"/=":return typeof s=="number"&&typeof f=="number"?s/f:s;case"%=":return typeof s=="number"&&typeof f=="number"?s%f:s;case"//=":return s===null||s===!1?f:s;default:return f}}function u(s,f,o){switch(f.type){case"Identity":return o(s);case"Field":{if(!b(f.name))return s;if(f.base)return u(s,f.base,h=>{if(h&&typeof h=="object"&&!Array.isArray(h)){let y=k(h),a=Object.hasOwn(y,f.name)?y[f.name]:void 0;return g(y,f.name,o(a)),y}return h});if(s&&typeof s=="object"&&!Array.isArray(s)){let h=k(s),y=Object.hasOwn(h,f.name)?h[f.name]:void 0;return g(h,f.name,o(y)),h}return s}case"Index":{let y=d(t,f.index,p)[0];if(typeof y=="number"&&Number.isNaN(y))throw new Error("Cannot set array element at NaN index");if(typeof y=="number"&&!Number.isInteger(y)&&(y=Math.trunc(y)),f.base)return u(s,f.base,a=>{if(typeof y=="number"&&Array.isArray(a)){let l=[...a],m=y<0?l.length+y:y;if(m>=0){for(;l.length<=m;)l.push(null);l[m]=o(l[m])}return l}if(typeof y=="string"&&a&&typeof a=="object"&&!Array.isArray(a)){if(!b(y))return a;let l=k(a),m=Object.hasOwn(l,y)?l[y]:void 0;return g(l,y,o(m)),l}return a});if(typeof y=="number"){if(y>536870911)throw new Error("Array index too large");if(y<0&&(!s||!Array.isArray(s)))throw new Error("Out of bounds negative array index");if(Array.isArray(s)){let l=[...s],m=y<0?l.length+y:y;if(m>=0){for(;l.length<=m;)l.push(null);l[m]=o(l[m])}return l}if(s==null){let l=[];for(;l.length<=y;)l.push(null);return l[y]=o(null),l}return s}if(typeof y=="string"&&s&&typeof s=="object"&&!Array.isArray(s)){if(!b(y))return s;let a=k(s),l=Object.hasOwn(a,y)?a[y]:void 0;return g(a,y,o(l)),a}return s}case"Iterate":{let h=y=>{if(Array.isArray(y))return y.map(a=>o(a));if(y&&typeof y=="object"){let a=Object.create(null);for(let[l,m]of Object.entries(y))b(l)&&g(a,l,o(m));return a}return y};return f.base?u(s,f.base,h):h(s)}case"Pipe":{let h=u(s,f.left,y=>y);return u(h,f.right,o)}default:return o(s)}}return u(t,r,s=>{if(e==="|=")return i(s,s);let f=d(t,n,p);return i(s,f[0]??null)})}function Ct(t,r,e){function n(i,u,c){switch(u.type){case"Identity":return c;case"Field":{if(!b(u.name))return i;if(u.base){let s=d(i,u.base,e)[0],f=n(s,{type:"Field",name:u.name},c);return n(i,u.base,f)}if(i&&typeof i=="object"&&!Array.isArray(i)){let s=k(i);return g(s,u.name,c),s}return i}case"Index":{if(u.base){let o=d(i,u.base,e)[0],h=n(o,{type:"Index",index:u.index},c);return n(i,u.base,h)}let f=d(t,u.index,e)[0];if(typeof f=="number"&&Array.isArray(i)){let o=[...i],h=f<0?o.length+f:f;return h>=0&&h<o.length&&(o[h]=c),o}if(typeof f=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!b(f))return i;let o=k(i);return g(o,f,c),o}return i}default:return i}}function p(i,u){switch(u.type){case"Identity":return null;case"Field":{if(!b(u.name))return i;if(u.base){let s=d(i,u.base,e)[0];if(s==null)return i;let f=p(s,{type:"Field",name:u.name});return n(i,u.base,f)}if(i&&typeof i=="object"&&!Array.isArray(i)){if(!b(u.name))return i;let s=k(i);return delete s[u.name],s}return i}case"Index":{if(u.base){let o=d(i,u.base,e)[0];if(o==null)return i;let h=p(o,{type:"Index",index:u.index});return n(i,u.base,h)}let f=d(t,u.index,e)[0];if(typeof f=="number"&&Array.isArray(i)){let o=[...i],h=f<0?o.length+f:f;return h>=0&&h<o.length&&o.splice(h,1),o}if(typeof f=="string"&&i&&typeof i=="object"&&!Array.isArray(i)){if(!b(f))return i;let o=k(i);return delete o[f],o}return i}case"Iterate":return Array.isArray(i)?[]:i&&typeof i=="object"?Object.create(null):i;case"Pipe":{let o=function(a,l,m){switch(l.type){case"Identity":return m;case"Field":{if(!b(l.name))return a;if(a&&typeof a=="object"&&!Array.isArray(a)){let A=k(a);return g(A,l.name,m),A}return a}case"Index":{let E=d(t,l.index,e)[0];if(typeof E=="number"&&Array.isArray(a)){let w=[...a],x=E<0?w.length+E:E;return x>=0&&x<w.length&&(w[x]=m),w}if(typeof E=="string"&&a&&typeof a=="object"&&!Array.isArray(a)){if(!b(E))return a;let w=k(a);return g(w,E,m),w}return a}case"Pipe":{let A=d(a,l.left,e)[0],E=o(A,l.right,m);return o(a,l.left,E)}default:return a}};var c=o;let s=u.left,f=u.right,h=d(i,s,e)[0];if(h==null)return i;let y=p(h,f);return o(i,s,y)}default:return i}}return p(t,r)}function jt(t,r,e,n,p){if(r==="and")return d(t,e,p).flatMap(s=>N(s)?d(t,n,p).map(o=>N(o)):[!1]);if(r==="or")return d(t,e,p).flatMap(s=>N(s)?[!0]:d(t,n,p).map(o=>N(o)));if(r==="//"){let s=d(t,e,p).filter(f=>f!=null&&f!==!1);return s.length>0?s:d(t,n,p)}let i=d(t,e,p),u=d(t,n,p);return i.flatMap(c=>u.map(s=>{switch(r){case"+":return c===null?s:s===null?c:typeof c=="number"&&typeof s=="number"||typeof c=="string"&&typeof s=="string"?c+s:Array.isArray(c)&&Array.isArray(s)?[...c,...s]:c&&s&&typeof c=="object"&&typeof s=="object"&&!Array.isArray(c)&&!Array.isArray(s)?X(c,s):null;case"-":if(typeof c=="number"&&typeof s=="number")return c-s;if(Array.isArray(c)&&Array.isArray(s)){let f=new Set(s.map(o=>JSON.stringify(o)));return c.filter(o=>!f.has(JSON.stringify(o)))}if(typeof c=="string"&&typeof s=="string"){let f=o=>o.length>10?`"${o.slice(0,10)}...`:JSON.stringify(o);throw new Error(`string (${f(c)}) and string (${f(s)}) cannot be subtracted`)}return null;case"*":return typeof c=="number"&&typeof s=="number"?c*s:typeof c=="string"&&typeof s=="number"?c.repeat(s):c&&s&&typeof c=="object"&&typeof s=="object"&&!Array.isArray(c)&&!Array.isArray(s)?z(c,s):null;case"/":if(typeof c=="number"&&typeof s=="number"){if(s===0)throw new Error(`number (${c}) and number (${s}) cannot be divided because the divisor is zero`);return c/s}return typeof c=="string"&&typeof s=="string"?c.split(s):null;case"%":if(typeof c=="number"&&typeof s=="number"){if(s===0)throw new Error(`number (${c}) and number (${s}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(c)&&!Number.isNaN(c)?!Number.isFinite(s)&&!Number.isNaN(s)&&c<0&&s>0?-1:0:c%s}return null;case"==":return R(c,s);case"!=":return!R(c,s);case"<":return D(c,s)<0;case"<=":return D(c,s)<=0;case">":return D(c,s)>0;case">=":return D(c,s)>=0;default:return null}}))}function mt(t,r,e,n){let p=Nt.get(r);if(p)return typeof t=="number"?[p(t)]:[null];let i=et(t,r,e,n,d);if(i!==null)return i;let u=ot(t,r,e,n,d);if(u!==null)return u;let c=Z(t,r,e,n,d);if(c!==null)return c;let s=v(t,r,n.limits.maxDepth);if(s!==null)return s;let f=ft(t,r);if(f!==null)return f;let o=nt(t,r,e,n,d);if(o!==null)return o;let h=W(t,r,e,n,d,yt,L,N,_,P);if(h!==null)return h;let y=st(t,r,e,n,d,N,$,F,Ct,K);if(y!==null)return y;let a=tt(t,r,e,n,d,R);if(a!==null)return a;let l=Q(t,r,e,n,d,yt,N,P);if(l!==null)return l;let m=rt(t,r,e,n,d,N,St,mt);if(m!==null)return m;let A=it(t,r,e,n,d,R);if(A!==null)return A;switch(r){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 E=e.length>0?d(t,e[0],n)[0]:t;throw new V(E)}case"env":return[n.env?G(n.env):Object.create(null)];case"debug":return[t];case"input_line_number":return[1];default:{let E=`${r}/${e.length}`,w=n.funcs?.get(E);if(w){let x=w.closure??n.funcs??new Map,Y=new Map(x);Y.set(E,w);for(let U=0;U<w.params.length;U++){let gt=w.params[U],ut=e[U];if(ut){let C=d(t,ut,n),j;if(C.length===0)j={type:"Call",name:"empty",args:[]};else if(C.length===1)j={type:"Literal",value:C[0]};else{j={type:"Literal",value:C[C.length-1]};for(let q=C.length-2;q>=0;q--)j={type:"Comma",left:{type:"Literal",value:C[q]},right:j}}Y.set(`${gt}/0`,{params:[],body:j})}}let bt={...n,funcs:Y};return d(t,w.body,bt)}throw new Error(`Unknown function: ${r}`)}}}function K(t,r,e,n,p){if(r.type==="Comma"){let c=r;K(t,c.left,e,n,p),K(t,c.right,e,n,p);return}let i=T(r);if(i!==null){p.push([...n,...i]);return}if(r.type==="Iterate"){if(Array.isArray(t))for(let c=0;c<t.length;c++)p.push([...n,c]);else if(t&&typeof t=="object")for(let c of Object.keys(t))p.push([...n,c]);return}if(r.type==="Recurse"){let c=(s,f)=>{if(p.push([...n,...f]),s&&typeof s=="object")if(Array.isArray(s))for(let o=0;o<s.length;o++)c(s[o],[...f,o]);else for(let o of Object.keys(s))c(s[o],[...f,o])};c(t,[]);return}if(r.type==="Pipe"){let c=T(r.left);if(c!==null){let s=d(t,r.left,e);for(let f of s)K(f,r.right,e,[...n,...c],p);return}}d(t,r,e).length>0&&p.push(n)}var dt=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"]]),H=new Set(dt.values());function At(t){let r=[],e=0,n=(f=0)=>t[e+f],p=()=>t[e++],i=()=>e>=t.length,u=f=>f>="0"&&f<="9",c=f=>f>="a"&&f<="z"||f>="A"&&f<="Z"||f==="_",s=f=>c(f)||u(f);for(;!i();){let f=e,o=p();if(!(o===" "||o===" "||o===`
|
|
4
|
-
`||o==="\r")){if(o==="#"){for(;!i()&&n()!==`
|
|
5
|
-
`;)p();continue}if(o==="."&&n()==="."){p(),r.push({type:"DOTDOT",pos:f});continue}if(o==="="&&n()==="="){p(),r.push({type:"EQ",pos:f});continue}if(o==="!"&&n()==="="){p(),r.push({type:"NE",pos:f});continue}if(o==="<"&&n()==="="){p(),r.push({type:"LE",pos:f});continue}if(o===">"&&n()==="="){p(),r.push({type:"GE",pos:f});continue}if(o==="/"&&n()==="/"){p(),n()==="="?(p(),r.push({type:"UPDATE_ALT",pos:f})):r.push({type:"ALT",pos:f});continue}if(o==="+"&&n()==="="){p(),r.push({type:"UPDATE_ADD",pos:f});continue}if(o==="-"&&n()==="="){p(),r.push({type:"UPDATE_SUB",pos:f});continue}if(o==="*"&&n()==="="){p(),r.push({type:"UPDATE_MUL",pos:f});continue}if(o==="/"&&n()==="="){p(),r.push({type:"UPDATE_DIV",pos:f});continue}if(o==="%"&&n()==="="){p(),r.push({type:"UPDATE_MOD",pos:f});continue}if(o==="="&&n()!=="="){r.push({type:"ASSIGN",pos:f});continue}if(o==="."){r.push({type:"DOT",pos:f});continue}if(o==="|"){n()==="="?(p(),r.push({type:"UPDATE_PIPE",pos:f})):r.push({type:"PIPE",pos:f});continue}if(o===","){r.push({type:"COMMA",pos:f});continue}if(o===":"){r.push({type:"COLON",pos:f});continue}if(o===";"){r.push({type:"SEMICOLON",pos:f});continue}if(o==="("){r.push({type:"LPAREN",pos:f});continue}if(o===")"){r.push({type:"RPAREN",pos:f});continue}if(o==="["){r.push({type:"LBRACKET",pos:f});continue}if(o==="]"){r.push({type:"RBRACKET",pos:f});continue}if(o==="{"){r.push({type:"LBRACE",pos:f});continue}if(o==="}"){r.push({type:"RBRACE",pos:f});continue}if(o==="?"){r.push({type:"QUESTION",pos:f});continue}if(o==="+"){r.push({type:"PLUS",pos:f});continue}if(o==="-"){r.push({type:"MINUS",pos:f});continue}if(o==="*"){r.push({type:"STAR",pos:f});continue}if(o==="/"){r.push({type:"SLASH",pos:f});continue}if(o==="%"){r.push({type:"PERCENT",pos:f});continue}if(o==="<"){r.push({type:"LT",pos:f});continue}if(o===">"){r.push({type:"GT",pos:f});continue}if(u(o)){let h=o;for(;!i()&&(u(n())||n()==="."||n()==="e"||n()==="E");)(n()==="e"||n()==="E")&&(t[e+1]==="+"||t[e+1]==="-")&&(h+=p()),h+=p();r.push({type:"NUMBER",value:Number(h),pos:f});continue}if(o==='"'){let h="";for(;!i()&&n()!=='"';)if(n()==="\\"){if(p(),i())break;let y=p();switch(y){case"n":h+=`
|
|
6
|
-
`;break;case"r":h+="\r";break;case"t":h+=" ";break;case"\\":h+="\\";break;case'"':h+='"';break;case"(":h+="\\(";break;default:h+=y}}else h+=p();i()||p(),r.push({type:"STRING",value:h,pos:f});continue}if(c(o)||o==="$"||o==="@"){let h=o;for(;!i()&&s(n());)h+=p();let y=dt.get(h);y?r.push({type:y,value:h,pos:f}):r.push({type:"IDENT",value:h,pos:f});continue}throw new Error(`Unexpected character '${o}' at position ${f}`)}}return r.push({type:"EOF",pos:e}),r}var pt=class t{tokens;pos=0;constructor(r){this.tokens=r}peek(r=0){return this.tokens[this.pos+r]??{type:"EOF",pos:-1}}advance(){return this.tokens[this.pos++]}check(r){return this.peek().type===r}match(...r){for(let e of r)if(this.check(e))return this.advance();return null}expect(r,e){if(!this.check(r))throw new Error(`${e} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}isFieldNameAfterDot(r=0){let e=this.peek(r),n=this.peek(r+1);return n.type==="STRING"?!0:n.type==="IDENT"||H.has(n.type)?n.pos===e.pos+1:!1}isIdentLike(){let r=this.peek().type;return r==="IDENT"||H.has(r)}consumeFieldNameAfterDot(r){let e=this.peek();return e.type==="STRING"?this.advance().value:(e.type==="IDENT"||H.has(e.type))&&e.pos===r.pos+1?this.advance().value:null}parse(){let r=this.parseExpr();if(!this.check("EOF"))throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return r}parseExpr(){return this.parsePipe()}parsePattern(){if(this.match("LBRACKET")){let n=[];if(!this.check("RBRACKET"))for(n.push(this.parsePattern());this.match("COMMA")&&!this.check("RBRACKET");)n.push(this.parsePattern());return this.expect("RBRACKET","Expected ']' after array pattern"),{type:"array",elements:n}}if(this.match("LBRACE")){let n=[];if(!this.check("RBRACE"))for(n.push(this.parsePatternField());this.match("COMMA")&&!this.check("RBRACE");)n.push(this.parsePatternField());return this.expect("RBRACE","Expected '}' after object pattern"),{type:"object",fields:n}}let r=this.expect("IDENT","Expected variable name in pattern"),e=r.value;if(!e.startsWith("$"))throw new Error(`Variable name must start with $ at position ${r.pos}`);return{type:"var",name:e}}parsePatternField(){if(this.match("LPAREN")){let e=this.parseExpr();this.expect("RPAREN","Expected ')' after computed key"),this.expect("COLON","Expected ':' after computed key");let n=this.parsePattern();return{key:e,pattern:n}}let r=this.peek();if(r.type==="IDENT"||H.has(r.type)){let e=r.value;if(e.startsWith("$")){if(this.advance(),this.match("COLON")){let n=this.parsePattern();return{key:e.slice(1),pattern:n,keyVar:e}}return{key:e.slice(1),pattern:{type:"var",name:e}}}if(this.advance(),this.match("COLON")){let n=this.parsePattern();return{key:e,pattern:n}}return{key:e,pattern:{type:"var",name:`$${e}`}}}throw new Error(`Expected field name in object pattern at position ${r.pos}`)}parsePipe(){let r=this.parseComma();for(;this.match("PIPE");){let e=this.parseComma();r={type:"Pipe",left:r,right:e}}return r}parseComma(){let r=this.parseVarBind();for(;this.match("COMMA");){let e=this.parseVarBind();r={type:"Comma",left:r,right:e}}return r}parseVarBind(){let r=this.parseUpdate();if(this.match("AS")){let e=this.parsePattern(),n=[];for(;this.check("QUESTION")&&this.peekAhead(1)?.type==="ALT";)this.advance(),this.advance(),n.push(this.parsePattern());this.expect("PIPE","Expected '|' after variable binding");let p=this.parseExpr();return e.type==="var"&&n.length===0?{type:"VarBind",name:e.name,value:r,body:p}:{type:"VarBind",name:e.type==="var"?e.name:"",value:r,body:p,pattern:e.type!=="var"?e:void 0,alternatives:n.length>0?n:void 0}}return r}peekAhead(r){let e=this.pos+r;return e<this.tokens.length?this.tokens[e]:void 0}parseUpdate(){let r=this.parseAlt(),e=new Map([["ASSIGN","="],["UPDATE_ADD","+="],["UPDATE_SUB","-="],["UPDATE_MUL","*="],["UPDATE_DIV","/="],["UPDATE_MOD","%="],["UPDATE_ALT","//="],["UPDATE_PIPE","|="]]),n=this.match("ASSIGN","UPDATE_ADD","UPDATE_SUB","UPDATE_MUL","UPDATE_DIV","UPDATE_MOD","UPDATE_ALT","UPDATE_PIPE");if(n){let p=this.parseVarBind(),i=e.get(n.type);if(i)return{type:"UpdateOp",op:i,path:r,value:p}}return r}parseAlt(){let r=this.parseOr();for(;this.match("ALT");){let e=this.parseOr();r={type:"BinaryOp",op:"//",left:r,right:e}}return r}parseOr(){let r=this.parseAnd();for(;this.match("OR");){let e=this.parseAnd();r={type:"BinaryOp",op:"or",left:r,right:e}}return r}parseAnd(){let r=this.parseNot();for(;this.match("AND");){let e=this.parseNot();r={type:"BinaryOp",op:"and",left:r,right:e}}return r}parseNot(){return this.parseComparison()}parseComparison(){let r=this.parseAddSub(),e=new Map([["EQ","=="],["NE","!="],["LT","<"],["LE","<="],["GT",">"],["GE",">="]]),n=this.match("EQ","NE","LT","LE","GT","GE");if(n){let p=e.get(n.type);if(p){let i=this.parseAddSub();r={type:"BinaryOp",op:p,left:r,right:i}}}return r}parseAddSub(){let r=this.parseMulDiv();for(;;)if(this.match("PLUS")){let e=this.parseMulDiv();r={type:"BinaryOp",op:"+",left:r,right:e}}else if(this.match("MINUS")){let e=this.parseMulDiv();r={type:"BinaryOp",op:"-",left:r,right:e}}else break;return r}parseMulDiv(){let r=this.parseUnary();for(;;)if(this.match("STAR")){let e=this.parseUnary();r={type:"BinaryOp",op:"*",left:r,right:e}}else if(this.match("SLASH")){let e=this.parseUnary();r={type:"BinaryOp",op:"/",left:r,right:e}}else if(this.match("PERCENT")){let e=this.parseUnary();r={type:"BinaryOp",op:"%",left:r,right:e}}else break;return r}parseUnary(){return this.match("MINUS")?{type:"UnaryOp",op:"-",operand:this.parseUnary()}:this.parsePostfix()}parsePostfix(){let r=this.parsePrimary();for(;;)if(this.match("QUESTION"))r={type:"Optional",expr:r};else if(this.check("DOT")&&this.isFieldNameAfterDot())this.advance(),r={type:"Field",name:this.advance().value,base:r};else if(this.check("LBRACKET"))if(this.advance(),this.match("RBRACKET"))r={type:"Iterate",base:r};else if(this.check("COLON")){this.advance();let e=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),r={type:"Slice",end:e,base:r}}else{let e=this.parseExpr();if(this.match("COLON")){let n=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),r={type:"Slice",start:e,end:n,base:r}}else this.expect("RBRACKET","Expected ']'"),r={type:"Index",index:e,base:r}}else break;return r}parsePrimary(){if(this.match("DOTDOT"))return{type:"Recurse"};if(this.check("DOT")){let r=this.advance();if(this.check("LBRACKET")){if(this.advance(),this.match("RBRACKET"))return{type:"Iterate"};if(this.check("COLON")){this.advance();let p=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",end:p}}let n=this.parseExpr();if(this.match("COLON")){let p=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",start:n,end:p}}return this.expect("RBRACKET","Expected ']'"),{type:"Index",index:n}}let e=this.consumeFieldNameAfterDot(r);return e!==null?{type:"Field",name:e}:{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 e=this.advance().value;return e.includes("\\(")?this.parseStringInterpolation(e):{type:"Literal",value:e}}if(this.match("LBRACKET")){if(this.match("RBRACKET"))return{type:"Array"};let r=this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Array",elements:r}}if(this.match("LBRACE"))return this.parseObjectConstruction();if(this.match("LPAREN")){let r=this.parseExpr();return this.expect("RPAREN","Expected ')'"),{type:"Paren",expr:r}}if(this.match("IF"))return this.parseIf();if(this.match("TRY")){let r=this.parsePostfix(),e;return this.match("CATCH")&&(e=this.parsePostfix()),{type:"Try",body:r,catch:e}}if(this.match("REDUCE")){let r=this.parseAddSub();this.expect("AS","Expected 'as' after reduce expression");let e=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let n=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let p=this.parseExpr();this.expect("RPAREN","Expected ')' after update expression");let i=e.type==="var"?e.name:"";return{type:"Reduce",expr:r,varName:i,init:n,update:p,pattern:e.type!=="var"?e:void 0}}if(this.match("FOREACH")){let r=this.parseAddSub();this.expect("AS","Expected 'as' after foreach expression");let e=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let n=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let p=this.parseExpr(),i;this.match("SEMICOLON")&&(i=this.parseExpr()),this.expect("RPAREN","Expected ')' after expressions");let u=e.type==="var"?e.name:"";return{type:"Foreach",expr:r,varName:u,init:n,update:p,extract:i,pattern:e.type!=="var"?e:void 0}}if(this.match("LABEL")){let r=this.expect("IDENT","Expected label name (e.g., $out)"),e=r.value;if(!e.startsWith("$"))throw new Error(`Label name must start with $ at position ${r.pos}`);this.expect("PIPE","Expected '|' after label name");let n=this.parseExpr();return{type:"Label",name:e,body:n}}if(this.match("BREAK")){let r=this.expect("IDENT","Expected label name to break to"),e=r.value;if(!e.startsWith("$"))throw new Error(`Break label must start with $ at position ${r.pos}`);return{type:"Break",name:e}}if(this.match("DEF")){let e=this.expect("IDENT","Expected function name after def").value,n=[];if(this.match("LPAREN")){if(!this.check("RPAREN")){let u=this.expect("IDENT","Expected parameter name");for(n.push(u.value);this.match("SEMICOLON");){let c=this.expect("IDENT","Expected parameter name");n.push(c.value)}}this.expect("RPAREN","Expected ')' after parameters")}this.expect("COLON","Expected ':' after function name");let p=this.parseExpr();this.expect("SEMICOLON","Expected ';' after function body");let i=this.parseExpr();return{type:"Def",name:e,params:n,funcBody:p,body:i}}if(this.match("NOT"))return{type:"Call",name:"not",args:[]};if(this.check("IDENT")){let e=this.advance().value;if(e.startsWith("$"))return{type:"VarRef",name:e};if(this.match("LPAREN")){let n=[];if(!this.check("RPAREN"))for(n.push(this.parseExpr());this.match("SEMICOLON");)n.push(this.parseExpr());return this.expect("RPAREN","Expected ')'"),{type:"Call",name:e,args:n}}return{type:"Call",name:e,args:[]}}throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){let r=[];if(!this.check("RBRACE"))do{let e,n;if(this.match("LPAREN"))e=this.parseExpr(),this.expect("RPAREN","Expected ')'"),this.expect("COLON","Expected ':'"),n=this.parseObjectValue();else if(this.isIdentLike()){let p=this.advance().value;this.match("COLON")?(e=p,n=this.parseObjectValue()):(e=p,n={type:"Field",name:p})}else if(this.check("STRING"))e=this.advance().value,this.expect("COLON","Expected ':'"),n=this.parseObjectValue();else throw new Error(`Expected object key at position ${this.peek().pos}`);r.push({key:e,value:n})}while(this.match("COMMA"));return this.expect("RBRACE","Expected '}'"),{type:"Object",entries:r}}parseObjectValue(){let r=this.parseVarBind();for(;this.match("PIPE");){let e=this.parseVarBind();r={type:"Pipe",left:r,right:e}}return r}parseIf(){let r=this.parseExpr();this.expect("THEN","Expected 'then'");let e=this.parseExpr(),n=[];for(;this.match("ELIF");){let i=this.parseExpr();this.expect("THEN","Expected 'then' after elif");let u=this.parseExpr();n.push({cond:i,then:u})}let p;return this.match("ELSE")&&(p=this.parseExpr()),this.expect("END","Expected 'end'"),{type:"Cond",cond:r,then:e,elifs:n,else:p}}parseStringInterpolation(r){let e=[],n="",p=0;for(;p<r.length;)if(r[p]==="\\"&&r[p+1]==="("){n&&(e.push(n),n=""),p+=2;let i=1,u="";for(;p<r.length&&i>0;)r[p]==="("?i++:r[p]===")"&&i--,i>0&&(u+=r[p]),p++;let c=At(u),s=new t(c);e.push(s.parse())}else n+=r[p],p++;return n&&e.push(n),{type:"StringInterp",parts:e}}};function ge(t){let r=At(t);return new pt(r).parse()}export{d as a,ge as b};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as x,b as y,c as A}from"./chunk-227L3ACM.js";import{g as m,h as f,i as v,l as g}from"./chunk-RQSPCXDR.js";var C={name:"env",summary:"run a program in a modified environment",usage:"env [OPTION]... [NAME=VALUE]... [COMMAND [ARG]...]",options:["-i, --ignore-environment start with an empty environment","-u NAME, --unset=NAME remove NAME from the environment"," --help display this help and exit"]},H={name:"env",async execute(h,a){let o=g(h);if(y(o))return x(C);let u=!1,i=[],l=new Map,t=-1;for(let n=0;n<o.length;n++){let e=o[n];if(e==="-i"||e==="--ignore-environment")u=!0;else if(e==="-u"&&n+1<o.length)i.push(o[++n]);else if(e.startsWith("-u"))i.push(e.slice(2));else if(e.startsWith("--unset="))i.push(e.slice(8));else{if(e.startsWith("--")&&e!=="--")return A("env",e);if(e.startsWith("-")&&e!=="-"){for(let s of e.slice(1))if(s!=="i"&&s!=="u")return A("env",`-${s}`);e.includes("i")&&(u=!0)}else if(e.includes("=")&&t===-1){let s=e.indexOf("="),c=e.slice(0,s),d=e.slice(s+1);l.set(c,d)}else{t=n;break}}}let r;if(u)r=[...l.entries()];else{let n=[];for(let[c,d]of a.env)n.push([c,v(d)]);let e=n.filter(([c])=>!i.includes(c)),s=new Map(e);for(let[c,d]of l)s.set(c,d);r=[...s.entries()]}if(t===-1){let n=[];for(let[e,s]of r)n.push(`${e}=${s}`);return{stdout:f(n.join(`
|
|
3
|
-
`)+(n.length>0?`
|
|
4
|
-
`:"")),stderr:m,exitCode:0}}if(!a.exec)return{stdout:m,stderr:f(`env: command execution not supported in this context
|
|
5
|
-
`),exitCode:1};let p=o.slice(t),E=p[0],N=p.slice(1).map(n=>/[\s"'\\$`!*?[\]{}|&;<>()]/.test(n)?`'${n.replace(/'/g,"'\\''")}'`:n),$=["command",E,...N].join(" "),M=[...l.entries()].map(([n,e])=>`${n}="${e}"`).join(" "),w=M?`${M} ${$}`:$;return a.exec(w,{cwd:a.cwd})}},O={name:"printenv",summary:"print all or part of environment",usage:"printenv [OPTION]... [VARIABLE]...",options:[" --help display this help and exit"]},W={name:"printenv",async execute(h,a){let o=g(h);if(y(o))return x(O);let u=o.filter(t=>!t.startsWith("-"));if(u.length===0){let t=[];for(let[r,p]of a.env)t.push(`${r}=${v(p)}`);return{stdout:f(t.join(`
|
|
6
|
-
`)+(t.length>0?`
|
|
7
|
-
`:"")),stderr:m,exitCode:0}}let i=[],l=0;for(let t of u){let r=a.env.get(t);r!==void 0?i.push(v(r)):l=1}return{stdout:f(i.join(`
|
|
8
|
-
`)+(i.length>0?`
|
|
9
|
-
`:"")),stderr:m,exitCode:l}}},z={name:"env",flags:[{flag:"-i",type:"boolean"},{flag:"-u",type:"value",valueHint:"string"}]},I={name:"printenv",flags:[]};export{H as a,W as b,z as c,I as d};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as p,b as g,c as N}from"./chunk-227L3ACM.js";import{g as a,h as l,i as b,l as h}from"./chunk-RQSPCXDR.js";var y={name:"nl",summary:"number lines of files",usage:"nl [OPTION]... [FILE]...",description:"Write each FILE to standard output, with line numbers added. If no FILE is specified, standard input is read.",options:["-b STYLE Body numbering style: a (all), t (non-empty), n (none)","-n FORMAT Number format: ln (left), rn (right), rz (right zeros)","-w WIDTH Number width (default: 6)","-s SEP Separator after number (default: TAB)","-v START Starting line number (default: 1)","-i INCR Line number increment (default: 1)"],examples:["nl file.txt # Number non-empty lines","nl -ba file.txt # Number all lines","nl -n rz -w 3 file.txt # Right-justified with zeros","nl -s ': ' file.txt # Use ': ' as separator"]};function x(u,s,r){let i=String(u);switch(s){case"ln":return i.padEnd(r);case"rn":return i.padStart(r);case"rz":return i.padStart(r,"0");default:return s}}function w(u,s){switch(s){case"a":return!0;case"t":return u.trim().length>0;case"n":return!1;default:return s}}function v(u,s,r){if(u==="")return{output:"",nextNumber:r};let i=u.split(`
|
|
3
|
-
`),o=[],t=r,d=u.endsWith(`
|
|
4
|
-
`)&&i[i.length-1]==="";d&&i.pop();for(let f of i)if(w(f,s.bodyStyle)){let n=x(t,s.numberFormat,s.width);o.push(`${n}${s.separator}${f}`),t+=s.increment}else{let n=" ".repeat(s.width);o.push(`${n}${s.separator}${f}`)}return{output:o.join(`
|
|
5
|
-
`)+(d?`
|
|
6
|
-
`:""),nextNumber:t}}var F={name:"nl",execute:async(u,s)=>{let r=h(u);if(g(r))return p(y);let i={bodyStyle:"t",numberFormat:"rn",width:6,separator:" ",startNumber:1,increment:1},o=[],t=0;for(;t<r.length;){let n=r[t];if(n==="-b"&&t+1<r.length){let e=r[t+1];if(e!=="a"&&e!=="t"&&e!=="n")return{exitCode:1,stdout:a,stderr:l(`nl: invalid body numbering style: '${e}'
|
|
7
|
-
`)};i.bodyStyle=e,t+=2}else if(n.startsWith("-b")){let e=n.slice(2);if(e!=="a"&&e!=="t"&&e!=="n")return{exitCode:1,stdout:a,stderr:l(`nl: invalid body numbering style: '${e}'
|
|
8
|
-
`)};i.bodyStyle=e,t++}else if(n==="-n"&&t+1<r.length){let e=r[t+1];if(e!=="ln"&&e!=="rn"&&e!=="rz")return{exitCode:1,stdout:a,stderr:l(`nl: invalid line numbering format: '${e}'
|
|
9
|
-
`)};i.numberFormat=e,t+=2}else if(n.startsWith("-n")){let e=n.slice(2);if(e!=="ln"&&e!=="rn"&&e!=="rz")return{exitCode:1,stdout:a,stderr:l(`nl: invalid line numbering format: '${e}'
|
|
10
|
-
`)};i.numberFormat=e,t++}else if(n==="-w"&&t+1<r.length){let e=parseInt(r[t+1],10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:a,stderr:l(`nl: invalid line number field width: '${r[t+1]}'
|
|
11
|
-
`)};i.width=e,t+=2}else if(n.startsWith("-w")){let e=parseInt(n.slice(2),10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:a,stderr:l(`nl: invalid line number field width: '${n.slice(2)}'
|
|
12
|
-
`)};i.width=e,t++}else if(n==="-s"&&t+1<r.length)i.separator=r[t+1],t+=2;else if(n.startsWith("-s"))i.separator=n.slice(2),t++;else if(n==="-v"&&t+1<r.length){let e=parseInt(r[t+1],10);if(Number.isNaN(e))return{exitCode:1,stdout:a,stderr:l(`nl: invalid starting line number: '${r[t+1]}'
|
|
13
|
-
`)};i.startNumber=e,t+=2}else if(n.startsWith("-v")){let e=parseInt(n.slice(2),10);if(Number.isNaN(e))return{exitCode:1,stdout:a,stderr:l(`nl: invalid starting line number: '${n.slice(2)}'
|
|
14
|
-
`)};i.startNumber=e,t++}else if(n==="-i"&&t+1<r.length){let e=parseInt(r[t+1],10);if(Number.isNaN(e))return{exitCode:1,stdout:a,stderr:l(`nl: invalid line number increment: '${r[t+1]}'
|
|
15
|
-
`)};i.increment=e,t+=2}else if(n.startsWith("-i")){let e=parseInt(n.slice(2),10);if(Number.isNaN(e))return{exitCode:1,stdout:a,stderr:l(`nl: invalid line number increment: '${n.slice(2)}'
|
|
16
|
-
`)};i.increment=e,t++}else if(n==="--"){o.push(...r.slice(t+1));break}else{if(n.startsWith("-")&&n!=="-")return N("nl",n);o.push(n),t++}}let d="",f=i.startNumber;if(o.length===0){let n=b(s.stdin);d=v(n,i,f).output}else for(let n of o){let e=s.fs.resolvePath(s.cwd,n),m=await s.fs.readFile(e);if(m===null)return{exitCode:1,stdout:l(d),stderr:l(`nl: ${n}: No such file or directory
|
|
17
|
-
`)};let c=v(m,i,f);d+=c.output,f=c.nextNumber}return{exitCode:0,stdout:l(d),stderr:a}}},I={name:"nl",flags:[{flag:"-b",type:"value",valueHint:"string"},{flag:"-n",type:"value",valueHint:"string"},{flag:"-w",type:"value",valueHint:"number"},{flag:"-s",type:"value",valueHint:"string"},{flag:"-v",type:"value",valueHint:"number"},{flag:"-i",type:"value",valueHint:"number"}],stdinType:"text",needsFiles:!0};export{F as a,I as b};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as O,b as I,c as $,d as ze,e as C,f as b,g as Z,h as Q}from"./chunk-IBHPKKIT.js";import{a as rt}from"./chunk-QUYWT2TY.js";import{a as j}from"./chunk-7TNGQWY6.js";import{d as B}from"./chunk-UYBH3FNE.js";import{a as Y}from"./chunk-SE4C7FJY.js";import{a as Je}from"./chunk-YEPWKN4F.js";import{a as U,b as X}from"./chunk-227L3ACM.js";import{b as _e,d as tt,e as nt,f as st,g as m,h as y,i as H,l as He}from"./chunk-RQSPCXDR.js";var J,Ye=_e(()=>{"use strict";J=class{input;pos=0;tokens=[];constructor(n){this.input=n}tokenize(){for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let n=this.nextToken();n&&this.tokens.push(n)}return this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}skipWhitespace(){for(;this.pos<this.input.length;){let n=this.input[this.pos];if(n===" "||n===" "||n===`
|
|
3
|
-
`||n==="\r")this.pos++;else if(n==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
|
|
4
|
-
`;)this.pos++;else break}}nextToken(){let n=this.pos,t=this.input[this.pos];if(t>="0"&&t<="9")return this.readNumber();if(t==='"'||t==="'"||t==="`")return this.readString(t);if(t==="b"&&this.pos+1<this.input.length){let o=this.input[this.pos+1];if(o==='"'||o==="'"||o==="`")return this.pos++,this.readString(o)}if(t==="/"){let o=this.tokens[this.tokens.length-1];return o&&(o.type==="int"||o.type==="float"||o.type==="string"||o.type==="ident"||o.type===")"||o.type==="]")?this.input[this.pos+1]==="/"?(this.pos+=2,{type:"//",value:"//",pos:n}):(this.pos++,{type:"/",value:"/",pos:n}):this.readRegex()}if(this.match("not in"))return{type:"not in",value:"not in",pos:n};if(this.match("=>"))return{type:"=>",value:"=>",pos:n};if(this.match("**"))return{type:"**",value:"**",pos:n};if(this.match("++"))return{type:"++",value:"++",pos:n};if(this.match("//"))return{type:"//",value:"//",pos:n};if(this.match("=="))return{type:"==",value:"==",pos:n};if(this.match("!="))return{type:"!=",value:"!=",pos:n};if(this.match("<="))return{type:"<=",value:"<=",pos:n};if(this.match(">="))return{type:">=",value:">=",pos:n};if(this.match("&&"))return{type:"&&",value:"&&",pos:n};if(this.match("||"))return{type:"||",value:"||",pos:n};let r=new Map([["(","("],[")",")"],["[","["],["]","]"],["{","{"],["}","}"],[",",","],[":",":"],[";",";"],["+","+"],["-","-"],["*","*"],["%","%"],["<","<"],[">",">"],["!","!"],[".","."],["|","|"],["=","="]]).get(t);if(r!==void 0)return this.pos++,{type:r,value:t,pos:n};if(this.isIdentStart(t))return this.readIdentifier();throw new Error(`Unexpected character '${t}' at position ${this.pos}`)}match(n){if(this.input.slice(this.pos,this.pos+n.length)===n){if(/^[a-zA-Z]/.test(n)){let t=this.input[this.pos+n.length];if(t&&this.isIdentChar(t))return!1}return this.pos+=n.length,!0}return!1}isIdentStart(n){return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="_"}isIdentChar(n){return this.isIdentStart(n)||n>="0"&&n<="9"}readNumber(){let n=this.pos,t=!1,s=!1;for(;this.pos<this.input.length;){let o=this.input[this.pos];if(o>="0"&&o<="9")this.pos++;else if(o==="_")this.pos++;else if(o==="."&&!t&&!s)t=!0,this.pos++;else if((o==="e"||o==="E")&&!s)s=!0,t=!0,this.pos++,this.pos<this.input.length&&(this.input[this.pos]==="+"||this.input[this.pos]==="-")&&this.pos++;else break}let r=this.input.slice(n,this.pos).replace(/_/g,"");return{type:t?"float":"int",value:r,pos:n}}readString(n){let t=this.pos;this.pos++;let s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r===n)return this.pos++,{type:"string",value:s,pos:t};if(r==="\\"){if(this.pos++,this.pos<this.input.length){let o=this.input[this.pos];switch(o){case"n":s+=`
|
|
5
|
-
`;break;case"r":s+="\r";break;case"t":s+=" ";break;case"\\":s+="\\";break;case'"':s+='"';break;case"'":s+="'";break;case"`":s+="`";break;case"0":s+="\0";break;default:s+=o}this.pos++}}else s+=r,this.pos++}throw new Error(`Unterminated string starting at position ${t}`)}readRegex(){let n=this.pos;this.pos++;let t="",s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r==="/"){for(this.pos++;this.pos<this.input.length&&this.input[this.pos]==="i";)s+=this.input[this.pos],this.pos++;return{type:"regex",value:t+(s?`/${s}`:""),pos:n}}r==="\\"?(t+=r,this.pos++,this.pos<this.input.length&&(t+=this.input[this.pos],this.pos++)):(t+=r,this.pos++)}throw new Error(`Unterminated regex starting at position ${n}`)}readIdentifier(){let n=this.pos;for(;this.pos<this.input.length&&this.isIdentChar(this.input[this.pos]);)this.pos++;let t=!1;this.pos<this.input.length&&this.input[this.pos]==="?"&&(t=!0,this.pos++);let s=this.input.slice(n,t?this.pos-1:this.pos);t&&(s+="?");let r=new Map([["true","true"],["false","false"],["null","null"],["and","and"],["or","or"],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["in","in"],["as","as"],["_","_"]]),o=s.replace(/\?$/,""),i=r.get(o);return i!==void 0&&!t?{type:i,value:o,pos:n}:{type:"ident",value:s,pos:n}}}});var Ke={};tt(Ke,{parseMoonblade:()=>z,parseNamedExpressions:()=>W});function W(e){let n=[],s=new J(e).tokenize(),r=0,o=()=>s[r]||{type:"eof",value:"",pos:0},i=()=>s[r++];for(;o().type!=="eof";){if(o().type===","&&n.length>0){i();continue}let f=[],c=0,p=r;for(;o().type!=="eof";){let a=o();if((a.type===","||a.type==="as")&&c===0)break;(a.type==="("||a.type==="["||a.type==="{")&&c++,(a.type===")"||a.type==="]"||a.type==="}")&&c--,f.push(i())}f.push({type:"eof",value:"",pos:0});let d=new K(f).parse(),u;if(o().type==="as")if(i(),o().type==="("){i();let a=[];for(;o().type!==")"&&o().type!=="eof";)(o().type==="ident"||o().type==="string")&&(a.push(o().value),i()),o().type===","&&i();o().type===")"&&i(),u=a}else if(o().type==="ident"||o().type==="string")u=o().value,i();else throw new Error(`Expected name after 'as', got ${o().type}`);else u=e.slice(s[p].pos,s[r-1]?.pos||e.length).trim(),d.type==="identifier"&&(u=d.name);n.push({expr:d,name:u})}return n}function z(e){let t=new J(e).tokenize();return new K(t).parse()}var T,K,q=_e(()=>{"use strict";Ye();T={PIPE:1,OR:2,AND:3,EQUALITY:4,COMPARISON:5,ADDITIVE:6,MULTIPLICATIVE:7,POWER:8,UNARY:9,POSTFIX:10},K=class{pos=0;tokens;constructor(n){this.tokens=n}parse(){let n=this.parseExpr(0);if(this.peek().type!=="eof")throw new Error(`Unexpected token: ${this.peek().value}`);return n}parseExpr(n){let t=this.parsePrefix();for(;;){let s=this.peek(),r=this.getInfixPrec(s.type);if(r<n)break;t=this.parseInfix(t,r)}return t}parsePrefix(){let n=this.peek();switch(n.type){case"int":return this.advance(),{type:"int",value:Number.parseInt(n.value,10)};case"float":return this.advance(),{type:"float",value:Number.parseFloat(n.value)};case"string":return this.advance(),{type:"string",value:n.value};case"regex":{this.advance();let t=n.value.split("/"),s=t.length>1?t[t.length-1]:"";return{type:"regex",pattern:t.slice(0,-1).join("/")||n.value,caseInsensitive:s.includes("i")}}case"true":return this.advance(),{type:"bool",value:!0};case"false":return this.advance(),{type:"bool",value:!1};case"null":return this.advance(),{type:"null"};case"_":return this.advance(),{type:"underscore"};case"ident":{let t=n.value,s=t.endsWith("?"),r=s?t.slice(0,-1):t;if(this.advance(),this.peek().type==="(")return this.parseFunctionCall(r);if(this.peek().type==="=>"){this.advance();let o=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:[r],body:o},[r])}return{type:"identifier",name:r,unsure:s}}case"(":{this.advance();let t=[];if(this.peek().type===")"){if(this.advance(),this.peek().type==="=>"){this.advance();let r=this.parseExpr(0);return{type:"lambda",params:[],body:r}}throw new Error("Empty parentheses not allowed")}if(this.peek().type==="ident"){let r=this.peek().value;if(this.advance(),this.peek().type===","||this.peek().type===")"){for(t.push(r);this.peek().type===","&&(this.advance(),this.peek().type==="ident");)t.push(this.peek().value),this.advance();if(this.peek().type===")"&&(this.advance(),this.peek().type==="=>")){this.advance();let o=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:t,body:o},t)}this.pos-=t.length*2,t.length>1&&(this.pos=this.pos)}this.pos--}let s=this.parseExpr(0);return this.expect(")"),this.peek().type,s}case"[":return this.parseList();case"{":return this.parseMap();case"-":{this.advance();let t=this.parseExpr(T.UNARY);return t.type==="int"?{type:"int",value:-t.value}:t.type==="float"?{type:"float",value:-t.value}:{type:"func",name:"neg",args:[{expr:t}]}}case"!":return this.advance(),{type:"func",name:"not",args:[{expr:this.parseExpr(T.UNARY)}]};default:throw new Error(`Unexpected token: ${n.type} (${n.value})`)}}parseFunctionCall(n){this.expect("(");let t=[];if(this.peek().type!==")")do{t.length>0&&this.peek().type===","&&this.advance();let s;if(this.peek().type==="ident"){let o=this.peek().value,i=this.pos+1;i<this.tokens.length&&this.tokens[i].type==="="&&(s=o,this.advance(),this.advance())}let r=this.parseExpr(0);t.push({name:s,expr:r})}while(this.peek().type===",");return this.expect(")"),{type:"func",name:n.toLowerCase(),args:t}}parseList(){this.expect("[");let n=[];if(this.peek().type!=="]")do n.length>0&&this.peek().type===","&&this.advance(),n.push(this.parseExpr(0));while(this.peek().type===",");return this.expect("]"),{type:"list",elements:n}}parseMap(){this.expect("{");let n=[];if(this.peek().type!=="}")do{n.length>0&&this.peek().type===","&&this.advance();let t;if(this.peek().type==="ident")t=this.peek().value,this.advance();else if(this.peek().type==="string")t=this.peek().value,this.advance();else throw new Error(`Expected map key, got ${this.peek().type}`);this.expect(":");let s=this.parseExpr(0);n.push({key:t,value:s})}while(this.peek().type===",");return this.expect("}"),{type:"map",entries:n}}parseInfix(n,t){let s=this.peek(),o=new Map([["+","add"],["-","sub"],["*","mul"],["/","div"],["//","idiv"],["%","mod"],["**","pow"],["++","concat"],["==","=="],["!=","!="],["<","<"],["<=","<="],[">",">"],[">=",">="],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["&&","and"],["and","and"],["||","or"],["or","or"]]).get(s.type);if(o!==void 0){this.advance();let i=this.parseExpr(t+(this.isRightAssoc(s.type)?0:1));return{type:"func",name:o,args:[{expr:n},{expr:i}]}}if(s.type==="|"){this.advance();let i=this.parseExpr(t);return this.handlePipe(n,i)}if(s.type===".")return this.advance(),this.handleDot(n);if(s.type==="[")return this.advance(),this.handleIndexing(n);if(s.type==="in")return this.advance(),{type:"func",name:"contains",args:[{expr:this.parseExpr(t+1)},{expr:n}]};if(s.type==="not in")return this.advance(),{type:"func",name:"not",args:[{expr:{type:"func",name:"contains",args:[{expr:this.parseExpr(t+1)},{expr:n}]}}]};throw new Error(`Unexpected infix token: ${s.type}`)}handlePipe(n,t){if(t.type==="identifier")return{type:"func",name:t.name,args:[{expr:n}]};if(t.type==="func"){let s=this.countUnderscores(t);return s===0?t:s===1?this.fillUnderscore(t,n):{type:"pipeline",exprs:[n,t]}}return this.countUnderscores(t)===1?this.fillUnderscore(t,n):t}handleDot(n){let t=this.peek();if(t.type==="ident"){let s=t.value;if(this.advance(),this.peek().type==="("){let r=this.parseFunctionCall(s);return r.type==="func"&&r.args.unshift({expr:n}),r}return{type:"func",name:"get",args:[{expr:n},{expr:{type:"string",value:s}}]}}if(t.type==="int"){let s=Number.parseInt(t.value,10);return this.advance(),{type:"func",name:"get",args:[{expr:n},{expr:{type:"int",value:s}}]}}if(t.type==="string"){let s=t.value;return this.advance(),{type:"func",name:"get",args:[{expr:n},{expr:{type:"string",value:s}}]}}throw new Error(`Expected identifier, number, or string after dot, got ${t.type}`)}handleIndexing(n){if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:n}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:n},{expr:{type:"int",value:0}},{expr:s}]}}let t=this.parseExpr(0);if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:n},{expr:t}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:n},{expr:t},{expr:s}]}}return this.expect("]"),{type:"func",name:"get",args:[{expr:n},{expr:t}]}}countUnderscores(n){return n.type==="underscore"?1:n.type==="func"?n.args.reduce((t,s)=>t+this.countUnderscores(s.expr),0):n.type==="list"?n.elements.reduce((t,s)=>t+this.countUnderscores(s),0):n.type==="map"?n.entries.reduce((t,s)=>t+this.countUnderscores(s.value),0):0}fillUnderscore(n,t){return n.type==="underscore"?t:n.type==="func"?{...n,args:n.args.map(s=>({...s,expr:this.fillUnderscore(s.expr,t)}))}:n.type==="list"?{...n,elements:n.elements.map(s=>this.fillUnderscore(s,t))}:n.type==="map"?{...n,entries:n.entries.map(s=>({...s,value:this.fillUnderscore(s.value,t)}))}:n}bindLambdaArgs(n,t){return{...n,body:this.bindLambdaArgsInExpr(n.body,t)}}bindLambdaArgsInExpr(n,t){return n.type==="identifier"&&t.includes(n.name)?{type:"lambdaBinding",name:n.name}:n.type==="func"?{...n,args:n.args.map(s=>({...s,expr:this.bindLambdaArgsInExpr(s.expr,t)}))}:n.type==="list"?{...n,elements:n.elements.map(s=>this.bindLambdaArgsInExpr(s,t))}:n.type==="map"?{...n,entries:n.entries.map(s=>({...s,value:this.bindLambdaArgsInExpr(s.value,t)}))}:n}getInfixPrec(n){switch(n){case"|":return T.PIPE;case"||":case"or":return T.OR;case"&&":case"and":return T.AND;case"==":case"!=":case"eq":case"ne":return T.EQUALITY;case"<":case"<=":case">":case">=":case"lt":case"le":case"gt":case"ge":case"in":case"not in":return T.COMPARISON;case"+":case"-":case"++":return T.ADDITIVE;case"*":case"/":case"//":case"%":return T.MULTIPLICATIVE;case"**":return T.POWER;case".":case"[":return T.POSTFIX;default:return-1}}isRightAssoc(n){return n==="**"}peek(){return this.tokens[this.pos]||{type:"eof",value:"",pos:0}}advance(){return this.tokens[this.pos++]}expect(n){let t=this.peek();if(t.type!==n)throw new Error(`Expected ${n}, got ${t.type}`);return this.advance()}}});q();function P(e,n){return n.length===0?N(e,[]):n.length===1?{type:"Pipe",left:n[0],right:N(e,[])}:{type:"Pipe",left:n[0],right:N(e,n.slice(1))}}var ee={add:e=>k("+",e[0],e[1]),sub:e=>k("-",e[0],e[1]),mul:e=>k("*",e[0],e[1]),div:e=>k("/",e[0],e[1]),mod:e=>k("%",e[0],e[1]),idiv:e=>N("floor",[k("/",e[0],e[1])]),pow:e=>P("pow",e),neg:e=>({type:"UnaryOp",op:"-",operand:e[0]}),"==":e=>k("==",e[0],e[1]),"!=":e=>k("!=",e[0],e[1]),"<":e=>k("<",e[0],e[1]),"<=":e=>k("<=",e[0],e[1]),">":e=>k(">",e[0],e[1]),">=":e=>k(">=",e[0],e[1]),eq:e=>k("==",M(e[0]),M(e[1])),ne:e=>k("!=",M(e[0]),M(e[1])),lt:e=>k("<",M(e[0]),M(e[1])),le:e=>k("<=",M(e[0]),M(e[1])),gt:e=>k(">",M(e[0]),M(e[1])),ge:e=>k(">=",M(e[0]),M(e[1])),and:e=>k("and",e[0],e[1]),or:e=>k("or",e[0],e[1]),not:e=>({type:"UnaryOp",op:"not",operand:e[0]}),len:e=>P("length",e),length:e=>P("length",e),upper:e=>P("ascii_upcase",e),lower:e=>P("ascii_downcase",e),trim:e=>P("trim",e),ltrim:e=>e.length===0?N("ltrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:N("ltrimstr",[{type:"Literal",value:" "}])},rtrim:e=>e.length===0?N("rtrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:N("rtrimstr",[{type:"Literal",value:" "}])},split:e=>P("split",e),join:e=>e.length===1?N("join",[{type:"Literal",value:""}]):P("join",e),concat:e=>k("+",e[0],e[1]),startswith:e=>P("startswith",e),endswith:e=>P("endswith",e),contains:e=>P("contains",e),replace:e=>P("gsub",e),substr:e=>e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:k("+",e[1],e[2])},abs:e=>P("fabs",e),floor:e=>P("floor",e),ceil:e=>P("ceil",e),round:e=>P("round",e),sqrt:e=>P("sqrt",e),log:e=>P("log",e),log10:e=>P("log10",e),log2:e=>P("log2",e),exp:e=>P("exp",e),sin:e=>P("sin",e),cos:e=>P("cos",e),tan:e=>P("tan",e),asin:e=>P("asin",e),acos:e=>P("acos",e),atan:e=>P("atan",e),min:e=>P("min",e),max:e=>P("max",e),first:e=>e.length===0?{type:"Index",index:{type:"Literal",value:0}}:{type:"Index",index:{type:"Literal",value:0},base:e[0]},last:e=>e.length===0?{type:"Index",index:{type:"Literal",value:-1}}:{type:"Index",index:{type:"Literal",value:-1},base:e[0]},get:e=>e.length===1?{type:"Index",index:e[0]}:{type:"Index",index:e[1],base:e[0]},slice:e=>e.length===1?{type:"Slice",base:e[0]}:e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:e[2]},keys:"keys",values:"values",entries:e=>N("to_entries",e),from_entries:"from_entries",reverse:"reverse",sort:"sort",sort_by:"sort_by",group_by:"group_by",unique:"unique",unique_by:"unique_by",flatten:"flatten",map:e=>({type:"Pipe",left:e[0],right:{type:"Array",elements:e[1]}}),select:e=>N("select",e),empty:()=>N("empty",[]),count:()=>N("length",[]),sum:e=>e.length===0?N("add",[]):{type:"Pipe",left:{type:"Array",elements:e[0]},right:N("add",[])},mean:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:k("/",N("add",[]),N("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:k("/",N("add",[]),N("length",[]))},avg:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:k("/",N("add",[]),N("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:k("/",N("add",[]),N("length",[]))},type:"type",isnull:e=>e.length===0?k("==",{type:"Identity"},{type:"Literal",value:null}):k("==",e[0],{type:"Literal",value:null}),isempty:e=>e.length===0?k("==",{type:"Identity"},{type:"Literal",value:""}):k("==",e[0],{type:"Literal",value:""}),tonumber:e=>e.length===0?N("tonumber",[]):N("tonumber",e),tostring:e=>e.length===0?N("tostring",[]):N("tostring",e),if:e=>Ge(e[0],e[1],e[2]),coalesce:e=>{if(e.length===0)return{type:"Literal",value:null};if(e.length===1)return e[0];let[n,...t]=e,s=k("and",k("!=",n,{type:"Literal",value:null}),k("!=",n,{type:"Literal",value:""}));return Ge(s,n,t.length===1?t[0]:ee.coalesce(t))},index:()=>({type:"Field",name:"_row_index"}),now:()=>N("now",[]),fmt:e=>N("tostring",e),format:e=>N("tostring",e)};function k(e,n,t){return{type:"BinaryOp",op:e,left:n,right:t}}function N(e,n){return{type:"Call",name:e,args:n}}var ot="then";function Ge(e,n,t){let s={type:"Cond",cond:e,elifs:[],else:t||{type:"Literal",value:null}};return s[ot]=n,s}function M(e){return{type:"Pipe",left:e,right:{type:"Call",name:"tostring",args:[]}}}function L(e,n=!0){switch(e.type){case"int":case"float":return{type:"Literal",value:e.value};case"string":return{type:"Literal",value:e.value};case"bool":return{type:"Literal",value:e.value};case"null":return{type:"Literal",value:null};case"underscore":return{type:"Index",base:{type:"Identity"},index:{type:"Literal",value:"_"}};case"identifier":return n?{type:"Field",name:e.name}:{type:"VarRef",name:e.name};case"lambdaBinding":return{type:"VarRef",name:e.name};case"func":{let t=e.args.map(r=>L(r.expr,n)),s=Object.hasOwn(ee,e.name)?ee[e.name]:void 0;return typeof s=="function"?s(t):N(typeof s=="string"?s:e.name,t)}case"list":return e.elements.length===0?{type:"Array"}:{type:"Array",elements:e.elements.reduce((t,s,r)=>{let o=L(s,n);return r===0?o:{type:"Comma",left:t,right:o}},null)};case"map":return{type:"Object",entries:e.entries.map(t=>({key:t.key,value:L(t.value,n)}))};case"regex":return{type:"Literal",value:e.pattern};case"slice":return{type:"Slice",start:e.start?L(e.start,n):void 0,end:e.end?L(e.end,n):void 0};case"lambda":return L(e.body,n);case"pipeline":return{type:"Identity"};default:throw new Error(`Unknown moonblade expression type: ${e.type}`)}}function ne(e){let n=[],t=0;for(;t<e.length;){for(;t<e.length&&(e[t]===" "||e[t]===",");)t++;if(t>=e.length)break;let s=t;for(;t<e.length&&/\w/.test(e[t]);)t++;let r=e.slice(s,t);for(;t<e.length&&e[t]===" ";)t++;if(e[t]!=="(")break;t++;let o=1,i=t;for(;t<e.length&&o>0;)e[t]==="("?o++:e[t]===")"&&o--,o>0&&t++;let f=e.slice(i,t).trim();for(t++;t<e.length&&e[t]===" ";)t++;let c="";if(e.slice(t,t+3).toLowerCase()==="as "){for(t+=3;t<e.length&&e[t]===" ";)t++;let p=t;for(;t<e.length&&/\w/.test(e[t]);)t++;c=e.slice(p,t)}c||(c=f?`${r}(${f})`:`${r}()`),n.push({func:r,expr:f,alias:c})}return n}function Xe(e){return/^\w+$/.test(e)}function te(e,n,t){let s=L(z(n)),r=j(e,s,t);return r.length>0?r[0]:null}function se(e,n,t={}){let{func:s,expr:r}=n;if(s==="count"&&!r)return e.length;let o;switch(Xe(r)?o=e.map(i=>i[r]).filter(i=>i!=null):o=e.map(i=>te(i,r,t)).filter(i=>i!=null),s){case"count":return Xe(r)?o.length:o.filter(i=>!!i).length;case"sum":return o.map(f=>typeof f=="number"?f:Number.parseFloat(String(f))).reduce((f,c)=>f+c,0);case"mean":case"avg":{let i=o.map(f=>typeof f=="number"?f:Number.parseFloat(String(f)));return i.length>0?i.reduce((f,c)=>f+c,0)/i.length:0}case"min":{let i=o.map(f=>typeof f=="number"?f:Number.parseFloat(String(f)));return i.length>0?Math.min(...i):null}case"max":{let i=o.map(f=>typeof f=="number"?f:Number.parseFloat(String(f)));return i.length>0?Math.max(...i):null}case"first":return o.length>0?o[0]:null;case"last":return o.length>0?o[o.length-1]:null;case"median":{let i=o.map(c=>typeof c=="number"?c:Number.parseFloat(String(c))).filter(c=>!Number.isNaN(c)).sort((c,p)=>c-p);if(i.length===0)return null;let f=Math.floor(i.length/2);return i.length%2===0?(i[f-1]+i[f])/2:i[f]}case"mode":{let i=new Map;for(let p of o){let l=String(p);i.set(l,(i.get(l)||0)+1)}let f=0,c=null;for(let[p,l]of i)l>f&&(f=l,c=p);return c}case"cardinality":return new Set(o.map(f=>String(f))).size;case"values":return o.map(i=>String(i)).join("|");case"distinct_values":return[...new Set(o.map(f=>String(f)))].sort().join("|");case"all":{if(e.length===0)return!0;for(let i of e)if(!te(i,r,t))return!1;return!0}case"any":{for(let i of e)if(te(i,r,t))return!0;return!1}default:return null}}function Be(e,n,t={}){let s=O();for(let r of n)I(s,r.alias,se(e,r,t));return s}async function re(e,n){let t="",s=[];for(let l of e)l.startsWith("-")||(t?s.push(l):t=l);if(!t)return{stdout:m,stderr:y(`xan agg: no aggregation expression
|
|
6
|
-
`),exitCode:1};let{data:r,error:o}=await b(s,n);if(o)return o;let i={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},f=ne(t),c=f.map(l=>l.alias),p=Be(r,f,i);return{stdout:y(C(c,[p])),stderr:m,exitCode:0}}async function oe(e,n){let t="",s="",r=[];for(let h=0;h<e.length;h++){let g=e[h];g==="--sorted"||g.startsWith("-")||(t?s?r.push(g):s=g:t=g)}if(!t||!s)return{stdout:m,stderr:y(`xan groupby: usage: xan groupby COLS EXPR [FILE]
|
|
7
|
-
`),exitCode:1};let{data:o,error:i}=await b(r,n);if(i)return i;let f={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},c=t.split(","),p=ne(s),l=[],d=new Map;for(let h of o){let g=c.map(x=>String(h[x])).join("\0");d.has(g)||(d.set(g,[]),l.push(g)),d.get(g)?.push(h)}let u=[...c,...p.map(h=>h.alias)],a=[];for(let h of l){let g=d.get(h);if(!g)continue;let x=O();for(let w of c)I(x,w,g[0][w]);for(let w of p)I(x,w.alias,se(g,w,f));a.push(x)}return{stdout:y(C(u,a)),stderr:m,exitCode:0}}async function ie(e,n){let t=[],s="",r=10,o=!1,i=[];for(let a=0;a<e.length;a++){let h=e[a];(h==="-s"||h==="--select")&&a+1<e.length?t=e[++a].split(","):(h==="-g"||h==="--groupby")&&a+1<e.length?s=e[++a]:(h==="-l"||h==="--limit")&&a+1<e.length?r=Number.parseInt(e[++a],10):h==="--no-extra"?o=!0:h==="-A"||h==="--all"?r=0:h.startsWith("-")||i.push(h)}let{headers:f,data:c,error:p}=await b(i,n);if(p)return p;let l=t.length>0?t:f.filter(a=>a!==s);s&&t.length===0&&(l=f.filter(a=>a!==s));let d=[],u=s?["field",s,"value","count"]:["field","value","count"];if(s){let a=new Map;for(let h of c){let g=String(h[s]??"");a.has(g)||a.set(g,[]),a.get(g)?.push(h)}for(let h of l)for(let[g,x]of a){let w=new Map;for(let E of x){let A=E[h],S=A===""||A===null||A===void 0?"":String(A);w.set(S,(w.get(S)||0)+1)}let v=[...w.entries()].sort((E,A)=>A[1]!==E[1]?A[1]-E[1]:E[0].localeCompare(A[0]));o&&(v=v.filter(([E])=>E!=="")),r>0&&(v=v.slice(0,r));for(let[E,A]of v)d.push({field:h,[s]:g,value:E===""?"<empty>":E,count:A})}}else for(let a of l){let h=new Map;for(let x of c){let w=x[a],v=w===""||w===null||w===void 0?"":String(w);h.set(v,(h.get(v)||0)+1)}let g=[...h.entries()].sort((x,w)=>w[1]!==x[1]?w[1]-x[1]:x[0].localeCompare(w[0]));o&&(g=g.filter(([x])=>x!=="")),r>0&&(g=g.slice(0,r));for(let[x,w]of g)d.push({field:a,value:x===""?"<empty>":x,count:w})}return{stdout:y(C(u,d)),stderr:m,exitCode:0}}async function ae(e,n){let t=[],s=[];for(let l=0;l<e.length;l++){let d=e[l];d==="-s"&&l+1<e.length?t=e[++l].split(","):d.startsWith("-")||s.push(d)}let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=t.length>0?t:r,c=["field","type","count","min","max","mean"],p=[];for(let l of f){let d=o.map(h=>h[l]).filter(h=>h!=null),u=d.map(h=>typeof h=="number"?h:Number.parseFloat(String(h))).filter(h=>!Number.isNaN(h)),a=u.length===d.length&&u.length>0;p.push({field:l,type:a?"Number":"String",count:d.length,min:a?Math.min(...u):"",max:a?Math.max(...u):"",mean:a?Math.round(u.reduce((h,g)=>h+g,0)/u.length*1e10)/1e10:""})}return{stdout:y(C(c,p)),stderr:m,exitCode:0}}q();function Ze(e){let n=z(e);return L(n)}function it(e){let t=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return Y(`^${t}$`)}function G(e,n){let t=[],s=new Set;for(let r of e.split(",")){let o=r.trim();if(o.startsWith("!")){let p=o.slice(1),l=G(p,n);for(let d of l)s.add(d);continue}if(o==="*"){for(let p of n)t.includes(p)||t.push(p);continue}if(o.includes("*")){let p=it(o);for(let l of n)p.test(l)&&!t.includes(l)&&t.push(l);continue}let i=o.match(/^([^:]*):([^:]*)$/);if(i&&(i[1]||i[2])){let p=i[1],l=i[2],d=p?n.indexOf(p):0,u=l?n.indexOf(l):n.length-1;if(d!==-1&&u!==-1){let a=d<=u?1:-1;for(let h=d;a>0?h<=u:h>=u;h+=a)t.includes(n[h])||t.push(n[h])}continue}let f=o.match(/^(\d+)-(\d+)$/);if(f){let p=Number.parseInt(f[1],10),l=Number.parseInt(f[2],10);for(let d=p;d<=l&&d<n.length;d++)t.push(n[d]);continue}let c=Number.parseInt(o,10);if(!Number.isNaN(c)&&c>=0&&c<n.length){t.push(n[c]);continue}n.includes(o)&&t.push(o)}return s.size>0?t.filter(r=>!s.has(r)):t}async function le(e,n){let t="",s=[];for(let p of e)p.startsWith("-")||(t?s.push(p):t=p);if(!t)return{stdout:m,stderr:y(`xan select: no columns specified
|
|
8
|
-
`),exitCode:1};let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=G(t,r),c=o.map(p=>{let l=O();for(let d of f)I(l,d,p[d]);return l});return{stdout:y(C(f,c)),stderr:m,exitCode:0}}async function ue(e,n){let t="",s=[];for(let l of e)l.startsWith("-")||(t?s.push(l):t=l);if(!t)return{stdout:m,stderr:y(`xan drop: no columns specified
|
|
9
|
-
`),exitCode:1};let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=new Set(G(t,r)),c=r.filter(l=>!f.has(l)),p=o.map(l=>{let d=O();for(let u of c)I(d,u,l[u]);return d});return{stdout:y(C(c,p)),stderr:m,exitCode:0}}async function ce(e,n){let t="",s="",r=[];for(let l=0;l<e.length;l++){let d=e[l];d==="-s"&&l+1<e.length?s=e[++l]:d.startsWith("-")||(t?r.push(d):t=d)}if(!t)return{stdout:m,stderr:y(`xan rename: no new name(s) specified
|
|
10
|
-
`),exitCode:1};let{headers:o,data:i,error:f}=await b(r,n);if(f)return f;let c;if(s){let l=s.split(","),d=t.split(","),u=new Map;for(let a=0;a<l.length&&a<d.length;a++)u.set(l[a],d[a]);c=o.map(a=>u.get(a)||a)}else{let l=t.split(",");c=o.map((d,u)=>u<l.length?l[u]:d)}let p=i.map(l=>{let d=O();for(let u=0;u<o.length;u++)I(d,c[u],l[o[u]]);return d});return{stdout:y(C(c,p)),stderr:m,exitCode:0}}async function pe(e,n){let t="index",s=[];for(let p=0;p<e.length;p++)e[p]==="-c"&&p+1<e.length?t=e[++p]:s.push(e[p]);let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=[t,...r],c=o.map((p,l)=>{let d=O();I(d,t,l);for(let u of r)I(d,u,p[u]);return d});return{stdout:y(C(f,c)),stderr:m,exitCode:0}}async function fe(e,n){let t=e.includes("-j")||e.includes("--just-names"),{headers:s,error:r}=await b(e.filter(i=>i!=="-j"&&i!=="--just-names"),n);if(r)return r;let o=t?`${s.map(i=>i).join(`
|
|
11
|
-
`)}
|
|
12
|
-
`:`${s.map((i,f)=>`${f} ${i}`).join(`
|
|
13
|
-
`)}
|
|
14
|
-
`;return{stdout:y(o),stderr:m,exitCode:0}}async function de(e,n){let{data:t,error:s}=await b(e,n);return s||{stdout:y(`${t.length}
|
|
15
|
-
`),stderr:m,exitCode:0}}async function he(e,n){let t=10,s=[];for(let c=0;c<e.length;c++)(e[c]==="-l"||e[c]==="-n")&&c+1<e.length?t=Number.parseInt(e[++c],10):s.push(e[c]);let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=o.slice(0,t);return{stdout:y(C(r,f)),stderr:m,exitCode:0}}async function me(e,n){let t=10,s=[];for(let c=0;c<e.length;c++)(e[c]==="-l"||e[c]==="-n")&&c+1<e.length?t=Number.parseInt(e[++c],10):s.push(e[c]);let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=o.slice(-t);return{stdout:y(C(r,f)),stderr:m,exitCode:0}}async function ge(e,n){let t,s,r,o=[];for(let u=0;u<e.length;u++){let a=e[u];(a==="-s"||a==="--start")&&u+1<e.length?t=Number.parseInt(e[++u],10):(a==="-e"||a==="--end")&&u+1<e.length?s=Number.parseInt(e[++u],10):(a==="-l"||a==="--len")&&u+1<e.length?r=Number.parseInt(e[++u],10):a.startsWith("-")||o.push(a)}let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;let p=t??0,l;r!==void 0?l=p+r:s!==void 0?l=s:l=f.length;let d=f.slice(p,l);return{stdout:y(C(i,d)),stderr:m,exitCode:0}}async function ye(e,n){let{headers:t,data:s,error:r}=await b(e,n);if(r)return r;let o=[...s].reverse();return{stdout:y(C(t,o)),stderr:m,exitCode:0}}var xe=nt(rt(),1);async function we(e,n){let t=e.filter(p=>!p.startsWith("-")),{headers:s,data:r,error:o}=await b(t,n);if(o)return o;if(r.length===0){let p=["column"],l=s.map(d=>({column:d}));return{stdout:y(C(p,l)),stderr:m,exitCode:0}}let i=s[0],f=[i,...r.map((p,l)=>String(p[i]??`row_${l}`))],c=[];for(let p=1;p<s.length;p++){let l=s[p],d=O();I(d,i,l);for(let u=0;u<r.length;u++)I(d,f[u+1],r[u][l]);c.push(d)}return{stdout:y(C(f,c)),stderr:m,exitCode:0}}async function ve(e,n){let t=null,s=[];for(let l=0;l<e.length;l++){let d=e[l];d==="--seed"&&l+1<e.length?t=Number.parseInt(e[++l],10):d.startsWith("-")||s.push(d)}let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=t!==null?t:Date.now(),c=()=>(f=f*1103515245+12345&2147483647,f/2147483647),p=[...o];for(let l=p.length-1;l>0;l--){let d=Math.floor(c()*(l+1));[p[l],p[d]]=[p[d],p[l]]}return{stdout:y(C(r,p)),stderr:m,exitCode:0}}async function Ce(e,n){let t=null,s="",r=[];for(let a=0;a<e.length;a++){let h=e[a];(h==="-l"||h==="--length")&&a+1<e.length?t=Number.parseInt(e[++a],10):(h==="-d"||h==="--default")&&a+1<e.length?s=e[++a]:h.startsWith("-")||r.push(h)}let o=r[0],i;if(!o||o==="-")i=H(n.stdin);else try{let a=n.fs.resolvePath(n.cwd,o);i=await n.fs.readFile(a)}catch{return{stdout:m,stderr:y(`xan fixlengths: ${o}: No such file or directory
|
|
16
|
-
`),exitCode:1}}let c=xe.default.parse(i.trim(),{header:!1,skipEmptyLines:!0}).data;if(c.length===0)return{stdout:m,stderr:m,exitCode:0};let p=Math.max(...c.map(a=>a.length)),l=t??p,d=c.map(a=>a.length===l?a:a.length<l?[...a,...Array(l-a.length).fill(s)]:a.slice(0,l)),u=xe.default.unparse(d);return{stdout:y(`${u.replace(/\r\n/g,`
|
|
17
|
-
`)}
|
|
18
|
-
`),stderr:m,exitCode:0}}async function be(e,n){let t=null,s=null,r=".",o=[];for(let u=0;u<e.length;u++){let a=e[u];(a==="-c"||a==="--chunks")&&u+1<e.length?t=Number.parseInt(e[++u],10):(a==="-S"||a==="--size")&&u+1<e.length?s=Number.parseInt(e[++u],10):(a==="-o"||a==="--output")&&u+1<e.length?r=e[++u]:a.startsWith("-")||o.push(a)}if(!t&&!s)return{stdout:m,stderr:y(`xan split: must specify -c or -S
|
|
19
|
-
`),exitCode:1};let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;let p=[];if(t){let u=Math.ceil(f.length/t);for(let a=0;a<t;a++)p.push(f.slice(a*u,(a+1)*u))}else if(s)for(let u=0;u<f.length;u+=s)p.push(f.slice(u,u+s));let l=p.filter(u=>u.length>0),d=o[0]?.replace(/\.csv$/,"")||"part";try{let u=n.fs.resolvePath(n.cwd,r);for(let a=0;a<l.length;a++){let h=`${d}_${String(a+1).padStart(3,"0")}.csv`,g=n.fs.resolvePath(u,h);await n.fs.writeFile(g,C(i,l[a]))}return{stdout:y(`Split into ${l.length} parts
|
|
20
|
-
`),stderr:m,exitCode:0}}catch{let u=l.map((a,h)=>`Part ${h+1}: ${a.length} rows`).join(`
|
|
21
|
-
`);return{stdout:y(`${u}
|
|
22
|
-
`),stderr:m,exitCode:0}}}async function Se(e,n){let t="",s=".",r=[];for(let p=0;p<e.length;p++){let l=e[p];(l==="-o"||l==="--output")&&p+1<e.length?s=e[++p]:l.startsWith("-")||(t?r.push(l):t=l)}if(!t)return{stdout:m,stderr:y(`xan partition: usage: xan partition COLUMN [FILE]
|
|
23
|
-
`),exitCode:1};let{headers:o,data:i,error:f}=await b(r,n);if(f)return f;if(!o.includes(t))return{stdout:m,stderr:y(`xan partition: column '${t}' not found
|
|
24
|
-
`),exitCode:1};let c=new Map;for(let p of i){let l=String(p[t]??"");c.has(l)||c.set(l,[]),c.get(l)?.push(p)}try{let p=n.fs.resolvePath(n.cwd,s);for(let[l,d]of c){let a=`${l.replace(/[^a-zA-Z0-9_-]/g,"_")||"empty"}.csv`,h=n.fs.resolvePath(p,a);await n.fs.writeFile(h,C(o,d))}return{stdout:y(`Partitioned into ${c.size} files by '${t}'
|
|
25
|
-
`),stderr:m,exitCode:0}}catch{let p=Array.from(c.entries()).map(([l,d])=>`${l}: ${d.length} rows`).join(`
|
|
26
|
-
`);return{stdout:y(`${p}
|
|
27
|
-
`),stderr:m,exitCode:0}}}async function Ie(e,n){if(e.length===0)return{stdout:m,stderr:y(`xan to: usage: xan to <format> [FILE]
|
|
28
|
-
`),exitCode:1};let t=e[0],s=e.slice(1);return t==="json"?at(s,n):{stdout:m,stderr:y(`xan to: unsupported format '${t}'
|
|
29
|
-
`),exitCode:1}}async function at(e,n){let t=e.filter(i=>!i.startsWith("-")),{data:s,error:r}=await b(t,n);if(r)return r;let o=JSON.stringify(s,null,2);return{stdout:y(`${o}
|
|
30
|
-
`),stderr:m,exitCode:0}}async function ke(e,n){let t="",s=[];for(let r=0;r<e.length;r++){let o=e[r];(o==="-f"||o==="--format")&&r+1<e.length?t=e[++r]:o.startsWith("-")||s.push(o)}return t?t==="json"?lt(s,n):{stdout:m,stderr:y(`xan from: unsupported format '${t}'
|
|
31
|
-
`),exitCode:1}:{stdout:m,stderr:y(`xan from: usage: xan from -f <format> [FILE]
|
|
32
|
-
`),exitCode:1}}async function lt(e,n){let t=e[0],s;if(!t||t==="-")s=H(n.stdin);else try{let r=n.fs.resolvePath(n.cwd,t);s=await n.fs.readFile(r)}catch{return{stdout:m,stderr:y(`xan from: ${t}: No such file or directory
|
|
33
|
-
`),exitCode:1}}try{let r=JSON.parse(s.trim());if(!Array.isArray(r))return{stdout:m,stderr:y(`xan from: JSON input must be an array
|
|
34
|
-
`),exitCode:1};if(r.length===0)return{stdout:y(`
|
|
35
|
-
`),stderr:m,exitCode:0};if(Array.isArray(r[0])){let[i,...f]=r,c=f.map(p=>{let l=O();for(let d=0;d<i.length;d++)I(l,i[d],p[d]);return l});return{stdout:y(C(i,c)),stderr:m,exitCode:0}}let o=Object.keys(r[0]).sort();return{stdout:y(C(o,r)),stderr:m,exitCode:0}}catch{return{stdout:m,stderr:y(`xan from: invalid JSON input
|
|
36
|
-
`),exitCode:1}}}async function Ee(e,n){let t=!1,s=0,r="",o=[];for(let u=0;u<e.length;u++){let a=e[u];if(a==="-v"||a==="--invert")t=!0;else if((a==="-l"||a==="--limit")&&u+1<e.length)s=Number.parseInt(e[++u],10);else{if(a==="--help")return U({name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output to N rows"," --help display help"]});a.startsWith("-")||(r?o.push(a):r=a)}}if(!r)return{stdout:m,stderr:y(`xan filter: no expression specified
|
|
37
|
-
`),exitCode:1};let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;let p={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},l=Ze(r),d=[];for(let u of f){if(s>0&&d.length>=s)break;let a=j(u,l,p),h=a.length>0&&a.some(g=>!!g);(t?!h:h)&&d.push(u)}return{stdout:y(C(i,d)),stderr:m,exitCode:0}}async function Ne(e,n){let t="",s=!1,r=!1,o=[];for(let l=0;l<e.length;l++){let d=e[l];d==="-N"||d==="--numeric"?s=!0:d==="-R"||d==="-r"||d==="--reverse"?r=!0:d==="-s"&&l+1<e.length?t=e[++l]:d.startsWith("-")||o.push(d)}let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;!t&&i.length>0&&(t=i[0]);let p=[...f].sort((l,d)=>{let u=l[t],a=d[t],h;if(s){let g=typeof u=="number"?u:Number.parseFloat(String(u)),x=typeof a=="number"?a:Number.parseFloat(String(a));h=g-x}else h=String(u).localeCompare(String(a));return r?-h:h});return{stdout:y(C(i,p)),stderr:m,exitCode:0}}async function Ae(e,n){let t="",s=[];for(let p=0;p<e.length;p++){let l=e[p];l==="-s"&&p+1<e.length?t=e[++p]:l.startsWith("-")||s.push(l)}let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let f=new Set,c=o.filter(p=>{let l=t?String(p[t]):JSON.stringify(p);return f.has(l)?!1:(f.add(l),!0)});return{stdout:y(C(r,c)),stderr:m,exitCode:0}}async function Pe(e,n){let t=10,s="",r=!1,o=[];for(let d=0;d<e.length;d++){let u=e[d];(u==="-l"||u==="-n")&&d+1<e.length?t=Number.parseInt(e[++d],10):u==="-R"||u==="-r"||u==="--reverse"?r=!0:u.startsWith("-")||(s?o.push(u):s=u)}let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;!s&&i.length>0&&(s=i[0]);let l=[...f].sort((d,u)=>{let a=d[s],h=u[s],g=typeof a=="number"?a:Number.parseFloat(String(a)),x=typeof h=="number"?h:Number.parseFloat(String(h));return r?g-x:x-g}).slice(0,t);return{stdout:y(C(i,l)),stderr:m,exitCode:0}}q();async function Fe(e,n){let t="",s=!1,r=!1,o=[];for(let h=0;h<e.length;h++){let g=e[h];g==="-O"||g==="--overwrite"?s=!0:g==="--filter"?r=!0:g.startsWith("-")||(t?o.push(g):t=g)}if(!t)return{stdout:m,stderr:y(`xan map: no expression specified
|
|
38
|
-
`),exitCode:1};let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;let l=W(t).map(({expr:h,name:g})=>({alias:typeof g=="string"?g:g[0],ast:L(h)})),d={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},u;if(s){u=[...i];for(let h of l)i.includes(h.alias)||u.push(h.alias)}else u=[...i,...l.map(h=>h.alias)];let a=[];for(let h=0;h<f.length;h++){let g=f[h],x=$(g),w=!1,v=Object.assign(B(g),{_row_index:h});for(let E of l){let A=j(v,E.ast,d),S=A.length>0?A[0]:null;if(r&&S==null){w=!0;break}I(x,E.alias,S)}w||a.push(x)}return{stdout:y(C(u,a)),stderr:m,exitCode:0}}async function Oe(e,n){let t="",s="",r="",o=[];for(let g=0;g<e.length;g++){let x=e[g];(x==="-r"||x==="--rename")&&g+1<e.length?r=e[++g]:x.startsWith("-")||(t?s?o.push(x):s=x:t=x)}if(!t||!s)return{stdout:m,stderr:y(`xan transform: usage: xan transform COLUMN EXPR [FILE]
|
|
39
|
-
`),exitCode:1};let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;let p=t.split(",").map(g=>g.trim()),l=r?r.split(",").map(g=>g.trim()):[];for(let g of p)if(!i.includes(g))return{stdout:m,stderr:y(`xan transform: column '${g}' not found
|
|
40
|
-
`),exitCode:1};let d=L(W(s)[0]?.expr||(q(),st(Ke)).parseMoonblade(s)),u={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},a=i.map(g=>{let x=p.indexOf(g);return x!==-1&&l[x]?l[x]:g}),h=[];for(let g of f){let x=$(g);for(let w=0;w<p.length;w++){let v=p[w],E=Object.assign(B(g),{_:g[v]}),A=j(E,d,u),S=A.length>0?A[0]:null,F=l[w]||v;F!==v&&delete x[v],I(x,F,S)}h.push(x)}return{stdout:y(C(a,h)),stderr:m,exitCode:0}}async function Le(e,n){let t="",s="|",r=!1,o="",i=[];for(let a=0;a<e.length;a++){let h=e[a];(h==="-s"||h==="--separator")&&a+1<e.length?s=e[++a]:h==="--drop-empty"?r=!0:(h==="-r"||h==="--rename")&&a+1<e.length?o=e[++a]:h.startsWith("-")||(t?i.push(h):t=h)}if(!t)return{stdout:m,stderr:y(`xan explode: usage: xan explode COLUMN [FILE]
|
|
41
|
-
`),exitCode:1};let{headers:f,data:c,error:p}=await b(i,n);if(p)return p;if(!f.includes(t))return{stdout:m,stderr:y(`xan explode: column '${t}' not found
|
|
42
|
-
`),exitCode:1};let l=o?f.map(a=>a===t?o:a):f,d=o||t,u=[];for(let a of c){let h=a[t],g=h==null?"":String(h);if(g===""){if(!r){let x=$(a);o&&(delete x[t],I(x,d,"")),u.push(x)}}else{let x=g.split(s);for(let w of x){let v=$(a);o&&delete v[t],I(v,d,w),u.push(v)}}}return{stdout:y(C(l,u)),stderr:m,exitCode:0}}async function Re(e,n){let t="",s="|",r="",o=[];for(let x=0;x<e.length;x++){let w=e[x];(w==="-s"||w==="--sep")&&x+1<e.length?s=e[++x]:(w==="-r"||w==="--rename")&&x+1<e.length?r=e[++x]:w.startsWith("-")||(t?o.push(w):t=w)}if(!t)return{stdout:m,stderr:y(`xan implode: usage: xan implode COLUMN [FILE]
|
|
43
|
-
`),exitCode:1};let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;if(!i.includes(t))return{stdout:m,stderr:y(`xan implode: column '${t}' not found
|
|
44
|
-
`),exitCode:1};let p=i.filter(x=>x!==t),l=r?i.map(x=>x===t?r:x):i,d=r||t,u=[],a=null,h=[],g=null;for(let x of f){let w=p.map(A=>String(x[A]??"")).join("\0"),v=x[t],E=v==null?"":String(v);if(w!==a){if(g!==null){let A=$(g);r&&delete A[t],I(A,d,h.join(s)),u.push(A)}a=w,h=[E],g=x}else h.push(E)}if(g!==null){let x=$(g);r&&delete x[t],I(x,d,h.join(s)),u.push(x)}return{stdout:y(C(l,u)),stderr:m,exitCode:0}}async function Me(e,n){let t="",s="",r="",o="",i="inner",f="",c=0;for(let S=0;S<e.length;S++){let F=e[S];F==="--left"?i="left":F==="--right"?i="right":F==="--full"?i="full":(F==="-D"||F==="--default")&&S+1<e.length?f=e[++S]:F.startsWith("-")||(c++,c===1?t=F:c===2?s=F:c===3?r=F:c===4&&(o=F))}if(!t||!s||!r||!o)return{stdout:m,stderr:y(`xan join: usage: xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]
|
|
45
|
-
`),exitCode:1};let p=await b([s],n);if(p.error)return p.error;let l=await b([o],n);if(l.error)return l.error;let{headers:d,data:u}=p,{headers:a,data:h}=l;if(!d.includes(t))return{stdout:m,stderr:y(`xan join: column '${t}' not found in first file
|
|
46
|
-
`),exitCode:1};if(!a.includes(r))return{stdout:m,stderr:y(`xan join: column '${r}' not found in second file
|
|
47
|
-
`),exitCode:1};let g=new Map;for(let S of h){let F=String(S[r]??"");g.has(F)||g.set(F,[]),g.get(F)?.push(S)}let x=new Set(d),w=a.filter(S=>!x.has(S)),v=[...d,...w],E=[],A=new Set;for(let S of u){let F=String(S[t]??""),V=g.get(F);if(V&&V.length>0){A.add(F);for(let R of V){let D=O();for(let _ of d)I(D,_,S[_]);for(let _ of w)I(D,_,R[_]);E.push(D)}}else if(i==="left"||i==="full"){let R=O();for(let D of d)I(R,D,S[D]);for(let D of w)I(R,D,f);E.push(R)}}if(i==="right"||i==="full")for(let S of h){let F=String(S[r]??"");if(!A.has(F)){let V=O();for(let R of d)I(V,R,a.includes(R)?S[R]:f);for(let R of w)I(V,R,S[R]);E.push(V)}}return{stdout:y(C(v,E)),stderr:m,exitCode:0}}async function Te(e,n){let t="",s="",r=[],o=[];for(let w=0;w<e.length;w++){let v=e[w];(v==="-g"||v==="--groupby")&&w+1<e.length?r=e[++w].split(",").map(E=>E.trim()):v.startsWith("-")||(t?s?o.push(v):s=v:t=v)}if(!t||!s)return{stdout:m,stderr:y(`xan pivot: usage: xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]
|
|
48
|
-
`),exitCode:1};let{headers:i,data:f,error:c}=await b(o,n);if(c)return c;if(!i.includes(t))return{stdout:m,stderr:y(`xan pivot: column '${t}' not found
|
|
49
|
-
`),exitCode:1};let p=s.match(/^(\w+)\((\w+)\)$/);if(!p)return{stdout:m,stderr:y(`xan pivot: invalid aggregation expression '${s}'
|
|
50
|
-
`),exitCode:1};let[,l,d]=p;r.length===0&&(r=i.filter(w=>w!==t&&w!==d));let u=[];for(let w of f){let v=String(w[t]??"");u.includes(v)||u.push(v)}let a=new Map,h=[];for(let w of f){let v=r.map(F=>String(w[F]??"")).join("\0"),E=String(w[t]??""),A=w[d];a.has(v)||(a.set(v,new Map),h.push(v));let S=a.get(v);S&&(S.has(E)||S.set(E,[]),S.get(E)?.push(A))}let g=[...r,...u],x=[];for(let w of h){let v=w.split("\0"),E=a.get(w);if(!E)continue;let A=O();for(let S=0;S<r.length;S++)I(A,r[S],v[S]);for(let S of u){let F=E.get(S)||[];I(A,S,ut(l,F))}x.push(A)}return{stdout:y(C(g,x)),stderr:m,exitCode:0}}function ut(e,n){let t=n.filter(s=>s!=null).map(s=>typeof s=="number"?s:Number.parseFloat(String(s))).filter(s=>!Number.isNaN(s));switch(e){case"count":return n.length;case"sum":return t.reduce((s,r)=>s+r,0);case"mean":case"avg":return t.length>0?t.reduce((s,r)=>s+r,0)/t.length:null;case"min":return t.length>0?Math.min(...t):null;case"max":return t.length>0?Math.max(...t):null;case"first":return n.length>0?String(n[0]??""):null;case"last":return n.length>0?String(n[n.length-1]??""):null;default:return null}}async function $e(e,n){let t="",s=[];for(let f=0;f<e.length;f++){let c=e[f];(c==="-s"||c==="--sort")&&f+1<e.length?t=e[++f]:c.startsWith("-")||s.push(c)}if(s.length<2)return{stdout:m,stderr:y(`xan merge: usage: xan merge [OPTIONS] FILE1 FILE2 ...
|
|
51
|
-
`),exitCode:1};let r=[],o=null;for(let f of s){let c=await b([f],n);if(c.error)return c.error;if(o===null)o=c.headers;else if(JSON.stringify(o)!==JSON.stringify(c.headers))return{stdout:m,stderr:y(`xan merge: all files must have the same headers
|
|
52
|
-
`),exitCode:1};r.push({headers:c.headers,data:c.data})}if(!o)return{stdout:m,stderr:m,exitCode:0};let i=[];for(let{data:f}of r)i=i.concat(f);if(t){if(!o.includes(t))return{stdout:m,stderr:y(`xan merge: column '${t}' not found
|
|
53
|
-
`),exitCode:1};i.sort((f,c)=>{let p=f[t],l=c[t],d=typeof p=="number"?p:Number.parseFloat(String(p)),u=typeof l=="number"?l:Number.parseFloat(String(l));return!Number.isNaN(d)&&!Number.isNaN(u)?d-u:String(p??"").localeCompare(String(l??""))})}return{stdout:y(C(o,i)),stderr:m,exitCode:0}}q();async function je(e,n){let t=e.filter(c=>!c.startsWith("-")),{headers:s,data:r,error:o}=await b(t,n);if(o)return o;if(r.length===0)return{stdout:m,stderr:m,exitCode:0};let f=r.map(c=>s.map(p=>c[p])).map(c=>c.map(p=>ct(p)).join(",")).join(`
|
|
54
|
-
`)+`
|
|
55
|
-
`;return{stdout:y(f),stderr:m,exitCode:0}}function ct(e){if(e==null)return"";let n=String(e);return n.includes(",")||n.includes('"')||n.includes(`
|
|
56
|
-
`)?`"${n.replace(/"/g,'""')}"`:n}async function De(e,n){let t=null,s=null,r=[];for(let u=0;u<e.length;u++){let a=e[u];if(a==="--seed"&&u+1<e.length)s=Number.parseInt(e[++u],10);else if(!a.startsWith("-")){let h=Number.parseInt(a,10);t===null&&!Number.isNaN(h)&&h>0?t=h:r.push(a)}}if(t===null)return{stdout:m,stderr:y(`xan sample: usage: xan sample <sample-size> [FILE]
|
|
57
|
-
`),exitCode:1};let{headers:o,data:i,error:f}=await b(r,n);if(f)return f;if(i.length<=t)return{stdout:y(C(o,i)),stderr:m,exitCode:0};let c=s!==null?s:Date.now(),p=()=>(c=c*1103515245+12345&2147483647,c/2147483647),l=i.map((u,a)=>a);for(let u=l.length-1;u>0;u--){let a=Math.floor(p()*(u+1));[l[u],l[a]]=[l[a],l[u]]}let d=l.slice(0,t).sort((u,a)=>u-a).map(u=>i[u]);return{stdout:y(C(o,d)),stderr:m,exitCode:0}}async function Ve(e,n){let t=!1,s=[];for(let c=0;c<e.length;c++){let p=e[c];p==="-p"||p==="--pad"?t=!0:p.startsWith("-")||s.push(p)}if(s.length===0)return{stdout:m,stderr:y(`xan cat: no files specified
|
|
58
|
-
`),exitCode:1};let r=await Je(n,s,{cmdName:"xan cat",stopOnError:!0});if(r.exitCode!==0)return{stdout:m,stderr:y(r.stderr),exitCode:r.exitCode};let o=[],i=[];for(let{content:c}of r.files){let{headers:p,data:l}=ze(H(c));o.push({headers:p,data:l});for(let d of p)i.includes(d)||i.push(d)}if(!t){let c=JSON.stringify(o[0].headers);for(let p=1;p<o.length;p++)if(JSON.stringify(o[p].headers)!==c)return{stdout:m,stderr:y(`xan cat: headers do not match (use -p to pad)
|
|
59
|
-
`),exitCode:1};i=o[0].headers}let f=[];for(let{headers:c,data:p}of o)for(let l of p){let d=O();for(let u of i)I(d,u,c.includes(u)?l[u]:"");f.push(d)}return{stdout:y(C(i,f)),stderr:m,exitCode:0}}async function Ue(e,n){let t="",s=[],r=!1,o=!1,i=[];for(let a=0;a<e.length;a++){let h=e[a];(h==="-s"||h==="--select")&&a+1<e.length?s=e[++a].split(","):h==="-v"||h==="--invert"?r=!0:h==="-i"||h==="--ignore-case"?o=!0:h==="-r"||h==="--regex"||h.startsWith("-")||(t?i.push(h):t=h)}if(!t)return{stdout:m,stderr:y(`xan search: no pattern specified
|
|
60
|
-
`),exitCode:1};let{headers:f,data:c,error:p}=await b(i,n);if(p)return p;let l=s.length>0?s:f,d;try{d=Y(t,o?"i":"")}catch{return{stdout:m,stderr:y(`xan search: invalid regex pattern '${t}'
|
|
61
|
-
`),exitCode:1}}let u=c.filter(a=>{let h=l.some(g=>{let x=a[g];return x!=null&&d.test(String(x))});return r?!h:h});return{stdout:y(C(f,u)),stderr:m,exitCode:0}}async function We(e,n){let t="",s=[];for(let u of e)u.startsWith("-")||(t?s.push(u):t=u);if(!t)return{stdout:m,stderr:y(`xan flatmap: no expression specified
|
|
62
|
-
`),exitCode:1};let{headers:r,data:o,error:i}=await b(s,n);if(i)return i;let c=W(t).map(({expr:u,name:a})=>({alias:typeof a=="string"?a:a[0],ast:L(u)})),p={limits:n.limits?{maxIterations:n.limits.maxJqIterations}:void 0},l=[...r,...c.map(u=>u.alias)],d=[];for(let u of o){let a=[],h=1;for(let g of c){let x=j(u,g.ast,p),w=x.length>0&&Array.isArray(x[0])?x[0]:x;a.push(w),h=Math.max(h,w.length)}for(let g=0;g<h;g++){let x=$(u);for(let w=0;w<c.length;w++){let v=a[w][g]??null;I(x,c[w].alias,v)}d.push(x)}}return{stdout:y(C(l,d)),stderr:m,exitCode:0}}async function qe(e,n){let{cmdView:t}=await import("./xan-view-NFMUMJ7Z.js");return t(e,n)}var et=new Set(["fuzzy-join","glob","hist","input","parallel","plot","progress","range","scrape","tokenize","union-find"]),pt=new Set(["agg","behead","cat","count","dedup","drop","enum","explode","f","filter","fixlengths","flatmap","flatten","fmt","frequency","freq","from","groupby","head","headers","implode","join","map","merge","partition","pivot","rename","reverse","sample","search","select","shuffle","slice","sort","split","stats","tail","to","top","transform","transpose","view",...et]),Qe={name:"xan",summary:"CSV toolkit for data manipulation",usage:"xan <COMMAND> [OPTIONS] [FILE]",description:`xan is a collection of commands for working with CSV data.
|
|
63
|
-
It provides a simple, ergonomic interface for common data operations.
|
|
64
|
-
|
|
65
|
-
COMMANDS:
|
|
66
|
-
Core:
|
|
67
|
-
headers Show column names
|
|
68
|
-
count Count rows
|
|
69
|
-
head Show first N rows
|
|
70
|
-
tail Show last N rows
|
|
71
|
-
slice Extract row range
|
|
72
|
-
reverse Reverse row order
|
|
73
|
-
behead Remove header row
|
|
74
|
-
sample Random sample of rows
|
|
75
|
-
|
|
76
|
-
Column operations:
|
|
77
|
-
select Select columns (supports glob, ranges, negation)
|
|
78
|
-
drop Drop columns
|
|
79
|
-
rename Rename columns
|
|
80
|
-
enum Add row index column
|
|
81
|
-
|
|
82
|
-
Row operations:
|
|
83
|
-
filter Filter rows by expression
|
|
84
|
-
search Filter rows by regex match
|
|
85
|
-
sort Sort rows
|
|
86
|
-
dedup Remove duplicates
|
|
87
|
-
top Get top N by column
|
|
88
|
-
|
|
89
|
-
Transformations:
|
|
90
|
-
map Add computed columns
|
|
91
|
-
transform Modify existing columns
|
|
92
|
-
explode Split column into multiple rows
|
|
93
|
-
implode Combine rows, join column values
|
|
94
|
-
flatmap Map returning multiple rows
|
|
95
|
-
pivot Reshape rows into columns
|
|
96
|
-
transpose Swap rows and columns
|
|
97
|
-
|
|
98
|
-
Aggregation:
|
|
99
|
-
agg Aggregate values
|
|
100
|
-
groupby Group and aggregate
|
|
101
|
-
frequency Count value occurrences
|
|
102
|
-
stats Show column statistics
|
|
103
|
-
|
|
104
|
-
Multi-file:
|
|
105
|
-
cat Concatenate CSV files
|
|
106
|
-
join Join two CSV files on key
|
|
107
|
-
merge Merge sorted CSV files
|
|
108
|
-
split Split into multiple files
|
|
109
|
-
partition Split by column value
|
|
110
|
-
|
|
111
|
-
Data conversion:
|
|
112
|
-
to Convert CSV to other formats (json)
|
|
113
|
-
from Convert other formats to CSV (json)
|
|
114
|
-
shuffle Randomly reorder rows
|
|
115
|
-
fixlengths Fix ragged CSV files
|
|
116
|
-
|
|
117
|
-
Output:
|
|
118
|
-
view Pretty print as table
|
|
119
|
-
flatten Display records vertically (alias: f)
|
|
120
|
-
fmt Format output
|
|
121
|
-
|
|
122
|
-
EXAMPLES:
|
|
123
|
-
xan headers data.csv
|
|
124
|
-
xan count data.csv
|
|
125
|
-
xan head -n 5 data.csv
|
|
126
|
-
xan select name,email data.csv
|
|
127
|
-
xan select 'vec_*' data.csv # glob pattern
|
|
128
|
-
xan select 'a:c' data.csv # column range
|
|
129
|
-
xan filter 'age > 30' data.csv
|
|
130
|
-
xan search -r '^foo' data.csv
|
|
131
|
-
xan sort -N price data.csv
|
|
132
|
-
xan agg 'sum(amount) as total' data.csv
|
|
133
|
-
xan groupby region 'count() as n' data.csv
|
|
134
|
-
xan explode tags data.csv
|
|
135
|
-
xan join id file1.csv id file2.csv
|
|
136
|
-
xan pivot year 'sum(sales)' data.csv`,options:[" --help display this help and exit"]},ft={headers:{name:"xan headers",summary:"Show column names",usage:"xan headers [OPTIONS] [FILE]",description:"Display column names from a CSV file.",options:["-j, --just-names show names only (no index)"]},count:{name:"xan count",summary:"Count rows",usage:"xan count [FILE]",description:"Count the number of data rows (excluding header).",options:[]},filter:{name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output rows"]},search:{name:"xan search",summary:"Filter rows by regex",usage:"xan search [OPTIONS] PATTERN [FILE]",description:"Filter CSV rows by regex match on columns.",options:["-s, --select COLS search only these columns","-v, --invert invert match","-i, --ignore-case case insensitive"]},select:{name:"xan select",summary:"Select columns",usage:"xan select COLS [FILE]",description:"Select columns by name, index, glob, or range.",options:["Supports: col names, indices (0,1), ranges (a:c), globs (vec_*), negation (!col)"]},explode:{name:"xan explode",summary:"Split column into rows",usage:"xan explode COLUMN [OPTIONS] [FILE]",description:"Split delimited column values into multiple rows.",options:["-s, --separator SEP separator (default: |)","--drop-empty drop empty values","-r, --rename NAME rename column"]},implode:{name:"xan implode",summary:"Combine rows",usage:"xan implode COLUMN [OPTIONS] [FILE]",description:"Combine consecutive rows, joining column values.",options:["-s, --sep SEP separator (default: |)","-r, --rename NAME rename column"]},join:{name:"xan join",summary:"Join CSV files",usage:"xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]",description:"Join two CSV files on key columns.",options:["--left left outer join","--right right outer join","--full full outer join","-D, --default VAL default for missing"]},pivot:{name:"xan pivot",summary:"Reshape to columns",usage:"xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]",description:"Turn row values into columns.",options:["-g, --groupby COLS group by columns"]}},Sn={name:"xan",async execute(e,n){let t=He(e);if(t.length===0||X(t))return U(Qe);let s=t[0],r=t.slice(1);if(X(r)){let o=ft[s];return o?U(o):U(Qe)}if(et.has(s))return{stdout:m,stderr:y(`xan ${s}: not yet implemented
|
|
137
|
-
`),exitCode:1};switch(s){case"headers":return fe(r,n);case"count":return de(r,n);case"head":return he(r,n);case"tail":return me(r,n);case"slice":return ge(r,n);case"reverse":return ye(r,n);case"behead":return je(r,n);case"sample":return De(r,n);case"select":return le(r,n);case"drop":return ue(r,n);case"rename":return ce(r,n);case"enum":return pe(r,n);case"filter":return Ee(r,n);case"search":return Ue(r,n);case"sort":return Ne(r,n);case"dedup":return Ae(r,n);case"top":return Pe(r,n);case"map":return Fe(r,n);case"transform":return Oe(r,n);case"explode":return Le(r,n);case"implode":return Re(r,n);case"flatmap":return We(r,n);case"pivot":return Te(r,n);case"agg":return re(r,n);case"groupby":return oe(r,n);case"frequency":case"freq":return ie(r,n);case"stats":return ae(r,n);case"cat":return Ve(r,n);case"join":return Me(r,n);case"merge":return $e(r,n);case"split":return be(r,n);case"partition":return Se(r,n);case"to":return Ie(r,n);case"from":return ke(r,n);case"transpose":return we(r,n);case"shuffle":return ve(r,n);case"fixlengths":return Ce(r,n);case"view":return Q(r,n);case"flatten":case"f":return Z(r,n);case"fmt":return qe(r,n);default:return pt.has(s)?{stdout:m,stderr:y(`xan ${s}: not yet implemented
|
|
138
|
-
`),exitCode:1}:{stdout:m,stderr:y(`xan: unknown command '${s}'
|
|
139
|
-
Run 'xan --help' for usage.
|
|
140
|
-
`),exitCode:1}}}},In={name:"xan",flags:[],stdinType:"text",needsArgs:!0};export{Sn as a,In as b};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as T}from"./chunk-KFLJ4EMB.js";import{a as b,b as w}from"./chunk-227L3ACM.js";import{h as $,l as F}from"./chunk-RQSPCXDR.js";var I={name:"du",summary:"estimate file space usage",usage:"du [OPTION]... [FILE]...",options:["-a write counts for all files, not just directories","-h print sizes in human readable format","-s display only a total for each argument","-c produce a grand total","--max-depth=N print total for directory only if N or fewer levels deep"," --help display this help and exit"]},C={allFiles:{short:"a",type:"boolean"},humanReadable:{short:"h",type:"boolean"},summarize:{short:"s",type:"boolean"},grandTotal:{short:"c",type:"boolean"},maxDepth:{long:"max-depth",type:"number"}},N={name:"du",async execute(r,s){let i=F(r);if(w(i))return b(I);let a=T("du",i,C);if(!a.ok)return a.error;let m={allFiles:a.result.flags.allFiles,humanReadable:a.result.flags.humanReadable,summarize:a.result.flags.summarize,grandTotal:a.result.flags.grandTotal,maxDepth:a.result.flags.maxDepth??null},n=a.result.positional;n.length===0&&n.push(".");let f="",u="",c=0;for(let g of n){let y=s.fs.resolvePath(s.cwd,g);try{await s.fs.stat(y);let e=await S(s,y,g,m,0);f+=e.output,c+=e.totalSize,u+=e.stderr}catch{u+=`du: cannot access '${g}': No such file or directory
|
|
3
|
-
`}}return m.grandTotal&&n.length>0&&(f+=`${D(c,m.humanReadable)} total
|
|
4
|
-
`),{stdout:$(f),stderr:$(u),exitCode:u?1:0}}};async function S(r,s,i,a,m){let n={output:"",totalSize:0,stderr:""};try{let f=await r.fs.stat(s);if(!f.isDirectory)return n.totalSize=f.size,(a.allFiles||m===0)&&(n.output=D(f.size,a.humanReadable)+" "+i+`
|
|
5
|
-
`),n;let u=0,c=[];if(r.fs.readdirWithFileTypes){let e=await r.fs.readdirWithFileTypes(s),o=e.filter(t=>t.isFile),d=e.filter(t=>t.isDirectory);for(let t=0;t<o.length;t+=100){let l=o.slice(t,t+100),z=await Promise.all(l.map(async p=>{let x=s==="/"?`/${p.name}`:`${s}/${p.name}`;try{let R=await r.fs.stat(x);return{name:p.name,isDirectory:!1,size:R.size}}catch{return{name:p.name,isDirectory:!1,size:0}}}));c.push(...z)}c.push(...d.map(t=>({name:t.name,isDirectory:!0})))}else{let e=await r.fs.readdir(s);for(let o=0;o<e.length;o+=100){let d=e.slice(o,o+100),t=await Promise.all(d.map(async l=>{let z=s==="/"?`/${l}`:`${s}/${l}`;try{let p=await r.fs.stat(z);return{name:l,isDirectory:p.isDirectory,size:p.isDirectory?void 0:p.size}}catch{return{name:l,isDirectory:!1,size:0}}}));c.push(...t)}}c.sort((e,o)=>e.name.localeCompare(o.name));let g=c.filter(e=>!e.isDirectory);for(let e of g){let o=e.size??0;if(u+=o,a.allFiles&&!a.summarize){let d=i==="."?e.name:`${i}/${e.name}`;n.output+=D(o,a.humanReadable)+" "+d+`
|
|
6
|
-
`}}let y=c.filter(e=>e.isDirectory);for(let e=0;e<y.length;e+=100){let o=y.slice(e,e+100),d=await Promise.all(o.map(async t=>{let l=s==="/"?`/${t.name}`:`${s}/${t.name}`,z=i==="."?t.name:`${i}/${t.name}`;return{name:t.name,result:await S(r,l,z,a,m+1)}}));d.sort((t,l)=>t.name.localeCompare(l.name));for(let{result:t}of d)u+=t.totalSize,a.summarize||(a.maxDepth===null||m+1<=a.maxDepth)&&(n.output+=t.output)}n.totalSize=u,(a.summarize||a.maxDepth===null||m<=a.maxDepth)&&(n.output+=`${D(u,a.humanReadable)} ${i}
|
|
7
|
-
`)}catch{n.stderr=`du: cannot read directory '${i}': Permission denied
|
|
8
|
-
`}return n}function D(r,s){return s?r<1024?`${r}`:r<1024*1024?`${(r/1024).toFixed(1)}K`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(1)}M`:`${(r/(1024*1024*1024)).toFixed(1)}G`:String(Math.ceil(r/1024)||1)}var W={name:"du",flags:[{flag:"-a",type:"boolean"},{flag:"-h",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"--max-depth",type:"value",valueHint:"number"}],needsFiles:!0};export{N as a,W as b};
|