@inkeep/open-knowledge 0.25.0-beta.8 → 0.25.0-beta.9
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/dist/alias-JE7RI5QX-DxvTrQH3.mjs +1 -0
- package/dist/{architectureDiagram-Q4EWVU46-C9cSuC8m.mjs → architectureDiagram-Q4EWVU46-Dwlx8W7J.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/awk2-POPGKRAI-6Q9HKhoL.mjs +1 -0
- package/dist/base64-4YMZCVJ5-bqN_UBX0.mjs +1 -0
- package/dist/basename-AA2KJYZQ-GWPOMupJ.mjs +1 -0
- package/dist/bash-IJWYRKFO-C7Yi9aK0.mjs +1 -0
- package/dist/{blockDiagram-DXYQGD6D-Dr7L7QsL.mjs → blockDiagram-DXYQGD6D-D_l7RLVS.mjs} +2 -2
- package/dist/{build-CN003PPg.mjs → build-CCNlCFyu.mjs} +1 -1
- package/dist/build-gfyDk62R.mjs +1 -0
- package/dist/{c4Diagram-AHTNJAMY-CPm6kKNR.mjs → c4Diagram-AHTNJAMY-QadWjRVL.mjs} +2 -2
- package/dist/cat-RDUMLXKC-Cqi4_PjZ.mjs +1 -0
- package/dist/channel-Dq8ADXfq.mjs +2 -0
- package/dist/chmod-SYMGL4JA-C_dD-tNl.mjs +1 -0
- package/dist/{chokidar-oNPiNLWX.mjs → chokidar-D1eNAlbX.mjs} +3 -3
- package/dist/{chunk-24IMIIXA-DaS5XS55.mjs → chunk-24IMIIXA-BoP5OA93.mjs} +2 -2
- package/dist/{chunk-336JU56O-KTMEs5Wk.mjs → chunk-336JU56O-5giJrfiv.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-B1WzJUh4.mjs → chunk-3THT3N7L-CBWmNncQ.mjs} +1 -1
- package/dist/{chunk-426QAEUC-DUpKwtVu.mjs → chunk-426QAEUC-BGn1TCpd.mjs} +2 -2
- package/dist/{chunk-44UOCSGV-BZ6LfyW2.mjs → chunk-44UOCSGV-B6GSHp1s.mjs} +1 -1
- package/dist/{chunk-4TB4RGXK-Ct6WjPoY.mjs → chunk-4TB4RGXK-DWREoP49.mjs} +2 -2
- package/dist/{chunk-5FUZZQ4R-Bf6nbyQG.mjs → chunk-5FUZZQ4R-DFR5eSi-.mjs} +2 -2
- package/dist/{chunk-5PVQY5BW-DUXm3tDu.mjs → chunk-5PVQY5BW-C5V4E1lO.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-BwpNU33k.mjs → chunk-5QMZ5MUS-_0tQyQsf.mjs} +2 -2
- package/dist/{chunk-62RKD26F-DebCAz0V.mjs → chunk-62RKD26F-K5NW6_Si.mjs} +2 -2
- package/dist/{chunk-A4JSPFCI-CQJoYugB.mjs → chunk-A4JSPFCI-BA544Kdp.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-DApqA6Ow.mjs → chunk-A5O5YHGN-Kbs3GRxW.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-XWD4jM9A.mjs → chunk-BBXLRYSX-OVlWa2B-.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-CZUkYGAZ.mjs → chunk-BRGMQKJV-DtyxDw61.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-DN7EAdus.mjs → chunk-CR5AFCPT-BD_awIEP.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-BkE4vqrf.mjs → chunk-CWQS3NFK-DNm_iIwd.mjs} +1 -1
- package/dist/{chunk-D6CWQ5DW-CF9bBHyK.mjs → chunk-D6CWQ5DW-CaV8X9is.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-F_tmy-Lz.mjs → chunk-DXB73IDG-Bx-Ikbnu.mjs} +1 -1
- package/dist/{chunk-EDXVE4YY-CI4s3JHP.mjs → chunk-EDXVE4YY-B_wA-KGy.mjs} +2 -2
- package/dist/{chunk-ENJZ2VHE-CQwjtY5A.mjs → chunk-ENJZ2VHE-DwiyImt2.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-BZSRX-Vi.mjs → chunk-F55TLFGB-AEzanSfe.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-NzTooVTc.mjs → chunk-FEIOJCZD-D6YUa1Xl.mjs} +2 -2
- package/dist/{chunk-GFQRA5P5-DbAN9IDm.mjs → chunk-GFQRA5P5-DigWkxW2.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-CDGzZWfT.mjs → chunk-GOV5EKKI-x0jEbztj.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-DQTTl_pa.mjs → chunk-HWBSOZZR-DaPTwPxK.mjs} +3 -3
- package/dist/{chunk-I57KEIP3-DSoF8c_0.mjs → chunk-I57KEIP3-DpiJySG6.mjs} +2 -2
- package/dist/{chunk-ICPOFSXX-C--tVIY5.mjs → chunk-ICPOFSXX-D0MVsm4H.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-CUKythEA.mjs → chunk-IPJHKYVM-DlQCOz2c.mjs} +1 -1
- package/dist/{chunk-J642UCRS-HjD8qpZD.mjs → chunk-J642UCRS-C1PS8Hwf.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-OoVL_l9j.mjs → chunk-LPQPILI2-GOcK96AE.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-ChL1CU4m.mjs → chunk-MDDMCKUK-CuQlmIio.mjs} +2 -2
- package/dist/{chunk-MIZPJHVH-BD7tHmLL.mjs → chunk-MIZPJHVH-Bo1j-3C3.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-CV7WHBm-.mjs → chunk-MLXIYONF-DRuy-_4a.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-Cyg2DAzO.mjs → chunk-NAERJDUW-0UrOIQ6q.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-BH2DjyxF.mjs → chunk-NUYSJFDK-BvwS54ju.mjs} +2 -2
- package/dist/{chunk-NYQYO467-CY88QCuT.mjs → chunk-NYQYO467-KfHLMnUW.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-dXiYYC4o.mjs → chunk-OARHFVLG-Csb_cJVS.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-DOkdFgyf.mjs → chunk-OCLXQMOG-CCPg8vjW.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-Bcx6uxmm.mjs → chunk-OCS6LSEM-DkbaohJu.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-CmrD0Dg2.mjs → chunk-OJDRYQWQ-LGuZyK6R.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-CWEDi2F_.mjs → chunk-OL3S66CO-CBdL6pp1.mjs} +2 -2
- package/dist/{chunk-OYMX7WX6-Dvg98Zb-.mjs → chunk-OYMX7WX6-BrOfVMt8.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-CpvczNyQ.mjs → chunk-PBXLG62G-C7MEQojr.mjs} +2 -2
- package/dist/{chunk-R6VWJ2ZL-BVeTwIsz.mjs → chunk-R6VWJ2ZL-XKIhMSUi.mjs} +1 -1
- package/dist/{chunk-SYMJJMQ4-jdmKoBFb.mjs → chunk-SYMJJMQ4-DUF5hY-A.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-DmDxJbbD.mjs → chunk-T56QNPHK-B6DfVzfs.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-CSDR438C.mjs → chunk-TLSUDHID-SuIGgADo.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-CrDa7MpH.mjs → chunk-TOMNU26N-Dw9Enq1O.mjs} +2 -2
- package/dist/{chunk-U2HBQHQK-C1Q2DiEX.mjs → chunk-U2HBQHQK-DB1SzWgs.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-CZ2Mla0s.mjs → chunk-UNYNJIFU-HSzsM3a6.mjs} +3 -3
- package/dist/{chunk-VLGZJRPG-DpYP_EVp.mjs → chunk-VLGZJRPG-CHtdu0KZ.mjs} +2 -2
- package/dist/{chunk-X2U36JSP-BiF0R9ys.mjs → chunk-X2U36JSP-CqOGcGN3.mjs} +2 -2
- package/dist/{chunk-XHM67O4N-D3pxE_Og.mjs → chunk-XHM67O4N-2lBQUjKO.mjs} +1 -1
- package/dist/{chunk-XORM457F-BuPOSqOe.mjs → chunk-XORM457F-CJbQLVgU.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-DsF45PbT.mjs → chunk-YCFVLTST-CKzPj8PR.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-DjdwxBNc.mjs → chunk-YFG2CMIF-DBRGs_rZ.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-gU4-j5DO.mjs → chunk-YNYSPYQ5-DHter9G3.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-CB0wWPLc.mjs → chunk-YS3AZT3J-DwQ3GyQR.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DpkSVTln.mjs → chunk-YTNYSM6T-DcovOiF_.mjs} +2 -2
- package/dist/{chunk-YZCP3GAM-DRdMIQsB.mjs → chunk-YZCP3GAM-CkC6DoBJ.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-EsbeaQ3V.mjs → chunk-Z6LRHWXI-BLaYoFnT.mjs} +2 -2
- package/dist/{chunk-ZZ45TVLE-DwKS4e_N.mjs → chunk-ZZ45TVLE-CXznFlWR.mjs} +2 -2
- package/dist/classDiagram-6PBFFD2Q-cIblqhKe.mjs +2 -0
- package/dist/classDiagram-v2-HSJHXN6E-CnZ_g-6O.mjs +2 -0
- package/dist/clear-5CZ5X4YR-C4DTv-gF.mjs +1 -0
- package/dist/cli.mjs +71 -59
- package/dist/clone-s6xjJkoz.mjs +2 -0
- package/dist/column-WLPMMSTS-Bg1ZsVDm.mjs +1 -0
- package/dist/comm-5SLSESQG-CTh1BUfn.mjs +1 -0
- package/dist/constants-BwIQxzxy.mjs +2 -0
- package/dist/cp-XOYR4ABJ-VqiK1WcH.mjs +1 -0
- package/dist/{curl-47BFPSFW-xgS5bDTx.mjs → curl-47BFPSFW-ClMENMWY.mjs} +2 -2
- package/dist/cut-OPC3VAGB-BDAM8WY8.mjs +1 -0
- package/dist/{dagre-KV5264BT-Ci7CcQr4.mjs → dagre-KV5264BT-C5SrnhX7.mjs} +2 -2
- package/dist/{dagre-L3rg9n9q.mjs → dagre-LJG-5J7U.mjs} +2 -2
- package/dist/date-DD7FVA2V-nDqDn5ZQ.mjs +1 -0
- package/dist/{diagram-5BDNPKRD-BM3C88Zx.mjs → diagram-5BDNPKRD-biBuhEzo.mjs} +2 -2
- package/dist/{diagram-G4DWMVQ6-Dt1Kt-mj.mjs → diagram-G4DWMVQ6-CHhS5h96.mjs} +2 -2
- package/dist/{diagram-MMDJMWI5-DomPsk0L.mjs → diagram-MMDJMWI5-BgulNwvp.mjs} +2 -2
- package/dist/{diagram-TYMM5635-eOfCqwhs.mjs → diagram-TYMM5635-DpmgERPD.mjs} +2 -2
- package/dist/diff-HJF2MPDN-DSY9AfjL.mjs +1 -0
- package/dist/dirname-LEMTZZFS-VsUIxZwx.mjs +1 -0
- package/dist/{dist-B1-OZ0zK.mjs → dist-Bj79e9B6.mjs} +16 -16
- package/dist/{dist-7R982DBB.mjs → dist-DUXDeyBp.mjs} +1 -1
- package/dist/du-WO2ENHXQ-Cq3dzRFU.mjs +1 -0
- package/dist/echo-O45JWWI2-B99ElfBo.mjs +1 -0
- package/dist/env-5EPCWSXR-CsaomJHQ.mjs +1 -0
- package/dist/{erDiagram-SMLLAGMA-CPcwhEue.mjs → erDiagram-SMLLAGMA-BNISHenz.mjs} +2 -2
- package/dist/{esm-BS2W3Uzl.mjs → esm-BQ4-CT8p.mjs} +1 -1
- package/dist/{esm-BLMtE3s6.mjs → esm-CsQUg9js.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-Bp3M0RnL.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-C5xjxYTl.mjs +1 -0
- package/dist/expr-5T3UU5KE-DrJUreFq.mjs +1 -0
- package/dist/file-ZIGAJ4YS-D07ChhI1.mjs +1 -0
- package/dist/find-TPUOAIUQ-ZPOxwUwf.mjs +1 -0
- package/dist/{flag-coverage-QT4N2Z44-hqAAghSo.mjs → flag-coverage-QT4N2Z44-BlPYKPtd.mjs} +2 -2
- package/dist/{flowDiagram-DWJPFMVM-WnIxEgSt.mjs → flowDiagram-DWJPFMVM-CFu645eN.mjs} +2 -2
- package/dist/fold-LDSORVYE-Bx5XDGgK.mjs +1 -0
- package/dist/{ganttDiagram-T4ZO3ILL-BJEuIZ2X.mjs → ganttDiagram-T4ZO3ILL-DhKUbpmR.mjs} +2 -2
- package/dist/{getMachineId-bsd-DYQqYqxN.mjs → getMachineId-bsd-Bt-frlcx.mjs} +2 -2
- package/dist/{getMachineId-bsd-B7ue3N1o.mjs → getMachineId-bsd-DC8LkcdK.mjs} +2 -2
- package/dist/{getMachineId-bsd-ucL-2FoT.mjs → getMachineId-bsd-DFsE-K5i.mjs} +2 -2
- package/dist/{getMachineId-darwin-BNCkZc-0.mjs → getMachineId-darwin-B9GQUU0e.mjs} +2 -2
- package/dist/{getMachineId-darwin-CSTYV_Bd.mjs → getMachineId-darwin-DMNBrKWp.mjs} +2 -2
- package/dist/{getMachineId-darwin-DWmBOUuk.mjs → getMachineId-darwin-DRxpszyZ.mjs} +2 -2
- package/dist/{getMachineId-linux-Bv6oOXxT.mjs → getMachineId-linux-B5vQV4C7.mjs} +2 -2
- package/dist/{getMachineId-linux-tTgUzx-Z.mjs → getMachineId-linux-D9dNX75P.mjs} +2 -2
- package/dist/{getMachineId-linux-BaNp1ZEm.mjs → getMachineId-linux-DOv7iOg-.mjs} +2 -2
- package/dist/{getMachineId-unsupported-fh_7WYkB.mjs → getMachineId-unsupported-BQ6KY9w-.mjs} +2 -2
- package/dist/{getMachineId-unsupported-iDvWGFBk.mjs → getMachineId-unsupported-D6sWFm_K.mjs} +2 -2
- package/dist/{getMachineId-unsupported-Kf9p6LJQ.mjs → getMachineId-unsupported-DdAD6gRb.mjs} +2 -2
- package/dist/{getMachineId-win-DQ2s9Z1n.mjs → getMachineId-win-BMQSc3Xj.mjs} +2 -2
- package/dist/{getMachineId-win-Bo1_B38N.mjs → getMachineId-win-BZsHRo32.mjs} +2 -2
- package/dist/{getMachineId-win-DHmdubaR.mjs → getMachineId-win-CpDtoa22.mjs} +2 -2
- package/dist/{gh-detect-BIaONQmT.mjs → gh-detect-Ck0zE5NU.mjs} +3 -3
- package/dist/{git-handle-DY9lXoT3-Cmzgvwd8.mjs → git-handle-DY9lXoT3-CfssnuIB.mjs} +4 -4
- package/dist/git-handle-DdgvPBh6-C80s8fFN.mjs +1 -0
- package/dist/{gitGraphDiagram-UUTBAWPF-BqA8KMTw.mjs → gitGraphDiagram-UUTBAWPF-Cwemn6Ch.mjs} +2 -2
- package/dist/{graphlib-BI4uS4Lx.mjs → graphlib-5CpUx0Yq.mjs} +2 -2
- package/dist/grep-3AIAIJVR-Bh6KBg6d.mjs +1 -0
- package/dist/gzip-AQXSGOVS-BtiMTiZG.mjs +1 -0
- package/dist/head-HT2B6D2J-DSAed845.mjs +1 -0
- package/dist/help-VVWX7SA5-DCBusWam.mjs +1 -0
- package/dist/history-J4QRNGRO-BwBOMO5i.mjs +1 -0
- package/dist/hostname-BK6HG2DE-_qJ9gN13.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-D7XdAo13.mjs +1 -0
- package/dist/index.d.mts +34 -1
- package/dist/index.mjs +1 -1
- package/dist/{infoDiagram-42DDH7IO-0lM1lRCH.mjs → infoDiagram-42DDH7IO-D0XeM9Mm.mjs} +2 -2
- package/dist/init-BzdKgHZr.mjs +321 -0
- package/dist/init-HqjPAvpy.mjs +1 -0
- package/dist/{ishikawaDiagram-UXIWVN3A-j-jlqjJX.mjs → ishikawaDiagram-UXIWVN3A-vTBTHzHj.mjs} +2 -2
- package/dist/join-GG2LDHE5-BMnXfCXQ.mjs +1 -0
- package/dist/{journeyDiagram-VCZTEJTY-BDX_OcrR.mjs → journeyDiagram-VCZTEJTY-Dq1fLo6N.mjs} +2 -2
- package/dist/jq-ODXZBPLY-D3tmTL1R.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-Cu6NIWHE.mjs → js-exec-M6UR76J5-ZESSNIAK.mjs} +2 -2
- package/dist/{kanban-definition-6JOO6SKY-C5XJUD3U.mjs → kanban-definition-6JOO6SKY-B03_bODj.mjs} +2 -2
- package/dist/{katex-DEJL_MaU.mjs → katex-Bif7Db7V.mjs} +1 -1
- package/dist/{lib-CItGM3rN.mjs → lib-CCQO9uWA.mjs} +2 -2
- package/dist/{libesm-Ob3yvbRV.mjs → libesm-_Wi8iuGI.mjs} +1 -1
- package/dist/{line-C6RZPh4T.mjs → line-C62ka-l9.mjs} +2 -2
- package/dist/ln-4TRFBYAT-Byit-TLI.mjs +1 -0
- package/dist/{loader-CoLeuXs-.mjs → loader-1IrHrVRY.mjs} +3 -3
- package/dist/loader-BEm7pFin.mjs +1 -0
- package/dist/ls-KSXFZCWH-CNZ_hN8P.mjs +1 -0
- package/dist/{lzma-DBkyKSY9.mjs → lzma-BSEvzrCT.mjs} +2 -2
- package/dist/md5sum-INMIK4DX-pTX2tfQd.mjs +1 -0
- package/dist/{mermaid.core-CcmmzbTt.mjs → mermaid.core-LrO0u_wA.mjs} +3 -3
- package/dist/{mindmap-definition-QFDTVHPH-WLdthwDy.mjs → mindmap-definition-QFDTVHPH-b0aFdJAS.mjs} +2 -2
- package/dist/mkdir-TDEMSB6C-Bl16kSBR.mjs +1 -0
- package/dist/mv-Z6MORUFL-D9pw6nb9.mjs +1 -0
- package/dist/nl-U5YJDM32-Bs_nMrMg.mjs +1 -0
- package/dist/od-VJEF2UR5-DwpkPMHp.mjs +1 -0
- package/dist/paste-7N6AFSDS-C8EyimeA.mjs +1 -0
- package/dist/{pieDiagram-DEJITSTG-7oeIAT-R.mjs → pieDiagram-DEJITSTG-C77h8TOO.mjs} +2 -2
- package/dist/preview-BoSe54Y5.mjs +1 -0
- package/dist/{preview-DWBYV32d.mjs → preview-qP8Vfz3W.mjs} +2 -2
- package/dist/printf-CX64KX2P-2Mks7IIT.mjs +1 -0
- package/dist/pwd-D4OZ7N27-m5fzqroZ.mjs +1 -0
- package/dist/{python3-AUFTPCU6-DmPp1QHj.mjs → python3-AUFTPCU6-B7_jrPM3.mjs} +2 -2
- package/dist/{quadrantDiagram-34T5L4WZ-DWVBhb1E.mjs → quadrantDiagram-34T5L4WZ-CLL-GTlz.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-BMheCA1U.mjs +1 -0
- package/dist/{repair-launch-json-DiMbidtg.mjs → repair-launch-json-B2igGItE.mjs} +2 -2
- package/dist/{repair-mcp-configs-dTwbVEwq.mjs → repair-mcp-configs-B0YDgxKo.mjs} +2 -2
- package/dist/{repair-skills-BvhYVWdw.mjs → repair-skills-Cv_2HgEN.mjs} +3 -3
- package/dist/repair-skills-XaoNNrHC.mjs +1 -0
- package/dist/{requirementDiagram-MS252O5E-Bneel37I.mjs → requirementDiagram-MS252O5E-JIzm76n0.mjs} +2 -2
- package/dist/rev-XOSYPP45-4azlKYu4.mjs +1 -0
- package/dist/rg-FOQSCCX3-ViKChHv5.mjs +1 -0
- package/dist/rm-RTZG23RL-F9g7gQHU.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-CFMuhNvO.mjs +1 -0
- package/dist/{sankeyDiagram-XADWPNL6-4f2f9-uf.mjs → sankeyDiagram-XADWPNL6-Bpk8eTPe.mjs} +2 -2
- package/dist/sed-VFTTATXJ-BfHBQ11q.mjs +1 -0
- package/dist/seq-RN5ZUASB-BaUQfYSh.mjs +1 -0
- package/dist/{sequenceDiagram-FGHM5R23-B1K4VtLp.mjs → sequenceDiagram-FGHM5R23-CHCigzvZ.mjs} +2 -2
- package/dist/server-lock-8Lv6A-Xa-xTK-ENFB.mjs +1 -0
- package/dist/{server-lock-CN2YHwpP-Cwa4llpq.mjs → server-lock-CN2YHwpP-BYuwTc93.mjs} +73 -73
- package/dist/sha1sum-VJPNLNU6-NRAU83Yg.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-Cfe-w5CY.mjs +1 -0
- package/dist/sleep-VZFPZFWA-BgSOeH2N.mjs +1 -0
- package/dist/sort-DCNRDA7U-DqMg1dll.mjs +1 -0
- package/dist/split-SITCSYCZ-DqhMcIGL.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-DNmhrHQv.mjs +1 -0
- package/dist/src-DD9KqmOQ.mjs +3 -0
- package/dist/start-B4zA8vv3.mjs +1 -0
- package/dist/start-DYPIgVG4.mjs +3 -0
- package/dist/stat-BT5A227F-DOG39Ce5.mjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-BREbMXiC.mjs → stateDiagram-FHFEXIEX-CiIJxbDV.mjs} +2 -2
- package/dist/stateDiagram-v2-QKLJ7IA2-CTdt2FVd.mjs +2 -0
- package/dist/strings-7PLOGTPD-l9kho9ff.mjs +1 -0
- package/dist/tac-SJGXQ4T2-DMDGVNTy.mjs +1 -0
- package/dist/tail-S5ULNTJU-knoYRbXD.mjs +1 -0
- package/dist/tar-ANUBEFJY-Db9qg5B2.mjs +1 -0
- package/dist/tee-O7VXZDCO-BgHEibOy.mjs +1 -0
- package/dist/time-DEUO3QV2-CXWA3kJ0.mjs +1 -0
- package/dist/{timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs → timeline-definition-GMOUNBTQ-BBhlpYO9.mjs} +2 -2
- package/dist/timeout-VRKMCG72-aaC7r4sX.mjs +1 -0
- package/dist/touch-DX2IJOQ4-DGiKr2c0.mjs +1 -0
- package/dist/tr-2HXZRDSW-BDNDgux2.mjs +1 -0
- package/dist/tree-LYXBS7DC-BK2c44-E.mjs +1 -0
- package/dist/true-WHJNXCHG-B6CZ-ZF1.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-BWFllY1p.mjs +1 -0
- package/dist/uniq-SUNANL47-CiXMC2Qh.mjs +1 -0
- package/dist/{vennDiagram-DHZGUBPP-Bk-INjRY.mjs → vennDiagram-DHZGUBPP-CATweP9B.mjs} +2 -2
- package/dist/{wardleyDiagram-NUSXRM2D-DOD6wQla.mjs → wardleyDiagram-NUSXRM2D-3qxY3I6a.mjs} +2 -2
- package/dist/wc-TQB3VNOX-Bof613yN.mjs +1 -0
- package/dist/which-XZHEH76L-DfnqWxtA.mjs +1 -0
- package/dist/whoami-DGKU3D2X-DhtD1OhF.mjs +1 -0
- package/dist/{wrapper-BZO_sIci.mjs → wrapper-CGw3ogaz.mjs} +1 -1
- package/dist/write-project-skill-HXJW0bDK.mjs +36 -0
- package/dist/xan-BXDXYEIB-I8yansvE.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-DJhdCPf3.mjs +1 -0
- package/dist/xargs-I6EZUCYF-CdKFilDT.mjs +1 -0
- package/dist/{xychartDiagram-5P7HB3ND-B4AGYFQs.mjs → xychartDiagram-5P7HB3ND-BAWpa2N2.mjs} +2 -2
- package/dist/yazl-Clfc09F-.mjs +1 -0
- package/dist/{yazl-Docqgl6q.mjs → yazl-DgCFuIuD.mjs} +1 -1
- package/dist/yq-MJMAR36V-BXyMiYfX.mjs +1 -0
- package/package.json +1 -1
- package/dist/alias-JE7RI5QX-DmHh8yog.mjs +0 -1
- package/dist/awk2-POPGKRAI-C7696e-z.mjs +0 -1
- package/dist/base64-4YMZCVJ5-BIHNwDj2.mjs +0 -1
- package/dist/basename-AA2KJYZQ-Dcz4Ls85.mjs +0 -1
- package/dist/bash-IJWYRKFO-DgruzS3i.mjs +0 -1
- package/dist/build-Ca40rJCO.mjs +0 -1
- package/dist/cat-RDUMLXKC-BJJIS9lB.mjs +0 -1
- package/dist/channel-DE79NHCf.mjs +0 -2
- package/dist/chmod-SYMGL4JA-C1Ie7s0s.mjs +0 -1
- package/dist/classDiagram-6PBFFD2Q-BrpY9pLd.mjs +0 -2
- package/dist/classDiagram-v2-HSJHXN6E-DDV6mz7Y.mjs +0 -2
- package/dist/clear-5CZ5X4YR-CHSnzs8i.mjs +0 -1
- package/dist/clone-BD_JFVST.mjs +0 -2
- package/dist/column-WLPMMSTS-DTBoovzp.mjs +0 -1
- package/dist/comm-5SLSESQG-DT3SY7zS.mjs +0 -1
- package/dist/constants-6L3bwbSM.mjs +0 -2
- package/dist/cp-XOYR4ABJ-Bs6Rpbb2.mjs +0 -1
- package/dist/cut-OPC3VAGB-Bm1HBn07.mjs +0 -1
- package/dist/date-DD7FVA2V-Dv3os04S.mjs +0 -1
- package/dist/diff-HJF2MPDN-Di-oK2tx.mjs +0 -1
- package/dist/dirname-LEMTZZFS-D-u8wJ0b.mjs +0 -1
- package/dist/du-WO2ENHXQ-CO_jR0w6.mjs +0 -1
- package/dist/echo-O45JWWI2-RBT2dq5Y.mjs +0 -1
- package/dist/env-5EPCWSXR-DSwwgRF5.mjs +0 -1
- package/dist/expand-DTNXU4LQ-CtzV8vlq.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-CNi8PTVy.mjs +0 -1
- package/dist/expr-5T3UU5KE-BOXtVHu2.mjs +0 -1
- package/dist/file-ZIGAJ4YS-Bt-1Wusv.mjs +0 -1
- package/dist/find-TPUOAIUQ-CJd25AiD.mjs +0 -1
- package/dist/fold-LDSORVYE-DZ2L21IZ.mjs +0 -1
- package/dist/git-handle-DdgvPBh6-Dv4DjLoy.mjs +0 -1
- package/dist/grep-3AIAIJVR-CzG01gPs.mjs +0 -1
- package/dist/gzip-AQXSGOVS-B_BV2fa3.mjs +0 -1
- package/dist/head-HT2B6D2J-CjBr6WQ1.mjs +0 -1
- package/dist/help-VVWX7SA5-C4HsVKec.mjs +0 -1
- package/dist/history-J4QRNGRO-1CYG7cs0.mjs +0 -1
- package/dist/hostname-BK6HG2DE-BLS00ZWn.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-5Fopg2Q5.mjs +0 -1
- package/dist/init-CGNl62xW.mjs +0 -1
- package/dist/init-D998mblu.mjs +0 -317
- package/dist/join-GG2LDHE5-C_A2RnwJ.mjs +0 -1
- package/dist/jq-ODXZBPLY-hdWY1RUY.mjs +0 -1
- package/dist/ln-4TRFBYAT-CMm4PFgi.mjs +0 -1
- package/dist/loader-BfDp4sqJ.mjs +0 -1
- package/dist/ls-KSXFZCWH-Beyjypib.mjs +0 -1
- package/dist/md5sum-INMIK4DX-C2RH1Ljb.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-BeLs_C7x.mjs +0 -1
- package/dist/mv-Z6MORUFL-BDAoI0Wd.mjs +0 -1
- package/dist/nl-U5YJDM32-SP99R3HJ.mjs +0 -1
- package/dist/od-VJEF2UR5-BR0Ho1t5.mjs +0 -1
- package/dist/paste-7N6AFSDS-Bz3kd4hU.mjs +0 -1
- package/dist/preview-CnOFDDeV.mjs +0 -1
- package/dist/printf-CX64KX2P-GrZNCK4M.mjs +0 -1
- package/dist/pwd-D4OZ7N27-DDRhZsId.mjs +0 -1
- package/dist/readlink-MI4GCHJF-mNeJ3km7.mjs +0 -1
- package/dist/repair-skills-qkZ_LTHD.mjs +0 -1
- package/dist/rev-XOSYPP45-KAKdorsx.mjs +0 -1
- package/dist/rg-FOQSCCX3-BWOdKDEd.mjs +0 -1
- package/dist/rm-RTZG23RL-D4Xj3X_m.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-Bx-u3U5l.mjs +0 -1
- package/dist/sed-VFTTATXJ-DmL_7Y-J.mjs +0 -1
- package/dist/seq-RN5ZUASB-DeaNEJEM.mjs +0 -1
- package/dist/server-lock-8Lv6A-Xa-B4jggKdG.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-DYUNX0rt.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-BwDMGEnF.mjs +0 -1
- package/dist/sleep-VZFPZFWA-D3IG7CwN.mjs +0 -1
- package/dist/sort-DCNRDA7U-BfL8J8kf.mjs +0 -1
- package/dist/split-SITCSYCZ-Q5NIWguo.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-DA8bw7DG.mjs +0 -1
- package/dist/src-CeXDKSSn.mjs +0 -3
- package/dist/start-BqOu87VR.mjs +0 -3
- package/dist/start-ByfafCut.mjs +0 -1
- package/dist/stat-BT5A227F-CYFqsI8W.mjs +0 -1
- package/dist/stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs +0 -2
- package/dist/strings-7PLOGTPD-BLW4mXRs.mjs +0 -1
- package/dist/tac-SJGXQ4T2-BGR2Dq7O.mjs +0 -1
- package/dist/tail-S5ULNTJU-BOBd42y5.mjs +0 -1
- package/dist/tar-ANUBEFJY-DCUS8bvA.mjs +0 -1
- package/dist/tee-O7VXZDCO-Bg8MXC_K.mjs +0 -1
- package/dist/time-DEUO3QV2-CxVP9vXG.mjs +0 -1
- package/dist/timeout-VRKMCG72-CVG2Q30a.mjs +0 -1
- package/dist/touch-DX2IJOQ4-DmEja_Fu.mjs +0 -1
- package/dist/tr-2HXZRDSW-DWcyuCoi.mjs +0 -1
- package/dist/tree-LYXBS7DC-CFaeUWGI.mjs +0 -1
- package/dist/true-WHJNXCHG-CJH22fVg.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-Uj1QzdPV.mjs +0 -1
- package/dist/uniq-SUNANL47-MRCnRrGo.mjs +0 -1
- package/dist/wc-TQB3VNOX-JPk1lni-.mjs +0 -1
- package/dist/which-XZHEH76L-Cl63MOrV.mjs +0 -1
- package/dist/whoami-DGKU3D2X-CB3itqHE.mjs +0 -1
- package/dist/write-project-skill-CAgr6zKv.mjs +0 -36
- package/dist/xan-BXDXYEIB-ZPqGVO90.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-C-WHEJiv.mjs +0 -1
- package/dist/xargs-I6EZUCYF-BvcSF5Y7.mjs +0 -1
- package/dist/yazl-CQSNnbvt.mjs +0 -1
- package/dist/yq-MJMAR36V-_D_zdU3z.mjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{t as e}from"./chunk-YNYSPYQ5-gU4-j5DO.mjs";import{i as t}from"./chunk-GFQRA5P5-DbAN9IDm.mjs";import{r as n,t as r}from"./chunk-OJDRYQWQ-CmrD0Dg2.mjs";import{t as i}from"./chunk-24IMIIXA-DaS5XS55.mjs";import{a,c as o,i as s,n as c,o as l,r as u,t as d}from"./chunk-7TSDKFEO-CMVuiOdP.mjs";function f(e,t,n,i,s,c,u,d,f,p){switch(t){case`sort`:return Array.isArray(e)?[[...e].sort(u)]:[null];case`sort_by`:return!Array.isArray(e)||n.length===0?[null]:[[...e].sort((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)})];case`bsearch`:if(!Array.isArray(e))throw Error(`${e===null?`null`:typeof e==`object`?`object`:typeof e} (${JSON.stringify(e)}) cannot be searched from`);return n.length===0?[null]:s(e,n[0],i).map(t=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;u(e[i],t)<0?n=i+1:r=i}return n<e.length&&u(e[n],t)===0?n:-n-1});case`unique_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=s(r,n[0],i)[0],a=JSON.stringify(e);t.has(a)||t.set(a,{item:r,key:e})}let r=[...t.values()];return r.sort((e,t)=>u(e.key,t.key)),[r.map(e=>e.item)]}case`group_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=JSON.stringify(s(r,n[0],i)[0]);t.has(e)||t.set(e,[]),t.get(e)?.push(r)}return[[...t.values()]]}case`max`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)>0?e:t)]:[null];case`max_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)>0?e:t})];case`min`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)<0?e:t)]:[null];case`min_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)<0?e:t})];case`add`:{let t=e=>{let t=e.filter(e=>e!==null);return t.length===0?null:t.every(e=>typeof e==`number`)?t.reduce((e,t)=>e+t,0):t.every(e=>typeof e==`string`)?t.join(``):t.every(e=>Array.isArray(e))?t.flat():t.every(e=>e&&typeof e==`object`&&!Array.isArray(e))?r(...t):null};return n.length>=1?[t(s(e,n[0],i))]:Array.isArray(e)?[t(e)]:[null]}case`any`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(s(e,n[1],i).some(d))return[!0]}catch(e){if(e instanceof p)throw e}return[!1]}return n.length===1?Array.isArray(e)?[e.some(e=>d(s(e,n[0],i)[0]))]:[!1]:Array.isArray(e)?[e.some(d)]:[!1];case`all`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(!s(e,n[1],i).some(d))return[!1]}catch(e){if(e instanceof p)throw e}return[!0]}return n.length===1?Array.isArray(e)?[e.every(e=>d(s(e,n[0],i)[0]))]:[!0]:Array.isArray(e)?[e.every(d)]:[!0];case`select`:return n.length===0||s(e,n[0],i).some(d)?[e]:[];case`map`:return n.length===0||!Array.isArray(e)?[null]:[e.flatMap(e=>s(e,n[0],i))];case`map_values`:if(n.length===0)return[null];if(Array.isArray(e))return[e.flatMap(e=>s(e,n[0],i))];if(e&&typeof e==`object`){let t=Object.create(null);for(let[r,o]of Object.entries(e)){if(!l(r))continue;let e=s(o,n[0],i);e.length>0&&a(t,r,e[0])}return[t]}return[null];case`has`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(e)&&typeof t==`number`?[t>=0&&t<e.length]:e&&typeof e==`object`&&typeof t==`string`?[o(e,t)]:[!1]}case`in`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(t)&&typeof e==`number`?[e>=0&&e<t.length]:t&&typeof t==`object`&&typeof e==`string`?[o(t,e)]:[!1]}case`contains`:return n.length===0?[!1]:[f(e,s(e,n[0],i)[0])];case`inside`:return n.length===0?[!1]:[f(s(e,n[0],i)[0],e)];default:return null}}function p(e,t,n,r,i,a,o,s){switch(t){case`first`:if(n.length>0)try{let t=a(e,n[0],r);return t.length>0?[t[0]]:[]}catch(e){if(e instanceof s)throw e;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case`last`:if(n.length>0){let t=i(e,n[0],r);return t.length>0?[t[t.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case`nth`:{if(n.length<1)return[null];let t=i(e,n[0],r);if(n.length>1){for(let e of t)if(e<0)throw Error(`nth doesn't support negative indices`);let i;try{i=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;i=[]}return t.flatMap(e=>{let t=e;return t<i.length?[i[t]]:[]})}return Array.isArray(e)?t.flatMap(t=>{let n=t;if(n<0)throw Error(`nth doesn't support negative indices`);return n<e.length?[e[n]]:[null]}):[null]}case`range`:{if(n.length===0)return[];let t=Math.max(r.limits.maxIterations*100,1e6),a=e=>e.length>=t,o=i(e,n[0],r);if(n.length===1){let e=[];for(let t of o){let n=t;for(let t=0;t<n;t++)if(e.push(t),a(e))return e}return e}let s=i(e,n[1],r);if(n.length===2){let e=[];for(let t of o)for(let n of s){let r=t,i=n;for(let t=r;t<i;t++)if(e.push(t),a(e))return e}return e}let c=i(e,n[2],r),l=[];for(let e of o)for(let t of s)for(let n of c){let r=e,i=t,o=n;if(o!==0){if(o>0){for(let e=r;e<i;e+=o)if(l.push(e),a(l))return l}else for(let e=r;e>i;e+=o)if(l.push(e),a(l))return l}}return l}case`limit`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let i=t;if(i<0)throw Error(`limit doesn't support negative count`);if(i===0)return[];let o;try{o=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;o=[]}return o.slice(0,i)});case`isempty`:if(n.length<1)return[!0];try{return[a(e,n[0],r).length===0]}catch(e){if(e instanceof s)throw e;return[!0]}case`isvalid`:if(n.length<1)return[!0];try{return[i(e,n[0],r).length>0]}catch(e){if(e instanceof s)throw e;return[!1]}case`skip`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let a=t;if(a<0)throw Error(`skip doesn't support negative count`);return i(e,n[1],r).slice(a)});case`until`:{if(n.length<2)return[e];let t=e,a=r.limits.maxIterations;for(let e=0;e<a;e++){if(i(t,n[0],r).some(o))return[t];let e=i(t,n[1],r);if(e.length===0)return[t];t=e[0]}throw new s(`jq until: too many iterations (${a}), increase executionLimits.maxJqIterations`,`iterations`)}case`while`:{if(n.length<2)return[e];let t=[],a=e,c=r.limits.maxIterations;for(let e=0;e<c&&i(a,n[0],r).some(o);e++){t.push(a);let e=i(a,n[1],r);if(e.length===0)break;a=e[0]}if(t.length>=c)throw new s(`jq while: too many iterations (${c}), increase executionLimits.maxJqIterations`,`iterations`);return t}case`repeat`:{if(n.length===0)return[e];let t=[],a=e,o=r.limits.maxIterations;for(let e=0;e<o;e++){t.push(a);let e=i(a,n[0],r);if(e.length===0)break;a=e[0]}if(t.length>=o)throw new s(`jq repeat: too many iterations (${o}), increase executionLimits.maxJqIterations`,`iterations`);return t}default:return null}}function m(e,t,n,r,i){switch(t){case`now`:return[Date.now()/1e3];case`gmtime`:{if(typeof e!=`number`)return[null];let t=new Date(e*1e3),n=t.getUTCFullYear(),r=t.getUTCMonth(),i=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),s=t.getUTCSeconds(),c=t.getUTCDay(),l=Date.UTC(n,0,1);return[[n,r,i,a,o,s,c,Math.floor((t.getTime()-l)/(1440*60*1e3))]]}case`mktime`:{if(!Array.isArray(e))throw Error(`mktime requires parsed datetime inputs`);let[t,n,r,i=0,a=0,o=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`mktime requires parsed datetime inputs`);return[Math.floor(Date.UTC(t,n,r??1,i??0,a??0,o??0)/1e3)]}case`strftime`:{if(n.length===0)return[null];let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strftime/1 requires a string format`);let a;if(typeof e==`number`)a=new Date(e*1e3);else if(Array.isArray(e)){let[t,n,r,i=0,o=0,s=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`strftime/1 requires parsed datetime inputs`);a=new Date(Date.UTC(t,n,r??1,i??0,o??0,s??0))}else throw Error(`strftime/1 requires parsed datetime inputs`);let o=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],s=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],c=(e,t=2)=>String(e).padStart(t,`0`);return[t.replace(/%Y/g,String(a.getUTCFullYear())).replace(/%m/g,c(a.getUTCMonth()+1)).replace(/%d/g,c(a.getUTCDate())).replace(/%H/g,c(a.getUTCHours())).replace(/%M/g,c(a.getUTCMinutes())).replace(/%S/g,c(a.getUTCSeconds())).replace(/%A/g,o[a.getUTCDay()]).replace(/%B/g,s[a.getUTCMonth()]).replace(/%Z/g,`UTC`).replace(/%%/g,`%`)]}case`strptime`:{if(n.length===0)return[null];if(typeof e!=`string`)throw Error(`strptime/1 requires a string input`);let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strptime/1 requires a string format`);if(t===`%Y-%m-%dT%H:%M:%SZ`){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(t){let[,e,n,r,i,a,o]=t.map(Number),s=new Date(Date.UTC(e,n-1,r,i,a,o)),c=s.getUTCDay(),l=Date.UTC(e,0,1),u=Math.floor((s.getTime()-l)/(1440*60*1e3));return[[e,n-1,r,i,a,o,c,u]]}}let a=new Date(e);if(!Number.isNaN(a.getTime())){let e=a.getUTCFullYear(),t=a.getUTCMonth(),n=a.getUTCDate(),r=a.getUTCHours(),i=a.getUTCMinutes(),o=a.getUTCSeconds(),s=a.getUTCDay(),c=Date.UTC(e,0,1);return[[e,t,n,r,i,o,s,Math.floor((a.getTime()-c)/(1440*60*1e3))]]}throw Error(`Cannot parse date: ${e}`)}case`fromdate`:{if(typeof e!=`string`)throw Error(`fromdate requires a string input`);let t=new Date(e);if(Number.isNaN(t.getTime()))throw Error(`date "${e}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(t.getTime()/1e3)]}case`todate`:if(typeof e!=`number`)throw Error(`todate requires a number input`);return[new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,`Z`)];default:return null}}function h(e){return e!==!1&&e!==null}function g(e,t){return JSON.stringify(e)===JSON.stringify(t)}function _(e,t){return typeof e==`number`&&typeof t==`number`?e-t:typeof e==`string`&&typeof t==`string`?e.localeCompare(t):0}function v(e,t){let n=c(e);for(let e of Object.keys(t)){if(!l(e))continue;let r=o(n,e)?u(n[e]):null,i=u(t[e]);r&&i?a(n,e,v(r,i)):a(n,e,t[e])}return n}function y(e,t=3e3){let n=0,r=e;for(;n<t;)if(Array.isArray(r)){if(r.length===0)return n+1;r=r[0],n++}else if(typeof r==`object`&&r){let e=Object.keys(r);if(e.length===0)return n+1;r=r[e[0]],n++}else return n;return n}function b(e,t){let n=e=>e===null?0:typeof e==`boolean`?1:typeof e==`number`?2:typeof e==`string`?3:Array.isArray(e)?4:typeof e==`object`?5:6,r=n(e),i=n(t);if(r!==i)return r-i;if(typeof e==`number`&&typeof t==`number`)return e-t;if(typeof e==`string`&&typeof t==`string`)return e.localeCompare(t);if(typeof e==`boolean`&&typeof t==`boolean`)return(e?1:0)-(t?1:0);if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<Math.min(e.length,t.length);n++){let r=b(e[n],t[n]);if(r!==0)return r}return e.length-t.length}let a=u(e),o=u(t);if(a&&o){let e=Object.keys(a).sort(),t=Object.keys(o).sort();for(let n=0;n<Math.min(e.length,t.length);n++){let r=e[n].localeCompare(t[n]);if(r!==0)return r}if(e.length!==t.length)return e.length-t.length;for(let t of e){let e=b(a[t],o[t]);if(e!==0)return e}}return 0}function x(e,t){if(g(e,t))return!0;if(typeof e==`string`&&typeof t==`string`)return e.includes(t);if(Array.isArray(e)&&Array.isArray(t))return t.every(t=>e.some(e=>x(e,t)));let n=u(e),r=u(t);return n&&r?Object.keys(r).every(e=>o(n,e)&&x(n[e],r[e])):!1}var S=2e3;function C(e,t,n){switch(t){case`@base64`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`utf-8`).toString(`base64`)]:[btoa(e)]:[null];case`@base64d`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`base64`).toString(`utf-8`)]:[atob(e)]:[null];case`@uri`:return typeof e==`string`?[encodeURIComponent(e).replace(/!/g,`%21`).replace(/'/g,`%27`).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/\*/g,`%2A`)]:[null];case`@urid`:return typeof e==`string`?[decodeURIComponent(e)]:[null];case`@csv`:return Array.isArray(e)?[e.map(e=>{if(e===null)return``;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return String(e);let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
|
|
1
|
+
import{t as e}from"./chunk-YNYSPYQ5-DHter9G3.mjs";import{i as t}from"./chunk-GFQRA5P5-DigWkxW2.mjs";import{r as n,t as r}from"./chunk-OJDRYQWQ-LGuZyK6R.mjs";import{t as i}from"./chunk-24IMIIXA-BoP5OA93.mjs";import{a,c as o,i as s,n as c,o as l,r as u,t as d}from"./chunk-7TSDKFEO-CMVuiOdP.mjs";function f(e,t,n,i,s,c,u,d,f,p){switch(t){case`sort`:return Array.isArray(e)?[[...e].sort(u)]:[null];case`sort_by`:return!Array.isArray(e)||n.length===0?[null]:[[...e].sort((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)})];case`bsearch`:if(!Array.isArray(e))throw Error(`${e===null?`null`:typeof e==`object`?`object`:typeof e} (${JSON.stringify(e)}) cannot be searched from`);return n.length===0?[null]:s(e,n[0],i).map(t=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;u(e[i],t)<0?n=i+1:r=i}return n<e.length&&u(e[n],t)===0?n:-n-1});case`unique_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=s(r,n[0],i)[0],a=JSON.stringify(e);t.has(a)||t.set(a,{item:r,key:e})}let r=[...t.values()];return r.sort((e,t)=>u(e.key,t.key)),[r.map(e=>e.item)]}case`group_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=JSON.stringify(s(r,n[0],i)[0]);t.has(e)||t.set(e,[]),t.get(e)?.push(r)}return[[...t.values()]]}case`max`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)>0?e:t)]:[null];case`max_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)>0?e:t})];case`min`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)<0?e:t)]:[null];case`min_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)<0?e:t})];case`add`:{let t=e=>{let t=e.filter(e=>e!==null);return t.length===0?null:t.every(e=>typeof e==`number`)?t.reduce((e,t)=>e+t,0):t.every(e=>typeof e==`string`)?t.join(``):t.every(e=>Array.isArray(e))?t.flat():t.every(e=>e&&typeof e==`object`&&!Array.isArray(e))?r(...t):null};return n.length>=1?[t(s(e,n[0],i))]:Array.isArray(e)?[t(e)]:[null]}case`any`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(s(e,n[1],i).some(d))return[!0]}catch(e){if(e instanceof p)throw e}return[!1]}return n.length===1?Array.isArray(e)?[e.some(e=>d(s(e,n[0],i)[0]))]:[!1]:Array.isArray(e)?[e.some(d)]:[!1];case`all`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(!s(e,n[1],i).some(d))return[!1]}catch(e){if(e instanceof p)throw e}return[!0]}return n.length===1?Array.isArray(e)?[e.every(e=>d(s(e,n[0],i)[0]))]:[!0]:Array.isArray(e)?[e.every(d)]:[!0];case`select`:return n.length===0||s(e,n[0],i).some(d)?[e]:[];case`map`:return n.length===0||!Array.isArray(e)?[null]:[e.flatMap(e=>s(e,n[0],i))];case`map_values`:if(n.length===0)return[null];if(Array.isArray(e))return[e.flatMap(e=>s(e,n[0],i))];if(e&&typeof e==`object`){let t=Object.create(null);for(let[r,o]of Object.entries(e)){if(!l(r))continue;let e=s(o,n[0],i);e.length>0&&a(t,r,e[0])}return[t]}return[null];case`has`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(e)&&typeof t==`number`?[t>=0&&t<e.length]:e&&typeof e==`object`&&typeof t==`string`?[o(e,t)]:[!1]}case`in`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(t)&&typeof e==`number`?[e>=0&&e<t.length]:t&&typeof t==`object`&&typeof e==`string`?[o(t,e)]:[!1]}case`contains`:return n.length===0?[!1]:[f(e,s(e,n[0],i)[0])];case`inside`:return n.length===0?[!1]:[f(s(e,n[0],i)[0],e)];default:return null}}function p(e,t,n,r,i,a,o,s){switch(t){case`first`:if(n.length>0)try{let t=a(e,n[0],r);return t.length>0?[t[0]]:[]}catch(e){if(e instanceof s)throw e;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case`last`:if(n.length>0){let t=i(e,n[0],r);return t.length>0?[t[t.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case`nth`:{if(n.length<1)return[null];let t=i(e,n[0],r);if(n.length>1){for(let e of t)if(e<0)throw Error(`nth doesn't support negative indices`);let i;try{i=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;i=[]}return t.flatMap(e=>{let t=e;return t<i.length?[i[t]]:[]})}return Array.isArray(e)?t.flatMap(t=>{let n=t;if(n<0)throw Error(`nth doesn't support negative indices`);return n<e.length?[e[n]]:[null]}):[null]}case`range`:{if(n.length===0)return[];let t=Math.max(r.limits.maxIterations*100,1e6),a=e=>e.length>=t,o=i(e,n[0],r);if(n.length===1){let e=[];for(let t of o){let n=t;for(let t=0;t<n;t++)if(e.push(t),a(e))return e}return e}let s=i(e,n[1],r);if(n.length===2){let e=[];for(let t of o)for(let n of s){let r=t,i=n;for(let t=r;t<i;t++)if(e.push(t),a(e))return e}return e}let c=i(e,n[2],r),l=[];for(let e of o)for(let t of s)for(let n of c){let r=e,i=t,o=n;if(o!==0){if(o>0){for(let e=r;e<i;e+=o)if(l.push(e),a(l))return l}else for(let e=r;e>i;e+=o)if(l.push(e),a(l))return l}}return l}case`limit`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let i=t;if(i<0)throw Error(`limit doesn't support negative count`);if(i===0)return[];let o;try{o=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;o=[]}return o.slice(0,i)});case`isempty`:if(n.length<1)return[!0];try{return[a(e,n[0],r).length===0]}catch(e){if(e instanceof s)throw e;return[!0]}case`isvalid`:if(n.length<1)return[!0];try{return[i(e,n[0],r).length>0]}catch(e){if(e instanceof s)throw e;return[!1]}case`skip`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let a=t;if(a<0)throw Error(`skip doesn't support negative count`);return i(e,n[1],r).slice(a)});case`until`:{if(n.length<2)return[e];let t=e,a=r.limits.maxIterations;for(let e=0;e<a;e++){if(i(t,n[0],r).some(o))return[t];let e=i(t,n[1],r);if(e.length===0)return[t];t=e[0]}throw new s(`jq until: too many iterations (${a}), increase executionLimits.maxJqIterations`,`iterations`)}case`while`:{if(n.length<2)return[e];let t=[],a=e,c=r.limits.maxIterations;for(let e=0;e<c&&i(a,n[0],r).some(o);e++){t.push(a);let e=i(a,n[1],r);if(e.length===0)break;a=e[0]}if(t.length>=c)throw new s(`jq while: too many iterations (${c}), increase executionLimits.maxJqIterations`,`iterations`);return t}case`repeat`:{if(n.length===0)return[e];let t=[],a=e,o=r.limits.maxIterations;for(let e=0;e<o;e++){t.push(a);let e=i(a,n[0],r);if(e.length===0)break;a=e[0]}if(t.length>=o)throw new s(`jq repeat: too many iterations (${o}), increase executionLimits.maxJqIterations`,`iterations`);return t}default:return null}}function m(e,t,n,r,i){switch(t){case`now`:return[Date.now()/1e3];case`gmtime`:{if(typeof e!=`number`)return[null];let t=new Date(e*1e3),n=t.getUTCFullYear(),r=t.getUTCMonth(),i=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),s=t.getUTCSeconds(),c=t.getUTCDay(),l=Date.UTC(n,0,1);return[[n,r,i,a,o,s,c,Math.floor((t.getTime()-l)/(1440*60*1e3))]]}case`mktime`:{if(!Array.isArray(e))throw Error(`mktime requires parsed datetime inputs`);let[t,n,r,i=0,a=0,o=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`mktime requires parsed datetime inputs`);return[Math.floor(Date.UTC(t,n,r??1,i??0,a??0,o??0)/1e3)]}case`strftime`:{if(n.length===0)return[null];let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strftime/1 requires a string format`);let a;if(typeof e==`number`)a=new Date(e*1e3);else if(Array.isArray(e)){let[t,n,r,i=0,o=0,s=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`strftime/1 requires parsed datetime inputs`);a=new Date(Date.UTC(t,n,r??1,i??0,o??0,s??0))}else throw Error(`strftime/1 requires parsed datetime inputs`);let o=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],s=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],c=(e,t=2)=>String(e).padStart(t,`0`);return[t.replace(/%Y/g,String(a.getUTCFullYear())).replace(/%m/g,c(a.getUTCMonth()+1)).replace(/%d/g,c(a.getUTCDate())).replace(/%H/g,c(a.getUTCHours())).replace(/%M/g,c(a.getUTCMinutes())).replace(/%S/g,c(a.getUTCSeconds())).replace(/%A/g,o[a.getUTCDay()]).replace(/%B/g,s[a.getUTCMonth()]).replace(/%Z/g,`UTC`).replace(/%%/g,`%`)]}case`strptime`:{if(n.length===0)return[null];if(typeof e!=`string`)throw Error(`strptime/1 requires a string input`);let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strptime/1 requires a string format`);if(t===`%Y-%m-%dT%H:%M:%SZ`){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(t){let[,e,n,r,i,a,o]=t.map(Number),s=new Date(Date.UTC(e,n-1,r,i,a,o)),c=s.getUTCDay(),l=Date.UTC(e,0,1),u=Math.floor((s.getTime()-l)/(1440*60*1e3));return[[e,n-1,r,i,a,o,c,u]]}}let a=new Date(e);if(!Number.isNaN(a.getTime())){let e=a.getUTCFullYear(),t=a.getUTCMonth(),n=a.getUTCDate(),r=a.getUTCHours(),i=a.getUTCMinutes(),o=a.getUTCSeconds(),s=a.getUTCDay(),c=Date.UTC(e,0,1);return[[e,t,n,r,i,o,s,Math.floor((a.getTime()-c)/(1440*60*1e3))]]}throw Error(`Cannot parse date: ${e}`)}case`fromdate`:{if(typeof e!=`string`)throw Error(`fromdate requires a string input`);let t=new Date(e);if(Number.isNaN(t.getTime()))throw Error(`date "${e}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(t.getTime()/1e3)]}case`todate`:if(typeof e!=`number`)throw Error(`todate requires a number input`);return[new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,`Z`)];default:return null}}function h(e){return e!==!1&&e!==null}function g(e,t){return JSON.stringify(e)===JSON.stringify(t)}function _(e,t){return typeof e==`number`&&typeof t==`number`?e-t:typeof e==`string`&&typeof t==`string`?e.localeCompare(t):0}function v(e,t){let n=c(e);for(let e of Object.keys(t)){if(!l(e))continue;let r=o(n,e)?u(n[e]):null,i=u(t[e]);r&&i?a(n,e,v(r,i)):a(n,e,t[e])}return n}function y(e,t=3e3){let n=0,r=e;for(;n<t;)if(Array.isArray(r)){if(r.length===0)return n+1;r=r[0],n++}else if(typeof r==`object`&&r){let e=Object.keys(r);if(e.length===0)return n+1;r=r[e[0]],n++}else return n;return n}function b(e,t){let n=e=>e===null?0:typeof e==`boolean`?1:typeof e==`number`?2:typeof e==`string`?3:Array.isArray(e)?4:typeof e==`object`?5:6,r=n(e),i=n(t);if(r!==i)return r-i;if(typeof e==`number`&&typeof t==`number`)return e-t;if(typeof e==`string`&&typeof t==`string`)return e.localeCompare(t);if(typeof e==`boolean`&&typeof t==`boolean`)return(e?1:0)-(t?1:0);if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<Math.min(e.length,t.length);n++){let r=b(e[n],t[n]);if(r!==0)return r}return e.length-t.length}let a=u(e),o=u(t);if(a&&o){let e=Object.keys(a).sort(),t=Object.keys(o).sort();for(let n=0;n<Math.min(e.length,t.length);n++){let r=e[n].localeCompare(t[n]);if(r!==0)return r}if(e.length!==t.length)return e.length-t.length;for(let t of e){let e=b(a[t],o[t]);if(e!==0)return e}}return 0}function x(e,t){if(g(e,t))return!0;if(typeof e==`string`&&typeof t==`string`)return e.includes(t);if(Array.isArray(e)&&Array.isArray(t))return t.every(t=>e.some(e=>x(e,t)));let n=u(e),r=u(t);return n&&r?Object.keys(r).every(e=>o(n,e)&&x(n[e],r[e])):!1}var S=2e3;function C(e,t,n){switch(t){case`@base64`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`utf-8`).toString(`base64`)]:[btoa(e)]:[null];case`@base64d`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`base64`).toString(`utf-8`)]:[atob(e)]:[null];case`@uri`:return typeof e==`string`?[encodeURIComponent(e).replace(/!/g,`%21`).replace(/'/g,`%27`).replace(/\(/g,`%28`).replace(/\)/g,`%29`).replace(/\*/g,`%2A`)]:[null];case`@urid`:return typeof e==`string`?[decodeURIComponent(e)]:[null];case`@csv`:return Array.isArray(e)?[e.map(e=>{if(e===null)return``;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return String(e);let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
|
|
2
2
|
`)||t.includes(`\r`)?`"${t.replace(/"/g,`""`)}"`:t}).join(`,`)]:[null];case`@tsv`:return Array.isArray(e)?[e.map(e=>String(e??``).replace(/\t/g,`\\t`).replace(/\n/g,`\\n`)).join(` `)]:[null];case`@json`:{let t=n??S;return y(e,t+1)>t?[null]:[JSON.stringify(e)]}case`@html`:return typeof e==`string`?[e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/'/g,`'`).replace(/"/g,`"`)]:[null];case`@sh`:return typeof e==`string`?[`'${e.replace(/'/g,`'\\''`)}'`]:[null];case`@text`:return typeof e==`string`?[e]:e==null?[``]:[String(e)];default:return null}}function w(e,t,n,r,i,a){switch(t){case`index`:return n.length===0?[null]:i(e,n[0],r).map(t=>{if(typeof e==`string`&&typeof t==`string`){if(t===``&&e===``)return null;let n=e.indexOf(t);return n>=0?n:null}if(Array.isArray(e)){if(Array.isArray(t)){for(let n=0;n<=e.length-t.length;n++){let r=!0;for(let i=0;i<t.length;i++)if(!a(e[n+i],t[i])){r=!1;break}if(r)return n}return null}let n=e.findIndex(e=>a(e,t));return n>=0?n:null}return null});case`rindex`:return n.length===0?[null]:i(e,n[0],r).map(t=>{if(typeof e==`string`&&typeof t==`string`){let n=e.lastIndexOf(t);return n>=0?n:null}if(Array.isArray(e)){if(Array.isArray(t)){for(let n=e.length-t.length;n>=0;n--){let r=!0;for(let i=0;i<t.length;i++)if(!a(e[n+i],t[i])){r=!1;break}if(r)return n}return null}for(let n=e.length-1;n>=0;n--)if(a(e[n],t))return n;return null}return null});case`indices`:return n.length===0?[[]]:i(e,n[0],r).map(t=>{let n=[];if(typeof e==`string`&&typeof t==`string`){let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1)}else if(Array.isArray(e))if(Array.isArray(t)){let r=t.length;if(r===0)for(let t=0;t<=e.length;t++)n.push(t);else for(let i=0;i<=e.length-r;i++){let o=!0;for(let n=0;n<r;n++)if(!a(e[i+n],t[n])){o=!1;break}o&&n.push(i)}}else for(let r=0;r<e.length;r++)a(e[r],t)&&n.push(r);return n});default:return null}}function T(e,t,n,r,i){switch(t){case`fabs`:case`abs`:return typeof e==`number`?[Math.abs(e)]:typeof e==`string`?[e]:[null];case`exp10`:return typeof e==`number`?[10**e]:[null];case`exp2`:return typeof e==`number`?[2**e]:[null];case`pow`:{if(n.length<2)return[null];let t=i(e,n[0],r),a=i(e,n[1],r),o=t[0],s=a[0];return typeof o!=`number`||typeof s!=`number`?[null]:[o**s]}case`atan2`:{if(n.length<2)return[null];let t=i(e,n[0],r),a=i(e,n[1],r),o=t[0],s=a[0];return typeof o!=`number`||typeof s!=`number`?[null]:[Math.atan2(o,s)]}case`hypot`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.hypot(e,t)]}case`fma`:{if(typeof e!=`number`||n.length<2)return[null];let t=i(e,n[0],r)[0],a=i(e,n[1],r)[0];return[e*t+a]}case`copysign`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.sign(t)*Math.abs(e)]}case`drem`:case`remainder`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[e-Math.round(e/t)*t]}case`fdim`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.max(0,e-t)]}case`fmax`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.max(e,t)]}case`fmin`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.min(e,t)]}case`ldexp`:return typeof e!=`number`||n.length===0?[null]:[e*2**i(e,n[0],r)[0]];case`scalbn`:case`scalbln`:return typeof e!=`number`||n.length===0?[null]:[e*2**i(e,n[0],r)[0]];case`nearbyint`:return typeof e==`number`?[Math.round(e)]:[null];case`logb`:return typeof e==`number`?[Math.floor(Math.log2(Math.abs(e)))]:[null];case`significand`:return typeof e==`number`?[e/2**Math.floor(Math.log2(Math.abs(e)))]:[null];case`frexp`:if(typeof e==`number`){if(e===0)return[[0,0]];let t=Math.floor(Math.log2(Math.abs(e)))+1;return[[e/2**t,t]]}return[null];case`modf`:if(typeof e==`number`){let t=Math.trunc(e);return[[e-t,t]]}return[null];default:return null}}function E(e,t,n,r,i,o,s,c){switch(t){case`recurse`:{if(n.length===0){let t=[],n=e=>{if(t.push(e),Array.isArray(e))for(let t of e)n(t);else if(e&&typeof e==`object`)for(let t of Object.keys(e))n(e[t])};return n(e),t}let t=[],a=n.length>=2?n[1]:null,s=0,c=e=>{if(s++>1e4||a&&!i(e,a,r).some(o))return;t.push(e);let l=i(e,n[0],r);for(let e of l)e!=null&&c(e)};return c(e),t}case`recurse_down`:return c(e,`recurse`,n,r);case`walk`:{if(n.length===0)return[e];let t=new WeakSet,o=e=>{if(e&&typeof e==`object`){if(t.has(e))return e;t.add(e)}let s;if(Array.isArray(e))s=e.map(o);else if(e&&typeof e==`object`){let t=Object.create(null);for(let[n,r]of Object.entries(e))l(n)&&a(t,n,o(r));s=t}else s=e;return i(s,n[0],r)[0]};return[o(e)]}case`transpose`:{if(!Array.isArray(e))return[null];if(e.length===0)return[[]];let t=Math.max(...e.map(e=>Array.isArray(e)?e.length:0)),n=[];for(let r=0;r<t;r++)n.push(e.map(e=>Array.isArray(e)?e[r]:null));return[n]}case`combinations`:{if(n.length>0){let t=i(e,n[0],r)[0];if(!Array.isArray(e)||t<0)return[];if(t===0)return[[]];let a=[],o=(n,r)=>{if(r===t){a.push([...n]);return}for(let t of e)n.push(t),o(n,r+1),n.pop()};return o([],0),a}if(!Array.isArray(e))return[];if(e.length===0)return[[]];for(let t of e)if(!Array.isArray(t))return[];let t=[],a=(n,r)=>{if(n===e.length){t.push([...r]);return}let i=e[n];for(let e of i)r.push(e),a(n+1,r),r.pop()};return a(0,[]),t}case`parent`:{if(r.root===void 0||r.currentPath===void 0)return[];let t=r.currentPath;if(t.length===0)return[];let a=n.length>0?i(e,n[0],r)[0]:1;if(a>=0){if(a>t.length)return[];let e=t.slice(0,t.length-a);return[s(r.root,e)]}else{let n=-a-1;if(n>=t.length)return[e];let i=t.slice(0,n);return[s(r.root,i)]}}case`parents`:{if(r.root===void 0||r.currentPath===void 0)return[[]];let e=r.currentPath,t=[];for(let n=e.length-1;n>=0;n--)t.push(s(r.root,e.slice(0,n)));return[t]}case`root`:return r.root===void 0?[]:[r.root];default:return null}}var D=2e3;function O(e,t,n,r,i){switch(t){case`keys`:return Array.isArray(e)?[e.map((e,t)=>t)]:e&&typeof e==`object`?[Object.keys(e).sort()]:[null];case`keys_unsorted`:return Array.isArray(e)?[e.map((e,t)=>t)]:e&&typeof e==`object`?[Object.keys(e)]:[null];case`length`:return typeof e==`string`||Array.isArray(e)?[e.length]:e&&typeof e==`object`?[Object.keys(e).length]:e===null?[0]:typeof e==`number`?[Math.abs(e)]:[null];case`utf8bytelength`:{if(typeof e==`string`)return[new TextEncoder().encode(e).length];let t=e===null?`null`:Array.isArray(e)?`array`:typeof e,n=t===`array`||t===`object`?JSON.stringify(e):String(e);throw Error(`${t} (${n}) only strings have UTF-8 byte length`)}case`to_entries`:{let t=u(e);return t?[Object.entries(t).map(([e,t])=>({key:e,value:t}))]:[null]}case`from_entries`:if(Array.isArray(e)){let t=Object.create(null);for(let n of e){let e=u(n);if(e){let n=e.key??e.Key??e.name??e.Name??e.k,r=e.value??e.Value??e.v;if(n!==void 0){let e=String(n);l(e)&&a(t,e,r)}}}return[t]}return[null];case`with_entries`:{if(n.length===0)return[e];let t=u(e);if(t){let e=Object.entries(t).map(([e,t])=>({key:e,value:t})).flatMap(e=>i(e,n[0],r)),o=Object.create(null);for(let t of e){let e=u(t);if(e){let t=e.key??e.name??e.k,n=e.value??e.v;if(t!==void 0){let e=String(t);l(e)&&a(o,e,n)}}}return[o]}return[null]}case`reverse`:return Array.isArray(e)?[[...e].reverse()]:typeof e==`string`?[e.split(``).reverse().join(``)]:[null];case`flatten`:return Array.isArray(e)?(n.length>0?i(e,n[0],r):[1/0]).map(t=>{let n=t;if(n<0)throw Error(`flatten depth must not be negative`);return e.flat(n)}):[null];case`unique`:if(Array.isArray(e)){let t=new Set,n=[];for(let r of e){let e=JSON.stringify(r);t.has(e)||(t.add(e),n.push(r))}return[n]}return[null];case`tojson`:case`tojsonstream`:{let t=r.limits.maxDepth??D;return y(e,t+1)>t?[null]:[JSON.stringify(e)]}case`fromjson`:if(typeof e==`string`){let t=e.trim().toLowerCase();if(t===`nan`)return[NaN];if(t===`inf`||t===`infinity`)return[1/0];if(t===`-inf`||t===`-infinity`)return[-1/0];try{return[d(JSON.parse(e))]}catch{throw Error(`Invalid JSON: ${e}`)}}return[e];case`tostring`:return typeof e==`string`?[e]:[JSON.stringify(e)];case`tonumber`:if(typeof e==`number`)return[e];if(typeof e==`string`){let t=Number(e);if(Number.isNaN(t))throw Error(`${JSON.stringify(e)} cannot be parsed as a number`);return[t]}throw Error(`${typeof e} cannot be parsed as a number`);case`toboolean`:{if(typeof e==`boolean`)return[e];if(typeof e==`string`){if(e===`true`)return[!0];if(e===`false`)return[!1];throw Error(`string (${JSON.stringify(e)}) cannot be parsed as a boolean`)}let t=e===null?`null`:Array.isArray(e)?`array`:typeof e,n=t===`array`||t===`object`?JSON.stringify(e):String(e);throw Error(`${t} (${n}) cannot be parsed as a boolean`)}case`tostream`:{let t=[],n=(e,r)=>{if(typeof e!=`object`||!e)t.push([r,e]);else if(Array.isArray(e))if(e.length===0)t.push([r,[]]);else for(let t=0;t<e.length;t++)n(e[t],[...r,t]);else{let i=Object.keys(e);if(i.length===0)t.push([r,Object.create(null)]);else for(let t of i)n(e[t],[...r,t])}};return n(e,[]),t.push([[]]),t}case`fromstream`:{if(n.length===0)return[e];let t=i(e,n[0],r),o=null;for(let e of t){if(!Array.isArray(e)||e.length===1&&Array.isArray(e[0])&&e[0].length===0||e.length!==2)continue;let[t,n]=e;if(!Array.isArray(t))continue;if(t.length===0){o=n;continue}o===null&&(o=typeof t[0]==`number`?[]:Object.create(null));let r=o;for(let e=0;e<t.length-1;e++){let n=t[e],i=t[e+1];if(Array.isArray(r)&&typeof n==`number`){for(;r.length<=n;)r.push(null);r[n]===null&&(r[n]=typeof i==`number`?[]:Object.create(null)),r=r[n]}else{let e=u(r);if(e){let t=String(n);if(!l(t))continue;(e[t]===null||e[t]===void 0)&&a(e,t,typeof i==`number`?[]:Object.create(null)),r=e[t]}}}let i=t[t.length-1];if(Array.isArray(r)&&typeof i==`number`){for(;r.length<=i;)r.push(null);r[i]=n}else{let e=u(r);if(e){let t=String(i);l(t)&&a(e,t,n)}}}return[o]}case`truncate_stream`:{let t=typeof e==`number`?Math.floor(e):0;if(n.length===0)return[];let a=[],o=i(e,n[0],r);for(let e of o)if(Array.isArray(e)){if(e.length===1&&Array.isArray(e[0])){let n=e[0];n.length>t&&a.push([n.slice(t)]);continue}if(e.length===2&&Array.isArray(e[0])){let n=e[0],r=e[1];n.length>t&&a.push([n.slice(t),r])}}return a}default:return null}}function ee(e,t,n,r,i,a,o,s,c,l){switch(t){case`getpath`:{if(n.length===0)return[null];let t=i(e,n[0],r),a=[];for(let n of t){let t=n,r=e;for(let e of t){if(r==null){r=null;break}if(Array.isArray(r)&&typeof e==`number`)r=r[e];else if(typeof e==`string`){let t=u(r);if(!t||!Object.hasOwn(t,e)){r=null;break}r=t[e]}else{r=null;break}}a.push(r)}return a}case`setpath`:{if(n.length<2)return[null];let t=i(e,n[0],r)[0],a=i(e,n[1],r)[0];return[o(e,t,a)]}case`delpaths`:{if(n.length===0)return[e];let t=i(e,n[0],r)[0],a=e;for(let e of t.sort((e,t)=>t.length-e.length))a=s(a,e);return[a]}case`path`:{if(n.length===0)return[[]];let t=[];return l(e,n[0],r,[],t),t}case`del`:return n.length===0?[e]:[c(e,n[0],r)];case`pick`:{if(n.length===0)return[null];let t=[];for(let i of n)l(e,i,r,[],t);let i=null;for(let n of t){for(let e of n)if(typeof e==`number`&&e<0)throw Error(`Out of bounds negative array index`);let t=e;for(let e of n){if(t==null)break;if(Array.isArray(t)&&typeof e==`number`)t=t[e];else if(typeof e==`string`){let n=u(t);if(!n||!Object.hasOwn(n,e)){t=null;break}t=n[e]}else{t=null;break}}i=o(i,n,t)}return[i]}case`paths`:{let t=[],o=(e,n)=>{if(e&&typeof e==`object`)if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push([...n,r]),o(e[r],[...n,r]);else for(let r of Object.keys(e))t.push([...n,r]),o(e[r],[...n,r])};return o(e,[]),n.length>0?t.filter(t=>{let o=e;for(let e of t)if(Array.isArray(o)&&typeof e==`number`)o=o[e];else if(typeof e==`string`){let t=u(o);if(!t||!Object.hasOwn(t,e))return!1;o=t[e]}else return!1;return i(o,n[0],r).some(a)}):t}case`leaf_paths`:{let t=[],n=(e,r)=>{if(typeof e!=`object`||!e)t.push(r);else if(Array.isArray(e))for(let t=0;t<e.length;t++)n(e[t],[...r,t]);else for(let t of Object.keys(e))n(e[t],[...r,t])};return n(e,[]),t}default:return null}}function k(e,t,n,r,i,s){switch(t){case`IN`:{if(n.length===0)return[!1];if(n.length===1){let t=i(e,n[0],r);for(let n of t)if(s(e,n))return[!0];return[!1]}let t=i(e,n[0],r),a=i(e,n[1],r),o=new Set(a.map(e=>JSON.stringify(e)));for(let e of t)if(o.has(JSON.stringify(e)))return[!0];return[!1]}case`INDEX`:{if(n.length===0)return[Object.create(null)];if(n.length===1){let t=i(e,n[0],r),o=Object.create(null);for(let e of t){let t=String(e);l(t)&&a(o,t,e)}return[o]}if(n.length===2){let t=i(e,n[0],r),o=Object.create(null);for(let e of t){let t=i(e,n[1],r);if(t.length>0){let n=String(t[0]);l(n)&&a(o,n,e)}}return[o]}let t=i(e,n[0],r),o=Object.create(null);for(let e of t){let t=i(e,n[1],r),s=i(e,n[2],r);if(t.length>0&&s.length>0){let e=String(t[0]);l(e)&&a(o,e,s[0])}}return[o]}case`JOIN`:{if(n.length<2)return[null];let t=u(i(e,n[0],r)[0]);if(!t||!Array.isArray(e))return[null];let a=[];for(let s of e){let e=i(s,n[1],r),c=e.length>0?String(e[0]):``,l=o(t,c)?t[c]:null;a.push([s,l])}return[a]}default:return null}}function A(t,n,r,i,a){switch(n){case`join`:{if(!Array.isArray(t))return[null];let e=r.length>0?a(t,r[0],i):[``];for(let e of t)if(Array.isArray(e)||typeof e==`object`&&e)throw Error(`cannot join: contains arrays or objects`);return e.map(e=>t.map(e=>e===null?``:typeof e==`string`?e:String(e)).join(String(e)))}case`split`:{if(typeof t!=`string`||r.length===0)return[null];let e=a(t,r[0],i),n=String(e[0]);return[t.split(n)]}case`splits`:{if(typeof t!=`string`||r.length===0)return[];let n=a(t,r[0],i),o=String(n[0]);try{let n=r.length>1?String(a(t,r[1],i)[0]):`g`;return e(o,n.includes(`g`)?n:`${n}g`).split(t)}catch{return[]}}case`scan`:{if(typeof t!=`string`||r.length===0)return[];let n=a(t,r[0],i),o=String(n[0]);try{let n=r.length>1?String(a(t,r[1],i)[0]):``;return[...e(o,n.includes(`g`)?n:`${n}g`).matchAll(t)].map(e=>e.length>1?e.slice(1):e[0])}catch{return[]}}case`test`:{if(typeof t!=`string`||r.length===0)return[!1];let n=a(t,r[0],i),o=String(n[0]);try{return[e(o,r.length>1?String(a(t,r[1],i)[0]):``).test(t)]}catch{return[!1]}}case`match`:{if(typeof t!=`string`||r.length===0)return[null];let n=a(t,r[0],i),o=String(n[0]);try{let n=e(o,`${r.length>1?String(a(t,r[1],i)[0]):``}d`).exec(t);if(!n)return[];let s=n.indices;return[{offset:n.index,length:n[0].length,string:n[0],captures:n.slice(1).map((e,t)=>({offset:s?.[t+1]?.[0]??null,length:e?.length??0,string:e??``,name:null}))}]}catch{return[null]}}case`capture`:{if(typeof t!=`string`||r.length===0)return[null];let n=a(t,r[0],i),o=String(n[0]);try{let n=e(o,r.length>1?String(a(t,r[1],i)[0]):``).match(t);return!n||!n.groups?[Object.create(null)]:[n.groups]}catch{return[null]}}case`sub`:{if(typeof t!=`string`||r.length<2)return[null];let n=a(t,r[0],i),o=a(t,r[1],i),s=String(n[0]),c=String(o[0]);try{return[e(s,r.length>2?String(a(t,r[2],i)[0]):``).replace(t,c)]}catch{return[t]}}case`gsub`:{if(typeof t!=`string`||r.length<2)return[null];let n=a(t,r[0],i),o=a(t,r[1],i),s=String(n[0]),c=String(o[0]);try{let n=r.length>2?String(a(t,r[2],i)[0]):`g`;return[e(s,n.includes(`g`)?n:`${n}g`).replace(t,c)]}catch{return[t]}}case`ascii_downcase`:return typeof t==`string`?[t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))]:[null];case`ascii_upcase`:return typeof t==`string`?[t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))]:[null];case`ltrimstr`:{if(typeof t!=`string`||r.length===0)return[t];let e=a(t,r[0],i),n=String(e[0]);return[t.startsWith(n)?t.slice(n.length):t]}case`rtrimstr`:{if(typeof t!=`string`||r.length===0)return[t];let e=a(t,r[0],i),n=String(e[0]);return n===``?[t]:[t.endsWith(n)?t.slice(0,-n.length):t]}case`trimstr`:{if(typeof t!=`string`||r.length===0)return[t];let e=a(t,r[0],i),n=String(e[0]);if(n===``)return[t];let o=t;return o.startsWith(n)&&(o=o.slice(n.length)),o.endsWith(n)&&(o=o.slice(0,-n.length)),[o]}case`trim`:if(typeof t==`string`)return[t.trim()];throw Error(`trim input must be a string`);case`ltrim`:if(typeof t==`string`)return[t.trimStart()];throw Error(`trim input must be a string`);case`rtrim`:if(typeof t==`string`)return[t.trimEnd()];throw Error(`trim input must be a string`);case`startswith`:{if(typeof t!=`string`||r.length===0)return[!1];let e=a(t,r[0],i);return[t.startsWith(String(e[0]))]}case`endswith`:{if(typeof t!=`string`||r.length===0)return[!1];let e=a(t,r[0],i);return[t.endsWith(String(e[0]))]}case`ascii`:return typeof t==`string`&&t.length>0?[t.charCodeAt(0)]:[null];case`explode`:return typeof t==`string`?[Array.from(t).map(e=>e.codePointAt(0))]:[null];case`implode`:if(!Array.isArray(t))throw Error(`implode input must be an array`);return[t.map(e=>{if(typeof e==`string`)throw Error(`string (${JSON.stringify(e)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof e!=`number`||Number.isNaN(e))throw Error(`number (null) can't be imploded, unicode codepoint needs to be numeric`);let t=Math.trunc(e);return t<0||t>1114111||t>=55296&&t<=57343?String.fromCodePoint(65533):String.fromCodePoint(t)}).join(``)];default:return null}}function j(e,t){switch(t){case`type`:return e===null?[`null`]:Array.isArray(e)?[`array`]:typeof e==`boolean`?[`boolean`]:typeof e==`number`?[`number`]:typeof e==`string`?[`string`]:typeof e==`object`?[`object`]:[`null`];case`infinite`:return[1/0];case`nan`:return[NaN];case`isinfinite`:return[typeof e==`number`&&!Number.isFinite(e)];case`isnan`:return[typeof e==`number`&&Number.isNaN(e)];case`isnormal`:return[typeof e==`number`&&Number.isFinite(e)&&e!==0];case`isfinite`:return[typeof e==`number`&&Number.isFinite(e)];case`numbers`:return typeof e==`number`?[e]:[];case`strings`:return typeof e==`string`?[e]:[];case`booleans`:return typeof e==`boolean`?[e]:[];case`nulls`:return e===null?[e]:[];case`arrays`:return Array.isArray(e)?[e]:[];case`objects`:return e&&typeof e==`object`&&!Array.isArray(e)?[e]:[];case`iterables`:return Array.isArray(e)||e&&typeof e==`object`&&!Array.isArray(e)?[e]:[];case`scalars`:return!Array.isArray(e)&&!(e&&typeof e==`object`)?[e]:[];case`values`:return e===null?[]:[e];case`not`:return e===!1||e===null?[!0]:[!1];case`null`:return[null];case`true`:return[!0];case`false`:return[!1];case`empty`:return[];default:return null}}function M(e,t,n){if(t.length===0)return n;let[r,...i]=t;if(typeof r==`number`){if(e&&typeof e==`object`&&!Array.isArray(e))throw Error(`Cannot index object with number`);if(r>536870911)throw Error(`Array index too large`);if(r<0)throw Error(`Out of bounds negative array index`);let t=Array.isArray(e)?[...e]:[];for(;t.length<=r;)t.push(null);return t[r]=M(t[r],i,n),t}if(Array.isArray(e))throw Error(`Cannot index array with string`);if(!l(r))return e??Object.create(null);let o=u(e),s=o?c(o):Object.create(null);return a(s,r,M(Object.hasOwn(s,r)?s[r]:void 0,i,n)),s}function N(e,t){if(t.length===0)return null;if(t.length===1){let n=t[0];if(Array.isArray(e)&&typeof n==`number`){let t=[...e];return t.splice(n,1),t}if(e&&typeof e==`object`&&!Array.isArray(e)){let t=String(n);if(!l(t))return e;let r=c(e);return delete r[t],r}return e}let[n,...r]=t;if(Array.isArray(e)&&typeof n==`number`){let t=[...e];return t[n]=N(t[n],r),t}if(e&&typeof e==`object`&&!Array.isArray(e)){let t=String(n);if(!l(t))return e;let i=c(e);return Object.hasOwn(i,t)&&a(i,t,N(i[t],r)),i}return e}var P=class e extends Error{label;partialResults;constructor(e,t=[]){super(`break ${e}`),this.label=e,this.partialResults=t,this.name=`BreakError`}withPrependedResults(t){return new e(this.label,[...t,...this.partialResults])}},F=class extends Error{value;constructor(e){super(typeof e==`string`?e:JSON.stringify(e)),this.value=e,this.name=`JqError`}},I=1e4,L=2e3,te=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 ne(e){return{vars:new Map,limits:{maxIterations:e?.limits?.maxIterations??I,maxDepth:e?.limits?.maxDepth??L},env:e?.env,coverage:e?.coverage,requireDefenseContext:e?.requireDefenseContext,defenseContextChecked:!1}}function R(e,t,n){let r=new Map(e.vars);return r.set(t,n),{vars:r,limits:e.limits,env:e.env,requireDefenseContext:e.requireDefenseContext,defenseContextChecked:e.defenseContextChecked,root:e.root,currentPath:e.currentPath,funcs:e.funcs,labels:e.labels,coverage:e.coverage}}function z(e,t,n){switch(t.type){case`var`:return R(e,t.name,n);case`array`:{if(!Array.isArray(n))return null;let r=e;for(let e=0;e<t.elements.length;e++){let i=t.elements[e],a=e<n.length?n[e]:null,o=z(r,i,a);if(o===null)return null;r=o}return r}case`object`:{let r=u(n);if(!r)return null;let i=e;for(let a of t.fields){let t;if(typeof a.key==`string`)t=a.key;else{let r=W(n,a.key,e);if(r.length===0)return null;t=String(r[0])}let s=o(r,t)?r[t]:null;a.keyVar&&(i=R(i,a.keyVar,s));let c=z(i,a.pattern,s);if(c===null)return null;i=c}return i}}}function B(e,t){let n=e;for(let e of t)if(n&&typeof n==`object`)if(Array.isArray(n))if(typeof e==`number`)n=n[e];else return;else{let t=u(n);if(t&&typeof e==`string`&&Object.hasOwn(t,e))n=t[e];else return}else return;return n}function V(e){if(e.type===`Identity`)return[];if(e.type===`Field`){let t=e.base?V(e.base):[];return t===null?null:[...t,e.name]}if(e.type===`Index`&&e.index.type===`Literal`){let t=e.base?V(e.base):[];if(t===null)return null;let n=e.index.value;return typeof n==`number`||typeof n==`string`?[...t,n]:null}if(e.type===`Pipe`){let t=V(e.left);return t===null?null:H(t,e.right)}if(e.type===`Call`){if(e.name===`parent`||e.name===`root`)return null;if(e.name===`first`&&e.args.length===0)return[0];if(e.name===`last`&&e.args.length===0)return[-1]}return null}function H(e,t){if(t.type===`Call`){if(t.name===`parent`){let n=1;if(t.args.length>0&&t.args[0].type===`Literal`){let e=t.args[0].value;typeof e==`number`&&(n=e)}if(n>=0)return e.slice(0,Math.max(0,e.length-n));{let t=-n-1;return e.slice(0,Math.min(t,e.length))}}if(t.name===`root`)return[]}if(t.type===`Field`){let n=V(t);if(n!==null)return[...e,...n]}if(t.type===`Index`&&t.index.type===`Literal`){let n=V(t);if(n!==null)return[...e,...n]}if(t.type===`Pipe`){let n=H(e,t.left);return n===null?null:H(n,t.right)}return t.type===`Identity`?e:null}function U(e,n,r){if(n.type===`Comma`){let i=[];try{i.push(...W(e,n.left,r))}catch(e){if(e instanceof t)throw e;if(i.length>0)return i;throw Error(`evaluation failed`)}try{i.push(...W(e,n.right,r))}catch(e){if(e instanceof t)throw e;return i}return i}return W(e,n,r)}function W(e,t,r){let o=r&&`vars`in r?r:ne(r);switch(o.defenseContextChecked||(i(o.requireDefenseContext,`query-engine`,`evaluation`),o={...o,defenseContextChecked:!0}),o.root===void 0&&(o={...o,root:e,currentPath:[]}),o.coverage?.hit(`jq:node:${t.type}`),t.type){case`Identity`:return[e];case`Field`:return(t.base?W(e,t.base,o):[e]).flatMap(e=>{let n=u(e);if(n){if(!Object.hasOwn(n,t.name))return[null];let e=n[t.name];return[e===void 0?null:e]}if(e===null)return[null];throw Error(`Cannot index ${Array.isArray(e)?`array`:typeof e} with string "${t.name}"`)});case`Index`:return(t.base?W(e,t.base,o):[e]).flatMap(e=>W(e,t.index,o).flatMap(t=>{if(typeof t==`number`&&Array.isArray(e)){if(Number.isNaN(t))return[null];let n=Math.trunc(t),r=n<0?e.length+n:n;return r>=0&&r<e.length?[e[r]]:[null]}if(typeof t==`string`){let n=u(e);return!n||!Object.hasOwn(n,t)?[null]:[n[t]]}return[null]}));case`Slice`:return(t.base?W(e,t.base,o):[e]).flatMap(n=>{if(n===null)return[null];if(!Array.isArray(n)&&typeof n!=`string`)throw Error(`Cannot slice ${typeof n} (${JSON.stringify(n)})`);let r=n.length,i=t.start?W(e,t.start,o):[0],a=t.end?W(e,t.end,o):[r];return i.flatMap(e=>a.map(t=>{let i=e,a=t,o=Number.isNaN(i)?0:Number.isInteger(i)?i:Math.floor(i),s=Number.isNaN(a)?r:Number.isInteger(a)?a:Math.ceil(a),c=G(o,r),l=G(s,r);return n.slice(c,l)}))});case`Iterate`:return(t.base?W(e,t.base,o):[e]).flatMap(e=>Array.isArray(e)?e:e&&typeof e==`object`?Object.values(e):[]);case`Pipe`:{let n=W(e,t.left,o),r=V(t.left),i=[];for(let e of n)try{if(r!==null){let n={...o,currentPath:[...o.currentPath??[],...r]};i.push(...W(e,t.right,n))}else i.push(...W(e,t.right,o))}catch(e){throw e instanceof P?e.withPrependedResults(i):e}return i}case`Comma`:{let n=W(e,t.left,o),r=W(e,t.right,o);return[...n,...r]}case`Literal`:return[t.value];case`Array`:return t.elements?[W(e,t.elements,o)]:[[]];case`Object`:{let n=[Object.create(null)];for(let r of t.entries){let t=typeof r.key==`string`?[r.key]:W(e,r.key,o),i=W(e,r.value,o),s=[];for(let e of n)for(let n of t){if(typeof n!=`string`)throw Error(`Cannot use ${n===null?`null`:Array.isArray(n)?`array`:typeof n} (${JSON.stringify(n)}) as object key`);if(!l(n)){for(let t of i)s.push(c(e));continue}for(let t of i){let r=c(e);a(r,n,t),s.push(r)}}n.length=0,n.push(...s)}return n}case`Paren`:return W(e,t.expr,o);case`BinaryOp`:return J(e,t.op,t.left,t.right,o);case`UnaryOp`:return W(e,t.operand,o).map(e=>{if(t.op===`-`){if(typeof e==`number`)return-e;if(typeof e==`string`)throw Error(`string (${(e=>e.length>5?`"${e.slice(0,3)}...`:JSON.stringify(e))(e)}) cannot be negated`);return null}return t.op===`not`?!h(e):null});case`Cond`:return W(e,t.cond,o).flatMap(n=>{if(h(n))return W(e,t.then,o);for(let n of t.elifs)if(W(e,n.cond,o).some(h))return W(e,n.then,o);return t.else?W(e,t.else,o):[e]});case`Try`:try{return W(e,t.body,o)}catch(e){return t.catch?W(e instanceof F?e.value:e instanceof Error?e.message:String(e),t.catch,o):[]}case`Call`:return Y(e,t.name,t.args,o);case`VarBind`:return W(e,t.value,o).flatMap(n=>{let r=null,i=[];t.pattern?i.push(t.pattern):t.name&&i.push({type:`var`,name:t.name}),t.alternatives&&i.push(...t.alternatives);for(let e of i)if(r=z(o,e,n),r!==null)break;return r===null?[]:W(e,t.body,r)});case`VarRef`:{if(t.name===`$ENV`)return[o.env?n(o.env):Object.create(null)];let e=o.vars.get(t.name);return e===void 0?[null]:[e]}case`Recurse`:{let t=[],n=new WeakSet,r=e=>{if(e&&typeof e==`object`){if(n.has(e))return;n.add(e)}if(t.push(e),Array.isArray(e))for(let t of e)r(t);else if(e&&typeof e==`object`)for(let t of Object.keys(e))r(e[t])};return r(e),t}case`Optional`:try{return W(e,t.expr,o)}catch{return[]}case`StringInterp`:return[t.parts.map(t=>typeof t==`string`?t:W(e,t,o).map(e=>typeof e==`string`?e:JSON.stringify(e)).join(``)).join(``)];case`UpdateOp`:return[K(e,t.path,t.op,t.value,o)];case`Reduce`:{let n=W(e,t.expr,o),r=W(e,t.init,o)[0],i=o.limits.maxDepth??L;for(let e of n){let n;if(t.pattern){if(n=z(o,t.pattern,e),n===null)continue}else n=R(o,t.varName,e);if(r=W(r,t.update,n)[0],y(r,i+1)>i)return[null]}return[r]}case`Foreach`:{let n=W(e,t.expr,o),r=W(e,t.init,o)[0],i=[];for(let e of n)try{let n;if(t.pattern){if(n=z(o,t.pattern,e),n===null)continue}else n=R(o,t.varName,e);if(r=W(r,t.update,n)[0],t.extract){let e=W(r,t.extract,n);i.push(...e)}else i.push(r)}catch(e){throw e instanceof P?e.withPrependedResults(i):e}return i}case`Label`:try{return W(e,t.body,{...o,labels:new Set([...o.labels??[],t.name])})}catch(e){if(e instanceof P&&e.label===t.name)return e.partialResults;throw e}case`Break`:throw new P(t.name);case`Def`:{let n=new Map(o.funcs??[]),r=`${t.name}/${t.params.length}`;n.set(r,{params:t.params,body:t.funcBody,closure:new Map(o.funcs??[])});let i={...o,funcs:n};return W(e,t.body,i)}default:throw Error(`Unknown AST node type: ${t.type}`)}}function G(e,t){return e<0?Math.max(0,t+e):Math.min(e,t)}function K(e,t,n,r,i){function o(e,t){switch(n){case`=`:return t;case`|=`:return W(e,r,i)[0]??null;case`+=`:return typeof e==`number`&&typeof t==`number`||typeof e==`string`&&typeof t==`string`?e+t:Array.isArray(e)&&Array.isArray(t)?[...e,...t]:e&&t&&typeof e==`object`&&typeof t==`object`?s(e,t):t;case`-=`:return typeof e==`number`&&typeof t==`number`?e-t:e;case`*=`:return typeof e==`number`&&typeof t==`number`?e*t:e;case`/=`:return typeof e==`number`&&typeof t==`number`?e/t:e;case`%=`:return typeof e==`number`&&typeof t==`number`?e%t:e;case`//=`:return e===null||e===!1?t:e;default:return t}}function u(t,n,r){switch(n.type){case`Identity`:return r(t);case`Field`:if(!l(n.name))return t;if(n.base)return u(t,n.base,e=>{if(e&&typeof e==`object`&&!Array.isArray(e)){let t=c(e),i=Object.hasOwn(t,n.name)?t[n.name]:void 0;return a(t,n.name,r(i)),t}return e});if(t&&typeof t==`object`&&!Array.isArray(t)){let e=c(t),i=Object.hasOwn(e,n.name)?e[n.name]:void 0;return a(e,n.name,r(i)),e}return t;case`Index`:{let o=W(e,n.index,i)[0];if(typeof o==`number`&&Number.isNaN(o))throw Error(`Cannot set array element at NaN index`);if(typeof o==`number`&&!Number.isInteger(o)&&(o=Math.trunc(o)),n.base)return u(t,n.base,e=>{if(typeof o==`number`&&Array.isArray(e)){let t=[...e],n=o<0?t.length+o:o;if(n>=0){for(;t.length<=n;)t.push(null);t[n]=r(t[n])}return t}if(typeof o==`string`&&e&&typeof e==`object`&&!Array.isArray(e)){if(!l(o))return e;let t=c(e),n=Object.hasOwn(t,o)?t[o]:void 0;return a(t,o,r(n)),t}return e});if(typeof o==`number`){if(o>536870911)throw Error(`Array index too large`);if(o<0&&(!t||!Array.isArray(t)))throw Error(`Out of bounds negative array index`);if(Array.isArray(t)){let e=[...t],n=o<0?e.length+o:o;if(n>=0){for(;e.length<=n;)e.push(null);e[n]=r(e[n])}return e}if(t==null){let e=[];for(;e.length<=o;)e.push(null);return e[o]=r(null),e}return t}if(typeof o==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(o))return t;let e=c(t),n=Object.hasOwn(e,o)?e[o]:void 0;return a(e,o,r(n)),e}return t}case`Iterate`:{let e=e=>{if(Array.isArray(e))return e.map(e=>r(e));if(e&&typeof e==`object`){let t=Object.create(null);for(let[n,i]of Object.entries(e))l(n)&&a(t,n,r(i));return t}return e};return n.base?u(t,n.base,e):e(t)}case`Pipe`:return u(u(t,n.left,e=>e),n.right,r);default:return r(t)}}return u(e,t,t=>n===`|=`?o(t,t):o(t,W(e,r,i)[0]??null))}function q(e,t,n){function r(t,i,o){switch(i.type){case`Identity`:return o;case`Field`:if(!l(i.name))return t;if(i.base){let e=W(t,i.base,n)[0],a=r(e,{type:`Field`,name:i.name},o);return r(t,i.base,a)}if(t&&typeof t==`object`&&!Array.isArray(t)){let e=c(t);return a(e,i.name,o),e}return t;case`Index`:{if(i.base){let e=W(t,i.base,n)[0],a=r(e,{type:`Index`,index:i.index},o);return r(t,i.base,a)}let s=W(e,i.index,n)[0];if(typeof s==`number`&&Array.isArray(t)){let e=[...t],n=s<0?e.length+s:s;return n>=0&&n<e.length&&(e[n]=o),e}if(typeof s==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(s))return t;let e=c(t);return a(e,s,o),e}return t}default:return t}}function i(t,o){switch(o.type){case`Identity`:return null;case`Field`:if(!l(o.name))return t;if(o.base){let e=W(t,o.base,n)[0];if(e==null)return t;let a=i(e,{type:`Field`,name:o.name});return r(t,o.base,a)}if(t&&typeof t==`object`&&!Array.isArray(t)){if(!l(o.name))return t;let e=c(t);return delete e[o.name],e}return t;case`Index`:{if(o.base){let e=W(t,o.base,n)[0];if(e==null)return t;let a=i(e,{type:`Index`,index:o.index});return r(t,o.base,a)}let a=W(e,o.index,n)[0];if(typeof a==`number`&&Array.isArray(t)){let e=[...t],n=a<0?e.length+a:a;return n>=0&&n<e.length&&e.splice(n,1),e}if(typeof a==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(a))return t;let e=c(t);return delete e[a],e}return t}case`Iterate`:return Array.isArray(t)?[]:t&&typeof t==`object`?Object.create(null):t;case`Pipe`:{let r=function(t,i,o){switch(i.type){case`Identity`:return o;case`Field`:if(!l(i.name))return t;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=c(t);return a(e,i.name,o),e}return t;case`Index`:{let r=W(e,i.index,n)[0];if(typeof r==`number`&&Array.isArray(t)){let e=[...t],n=r<0?e.length+r:r;return n>=0&&n<e.length&&(e[n]=o),e}if(typeof r==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(r))return t;let e=c(t);return a(e,r,o),e}return t}case`Pipe`:{let e=W(t,i.left,n)[0],a=r(e,i.right,o);return r(t,i.left,a)}default:return t}},s=o.left,u=o.right,d=W(t,s,n)[0];return d==null?t:r(t,s,i(d,u))}default:return t}}return i(e,t)}function J(e,t,n,r,i){if(t===`and`)return W(e,n,i).flatMap(t=>h(t)?W(e,r,i).map(e=>h(e)):[!1]);if(t===`or`)return W(e,n,i).flatMap(t=>h(t)?[!0]:W(e,r,i).map(e=>h(e)));if(t===`//`){let t=W(e,n,i).filter(e=>e!=null&&e!==!1);return t.length>0?t:W(e,r,i)}let a=W(e,n,i),o=W(e,r,i);return a.flatMap(e=>o.map(n=>{switch(t){case`+`:return e===null?n:n===null?e:typeof e==`number`&&typeof n==`number`||typeof e==`string`&&typeof n==`string`?e+n:Array.isArray(e)&&Array.isArray(n)?[...e,...n]:e&&n&&typeof e==`object`&&typeof n==`object`&&!Array.isArray(e)&&!Array.isArray(n)?s(e,n):null;case`-`:if(typeof e==`number`&&typeof n==`number`)return e-n;if(Array.isArray(e)&&Array.isArray(n)){let t=new Set(n.map(e=>JSON.stringify(e)));return e.filter(e=>!t.has(JSON.stringify(e)))}if(typeof e==`string`&&typeof n==`string`){let t=e=>e.length>10?`"${e.slice(0,10)}...`:JSON.stringify(e);throw Error(`string (${t(e)}) and string (${t(n)}) cannot be subtracted`)}return null;case`*`:if(typeof e==`number`&&typeof n==`number`)return e*n;if(typeof e==`string`&&typeof n==`number`)return e.repeat(n);{let t=u(e),r=u(n);if(t&&r)return v(t,r)}return null;case`/`:if(typeof e==`number`&&typeof n==`number`){if(n===0)throw Error(`number (${e}) and number (${n}) cannot be divided because the divisor is zero`);return e/n}return typeof e==`string`&&typeof n==`string`?e.split(n):null;case`%`:if(typeof e==`number`&&typeof n==`number`){if(n===0)throw Error(`number (${e}) and number (${n}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(e)&&!Number.isNaN(e)?!Number.isFinite(n)&&!Number.isNaN(n)&&e<0&&n>0?-1:0:e%n}return null;case`==`:return g(e,n);case`!=`:return!g(e,n);case`<`:return _(e,n)<0;case`<=`:return _(e,n)<=0;case`>`:return _(e,n)>0;case`>=`:return _(e,n)>=0;default:return null}}))}function Y(e,r,i,a){let o=te.get(r);if(o)return typeof e==`number`?[o(e)]:[null];let s=T(e,r,i,a,W);if(s!==null)return s;let c=A(e,r,i,a,W);if(c!==null)return c;let l=m(e,r,i,a,W);if(l!==null)return l;let u=C(e,r,a.limits.maxDepth);if(u!==null)return u;let d=j(e,r);if(d!==null)return d;let _=O(e,r,i,a,W);if(_!==null)return _;let v=f(e,r,i,a,W,U,b,h,x,t);if(v!==null)return v;let y=ee(e,r,i,a,W,h,M,N,q,X);if(y!==null)return y;let S=w(e,r,i,a,W,g);if(S!==null)return S;let D=p(e,r,i,a,W,U,h,t);if(D!==null)return D;let P=E(e,r,i,a,W,h,B,Y);if(P!==null)return P;let I=k(e,r,i,a,W,g);if(I!==null)return I;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`.split(`.`)];case`error`:throw new F(i.length>0?W(e,i[0],a)[0]:e);case`env`:return[a.env?n(a.env):Object.create(null)];case`debug`:return[e];case`input_line_number`:return[1];default:{let t=`${r}/${i.length}`,n=a.funcs?.get(t);if(n){let r=n.closure??a.funcs??new Map,o=new Map(r);o.set(t,n);for(let t=0;t<n.params.length;t++){let r=n.params[t],s=i[t];if(s){let t=W(e,s,a),n;if(t.length===0)n={type:`Call`,name:`empty`,args:[]};else if(t.length===1)n={type:`Literal`,value:t[0]};else{n={type:`Literal`,value:t[t.length-1]};for(let e=t.length-2;e>=0;e--)n={type:`Comma`,left:{type:`Literal`,value:t[e]},right:n}}o.set(`${r}/0`,{params:[],body:n})}}let s={...a,funcs:o};return W(e,n.body,s)}throw Error(`Unknown function: ${r}`)}}}function X(e,t,n,r,i){if(t.type===`Comma`){let a=t;X(e,a.left,n,r,i),X(e,a.right,n,r,i);return}let a=V(t);if(a!==null){i.push([...r,...a]);return}if(t.type===`Iterate`){if(Array.isArray(e))for(let t=0;t<e.length;t++)i.push([...r,t]);else if(e&&typeof e==`object`)for(let t of Object.keys(e))i.push([...r,t]);return}if(t.type===`Recurse`){let t=(e,n)=>{if(i.push([...r,...n]),e&&typeof e==`object`)if(Array.isArray(e))for(let r=0;r<e.length;r++)t(e[r],[...n,r]);else for(let r of Object.keys(e))t(e[r],[...n,r])};t(e,[]);return}if(t.type===`Pipe`){let a=V(t.left);if(a!==null){let o=W(e,t.left,n);for(let e of o)X(e,t.right,n,[...r,...a],i);return}}W(e,t,n).length>0&&i.push(r)}var Z=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`]]),Q=new Set(Z.values());function $(e){let t=[],n=0,r=(t=0)=>e[n+t],i=()=>e[n++],a=()=>n>=e.length,o=e=>e>=`0`&&e<=`9`,s=e=>e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`_`,c=e=>s(e)||o(e);for(;!a();){let l=n,u=i();if(!(u===` `||u===` `||u===`
|
|
3
3
|
`||u===`\r`)){if(u===`#`){for(;!a()&&r()!==`
|
|
4
4
|
`;)i();continue}if(u===`.`&&r()===`.`){i(),t.push({type:`DOTDOT`,pos:l});continue}if(u===`=`&&r()===`=`){i(),t.push({type:`EQ`,pos:l});continue}if(u===`!`&&r()===`=`){i(),t.push({type:`NE`,pos:l});continue}if(u===`<`&&r()===`=`){i(),t.push({type:`LE`,pos:l});continue}if(u===`>`&&r()===`=`){i(),t.push({type:`GE`,pos:l});continue}if(u===`/`&&r()===`/`){i(),r()===`=`?(i(),t.push({type:`UPDATE_ALT`,pos:l})):t.push({type:`ALT`,pos:l});continue}if(u===`+`&&r()===`=`){i(),t.push({type:`UPDATE_ADD`,pos:l});continue}if(u===`-`&&r()===`=`){i(),t.push({type:`UPDATE_SUB`,pos:l});continue}if(u===`*`&&r()===`=`){i(),t.push({type:`UPDATE_MUL`,pos:l});continue}if(u===`/`&&r()===`=`){i(),t.push({type:`UPDATE_DIV`,pos:l});continue}if(u===`%`&&r()===`=`){i(),t.push({type:`UPDATE_MOD`,pos:l});continue}if(u===`=`&&r()!==`=`){t.push({type:`ASSIGN`,pos:l});continue}if(u===`.`){t.push({type:`DOT`,pos:l});continue}if(u===`|`){r()===`=`?(i(),t.push({type:`UPDATE_PIPE`,pos:l})):t.push({type:`PIPE`,pos:l});continue}if(u===`,`){t.push({type:`COMMA`,pos:l});continue}if(u===`:`){t.push({type:`COLON`,pos:l});continue}if(u===`;`){t.push({type:`SEMICOLON`,pos:l});continue}if(u===`(`){t.push({type:`LPAREN`,pos:l});continue}if(u===`)`){t.push({type:`RPAREN`,pos:l});continue}if(u===`[`){t.push({type:`LBRACKET`,pos:l});continue}if(u===`]`){t.push({type:`RBRACKET`,pos:l});continue}if(u===`{`){t.push({type:`LBRACE`,pos:l});continue}if(u===`}`){t.push({type:`RBRACE`,pos:l});continue}if(u===`?`){t.push({type:`QUESTION`,pos:l});continue}if(u===`+`){t.push({type:`PLUS`,pos:l});continue}if(u===`-`){t.push({type:`MINUS`,pos:l});continue}if(u===`*`){t.push({type:`STAR`,pos:l});continue}if(u===`/`){t.push({type:`SLASH`,pos:l});continue}if(u===`%`){t.push({type:`PERCENT`,pos:l});continue}if(u===`<`){t.push({type:`LT`,pos:l});continue}if(u===`>`){t.push({type:`GT`,pos:l});continue}if(o(u)){let s=u;for(;!a()&&(o(r())||r()===`.`||r()===`e`||r()===`E`);)(r()===`e`||r()===`E`)&&(e[n+1]===`+`||e[n+1]===`-`)&&(s+=i()),s+=i();t.push({type:`NUMBER`,value:Number(s),pos:l});continue}if(u===`"`){let e=``;for(;!a()&&r()!==`"`;)if(r()===`\\`){if(i(),a())break;let t=i();switch(t){case`n`:e+=`
|
|
5
5
|
`;break;case`r`:e+=`\r`;break;case`t`:e+=` `;break;case`\\`:e+=`\\`;break;case`"`:e+=`"`;break;case`(`:e+=`\\(`;break;default:e+=t}}else e+=i();a()||i(),t.push({type:`STRING`,value:e,pos:l});continue}if(s(u)||u===`$`||u===`@`){let e=u;for(;!a()&&c(r());)e+=i();let n=Z.get(e);n?t.push({type:n,value:e,pos:l}):t.push({type:`IDENT`,value:e,pos:l});continue}throw Error(`Unexpected character '${u}' at position ${l}`)}}return t.push({type:`EOF`,pos:n}),t}var re=class e{tokens;pos=0;constructor(e){this.tokens=e}peek(e=0){return this.tokens[this.pos+e]??{type:`EOF`,pos:-1}}advance(){return this.tokens[this.pos++]}check(e){return this.peek().type===e}match(...e){for(let t of e)if(this.check(t))return this.advance();return null}expect(e,t){if(!this.check(e))throw Error(`${t} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}isFieldNameAfterDot(e=0){let t=this.peek(e),n=this.peek(e+1);return n.type===`STRING`?!0:n.type===`IDENT`||Q.has(n.type)?n.pos===t.pos+1:!1}isIdentLike(){let e=this.peek().type;return e===`IDENT`||Q.has(e)}consumeFieldNameAfterDot(e){let t=this.peek();return t.type===`STRING`||(t.type===`IDENT`||Q.has(t.type))&&t.pos===e.pos+1?this.advance().value:null}parse(){let e=this.parseExpr();if(!this.check(`EOF`))throw Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return e}parseExpr(){return this.parsePipe()}parsePattern(){if(this.match(`LBRACKET`)){let e=[];if(!this.check(`RBRACKET`))for(e.push(this.parsePattern());this.match(`COMMA`)&&!this.check(`RBRACKET`);)e.push(this.parsePattern());return this.expect(`RBRACKET`,`Expected ']' after array pattern`),{type:`array`,elements:e}}if(this.match(`LBRACE`)){let e=[];if(!this.check(`RBRACE`))for(e.push(this.parsePatternField());this.match(`COMMA`)&&!this.check(`RBRACE`);)e.push(this.parsePatternField());return this.expect(`RBRACE`,`Expected '}' after object pattern`),{type:`object`,fields:e}}let e=this.expect(`IDENT`,`Expected variable name in pattern`),t=e.value;if(!t.startsWith(`$`))throw Error(`Variable name must start with $ at position ${e.pos}`);return{type:`var`,name:t}}parsePatternField(){if(this.match(`LPAREN`)){let e=this.parseExpr();return this.expect(`RPAREN`,`Expected ')' after computed key`),this.expect(`COLON`,`Expected ':' after computed key`),{key:e,pattern:this.parsePattern()}}let e=this.peek();if(e.type===`IDENT`||Q.has(e.type)){let t=e.value;if(t.startsWith(`$`)){if(this.advance(),this.match(`COLON`)){let e=this.parsePattern();return{key:t.slice(1),pattern:e,keyVar:t}}return{key:t.slice(1),pattern:{type:`var`,name:t}}}return this.advance(),this.match(`COLON`)?{key:t,pattern:this.parsePattern()}:{key:t,pattern:{type:`var`,name:`$${t}`}}}throw Error(`Expected field name in object pattern at position ${e.pos}`)}parsePipe(){let e=this.parseComma();for(;this.match(`PIPE`);){let t=this.parseComma();e={type:`Pipe`,left:e,right:t}}return e}parseComma(){let e=this.parseVarBind();for(;this.match(`COMMA`);){let t=this.parseVarBind();e={type:`Comma`,left:e,right:t}}return e}parseVarBind(){let e=this.parseUpdate();if(this.match(`AS`)){let t=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 r=this.parseExpr();return t.type===`var`&&n.length===0?{type:`VarBind`,name:t.name,value:e,body:r}:{type:`VarBind`,name:t.type===`var`?t.name:``,value:e,body:r,pattern:t.type===`var`?void 0:t,alternatives:n.length>0?n:void 0}}return e}peekAhead(e){let t=this.pos+e;return t<this.tokens.length?this.tokens[t]:void 0}parseUpdate(){let e=this.parseAlt(),t=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 r=this.parseVarBind(),i=t.get(n.type);if(i)return{type:`UpdateOp`,op:i,path:e,value:r}}return e}parseAlt(){let e=this.parseOr();for(;this.match(`ALT`);){let t=this.parseOr();e={type:`BinaryOp`,op:`//`,left:e,right:t}}return e}parseOr(){let e=this.parseAnd();for(;this.match(`OR`);){let t=this.parseAnd();e={type:`BinaryOp`,op:`or`,left:e,right:t}}return e}parseAnd(){let e=this.parseNot();for(;this.match(`AND`);){let t=this.parseNot();e={type:`BinaryOp`,op:`and`,left:e,right:t}}return e}parseNot(){return this.parseComparison()}parseComparison(){let e=this.parseAddSub(),t=new Map([[`EQ`,`==`],[`NE`,`!=`],[`LT`,`<`],[`LE`,`<=`],[`GT`,`>`],[`GE`,`>=`]]),n=this.match(`EQ`,`NE`,`LT`,`LE`,`GT`,`GE`);if(n){let r=t.get(n.type);if(r){let t=this.parseAddSub();e={type:`BinaryOp`,op:r,left:e,right:t}}}return e}parseAddSub(){let e=this.parseMulDiv();for(;;)if(this.match(`PLUS`)){let t=this.parseMulDiv();e={type:`BinaryOp`,op:`+`,left:e,right:t}}else if(this.match(`MINUS`)){let t=this.parseMulDiv();e={type:`BinaryOp`,op:`-`,left:e,right:t}}else break;return e}parseMulDiv(){let e=this.parseUnary();for(;;)if(this.match(`STAR`)){let t=this.parseUnary();e={type:`BinaryOp`,op:`*`,left:e,right:t}}else if(this.match(`SLASH`)){let t=this.parseUnary();e={type:`BinaryOp`,op:`/`,left:e,right:t}}else if(this.match(`PERCENT`)){let t=this.parseUnary();e={type:`BinaryOp`,op:`%`,left:e,right:t}}else break;return e}parseUnary(){return this.match(`MINUS`)?{type:`UnaryOp`,op:`-`,operand:this.parseUnary()}:this.parsePostfix()}parsePostfix(){let e=this.parsePrimary();for(;;)if(this.match(`QUESTION`))e={type:`Optional`,expr:e};else if(this.check(`DOT`)&&this.isFieldNameAfterDot())this.advance(),e={type:`Field`,name:this.advance().value,base:e};else if(this.check(`LBRACKET`))if(this.advance(),this.match(`RBRACKET`))e={type:`Iterate`,base:e};else if(this.check(`COLON`)){this.advance();let t=this.check(`RBRACKET`)?void 0:this.parseExpr();this.expect(`RBRACKET`,`Expected ']'`),e={type:`Slice`,end:t,base:e}}else{let t=this.parseExpr();if(this.match(`COLON`)){let n=this.check(`RBRACKET`)?void 0:this.parseExpr();this.expect(`RBRACKET`,`Expected ']'`),e={type:`Slice`,start:t,end:n,base:e}}else this.expect(`RBRACKET`,`Expected ']'`),e={type:`Index`,index:t,base:e}}else break;return e}parsePrimary(){if(this.match(`DOTDOT`))return{type:`Recurse`};if(this.check(`DOT`)){let e=this.advance();if(this.check(`LBRACKET`)){if(this.advance(),this.match(`RBRACKET`))return{type:`Iterate`};if(this.check(`COLON`)){this.advance();let e=this.check(`RBRACKET`)?void 0:this.parseExpr();return this.expect(`RBRACKET`,`Expected ']'`),{type:`Slice`,end:e}}let e=this.parseExpr();if(this.match(`COLON`)){let t=this.check(`RBRACKET`)?void 0:this.parseExpr();return this.expect(`RBRACKET`,`Expected ']'`),{type:`Slice`,start:e,end:t}}return this.expect(`RBRACKET`,`Expected ']'`),{type:`Index`,index:e}}let t=this.consumeFieldNameAfterDot(e);return t===null?{type:`Identity`}:{type:`Field`,name:t}}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 e=this.parseExpr();return this.expect(`RBRACKET`,`Expected ']'`),{type:`Array`,elements:e}}if(this.match(`LBRACE`))return this.parseObjectConstruction();if(this.match(`LPAREN`)){let e=this.parseExpr();return this.expect(`RPAREN`,`Expected ')'`),{type:`Paren`,expr:e}}if(this.match(`IF`))return this.parseIf();if(this.match(`TRY`)){let e=this.parsePostfix(),t;return this.match(`CATCH`)&&(t=this.parsePostfix()),{type:`Try`,body:e,catch:t}}if(this.match(`REDUCE`)){let e=this.parseAddSub();this.expect(`AS`,`Expected 'as' after reduce expression`);let t=this.parsePattern();this.expect(`LPAREN`,`Expected '(' after variable`);let n=this.parseExpr();this.expect(`SEMICOLON`,`Expected ';' after init expression`);let r=this.parseExpr();return this.expect(`RPAREN`,`Expected ')' after update expression`),{type:`Reduce`,expr:e,varName:t.type===`var`?t.name:``,init:n,update:r,pattern:t.type===`var`?void 0:t}}if(this.match(`FOREACH`)){let e=this.parseAddSub();this.expect(`AS`,`Expected 'as' after foreach expression`);let t=this.parsePattern();this.expect(`LPAREN`,`Expected '(' after variable`);let n=this.parseExpr();this.expect(`SEMICOLON`,`Expected ';' after init expression`);let r=this.parseExpr(),i;return this.match(`SEMICOLON`)&&(i=this.parseExpr()),this.expect(`RPAREN`,`Expected ')' after expressions`),{type:`Foreach`,expr:e,varName:t.type===`var`?t.name:``,init:n,update:r,extract:i,pattern:t.type===`var`?void 0:t}}if(this.match(`LABEL`)){let e=this.expect(`IDENT`,`Expected label name (e.g., $out)`),t=e.value;if(!t.startsWith(`$`))throw Error(`Label name must start with $ at position ${e.pos}`);return this.expect(`PIPE`,`Expected '|' after label name`),{type:`Label`,name:t,body:this.parseExpr()}}if(this.match(`BREAK`)){let e=this.expect(`IDENT`,`Expected label name to break to`),t=e.value;if(!t.startsWith(`$`))throw Error(`Break label must start with $ at position ${e.pos}`);return{type:`Break`,name:t}}if(this.match(`DEF`)){let e=this.expect(`IDENT`,`Expected function name after def`).value,t=[];if(this.match(`LPAREN`)){if(!this.check(`RPAREN`)){let e=this.expect(`IDENT`,`Expected parameter name`);for(t.push(e.value);this.match(`SEMICOLON`);){let e=this.expect(`IDENT`,`Expected parameter name`);t.push(e.value)}}this.expect(`RPAREN`,`Expected ')' after parameters`)}this.expect(`COLON`,`Expected ':' after function name`);let n=this.parseExpr();return this.expect(`SEMICOLON`,`Expected ';' after function body`),{type:`Def`,name:e,params:t,funcBody:n,body:this.parseExpr()}}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 t=[];if(!this.check(`RPAREN`))for(t.push(this.parseExpr());this.match(`SEMICOLON`);)t.push(this.parseExpr());return this.expect(`RPAREN`,`Expected ')'`),{type:`Call`,name:e,args:t}}return{type:`Call`,name:e,args:[]}}throw Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){let e=[];if(!this.check(`RBRACE`))do{let t,n;if(this.match(`LPAREN`))t=this.parseExpr(),this.expect(`RPAREN`,`Expected ')'`),this.expect(`COLON`,`Expected ':'`),n=this.parseObjectValue();else if(this.isIdentLike()){let e=this.advance().value;this.match(`COLON`)?(t=e,n=this.parseObjectValue()):(t=e,n={type:`Field`,name:e})}else if(this.check(`STRING`))t=this.advance().value,this.expect(`COLON`,`Expected ':'`),n=this.parseObjectValue();else throw Error(`Expected object key at position ${this.peek().pos}`);e.push({key:t,value:n})}while(this.match(`COMMA`));return this.expect(`RBRACE`,`Expected '}'`),{type:`Object`,entries:e}}parseObjectValue(){let e=this.parseVarBind();for(;this.match(`PIPE`);){let t=this.parseVarBind();e={type:`Pipe`,left:e,right:t}}return e}parseIf(){let e=this.parseExpr();this.expect(`THEN`,`Expected 'then'`);let t=this.parseExpr(),n=[];for(;this.match(`ELIF`);){let e=this.parseExpr();this.expect(`THEN`,`Expected 'then' after elif`);let t=this.parseExpr();n.push({cond:e,then:t})}let r;return this.match(`ELSE`)&&(r=this.parseExpr()),this.expect(`END`,`Expected 'end'`),{type:`Cond`,cond:e,then:t,elifs:n,else:r}}parseStringInterpolation(t){let n=[],r=``,i=0;for(;i<t.length;)if(t[i]===`\\`&&t[i+1]===`(`){r&&=(n.push(r),``),i+=2;let a=1,o=``;for(;i<t.length&&a>0;)t[i]===`(`?a++:t[i]===`)`&&a--,a>0&&(o+=t[i]),i++;let s=new e($(o));n.push(s.parse())}else r+=t[i],i++;return r&&n.push(r),{type:`StringInterp`,parts:n}}};function ie(e){return new re($(e)).parse()}export{W as n,ie as t};
|
|
6
|
-
//# sourceMappingURL=chunk-BBXLRYSX-
|
|
6
|
+
//# sourceMappingURL=chunk-BBXLRYSX-OVlWa2B-.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{s as e,t}from"./chunk-C94x7I9S.mjs";import{t as n}from"./chunk-YNYSPYQ5-gU4-j5DO.mjs";import{t as r}from"./chunk-5QMZ5MUS-BwpNU33k.mjs";import{n as i,r as a,t as o}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as s}from"./chunk-X2AJGDEF-ClcErtij.mjs";var c=t(((e,t)=>{var n=[0,1,3,7,15,31,63,127,255],r=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};r.prototype._ensureByte=function(){this.hasByte||=(this.curByte=this.stream.readByte(),!0)},r.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=n[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var i=r-e;t|=(this.curByte&n[e]<<i)>>i,this.bitOffset+=e,e=0}}return t},r.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},r.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t<e.length;t++)e[t]=this.read(8);return e.toString(`hex`)},t.exports=r})),l=t(((e,t)=>{var n=function(){};n.prototype.readByte=function(){throw Error(`abstract method readByte() not implemented`)},n.prototype.read=function(e,t,n){for(var r=0;r<n;){var i=this.readByte();if(i<0)return r===0?-1:r;e[t++]=i,r++}return r},n.prototype.seek=function(e){throw Error(`abstract method seek() not implemented`)},n.prototype.writeByte=function(e){throw Error(`abstract method readByte() not implemented`)},n.prototype.write=function(e,t,n){var r;for(r=0;r<n;r++)this.writeByte(e[t++]);return n},n.prototype.flush=function(){},t.exports=n})),u=t(((e,t)=>{t.exports=(function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]);return function(){var t=4294967295;this.getCRC=function(){return~t>>>0},this.updateCRC=function(n){t=t<<8^e[(t>>>24^n)&255]},this.updateCRCRun=function(n,r){for(;r-- >0;)t=t<<8^e[(t>>>24^n)&255]}}})()})),d=t(((e,t)=>{t.exports={name:`seek-bzip`,version:`2.0.0`,contributors:[`C. Scott Ananian (http://cscott.net)`,`Eli Skeggs`,`Kevin Kwok`,`Rob Landley (http://landley.net)`],description:`a pure-JavaScript Node.JS module for random-access decoding bzip2 data`,main:`./lib/index.js`,repository:{type:`git`,url:`https://github.com/cscott/seek-bzip.git`},license:`MIT`,bin:{"seek-bunzip":`./bin/seek-bunzip`,"seek-table":`./bin/seek-bzip-table`},directories:{test:`test`},dependencies:{commander:`^6.0.0`},devDependencies:{fibers:`^5.0.0`,mocha:`^8.1.0`},scripts:{test:`mocha`}}})),f=e(t(((e,t)=>{var n=c(),r=l(),i=u(),a=d(),o=20,s=258,f=0,p=1,m=2,h=6,g=50,_=`314159265359`,v=`177245385090`,y=function(e,t){var n=e[t],r;for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},b={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},x={};x[b.LAST_BLOCK]=`Bad file checksum`,x[b.NOT_BZIP_DATA]=`Not bzip data`,x[b.UNEXPECTED_INPUT_EOF]=`Unexpected input EOF`,x[b.UNEXPECTED_OUTPUT_EOF]=`Unexpected output EOF`,x[b.DATA_ERROR]=`Data error`,x[b.OUT_OF_MEMORY]=`Out of memory`,x[b.OBSOLETE_INPUT]=`Obsolete (pre 0.9.5) bzip format not supported.`;var S=function(e,t){var n=x[e]||`unknown error`;t&&(n+=`: `+t);var r=TypeError(n);throw r.errorCode=e,r},C=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};C.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new i,!0):(this.writeCount=-1,!1)},C.prototype._start_bunzip=function(e,t){var r=new Buffer(4);(e.read(r,0,4)!==4||String.fromCharCode(r[0],r[1],r[2])!==`BZh`)&&S(b.NOT_BZIP_DATA,`bad magic`);var i=r[3]-48;(i<1||i>9)&&S(b.NOT_BZIP_DATA,`level out of range`),this.reader=new n(e),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},C.prototype._get_next_block=function(){var e,t,n,r=this.reader,i=r.pi();if(i===v)return!1;i!==_&&S(b.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&S(b.OBSOLETE_INPUT);var a=r.read(24);a>this.dbufSize&&S(b.DATA_ERROR,`initial position out of bounds`);var c=r.read(16),l=new Buffer(256),u=0;for(e=0;e<16;e++)if(c&1<<15-e){var d=e*16;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(l[u++]=d+t)}var x=r.read(3);(x<m||x>h)&&S(b.DATA_ERROR);var C=r.read(15);C===0&&S(b.DATA_ERROR);var w=new Buffer(256);for(e=0;e<x;e++)w[e]=e;var T=new Buffer(C);for(e=0;e<C;e++){for(t=0;r.read(1);t++)t>=x&&S(b.DATA_ERROR);T[e]=y(w,t)}var E=u+2,D=[],O;for(t=0;t<x;t++){var k=new Buffer(E),A=new Uint16Array(o+1);for(c=r.read(5),e=0;e<E;e++){for(;(c<1||c>o)&&S(b.DATA_ERROR),r.read(1);)r.read(1)?c--:c++;k[e]=c}var j=M=k[0],M;for(e=1;e<E;e++)k[e]>M?M=k[e]:k[e]<j&&(j=k[e]);O={},D.push(O),O.permute=new Uint16Array(s),O.limit=new Uint32Array(o+2),O.base=new Uint32Array(o+1),O.minLen=j,O.maxLen=M;var N=0;for(e=j;e<=M;e++)for(A[e]=O.limit[e]=0,c=0;c<E;c++)k[c]===e&&(O.permute[N++]=c);for(e=0;e<E;e++)A[k[e]]++;for(N=c=0,e=j;e<M;e++)N+=A[e],O.limit[e]=N-1,N<<=1,c+=A[e],O.base[e+1]=N-c;O.limit[M+1]=Number.MAX_VALUE,O.limit[M]=N+A[M]-1,O.base[j]=0}var P=new Uint32Array(256);for(e=0;e<256;e++)w[e]=e;var F=0,I=0,L=0,R,z=this.dbuf=new Uint32Array(this.dbufSize);for(E=0;;){for(E--||(E=g-1,L>=C&&S(b.DATA_ERROR),O=D[T[L++]]),e=O.minLen,t=r.read(e);e>O.maxLen&&S(b.DATA_ERROR),!(t<=O.limit[e]);e++)t=t<<1|r.read(1);t-=O.base[e],(t<0||t>=s)&&S(b.DATA_ERROR);var B=O.permute[t];if(B===f||B===p){F||(F=1,c=0),B===f?c+=F:c+=2*F,F<<=1;continue}if(F)for(F=0,I+c>this.dbufSize&&S(b.DATA_ERROR),R=l[w[0]],P[R]+=c;c--;)z[I++]=R;if(B>u)break;I>=this.dbufSize&&S(b.DATA_ERROR),e=B-1,R=y(w,e),R=l[R],P[R]++,z[I++]=R}for((a<0||a>=I)&&S(b.DATA_ERROR),t=0,e=0;e<256;e++)n=t+P[e],P[e]=t,t=n;for(e=0;e<I;e++)R=z[e]&255,z[P[R]]|=e<<8,P[R]++;var V=0,ee=0,te=0;return I&&(V=z[a],ee=V&255,V>>=8,te=-1),this.writePos=V,this.writeCurrent=ee,this.writeCount=I,this.writeRun=te,!0},C.prototype._read_bunzip=function(e,t){var n,r,i;if(this.writeCount<0)return 0;var a=this.dbuf,o=this.writePos,s=this.writeCurrent,c=this.writeCount;this.outputsize;for(var l=this.writeRun;c;){for(c--,r=s,o=a[o],s=o&255,o>>=8,l++===3?(n=s,i=r,s=-1):(n=1,i=s),this.blockCRC.updateCRCRun(i,n);n--;)this.outputStream.writeByte(i),this.nextoutput++;s!=r&&(l=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&S(b.DATA_ERROR,`Bad block CRC (got `+this.blockCRC.getCRC().toString(16)+` expected `+this.targetBlockCRC.toString(16)+`)`),this.nextoutput};var w=function(e){if(`readByte`in e)return e;var t=new r;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(e){this.pos=e},t.eof=function(){return this.pos>=e.length},t},T=function(e){var t=new r,n=!0;if(e)if(typeof e==`number`)t.buffer=new Buffer(e),n=!1;else if(`writeByte`in e)return e;else t.buffer=e,n=!1;else t.buffer=new Buffer(16384);return t.pos=0,t.writeByte=function(e){if(n&&this.pos>=this.buffer.length){var t=new Buffer(this.buffer.length*2);this.buffer.copy(t),this.buffer=t}this.buffer[this.pos++]=e},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!n)throw TypeError(`outputsize does not match decoded input`);var e=new Buffer(this.pos);this.buffer.copy(e,0,0,this.pos),this.buffer=e}return this.buffer},t._coerced=!0,t};C.Err=b,C.decode=function(e,t,n){for(var r=w(e),i=T(t),a=new C(r,i);!(`eof`in r&&r.eof());)if(a._init_block())a._read_bunzip();else{var o=a.reader.read(32)>>>0;if(o!==a.streamCRC&&S(b.DATA_ERROR,`Bad stream CRC (got `+a.streamCRC.toString(16)+` expected `+o.toString(16)+`)`),n&&`eof`in r&&!r.eof())a._start_bunzip(r,i);else break}if(`getBuffer`in i)return i.getBuffer()},C.decodeBlock=function(e,t,n){var r=w(e),a=T(n),o=new C(r,a);if(o.reader.seek(t),o._get_next_block()&&(o.blockCRC=new i,o.writeCopies=0,o._read_bunzip()),`getBuffer`in a)return a.getBuffer()},C.table=function(e,t,n){var i=new r;i.delegate=w(e),i.pos=0,i.readByte=function(){return this.pos++,this.delegate.readByte()},i.delegate.eof&&(i.eof=i.delegate.eof.bind(i.delegate));var a=new r;a.pos=0,a.writeByte=function(){this.pos++};for(var o=new C(i,a),s=o.dbufSize;!(`eof`in i&&i.eof());){var c=i.pos*8+o.reader.bitOffset;if(o.reader.hasByte&&(c-=8),o._init_block()){var l=a.pos;o._read_bunzip(),t(c,a.pos-l)}else if(o.reader.read(32),n&&`eof`in i&&!i.eof())o._start_bunzip(i,a),console.assert(o.dbufSize===s,`shouldn't change block size within multistream file`);else break}},C.Stream=r,C.version=a.version,C.license=a.license,t.exports=C}))(),1),p=`file`,m=`link`,h=`symlink`,g=`directory`,_={file:`0`,link:`1`,symlink:`2`,"character-device":`3`,"block-device":`4`,directory:`5`,fifo:`6`,"pax-header":`x`,"pax-global-header":`g`,"gnu-long-name":`L`,"gnu-long-link-name":`K`},v={0:p,1:m,2:h,3:`character-device`,4:`block-device`,5:g,6:`fifo`,x:`pax-header`,g:`pax-global-header`,L:`gnu-long-name`,K:`gnu-long-link-name`},y=new Uint8Array(512),b=new Uint8Array,x=new TextEncoder,S=new TextDecoder;function C(e,t,n,r){r&&x.encodeInto(r,e.subarray(t,t+n))}function w(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,`0`);x.encodeInto(i,e.subarray(t,t+n-1))}function T(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return S.decode(e.subarray(t,i))}function E(e,t,n){let r=0,i=t+n;for(let n=t;n<i;n++){let t=e[n];if(t===0)break;t!==32&&(r=r*8+(t-48))}return r}function D(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw Error(`TAR number too large`);return r}return E(e,t,n)}var O=e=>e.type===g||e.type===h||e.type===m;async function k(e){if(e==null)return b;if(e instanceof Uint8Array)return e;if(typeof e==`string`)return x.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw TypeError(`Unsupported content type for entry body.`)}function A(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let a={...e};if(n&&n>0){let e=a.name.split(`/`).filter(Boolean);if(n>=e.length)return null;let t=e.slice(n).join(`/`);if(a.name=a.type===g&&!t.endsWith(`/`)?`${t}/`:t,a.linkname?.startsWith(`/`)){let e=a.linkname.split(`/`).filter(Boolean);a.linkname=n>=e.length?`/`:`/${e.slice(n).join(`/`)}`}}if(r?.(a)===!1)return null;let o=i?i(a):a;return o&&(!o.name||!o.name.trim()||o.name===`.`||o.name===`/`)?null:o}var j=32,M=48;function N(e){let t=E(e,148,8),n=0;for(let t=0;t<e.length;t++)t>=148&&t<156?n+=j:n+=e[t];return t===n}function P(e){e.fill(j,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+M,t>>=3;e[154]=0,e[155]=j}function F(e){let t={};e.name.length>100&&I(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=x.encode(n.map(([e,t])=>{let n=`${e}=${t}
|
|
2
|
-
`,r=x.encode(n).length+1,i=r+String(r).length;return i=r+String(i).length,`${i} ${n}`}).join(``));return{paxHeader:L({name:S.decode(x.encode(`PaxHeader/${e.name}`).slice(0,100)),size:r.length,type:`pax-header`,mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:r}}function I(e){if(e.length<=100)return null;let t=e.length-100-1,n=e.lastIndexOf(`/`,155);return n>0&&n>=t?{prefix:e.slice(0,n),name:e.slice(n+1)}:null}function L(e){let t=new Uint8Array(512),n=O(e)?0:e.size??0,r=e.name,i=``;if(!e.pax?.path){let e=I(r);e&&(r=e.name,i=e.prefix)}return C(t,0,100,r),w(t,100,8,e.mode??(e.type===g?493:420)),w(t,108,8,e.uid??0),w(t,116,8,e.gid??0),w(t,124,12,n),w(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),C(t,156,1,_[e.type??p]),C(t,157,100,e.linkname),C(t,257,6,`ustar\0`),C(t,263,2,`00`),C(t,265,32,e.uname),C(t,297,32,e.gname),C(t,345,155,i),P(t),t}function R(e,t){if(t&&!N(e))throw Error(`Invalid tar header checksum.`);let n=T(e,156,1),r={name:T(e,0,100),mode:E(e,100,8),uid:D(e,108,8),gid:D(e,116,8),size:D(e,124,12),mtime:new Date(D(e,136,12)*1e3),type:v[n]||p,linkname:T(e,157,100)},i=T(e,257,6);return i.trim()===`ustar`&&(r.uname=T(e,265,32),r.gname=T(e,297,32)),i===`ustar`&&(r.prefix=T(e,345,155)),r}var z={path:[`name`,e=>e],linkpath:[`linkname`,e=>e],size:[`size`,e=>parseInt(e,10)],mtime:[`mtime`,parseFloat],uid:[`uid`,e=>parseInt(e,10)],gid:[`gid`,e=>parseInt(e,10)],uname:[`uname`,e=>e],gname:[`gname`,e=>e]};function B(e){let t=new TextDecoder(`utf-8`),n={},r={},i=0;for(;i<e.length;){let a=e.indexOf(32,i);if(a===-1)break;let o=parseInt(t.decode(e.subarray(i,a)),10);if(Number.isNaN(o)||o===0)break;let s=i+o,[c,l]=t.decode(e.subarray(a+1,s-1)).split(`=`,2);if(c&&l!==void 0){r[c]=l;let e=z[c];if(e){let[t,r]=e,i=r(l);(typeof i==`string`||!Number.isNaN(i))&&(n[t]=i)}}i=s}return Object.keys(r).length>0&&(n.pax=r),n}function V(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function ee(e){switch(e){case`pax-global-header`:case`pax-header`:return B;case`gnu-long-name`:return e=>({name:T(e,0,e.length)});case`gnu-long-link-name`:return e=>({linkname:T(e,0,e.length)});default:return}}function te(e){let t=L(e),n=F(e);if(!n)return[t];let r=-n.paxBody.length&511,i=r>0?[y.subarray(0,r)]:[];return[n.paxHeader,n.paxBody,...i,t]}var ne=new Uint8Array(512*2);function re(e,t,n){let r=null,i=0,a=!1;return{add(n){if(a){let e=Error(`No new tar entries after finalize.`);throw t(e),e}if(r!==null){let e=Error(`Previous entry must be completed before adding a new one`);throw t(e),e}try{let t=O(n)?0:n.size??0,a=te({...n,size:t});for(let t of a)e(t);r={...n,size:t},i=0}catch(e){t(e)}},write(n){if(!r){let e=Error(`No active tar entry.`);throw t(e),e}if(a){let e=Error(`Cannot write data after finalize.`);throw t(e),e}let o=i+n.length;if(o>r.size){let e=Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(e),e}try{i=o,e(n)}catch(e){t(e)}},endEntry(){if(!r){let e=Error(`No active entry to end.`);throw t(e),e}if(a){let e=Error(`Cannot end entry after finalize.`);throw t(e),e}try{if(i!==r.size){let e=Error(`Size mismatch for "${r.name}".`);throw t(e),e}let n=-r.size&511;n>0&&e(new Uint8Array(n)),r=null,i=0}catch(e){throw t(e),e}},finalize(){if(a){let e=Error(`Archive has already been finalized`);throw t(e),e}if(r!==null){let e=Error(`Cannot finalize while an entry is still active`);throw t(e),e}try{e(ne),a=!0,n&&n()}catch(e){t(e)}}}}var H=256;function ie(){let e=Array(H),t=e.length-1,n=0,r=0,i=0,a=a=>{let o=e[n];a===o.length?(e[n]=b,n=n+1&t):e[n]=o.subarray(a),i-=a,i===0&&e.length>H&&(e=Array(H),t=H-1,n=0,r=0)};function o(t,r){if(r){let o=0,s=Math.min(t,i);for(;s>0;){let t=e[n],i=Math.min(s,t.length),c=i===t.length?t:t.subarray(0,i);if(a(i),s-=i,o+=i,!r(c))break}return o}if(i<t)return null;if(t===0)return b;let o=e[n];if(o.length>=t){let e=o.length===t?o:o.subarray(0,t);return a(t),e}let s=new Uint8Array(t),c=0,l=t;for(;l>0;){let t=e[n],r=Math.min(l,t.length);s.set(r===t.length?t:t.subarray(0,r),c),c+=r,l-=r,a(r)}return s}return{push:a=>{if(a.length===0)return;let o=r+1&t;if(o===n){let i=e.length,a=i*2,s=Array(a),c=r-n+i&i-1;if(n<r)for(let t=0;t<c;t++)s[t]=e[n+t];else if(c>0){let t=i-n;for(let r=0;r<t;r++)s[r]=e[n+r];for(let n=0;n<r;n++)s[t+n]=e[n]}e=s,t=a-1,n=0,r=c,o=r+1&t}e[r]=a,r=o,i+=a.length},available:()=>i,peek:r=>{if(i<r)return null;if(r===0)return b;let a=e[n];if(a.length>=r)return a.length===r?a:a.subarray(0,r);let o=new Uint8Array(r),s=0,c=n;for(;s<r;){let n=e[c],i=Math.min(r-s,n.length);i===n.length?o.set(n,s):o.set(n.subarray(0,i),s),s+=i,c=c+1&t}return o},discard:t=>{if(t>i)throw Error(`Too many bytes consumed`);if(t===0)return;let r=t;for(;r>0;){let t=e[n],i=Math.min(r,t.length);a(i),r-=i}},pull:o}}var ae=0,U=1,W=Error(`Tar archive is truncated.`);function oe(e={}){let t=e.strict??!1,{available:n,peek:r,push:i,discard:a,pull:o}=ie(),s=ae,c=!1,l=!1,u=!1,d=null,f={},p={},m={isEntryActive:()=>s===U,isBodyComplete:()=>!d||d.remaining===0,write(e){if(c)throw Error(`Archive already ended.`);i(e)},end(){c=!0},readHeader(){if(s!==ae)throw Error(`Cannot read header while an entry is active`);if(!l)for(;!l;){if(n()<512){if(c){if(n()>0&&t)throw W;l=!0;return}return null}let e=r(512);if(se(e)){if(n()<512*2){if(c){if(t)throw W;l=!0;return}return null}if(se(r(512*2).subarray(512))){a(512*2),l=!0,u=!0;return}if(t)throw Error(`Invalid tar header.`);a(512);continue}let i;try{i=R(e,t)}catch(e){if(t)throw e;a(512);continue}let m=ee(i.type);if(m){let e=i.size+511&-512;if(n()<512+e){if(c&&t)throw W;return null}a(512);let r=m(o(e).subarray(0,i.size)),s=i.type===`pax-global-header`?f:p;for(let e in r)s[e]=r[e];continue}a(512);let h=i;return i.prefix&&(h.name=`${i.prefix}/${h.name}`),V(h,f),V(h,p),p={},d={header:h,remaining:h.size,padding:-h.size&511},s=U,h}},streamBody(e){if(s!==U||!d||d.remaining===0)return 0;let t=Math.min(d.remaining,n());if(t===0)return 0;let r=o(t,e);return d.remaining-=r,r},skipPadding(){if(s!==U||!d)return!0;if(d.remaining>0)throw Error(`Body not fully consumed`);return n()<d.padding?!1:(a(d.padding),d=null,s=ae,!0)},skipEntry(){if(s!==U||!d)return!0;let e=Math.min(d.remaining,n());return e>0&&(a(e),d.remaining-=e),d.remaining>0?!1:m.skipPadding()},validateEOF(){if(t){if(!u)throw W;if(n()>0&&o(n()).some(e=>e!==0))throw Error(`Invalid EOF.`)}}};return m}function se(e){if(e.byteOffset%8==0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let e=0;e<t.length;e++)if(t[e]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function ce(){return new CompressionStream(`gzip`)}function le(){return new DecompressionStream(`gzip`)}function ue(){let e,t;return{readable:new ReadableStream({start(n){e=n,t=re(n.enqueue.bind(n),n.error.bind(n),n.close.bind(n))}}),controller:{add(n){let r=O(n),i={...n};return r&&(i.size=0),t.add(i),r&&t.endEntry(),new WritableStream({write(e){t.write(e)},close(){r||t.endEntry()},abort(t){e.error(t)}})},finalize(){t.finalize()},error(t){e.error(t)}}}}async function de(e){let t=[],n=e.getReader(),r=0;try{for(;;){let{done:e,value:i}=await n.read();if(e)break;t.push(i),r+=i.length}let e=new Uint8Array(r),i=0;for(let n of t)e.set(n,i),i+=n.length;return e}finally{n.releaseLock()}}var fe=e=>e.pipeTo(new WritableStream);function pe(e={}){let t=oe(e),n=null,r=!1,i=e=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(n){if(t.streamBody(e=>(n.enqueue(e),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{n?.close()}catch{}if(n=null,!t.skipPadding())break}}else{let r=t.readHeader();if(r==null)break;e.enqueue({header:r,body:new ReadableStream({start(e){r.size===0?e.close():n=e},pull:()=>i(e),cancel(){n=null,i(e)}})})}}catch(e){try{n?.error(e)}catch{}throw n=null,e}finally{r=!1}}};return new TransformStream({transform(e,r){try{t.write(e),i(r)}catch(e){try{n?.error(e)}catch{}throw e}},flush(e){try{if(t.end(),i(e),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{n?.close()}catch{}}catch(e){try{n?.error(e)}catch{}throw e}}},void 0,{highWaterMark:1})}async function me(e){let{readable:t,controller:n}=ue();return await(async()=>{for(let t of e){let e=n.add(t.header),r=`body`in t?t.body:t.data;if(!r){await e.close();continue}if(r instanceof ReadableStream)await r.pipeTo(e);else if(r instanceof Blob)await r.stream().pipeTo(e);else try{let t=await k(r);if(t.length>0){let n=e.getWriter();await n.write(t),await n.close()}else await e.close()}catch{throw TypeError(`Unsupported content type for entry "${t.header.name}".`)}}})().then(()=>n.finalize()).catch(e=>n.error(e)),new Uint8Array(await de(t))}async function he(e,t={}){let n=e instanceof ReadableStream?e:new ReadableStream({start(t){t.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),t.close()}}),r=[],i=n.pipeThrough(pe(t));for await(let e of i){let n;try{n=A(e.header,t)}catch(t){throw await e.body.cancel(),t}if(n===null){await fe(e.body);continue}O(n)?(await fe(e.body),r.push({header:n})):r.push({header:n,data:await de(e.body)})}return r}var ge=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t<<24;for(let e=0;e<8;e++)n=n&2147483648?n<<1^79764919:n<<1;e[t]=n>>>0}return e})();function _e(e,t){return(e<<8^ge[(e>>>24^t)&255])>>>0}var ve=class{buffer=[];current=0;bitCount=0;writeBits(e,t){for(let n=e-1;n>=0;n--)this.current=this.current<<1|t>>>n&1,this.bitCount++,this.bitCount===8&&(this.buffer.push(this.current),this.current=0,this.bitCount=0)}writeBit(e){this.current=this.current<<1|e&1,this.bitCount++,this.bitCount===8&&(this.buffer.push(this.current),this.current=0,this.bitCount=0)}finish(){return this.bitCount>0&&this.buffer.push(this.current<<8-this.bitCount),new Uint8Array(this.buffer)}};function ye(e){let t=[],n=0;for(;n<e.length;){let r=e[n],i=1;for(;n+i<e.length&&e[n+i]===r&&i<255;)i++;i>=4?(t.push(r,r,r,r),t.push(i-4),n+=i):(t.push(r),n++)}return new Uint8Array(t)}function be(e){let t=e.length;if(t===0)return{transformed:new Uint8Array,pointer:0};let n=xe(e),r=new Uint8Array(t),i=0;for(let a=0;a<t;a++)n[a]===0?(i=a,r[a]=e[t-1]):r[a]=e[n[a]-1];return{transformed:r,pointer:i}}function xe(e){let t=e.length,n=new Int32Array(t),r=new Int32Array(t);for(let i=0;i<t;i++)n[i]=i,r[i]=e[i];for(let e=1;e<t;e*=2){let i=r.slice();n.sort((n,r)=>i[n]===i[r]?i[(n+e)%t]-i[(r+e)%t]:i[n]-i[r]),r[n[0]]=0;for(let a=1;a<t;a++)i[n[a]]===i[n[a-1]]&&i[(n[a]+e)%t]===i[(n[a-1]+e)%t]?r[n[a]]=r[n[a-1]]:r[n[a]]=r[n[a-1]]+1;if(r[n[t-1]]===t-1)break}return n}function Se(e,t){let n=[];for(let e=0;e<256;e++)t[e]&&n.push(e);let r=Array(256).fill(-1);for(let e=0;e<n.length;e++)r[n[e]]=e;let i=new Uint16Array(e.length),a=n.slice();for(let t=0;t<e.length;t++){let n=e[t],r=0;for(;a[r]!==n;)r++;if(i[t]=r,r>0){let e=a[r];for(let e=r;e>0;e--)a[e]=a[e-1];a[0]=e}}return{encoded:i,length:e.length}}function Ce(e,t,n){let r=n+1,i=[],a=0;for(;a<t;)if(e[a]===0){let n=0;for(;a<t&&e[a]===0;)n++,a++;let r=n;for(;r>0;)r--,r&1?i.push(1):i.push(0),r>>>=1}else i.push(e[a]+1),a++;i.push(r);let o=new Uint16Array(i.length);for(let e=0;e<i.length;e++)o[e]=i[e];return{symbols:o,length:i.length,eob:r}}function we(e,t,n){if(t<=1){let t=Array(e.length).fill(0);for(let n=0;n<e.length;n++)e[n]>0&&(t[n]=1);return{codeLengths:t,maxLen:1,minLen:1}}let r=[];for(let t=0;t<e.length;t++)e[t]>0&&r.push({freq:e[t],symbol:t,left:null,right:null});if(r.length===0)return{codeLengths:Array(e.length).fill(0),maxLen:0,minLen:0};if(r.length===1){let t=Array(e.length).fill(0);return t[r[0].symbol]=1,{codeLengths:t,maxLen:1,minLen:1}}for(;r.length>1;){r.sort((e,t)=>e.freq-t.freq);let e=r.shift(),t=r.shift();r.push({freq:e.freq+t.freq,symbol:-1,left:e,right:t})}let i=Array(e.length).fill(0);function a(e,t){if(!e.left&&!e.right){i[e.symbol]=t;return}e.left&&a(e.left,t+1),e.right&&a(e.right,t+1)}a(r[0],0);let o=!0;for(;o;){o=!1;for(let e=0;e<i.length;e++)i[e]>n&&(i[e]=n,o=!0);if(o){let e=0;for(let t=0;t<i.length;t++)i[t]>0&&(e+=1/(1<<i[t]));if(e>1)for(let t=1;t<n&&e>1;t++)for(let n=0;n<i.length&&e>1;n++)i[n]===t&&(i[n]++,e-=1/(1<<t)-1/(1<<t+1));o=!1;for(let e=0;e<i.length;e++)if(i[e]>n){o=!0;break}}}let s=n,c=0;for(let e=0;e<i.length;e++)i[e]>0&&(i[e]<s&&(s=i[e]),i[e]>c&&(c=i[e]));return{codeLengths:i,maxLen:c,minLen:s}}function Te(e,t){let n=Array(t).fill(0),r=e.slice(0,t),i=Math.max(...r,0),a=Array(i+1).fill(0);for(let e=0;e<t;e++)r[e]>0&&a[r[e]]++;let o=Array(i+1).fill(0),s=0;for(let e=1;e<=i;e++)s=s+a[e-1]<<1,o[e]=s;for(let e=0;e<t;e++)r[e]>0&&(n[e]=o[r[e]]++);return{codes:n,lengths:r}}function Ee(e,t,n){e.writeBits(24,3227993),e.writeBits(24,2511705),e.writeBits(32,n),e.writeBit(0);let{transformed:r,pointer:i}=be(ye(t));e.writeBits(24,i);let a=Array(256).fill(!1);for(let e=0;e<r.length;e++)a[r[e]]=!0;let o=Array(16).fill(!1);for(let e=0;e<16;e++)for(let t=0;t<16;t++)if(a[e*16+t]){o[e]=!0;break}for(let t=0;t<16;t++)e.writeBit(o[t]?1:0);for(let t=0;t<16;t++)if(o[t])for(let n=0;n<16;n++)e.writeBit(a[t*16+n]?1:0);let s=0;for(let e=0;e<256;e++)a[e]&&s++;let{encoded:c,length:l}=Se(r,a),{symbols:u,length:d}=Ce(c,l,s),f=s+2,p=Math.ceil(d/50),m;m=d<200?2:d<600?3:d<1200?4:d<2400?5:6,m>p&&(m=Math.max(2,p));let h=[];for(let e=0;e<m;e++)h.push(Array(f).fill(0));let g=new Int32Array(p);for(let e=0;e<p;e++)g[e]=e%m;for(let e=0;e<p;e++){let t=e*50,n=Math.min(t+50,d),r=g[e];for(let e=t;e<n;e++)h[r][u[e]]++}function _(e){for(let t=0;t<f;t++)e[t]<1&&(e[t]=1)}let v=[];for(let e=0;e<m;e++)_(h[e]),v.push(we(h[e],f,20));for(let e=0;e<4;e++){for(let e=0;e<m;e++)h[e].fill(0);for(let e=0;e<p;e++){let t=e*50,n=Math.min(t+50,d),r=0,i=1/0;for(let e=0;e<m;e++){let a=0;for(let r=t;r<n;r++)a+=v[e].codeLengths[u[r]]||20;a<i&&(i=a,r=e)}g[e]=r;for(let e=t;e<n;e++)h[r][u[e]]++}for(let e=0;e<m;e++)_(h[e]),v[e]=we(h[e],f,20)}e.writeBits(3,m),e.writeBits(15,p);let y=[],b=[];for(let e=0;e<m;e++)b.push(e);for(let e=0;e<p;e++){let t=g[e],n=0;for(;b[n]!==t;)n++;if(y.push(n),n>0){let e=b[n];for(let e=n;e>0;e--)b[e]=b[e-1];b[0]=e}}for(let t=0;t<p;t++){for(let n=0;n<y[t];n++)e.writeBit(1);e.writeBit(0)}for(let t=0;t<m;t++){let n=v[t].codeLengths,r=n[0];e.writeBits(5,r);for(let t=0;t<f;t++){let i=n[t];for(;r<i;)e.writeBit(1),e.writeBit(0),r++;for(;r>i;)e.writeBit(1),e.writeBit(1),r--;e.writeBit(0)}}for(let e=0;e<m;e++){let{codes:t,lengths:n}=Te(v[e].codeLengths,f);v[e]=Object.assign(v[e],{_codes:t,_lengths:n})}let x=0,S=0;for(let t=0;t<d;t++){(S===0||S>=50)&&(t>0&&x++,S=0);let n=v[g[x]],r=u[t],i=n._lengths[r],a=n._codes[r];i>0&&e.writeBits(i,a),S++}}var De=10*1024*1024;function Oe(e,t=9,n=De){if(t<1||t>9)throw Error(`Block size level must be 1-9`);if(e.length>n)throw Error(`Input too large for bzip2 compression (${e.length} bytes, max ${n})`);let r=t*1e5,i=new ve;i.writeBits(8,66),i.writeBits(8,90),i.writeBits(8,104),i.writeBits(8,48+t);let a=0,o=0;for(;o<e.length;){let t=Math.min(o+r,e.length),n=e.subarray(o,t),s=4294967295;for(let e=0;e<n.length;e++)s=_e(s,n[e]);s=~s>>>0,a=(a<<1|a>>>31)>>>0,a=(a^s)>>>0,Ee(i,n,s),o=t}return i.writeBits(24,1536581),i.writeBits(24,3690640),i.writeBits(32,a),i.finish()}var G=null,K=null;async function ke(){if(G)return G;if(K)throw K;try{return G=await r.runTrustedAsync(()=>import(`./lzma-DBkyKSY9.mjs`)),G}catch{throw K=Error(`xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies.`),K}}var q=null,J=null;async function Ae(){if(q)return q;if(J)throw J;try{return q=await r.runTrustedAsync(()=>import(`./lib-BbNAtG4h.mjs`).then(t=>e(t.default,1))),q}catch{throw J=Error(`zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd`),J}}var Y=100*1024*1024,je=512,Me=1e4;function Ne(e){let t=`file`;e.isDirectory?t=`directory`:e.isSymlink&&(t=`symlink`);let n=e.name;e.isDirectory&&!n.endsWith(`/`)&&(n+=`/`);let r;e.content!==void 0&&(r=typeof e.content==`string`?new TextEncoder().encode(e.content):e.content);let i=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:n,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??``,uname:`user`,gname:`user`},body:r}}async function X(e){return me(e.map(Ne))}async function Pe(e){let t=await X(e),n=new ReadableStream({start(e){e.enqueue(t),e.close()}}).pipeThrough(ce()).getReader(),r=[];for(;;){let{done:e,value:t}=await n.read();if(e)break;r.push(t)}let i=r.reduce((e,t)=>e+t.length,0),a=new Uint8Array(i),o=0;for(let e of r)a.set(e,o),o+=e.length;return a}async function Z(e){if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};if(e.length<je||e.length%je!==0)return{entries:[],error:`Invalid tar archive format`};try{let t=await he(e),n=[];for(let e of t){if(n.length>=Me)return{entries:n,error:`Too many entries (max ${Me})`};let t=`file`;switch(e.header.type){case`directory`:t=`directory`;break;case`symlink`:t=`symlink`;break;case`link`:t=`hardlink`;break;case`file`:t=`file`;break;default:t=`other`}n.push({name:e.header.name,mode:e.header.mode??420,uid:e.header.uid??0,gid:e.header.gid??0,size:e.header.size,mtime:e.header.mtime??new Date,type:t,linkTarget:e.header.linkname||void 0,content:e.data??new Uint8Array})}return{entries:n}}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}async function Fe(e){if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=new ReadableStream({start(t){t.enqueue(e),t.close()}}).pipeThrough(le()).getReader(),n=[],r=0;for(;;){let{done:e,value:i}=await t.read();if(e)break;if(r+=i.length,r>Y)return await t.cancel(),{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`};n.push(i)}let i=new Uint8Array(r),a=0;for(let e of n)i.set(e,a),a+=e.length;return Z(i)}catch(e){return{entries:[],error:`Decompression failed: ${e instanceof Error?e.message:`Unknown error`}`}}}function Ie(e){return e.length>=2&&e[0]===31&&e[1]===139}function Le(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function Re(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function ze(e){let t=f.default.decode(Buffer.from(e));return new Uint8Array(t)}async function Be(e){return Oe(e,9)}async function Ve(e){let t=(await ke()).unxzSync(Buffer.from(e));return new Uint8Array(t)}async function He(e){let t=(await ke()).xzSync(Buffer.from(e));return new Uint8Array(t)}async function Ue(e){return Be(await X(e))}async function We(e,t){if(!t?.allowNativeCodecs)throw Error(`xz compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.`);return He(await X(e))}async function Ge(e){if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=await ze(e);return t.length>Y?{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`}:Z(t)}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}async function Ke(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:`xz decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction.`};if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=await Ve(e);return t.length>Y?{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`}:Z(t)}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}function qe(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function Je(e){let t=await(await Ae()).compress(Buffer.from(e),3);return new Uint8Array(t)}async function Ye(e){let t=await(await Ae()).decompress(Buffer.from(e));return new Uint8Array(t)}async function Xe(e,t){if(!t?.allowNativeCodecs)throw Error(`zstd compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.`);return Je(await X(e))}async function Ze(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:`zstd decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction.`};if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=await Ye(e);return t.length>Y?{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`}:Z(t)}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}function Qe(e){let t={create:!1,append:!1,update:!1,extract:!1,list:!1,file:``,autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:``,preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:``,excludeFrom:``,wildcards:!1},n=[],r=0;for(;r<e.length;){let a=e[r];if(a.startsWith(`-`)&&!a.startsWith(`--`)&&a.length>2){if(/^-\d+$/.test(a)){n.push(a),r++;continue}for(let n=1;n<a.length;n++){let o=a[n];switch(o){case`c`:t.create=!0;break;case`r`:t.append=!0;break;case`u`:t.update=!0;break;case`x`:t.extract=!0;break;case`t`:t.list=!0;break;case`a`:t.autoCompress=!0;break;case`z`:t.gzip=!0;break;case`j`:t.bzip2=!0;break;case`J`:t.xz=!0;break;case`v`:t.verbose=!0;break;case`O`:t.toStdout=!0;break;case`k`:t.keepOldFiles=!0;break;case`m`:t.touch=!0;break;case`p`:t.preserve=!0;break;case`P`:t.absoluteNames=!0;break;case`f`:if(n<a.length-1)t.file=a.substring(n+1),n=a.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:``,stderr:`tar: option requires an argument -- 'f'
|
|
1
|
+
import{s as e,t}from"./chunk-C94x7I9S.mjs";import{t as n}from"./chunk-YNYSPYQ5-DHter9G3.mjs";import{t as r}from"./chunk-5QMZ5MUS-_0tQyQsf.mjs";import{n as i,r as a,t as o}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as s}from"./chunk-X2AJGDEF-ClcErtij.mjs";var c=t(((e,t)=>{var n=[0,1,3,7,15,31,63,127,255],r=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};r.prototype._ensureByte=function(){this.hasByte||=(this.curByte=this.stream.readByte(),!0)},r.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=n[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var i=r-e;t|=(this.curByte&n[e]<<i)>>i,this.bitOffset+=e,e=0}}return t},r.prototype.seek=function(e){var t=e%8,n=(e-t)/8;this.bitOffset=t,this.stream.seek(n),this.hasByte=!1},r.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t<e.length;t++)e[t]=this.read(8);return e.toString(`hex`)},t.exports=r})),l=t(((e,t)=>{var n=function(){};n.prototype.readByte=function(){throw Error(`abstract method readByte() not implemented`)},n.prototype.read=function(e,t,n){for(var r=0;r<n;){var i=this.readByte();if(i<0)return r===0?-1:r;e[t++]=i,r++}return r},n.prototype.seek=function(e){throw Error(`abstract method seek() not implemented`)},n.prototype.writeByte=function(e){throw Error(`abstract method readByte() not implemented`)},n.prototype.write=function(e,t,n){var r;for(r=0;r<n;r++)this.writeByte(e[t++]);return n},n.prototype.flush=function(){},t.exports=n})),u=t(((e,t)=>{t.exports=(function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]);return function(){var t=4294967295;this.getCRC=function(){return~t>>>0},this.updateCRC=function(n){t=t<<8^e[(t>>>24^n)&255]},this.updateCRCRun=function(n,r){for(;r-- >0;)t=t<<8^e[(t>>>24^n)&255]}}})()})),d=t(((e,t)=>{t.exports={name:`seek-bzip`,version:`2.0.0`,contributors:[`C. Scott Ananian (http://cscott.net)`,`Eli Skeggs`,`Kevin Kwok`,`Rob Landley (http://landley.net)`],description:`a pure-JavaScript Node.JS module for random-access decoding bzip2 data`,main:`./lib/index.js`,repository:{type:`git`,url:`https://github.com/cscott/seek-bzip.git`},license:`MIT`,bin:{"seek-bunzip":`./bin/seek-bunzip`,"seek-table":`./bin/seek-bzip-table`},directories:{test:`test`},dependencies:{commander:`^6.0.0`},devDependencies:{fibers:`^5.0.0`,mocha:`^8.1.0`},scripts:{test:`mocha`}}})),f=e(t(((e,t)=>{var n=c(),r=l(),i=u(),a=d(),o=20,s=258,f=0,p=1,m=2,h=6,g=50,_=`314159265359`,v=`177245385090`,y=function(e,t){var n=e[t],r;for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},b={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},x={};x[b.LAST_BLOCK]=`Bad file checksum`,x[b.NOT_BZIP_DATA]=`Not bzip data`,x[b.UNEXPECTED_INPUT_EOF]=`Unexpected input EOF`,x[b.UNEXPECTED_OUTPUT_EOF]=`Unexpected output EOF`,x[b.DATA_ERROR]=`Data error`,x[b.OUT_OF_MEMORY]=`Out of memory`,x[b.OBSOLETE_INPUT]=`Obsolete (pre 0.9.5) bzip format not supported.`;var S=function(e,t){var n=x[e]||`unknown error`;t&&(n+=`: `+t);var r=TypeError(n);throw r.errorCode=e,r},C=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};C.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new i,!0):(this.writeCount=-1,!1)},C.prototype._start_bunzip=function(e,t){var r=new Buffer(4);(e.read(r,0,4)!==4||String.fromCharCode(r[0],r[1],r[2])!==`BZh`)&&S(b.NOT_BZIP_DATA,`bad magic`);var i=r[3]-48;(i<1||i>9)&&S(b.NOT_BZIP_DATA,`level out of range`),this.reader=new n(e),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},C.prototype._get_next_block=function(){var e,t,n,r=this.reader,i=r.pi();if(i===v)return!1;i!==_&&S(b.NOT_BZIP_DATA),this.targetBlockCRC=r.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,r.read(1)&&S(b.OBSOLETE_INPUT);var a=r.read(24);a>this.dbufSize&&S(b.DATA_ERROR,`initial position out of bounds`);var c=r.read(16),l=new Buffer(256),u=0;for(e=0;e<16;e++)if(c&1<<15-e){var d=e*16;for(n=r.read(16),t=0;t<16;t++)n&1<<15-t&&(l[u++]=d+t)}var x=r.read(3);(x<m||x>h)&&S(b.DATA_ERROR);var C=r.read(15);C===0&&S(b.DATA_ERROR);var w=new Buffer(256);for(e=0;e<x;e++)w[e]=e;var T=new Buffer(C);for(e=0;e<C;e++){for(t=0;r.read(1);t++)t>=x&&S(b.DATA_ERROR);T[e]=y(w,t)}var E=u+2,D=[],O;for(t=0;t<x;t++){var k=new Buffer(E),A=new Uint16Array(o+1);for(c=r.read(5),e=0;e<E;e++){for(;(c<1||c>o)&&S(b.DATA_ERROR),r.read(1);)r.read(1)?c--:c++;k[e]=c}var j=M=k[0],M;for(e=1;e<E;e++)k[e]>M?M=k[e]:k[e]<j&&(j=k[e]);O={},D.push(O),O.permute=new Uint16Array(s),O.limit=new Uint32Array(o+2),O.base=new Uint32Array(o+1),O.minLen=j,O.maxLen=M;var N=0;for(e=j;e<=M;e++)for(A[e]=O.limit[e]=0,c=0;c<E;c++)k[c]===e&&(O.permute[N++]=c);for(e=0;e<E;e++)A[k[e]]++;for(N=c=0,e=j;e<M;e++)N+=A[e],O.limit[e]=N-1,N<<=1,c+=A[e],O.base[e+1]=N-c;O.limit[M+1]=Number.MAX_VALUE,O.limit[M]=N+A[M]-1,O.base[j]=0}var P=new Uint32Array(256);for(e=0;e<256;e++)w[e]=e;var F=0,I=0,L=0,R,z=this.dbuf=new Uint32Array(this.dbufSize);for(E=0;;){for(E--||(E=g-1,L>=C&&S(b.DATA_ERROR),O=D[T[L++]]),e=O.minLen,t=r.read(e);e>O.maxLen&&S(b.DATA_ERROR),!(t<=O.limit[e]);e++)t=t<<1|r.read(1);t-=O.base[e],(t<0||t>=s)&&S(b.DATA_ERROR);var B=O.permute[t];if(B===f||B===p){F||(F=1,c=0),B===f?c+=F:c+=2*F,F<<=1;continue}if(F)for(F=0,I+c>this.dbufSize&&S(b.DATA_ERROR),R=l[w[0]],P[R]+=c;c--;)z[I++]=R;if(B>u)break;I>=this.dbufSize&&S(b.DATA_ERROR),e=B-1,R=y(w,e),R=l[R],P[R]++,z[I++]=R}for((a<0||a>=I)&&S(b.DATA_ERROR),t=0,e=0;e<256;e++)n=t+P[e],P[e]=t,t=n;for(e=0;e<I;e++)R=z[e]&255,z[P[R]]|=e<<8,P[R]++;var V=0,ee=0,te=0;return I&&(V=z[a],ee=V&255,V>>=8,te=-1),this.writePos=V,this.writeCurrent=ee,this.writeCount=I,this.writeRun=te,!0},C.prototype._read_bunzip=function(e,t){var n,r,i;if(this.writeCount<0)return 0;var a=this.dbuf,o=this.writePos,s=this.writeCurrent,c=this.writeCount;this.outputsize;for(var l=this.writeRun;c;){for(c--,r=s,o=a[o],s=o&255,o>>=8,l++===3?(n=s,i=r,s=-1):(n=1,i=s),this.blockCRC.updateCRCRun(i,n);n--;)this.outputStream.writeByte(i),this.nextoutput++;s!=r&&(l=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&S(b.DATA_ERROR,`Bad block CRC (got `+this.blockCRC.getCRC().toString(16)+` expected `+this.targetBlockCRC.toString(16)+`)`),this.nextoutput};var w=function(e){if(`readByte`in e)return e;var t=new r;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(e){this.pos=e},t.eof=function(){return this.pos>=e.length},t},T=function(e){var t=new r,n=!0;if(e)if(typeof e==`number`)t.buffer=new Buffer(e),n=!1;else if(`writeByte`in e)return e;else t.buffer=e,n=!1;else t.buffer=new Buffer(16384);return t.pos=0,t.writeByte=function(e){if(n&&this.pos>=this.buffer.length){var t=new Buffer(this.buffer.length*2);this.buffer.copy(t),this.buffer=t}this.buffer[this.pos++]=e},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!n)throw TypeError(`outputsize does not match decoded input`);var e=new Buffer(this.pos);this.buffer.copy(e,0,0,this.pos),this.buffer=e}return this.buffer},t._coerced=!0,t};C.Err=b,C.decode=function(e,t,n){for(var r=w(e),i=T(t),a=new C(r,i);!(`eof`in r&&r.eof());)if(a._init_block())a._read_bunzip();else{var o=a.reader.read(32)>>>0;if(o!==a.streamCRC&&S(b.DATA_ERROR,`Bad stream CRC (got `+a.streamCRC.toString(16)+` expected `+o.toString(16)+`)`),n&&`eof`in r&&!r.eof())a._start_bunzip(r,i);else break}if(`getBuffer`in i)return i.getBuffer()},C.decodeBlock=function(e,t,n){var r=w(e),a=T(n),o=new C(r,a);if(o.reader.seek(t),o._get_next_block()&&(o.blockCRC=new i,o.writeCopies=0,o._read_bunzip()),`getBuffer`in a)return a.getBuffer()},C.table=function(e,t,n){var i=new r;i.delegate=w(e),i.pos=0,i.readByte=function(){return this.pos++,this.delegate.readByte()},i.delegate.eof&&(i.eof=i.delegate.eof.bind(i.delegate));var a=new r;a.pos=0,a.writeByte=function(){this.pos++};for(var o=new C(i,a),s=o.dbufSize;!(`eof`in i&&i.eof());){var c=i.pos*8+o.reader.bitOffset;if(o.reader.hasByte&&(c-=8),o._init_block()){var l=a.pos;o._read_bunzip(),t(c,a.pos-l)}else if(o.reader.read(32),n&&`eof`in i&&!i.eof())o._start_bunzip(i,a),console.assert(o.dbufSize===s,`shouldn't change block size within multistream file`);else break}},C.Stream=r,C.version=a.version,C.license=a.license,t.exports=C}))(),1),p=`file`,m=`link`,h=`symlink`,g=`directory`,_={file:`0`,link:`1`,symlink:`2`,"character-device":`3`,"block-device":`4`,directory:`5`,fifo:`6`,"pax-header":`x`,"pax-global-header":`g`,"gnu-long-name":`L`,"gnu-long-link-name":`K`},v={0:p,1:m,2:h,3:`character-device`,4:`block-device`,5:g,6:`fifo`,x:`pax-header`,g:`pax-global-header`,L:`gnu-long-name`,K:`gnu-long-link-name`},y=new Uint8Array(512),b=new Uint8Array,x=new TextEncoder,S=new TextDecoder;function C(e,t,n,r){r&&x.encodeInto(r,e.subarray(t,t+n))}function w(e,t,n,r){if(r===void 0)return;let i=r.toString(8).padStart(n-1,`0`);x.encodeInto(i,e.subarray(t,t+n-1))}function T(e,t,n){let r=e.indexOf(0,t),i=r===-1||r>t+n?t+n:r;return S.decode(e.subarray(t,i))}function E(e,t,n){let r=0,i=t+n;for(let n=t;n<i;n++){let t=e[n];if(t===0)break;t!==32&&(r=r*8+(t-48))}return r}function D(e,t,n){if(e[t]&128){let r=0;r=e[t]&127;for(let i=1;i<n;i++)r=r*256+e[t+i];if(!Number.isSafeInteger(r))throw Error(`TAR number too large`);return r}return E(e,t,n)}var O=e=>e.type===g||e.type===h||e.type===m;async function k(e){if(e==null)return b;if(e instanceof Uint8Array)return e;if(typeof e==`string`)return x.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await e.arrayBuffer());throw TypeError(`Unsupported content type for entry body.`)}function A(e,t){let{strip:n,filter:r,map:i}=t;if(!n&&!r&&!i)return e;let a={...e};if(n&&n>0){let e=a.name.split(`/`).filter(Boolean);if(n>=e.length)return null;let t=e.slice(n).join(`/`);if(a.name=a.type===g&&!t.endsWith(`/`)?`${t}/`:t,a.linkname?.startsWith(`/`)){let e=a.linkname.split(`/`).filter(Boolean);a.linkname=n>=e.length?`/`:`/${e.slice(n).join(`/`)}`}}if(r?.(a)===!1)return null;let o=i?i(a):a;return o&&(!o.name||!o.name.trim()||o.name===`.`||o.name===`/`)?null:o}var j=32,M=48;function N(e){let t=E(e,148,8),n=0;for(let t=0;t<e.length;t++)t>=148&&t<156?n+=j:n+=e[t];return t===n}function P(e){e.fill(j,148,156);let t=0;for(let n of e)t+=n;for(let n=153;n>=148;n--)e[n]=(t&7)+M,t>>=3;e[154]=0,e[155]=j}function F(e){let t={};e.name.length>100&&I(e.name)===null&&(t.path=e.name),e.linkname&&e.linkname.length>100&&(t.linkpath=e.linkname),e.uname&&e.uname.length>32&&(t.uname=e.uname),e.gname&&e.gname.length>32&&(t.gname=e.gname),e.uid!=null&&e.uid>2097151&&(t.uid=String(e.uid)),e.gid!=null&&e.gid>2097151&&(t.gid=String(e.gid)),e.size!=null&&e.size>8589934591&&(t.size=String(e.size)),e.pax&&Object.assign(t,e.pax);let n=Object.entries(t);if(n.length===0)return null;let r=x.encode(n.map(([e,t])=>{let n=`${e}=${t}
|
|
2
|
+
`,r=x.encode(n).length+1,i=r+String(r).length;return i=r+String(i).length,`${i} ${n}`}).join(``));return{paxHeader:L({name:S.decode(x.encode(`PaxHeader/${e.name}`).slice(0,100)),size:r.length,type:`pax-header`,mode:420,mtime:e.mtime,uname:e.uname,gname:e.gname,uid:e.uid,gid:e.gid}),paxBody:r}}function I(e){if(e.length<=100)return null;let t=e.length-100-1,n=e.lastIndexOf(`/`,155);return n>0&&n>=t?{prefix:e.slice(0,n),name:e.slice(n+1)}:null}function L(e){let t=new Uint8Array(512),n=O(e)?0:e.size??0,r=e.name,i=``;if(!e.pax?.path){let e=I(r);e&&(r=e.name,i=e.prefix)}return C(t,0,100,r),w(t,100,8,e.mode??(e.type===g?493:420)),w(t,108,8,e.uid??0),w(t,116,8,e.gid??0),w(t,124,12,n),w(t,136,12,Math.floor((e.mtime?.getTime()??Date.now())/1e3)),C(t,156,1,_[e.type??p]),C(t,157,100,e.linkname),C(t,257,6,`ustar\0`),C(t,263,2,`00`),C(t,265,32,e.uname),C(t,297,32,e.gname),C(t,345,155,i),P(t),t}function R(e,t){if(t&&!N(e))throw Error(`Invalid tar header checksum.`);let n=T(e,156,1),r={name:T(e,0,100),mode:E(e,100,8),uid:D(e,108,8),gid:D(e,116,8),size:D(e,124,12),mtime:new Date(D(e,136,12)*1e3),type:v[n]||p,linkname:T(e,157,100)},i=T(e,257,6);return i.trim()===`ustar`&&(r.uname=T(e,265,32),r.gname=T(e,297,32)),i===`ustar`&&(r.prefix=T(e,345,155)),r}var z={path:[`name`,e=>e],linkpath:[`linkname`,e=>e],size:[`size`,e=>parseInt(e,10)],mtime:[`mtime`,parseFloat],uid:[`uid`,e=>parseInt(e,10)],gid:[`gid`,e=>parseInt(e,10)],uname:[`uname`,e=>e],gname:[`gname`,e=>e]};function B(e){let t=new TextDecoder(`utf-8`),n={},r={},i=0;for(;i<e.length;){let a=e.indexOf(32,i);if(a===-1)break;let o=parseInt(t.decode(e.subarray(i,a)),10);if(Number.isNaN(o)||o===0)break;let s=i+o,[c,l]=t.decode(e.subarray(a+1,s-1)).split(`=`,2);if(c&&l!==void 0){r[c]=l;let e=z[c];if(e){let[t,r]=e,i=r(l);(typeof i==`string`||!Number.isNaN(i))&&(n[t]=i)}}i=s}return Object.keys(r).length>0&&(n.pax=r),n}function V(e,t){t.name!==void 0&&(e.name=t.name),t.linkname!==void 0&&(e.linkname=t.linkname),t.size!==void 0&&(e.size=t.size),t.mtime!==void 0&&(e.mtime=new Date(t.mtime*1e3)),t.uid!==void 0&&(e.uid=t.uid),t.gid!==void 0&&(e.gid=t.gid),t.uname!==void 0&&(e.uname=t.uname),t.gname!==void 0&&(e.gname=t.gname),t.pax&&(e.pax=Object.assign({},e.pax??{},t.pax))}function ee(e){switch(e){case`pax-global-header`:case`pax-header`:return B;case`gnu-long-name`:return e=>({name:T(e,0,e.length)});case`gnu-long-link-name`:return e=>({linkname:T(e,0,e.length)});default:return}}function te(e){let t=L(e),n=F(e);if(!n)return[t];let r=-n.paxBody.length&511,i=r>0?[y.subarray(0,r)]:[];return[n.paxHeader,n.paxBody,...i,t]}var ne=new Uint8Array(512*2);function re(e,t,n){let r=null,i=0,a=!1;return{add(n){if(a){let e=Error(`No new tar entries after finalize.`);throw t(e),e}if(r!==null){let e=Error(`Previous entry must be completed before adding a new one`);throw t(e),e}try{let t=O(n)?0:n.size??0,a=te({...n,size:t});for(let t of a)e(t);r={...n,size:t},i=0}catch(e){t(e)}},write(n){if(!r){let e=Error(`No active tar entry.`);throw t(e),e}if(a){let e=Error(`Cannot write data after finalize.`);throw t(e),e}let o=i+n.length;if(o>r.size){let e=Error(`"${r.name}" exceeds given size of ${r.size} bytes.`);throw t(e),e}try{i=o,e(n)}catch(e){t(e)}},endEntry(){if(!r){let e=Error(`No active entry to end.`);throw t(e),e}if(a){let e=Error(`Cannot end entry after finalize.`);throw t(e),e}try{if(i!==r.size){let e=Error(`Size mismatch for "${r.name}".`);throw t(e),e}let n=-r.size&511;n>0&&e(new Uint8Array(n)),r=null,i=0}catch(e){throw t(e),e}},finalize(){if(a){let e=Error(`Archive has already been finalized`);throw t(e),e}if(r!==null){let e=Error(`Cannot finalize while an entry is still active`);throw t(e),e}try{e(ne),a=!0,n&&n()}catch(e){t(e)}}}}var H=256;function ie(){let e=Array(H),t=e.length-1,n=0,r=0,i=0,a=a=>{let o=e[n];a===o.length?(e[n]=b,n=n+1&t):e[n]=o.subarray(a),i-=a,i===0&&e.length>H&&(e=Array(H),t=H-1,n=0,r=0)};function o(t,r){if(r){let o=0,s=Math.min(t,i);for(;s>0;){let t=e[n],i=Math.min(s,t.length),c=i===t.length?t:t.subarray(0,i);if(a(i),s-=i,o+=i,!r(c))break}return o}if(i<t)return null;if(t===0)return b;let o=e[n];if(o.length>=t){let e=o.length===t?o:o.subarray(0,t);return a(t),e}let s=new Uint8Array(t),c=0,l=t;for(;l>0;){let t=e[n],r=Math.min(l,t.length);s.set(r===t.length?t:t.subarray(0,r),c),c+=r,l-=r,a(r)}return s}return{push:a=>{if(a.length===0)return;let o=r+1&t;if(o===n){let i=e.length,a=i*2,s=Array(a),c=r-n+i&i-1;if(n<r)for(let t=0;t<c;t++)s[t]=e[n+t];else if(c>0){let t=i-n;for(let r=0;r<t;r++)s[r]=e[n+r];for(let n=0;n<r;n++)s[t+n]=e[n]}e=s,t=a-1,n=0,r=c,o=r+1&t}e[r]=a,r=o,i+=a.length},available:()=>i,peek:r=>{if(i<r)return null;if(r===0)return b;let a=e[n];if(a.length>=r)return a.length===r?a:a.subarray(0,r);let o=new Uint8Array(r),s=0,c=n;for(;s<r;){let n=e[c],i=Math.min(r-s,n.length);i===n.length?o.set(n,s):o.set(n.subarray(0,i),s),s+=i,c=c+1&t}return o},discard:t=>{if(t>i)throw Error(`Too many bytes consumed`);if(t===0)return;let r=t;for(;r>0;){let t=e[n],i=Math.min(r,t.length);a(i),r-=i}},pull:o}}var ae=0,U=1,W=Error(`Tar archive is truncated.`);function oe(e={}){let t=e.strict??!1,{available:n,peek:r,push:i,discard:a,pull:o}=ie(),s=ae,c=!1,l=!1,u=!1,d=null,f={},p={},m={isEntryActive:()=>s===U,isBodyComplete:()=>!d||d.remaining===0,write(e){if(c)throw Error(`Archive already ended.`);i(e)},end(){c=!0},readHeader(){if(s!==ae)throw Error(`Cannot read header while an entry is active`);if(!l)for(;!l;){if(n()<512){if(c){if(n()>0&&t)throw W;l=!0;return}return null}let e=r(512);if(se(e)){if(n()<512*2){if(c){if(t)throw W;l=!0;return}return null}if(se(r(512*2).subarray(512))){a(512*2),l=!0,u=!0;return}if(t)throw Error(`Invalid tar header.`);a(512);continue}let i;try{i=R(e,t)}catch(e){if(t)throw e;a(512);continue}let m=ee(i.type);if(m){let e=i.size+511&-512;if(n()<512+e){if(c&&t)throw W;return null}a(512);let r=m(o(e).subarray(0,i.size)),s=i.type===`pax-global-header`?f:p;for(let e in r)s[e]=r[e];continue}a(512);let h=i;return i.prefix&&(h.name=`${i.prefix}/${h.name}`),V(h,f),V(h,p),p={},d={header:h,remaining:h.size,padding:-h.size&511},s=U,h}},streamBody(e){if(s!==U||!d||d.remaining===0)return 0;let t=Math.min(d.remaining,n());if(t===0)return 0;let r=o(t,e);return d.remaining-=r,r},skipPadding(){if(s!==U||!d)return!0;if(d.remaining>0)throw Error(`Body not fully consumed`);return n()<d.padding?!1:(a(d.padding),d=null,s=ae,!0)},skipEntry(){if(s!==U||!d)return!0;let e=Math.min(d.remaining,n());return e>0&&(a(e),d.remaining-=e),d.remaining>0?!1:m.skipPadding()},validateEOF(){if(t){if(!u)throw W;if(n()>0&&o(n()).some(e=>e!==0))throw Error(`Invalid EOF.`)}}};return m}function se(e){if(e.byteOffset%8==0){let t=new BigUint64Array(e.buffer,e.byteOffset,e.length/8);for(let e=0;e<t.length;e++)if(t[e]!==0n)return!1;return!0}for(let t=0;t<e.length;t++)if(e[t]!==0)return!1;return!0}function ce(){return new CompressionStream(`gzip`)}function le(){return new DecompressionStream(`gzip`)}function ue(){let e,t;return{readable:new ReadableStream({start(n){e=n,t=re(n.enqueue.bind(n),n.error.bind(n),n.close.bind(n))}}),controller:{add(n){let r=O(n),i={...n};return r&&(i.size=0),t.add(i),r&&t.endEntry(),new WritableStream({write(e){t.write(e)},close(){r||t.endEntry()},abort(t){e.error(t)}})},finalize(){t.finalize()},error(t){e.error(t)}}}}async function de(e){let t=[],n=e.getReader(),r=0;try{for(;;){let{done:e,value:i}=await n.read();if(e)break;t.push(i),r+=i.length}let e=new Uint8Array(r),i=0;for(let n of t)e.set(n,i),i+=n.length;return e}finally{n.releaseLock()}}var fe=e=>e.pipeTo(new WritableStream);function pe(e={}){let t=oe(e),n=null,r=!1,i=e=>{if(!r){r=!0;try{for(;;)if(t.isEntryActive()){if(n){if(t.streamBody(e=>(n.enqueue(e),!0))===0&&!t.isBodyComplete())break}else if(!t.skipEntry())break;if(t.isBodyComplete()){try{n?.close()}catch{}if(n=null,!t.skipPadding())break}}else{let r=t.readHeader();if(r==null)break;e.enqueue({header:r,body:new ReadableStream({start(e){r.size===0?e.close():n=e},pull:()=>i(e),cancel(){n=null,i(e)}})})}}catch(e){try{n?.error(e)}catch{}throw n=null,e}finally{r=!1}}};return new TransformStream({transform(e,r){try{t.write(e),i(r)}catch(e){try{n?.error(e)}catch{}throw e}},flush(e){try{if(t.end(),i(e),t.validateEOF(),t.isEntryActive()&&!t.isBodyComplete())try{n?.close()}catch{}}catch(e){try{n?.error(e)}catch{}throw e}}},void 0,{highWaterMark:1})}async function me(e){let{readable:t,controller:n}=ue();return await(async()=>{for(let t of e){let e=n.add(t.header),r=`body`in t?t.body:t.data;if(!r){await e.close();continue}if(r instanceof ReadableStream)await r.pipeTo(e);else if(r instanceof Blob)await r.stream().pipeTo(e);else try{let t=await k(r);if(t.length>0){let n=e.getWriter();await n.write(t),await n.close()}else await e.close()}catch{throw TypeError(`Unsupported content type for entry "${t.header.name}".`)}}})().then(()=>n.finalize()).catch(e=>n.error(e)),new Uint8Array(await de(t))}async function he(e,t={}){let n=e instanceof ReadableStream?e:new ReadableStream({start(t){t.enqueue(e instanceof Uint8Array?e:new Uint8Array(e)),t.close()}}),r=[],i=n.pipeThrough(pe(t));for await(let e of i){let n;try{n=A(e.header,t)}catch(t){throw await e.body.cancel(),t}if(n===null){await fe(e.body);continue}O(n)?(await fe(e.body),r.push({header:n})):r.push({header:n,data:await de(e.body)})}return r}var ge=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t<<24;for(let e=0;e<8;e++)n=n&2147483648?n<<1^79764919:n<<1;e[t]=n>>>0}return e})();function _e(e,t){return(e<<8^ge[(e>>>24^t)&255])>>>0}var ve=class{buffer=[];current=0;bitCount=0;writeBits(e,t){for(let n=e-1;n>=0;n--)this.current=this.current<<1|t>>>n&1,this.bitCount++,this.bitCount===8&&(this.buffer.push(this.current),this.current=0,this.bitCount=0)}writeBit(e){this.current=this.current<<1|e&1,this.bitCount++,this.bitCount===8&&(this.buffer.push(this.current),this.current=0,this.bitCount=0)}finish(){return this.bitCount>0&&this.buffer.push(this.current<<8-this.bitCount),new Uint8Array(this.buffer)}};function ye(e){let t=[],n=0;for(;n<e.length;){let r=e[n],i=1;for(;n+i<e.length&&e[n+i]===r&&i<255;)i++;i>=4?(t.push(r,r,r,r),t.push(i-4),n+=i):(t.push(r),n++)}return new Uint8Array(t)}function be(e){let t=e.length;if(t===0)return{transformed:new Uint8Array,pointer:0};let n=xe(e),r=new Uint8Array(t),i=0;for(let a=0;a<t;a++)n[a]===0?(i=a,r[a]=e[t-1]):r[a]=e[n[a]-1];return{transformed:r,pointer:i}}function xe(e){let t=e.length,n=new Int32Array(t),r=new Int32Array(t);for(let i=0;i<t;i++)n[i]=i,r[i]=e[i];for(let e=1;e<t;e*=2){let i=r.slice();n.sort((n,r)=>i[n]===i[r]?i[(n+e)%t]-i[(r+e)%t]:i[n]-i[r]),r[n[0]]=0;for(let a=1;a<t;a++)i[n[a]]===i[n[a-1]]&&i[(n[a]+e)%t]===i[(n[a-1]+e)%t]?r[n[a]]=r[n[a-1]]:r[n[a]]=r[n[a-1]]+1;if(r[n[t-1]]===t-1)break}return n}function Se(e,t){let n=[];for(let e=0;e<256;e++)t[e]&&n.push(e);let r=Array(256).fill(-1);for(let e=0;e<n.length;e++)r[n[e]]=e;let i=new Uint16Array(e.length),a=n.slice();for(let t=0;t<e.length;t++){let n=e[t],r=0;for(;a[r]!==n;)r++;if(i[t]=r,r>0){let e=a[r];for(let e=r;e>0;e--)a[e]=a[e-1];a[0]=e}}return{encoded:i,length:e.length}}function Ce(e,t,n){let r=n+1,i=[],a=0;for(;a<t;)if(e[a]===0){let n=0;for(;a<t&&e[a]===0;)n++,a++;let r=n;for(;r>0;)r--,r&1?i.push(1):i.push(0),r>>>=1}else i.push(e[a]+1),a++;i.push(r);let o=new Uint16Array(i.length);for(let e=0;e<i.length;e++)o[e]=i[e];return{symbols:o,length:i.length,eob:r}}function we(e,t,n){if(t<=1){let t=Array(e.length).fill(0);for(let n=0;n<e.length;n++)e[n]>0&&(t[n]=1);return{codeLengths:t,maxLen:1,minLen:1}}let r=[];for(let t=0;t<e.length;t++)e[t]>0&&r.push({freq:e[t],symbol:t,left:null,right:null});if(r.length===0)return{codeLengths:Array(e.length).fill(0),maxLen:0,minLen:0};if(r.length===1){let t=Array(e.length).fill(0);return t[r[0].symbol]=1,{codeLengths:t,maxLen:1,minLen:1}}for(;r.length>1;){r.sort((e,t)=>e.freq-t.freq);let e=r.shift(),t=r.shift();r.push({freq:e.freq+t.freq,symbol:-1,left:e,right:t})}let i=Array(e.length).fill(0);function a(e,t){if(!e.left&&!e.right){i[e.symbol]=t;return}e.left&&a(e.left,t+1),e.right&&a(e.right,t+1)}a(r[0],0);let o=!0;for(;o;){o=!1;for(let e=0;e<i.length;e++)i[e]>n&&(i[e]=n,o=!0);if(o){let e=0;for(let t=0;t<i.length;t++)i[t]>0&&(e+=1/(1<<i[t]));if(e>1)for(let t=1;t<n&&e>1;t++)for(let n=0;n<i.length&&e>1;n++)i[n]===t&&(i[n]++,e-=1/(1<<t)-1/(1<<t+1));o=!1;for(let e=0;e<i.length;e++)if(i[e]>n){o=!0;break}}}let s=n,c=0;for(let e=0;e<i.length;e++)i[e]>0&&(i[e]<s&&(s=i[e]),i[e]>c&&(c=i[e]));return{codeLengths:i,maxLen:c,minLen:s}}function Te(e,t){let n=Array(t).fill(0),r=e.slice(0,t),i=Math.max(...r,0),a=Array(i+1).fill(0);for(let e=0;e<t;e++)r[e]>0&&a[r[e]]++;let o=Array(i+1).fill(0),s=0;for(let e=1;e<=i;e++)s=s+a[e-1]<<1,o[e]=s;for(let e=0;e<t;e++)r[e]>0&&(n[e]=o[r[e]]++);return{codes:n,lengths:r}}function Ee(e,t,n){e.writeBits(24,3227993),e.writeBits(24,2511705),e.writeBits(32,n),e.writeBit(0);let{transformed:r,pointer:i}=be(ye(t));e.writeBits(24,i);let a=Array(256).fill(!1);for(let e=0;e<r.length;e++)a[r[e]]=!0;let o=Array(16).fill(!1);for(let e=0;e<16;e++)for(let t=0;t<16;t++)if(a[e*16+t]){o[e]=!0;break}for(let t=0;t<16;t++)e.writeBit(o[t]?1:0);for(let t=0;t<16;t++)if(o[t])for(let n=0;n<16;n++)e.writeBit(a[t*16+n]?1:0);let s=0;for(let e=0;e<256;e++)a[e]&&s++;let{encoded:c,length:l}=Se(r,a),{symbols:u,length:d}=Ce(c,l,s),f=s+2,p=Math.ceil(d/50),m;m=d<200?2:d<600?3:d<1200?4:d<2400?5:6,m>p&&(m=Math.max(2,p));let h=[];for(let e=0;e<m;e++)h.push(Array(f).fill(0));let g=new Int32Array(p);for(let e=0;e<p;e++)g[e]=e%m;for(let e=0;e<p;e++){let t=e*50,n=Math.min(t+50,d),r=g[e];for(let e=t;e<n;e++)h[r][u[e]]++}function _(e){for(let t=0;t<f;t++)e[t]<1&&(e[t]=1)}let v=[];for(let e=0;e<m;e++)_(h[e]),v.push(we(h[e],f,20));for(let e=0;e<4;e++){for(let e=0;e<m;e++)h[e].fill(0);for(let e=0;e<p;e++){let t=e*50,n=Math.min(t+50,d),r=0,i=1/0;for(let e=0;e<m;e++){let a=0;for(let r=t;r<n;r++)a+=v[e].codeLengths[u[r]]||20;a<i&&(i=a,r=e)}g[e]=r;for(let e=t;e<n;e++)h[r][u[e]]++}for(let e=0;e<m;e++)_(h[e]),v[e]=we(h[e],f,20)}e.writeBits(3,m),e.writeBits(15,p);let y=[],b=[];for(let e=0;e<m;e++)b.push(e);for(let e=0;e<p;e++){let t=g[e],n=0;for(;b[n]!==t;)n++;if(y.push(n),n>0){let e=b[n];for(let e=n;e>0;e--)b[e]=b[e-1];b[0]=e}}for(let t=0;t<p;t++){for(let n=0;n<y[t];n++)e.writeBit(1);e.writeBit(0)}for(let t=0;t<m;t++){let n=v[t].codeLengths,r=n[0];e.writeBits(5,r);for(let t=0;t<f;t++){let i=n[t];for(;r<i;)e.writeBit(1),e.writeBit(0),r++;for(;r>i;)e.writeBit(1),e.writeBit(1),r--;e.writeBit(0)}}for(let e=0;e<m;e++){let{codes:t,lengths:n}=Te(v[e].codeLengths,f);v[e]=Object.assign(v[e],{_codes:t,_lengths:n})}let x=0,S=0;for(let t=0;t<d;t++){(S===0||S>=50)&&(t>0&&x++,S=0);let n=v[g[x]],r=u[t],i=n._lengths[r],a=n._codes[r];i>0&&e.writeBits(i,a),S++}}var De=10*1024*1024;function Oe(e,t=9,n=De){if(t<1||t>9)throw Error(`Block size level must be 1-9`);if(e.length>n)throw Error(`Input too large for bzip2 compression (${e.length} bytes, max ${n})`);let r=t*1e5,i=new ve;i.writeBits(8,66),i.writeBits(8,90),i.writeBits(8,104),i.writeBits(8,48+t);let a=0,o=0;for(;o<e.length;){let t=Math.min(o+r,e.length),n=e.subarray(o,t),s=4294967295;for(let e=0;e<n.length;e++)s=_e(s,n[e]);s=~s>>>0,a=(a<<1|a>>>31)>>>0,a=(a^s)>>>0,Ee(i,n,s),o=t}return i.writeBits(24,1536581),i.writeBits(24,3690640),i.writeBits(32,a),i.finish()}var G=null,K=null;async function ke(){if(G)return G;if(K)throw K;try{return G=await r.runTrustedAsync(()=>import(`./lzma-BSEvzrCT.mjs`)),G}catch{throw K=Error(`xz compression requires node-liblzma which failed to load. Install liblzma-dev (apt) or xz (brew) and reinstall dependencies.`),K}}var q=null,J=null;async function Ae(){if(q)return q;if(J)throw J;try{return q=await r.runTrustedAsync(()=>import(`./lib-BbNAtG4h.mjs`).then(t=>e(t.default,1))),q}catch{throw J=Error(`zstd compression requires @mongodb-js/zstd which is not installed. Install it with: npm install @mongodb-js/zstd`),J}}var Y=100*1024*1024,je=512,Me=1e4;function Ne(e){let t=`file`;e.isDirectory?t=`directory`:e.isSymlink&&(t=`symlink`);let n=e.name;e.isDirectory&&!n.endsWith(`/`)&&(n+=`/`);let r;e.content!==void 0&&(r=typeof e.content==`string`?new TextEncoder().encode(e.content):e.content);let i=e.isDirectory||e.isSymlink?0:r?.length??0;return{header:{name:n,mode:e.mode??(e.isDirectory?493:420),uid:e.uid??0,gid:e.gid??0,size:i,mtime:e.mtime??new Date,type:t,linkname:e.linkTarget??``,uname:`user`,gname:`user`},body:r}}async function X(e){return me(e.map(Ne))}async function Pe(e){let t=await X(e),n=new ReadableStream({start(e){e.enqueue(t),e.close()}}).pipeThrough(ce()).getReader(),r=[];for(;;){let{done:e,value:t}=await n.read();if(e)break;r.push(t)}let i=r.reduce((e,t)=>e+t.length,0),a=new Uint8Array(i),o=0;for(let e of r)a.set(e,o),o+=e.length;return a}async function Z(e){if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};if(e.length<je||e.length%je!==0)return{entries:[],error:`Invalid tar archive format`};try{let t=await he(e),n=[];for(let e of t){if(n.length>=Me)return{entries:n,error:`Too many entries (max ${Me})`};let t=`file`;switch(e.header.type){case`directory`:t=`directory`;break;case`symlink`:t=`symlink`;break;case`link`:t=`hardlink`;break;case`file`:t=`file`;break;default:t=`other`}n.push({name:e.header.name,mode:e.header.mode??420,uid:e.header.uid??0,gid:e.header.gid??0,size:e.header.size,mtime:e.header.mtime??new Date,type:t,linkTarget:e.header.linkname||void 0,content:e.data??new Uint8Array})}return{entries:n}}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}async function Fe(e){if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=new ReadableStream({start(t){t.enqueue(e),t.close()}}).pipeThrough(le()).getReader(),n=[],r=0;for(;;){let{done:e,value:i}=await t.read();if(e)break;if(r+=i.length,r>Y)return await t.cancel(),{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`};n.push(i)}let i=new Uint8Array(r),a=0;for(let e of n)i.set(e,a),a+=e.length;return Z(i)}catch(e){return{entries:[],error:`Decompression failed: ${e instanceof Error?e.message:`Unknown error`}`}}}function Ie(e){return e.length>=2&&e[0]===31&&e[1]===139}function Le(e){return e.length>=3&&e[0]===66&&e[1]===90&&e[2]===104}function Re(e){return e.length>=6&&e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0}async function ze(e){let t=f.default.decode(Buffer.from(e));return new Uint8Array(t)}async function Be(e){return Oe(e,9)}async function Ve(e){let t=(await ke()).unxzSync(Buffer.from(e));return new Uint8Array(t)}async function He(e){let t=(await ke()).xzSync(Buffer.from(e));return new Uint8Array(t)}async function Ue(e){return Be(await X(e))}async function We(e,t){if(!t?.allowNativeCodecs)throw Error(`xz compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.`);return He(await X(e))}async function Ge(e){if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=await ze(e);return t.length>Y?{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`}:Z(t)}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}async function Ke(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:`xz decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction.`};if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=await Ve(e);return t.length>Y?{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`}:Z(t)}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}function qe(e){return e.length>=4&&e[0]===40&&e[1]===181&&e[2]===47&&e[3]===253}async function Je(e){let t=await(await Ae()).compress(Buffer.from(e),3);return new Uint8Array(t)}async function Ye(e){let t=await(await Ae()).decompress(Buffer.from(e));return new Uint8Array(t)}async function Xe(e,t){if(!t?.allowNativeCodecs)throw Error(`zstd compression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in.`);return Je(await X(e))}async function Ze(e,t){if(!t?.allowNativeCodecs)return{entries:[],error:`zstd decompression is disabled by default (native codec risk). Pass { allowNativeCodecs: true } to opt in, or decompress the archive externally before extraction.`};if(e.length>Y)return{entries:[],error:`Archive too large (max ${Y} bytes)`};try{let t=await Ye(e);return t.length>Y?{entries:[],error:`Decompressed archive too large (max ${Y} bytes)`}:Z(t)}catch(e){return{entries:[],error:e instanceof Error?e.message:`Unknown error`}}}function Qe(e){let t={create:!1,append:!1,update:!1,extract:!1,list:!1,file:``,autoCompress:!1,gzip:!1,bzip2:!1,xz:!1,zstd:!1,verbose:!1,toStdout:!1,keepOldFiles:!1,touch:!1,directory:``,preserve:!1,absoluteNames:!1,strip:0,exclude:[],filesFrom:``,excludeFrom:``,wildcards:!1},n=[],r=0;for(;r<e.length;){let a=e[r];if(a.startsWith(`-`)&&!a.startsWith(`--`)&&a.length>2){if(/^-\d+$/.test(a)){n.push(a),r++;continue}for(let n=1;n<a.length;n++){let o=a[n];switch(o){case`c`:t.create=!0;break;case`r`:t.append=!0;break;case`u`:t.update=!0;break;case`x`:t.extract=!0;break;case`t`:t.list=!0;break;case`a`:t.autoCompress=!0;break;case`z`:t.gzip=!0;break;case`j`:t.bzip2=!0;break;case`J`:t.xz=!0;break;case`v`:t.verbose=!0;break;case`O`:t.toStdout=!0;break;case`k`:t.keepOldFiles=!0;break;case`m`:t.touch=!0;break;case`p`:t.preserve=!0;break;case`P`:t.absoluteNames=!0;break;case`f`:if(n<a.length-1)t.file=a.substring(n+1),n=a.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:``,stderr:`tar: option requires an argument -- 'f'
|
|
3
3
|
`,exitCode:2}};t.file=e[r]}break;case`C`:if(n<a.length-1)t.directory=a.substring(n+1),n=a.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:``,stderr:`tar: option requires an argument -- 'C'
|
|
4
4
|
`,exitCode:2}};t.directory=e[r]}break;case`T`:if(n<a.length-1)t.filesFrom=a.substring(n+1),n=a.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:``,stderr:`tar: option requires an argument -- 'T'
|
|
5
5
|
`,exitCode:2}};t.filesFrom=e[r]}break;case`X`:if(n<a.length-1)t.excludeFrom=a.substring(n+1),n=a.length;else{if(r++,r>=e.length)return{ok:!1,error:{stdout:``,stderr:`tar: option requires an argument -- 'X'
|
|
@@ -60,4 +60,4 @@ import{s as e,t}from"./chunk-C94x7I9S.mjs";import{t as n}from"./chunk-YNYSPYQ5-g
|
|
|
60
60
|
`,exitCode:2}}}if(r.excludeFrom){let e=t.fs.resolvePath(t.cwd,r.excludeFrom);try{let n=(await t.fs.readFile(e)).split(`
|
|
61
61
|
`).map(e=>e.trim()).filter(e=>e.length>0&&!e.startsWith(`#`));r.exclude.push(...n)}catch{return{stdout:``,stderr:`tar: ${r.excludeFrom}: Cannot open: No such file or directory
|
|
62
62
|
`,exitCode:2}}}return r.create?ot(t,r,l):r.append?st(t,r,l):r.update?ct(t,r,l):r.extract?lt(t,r,l):ut(t,r,l)}},ft={name:`tar`,flags:[{flag:`-c`,type:`boolean`},{flag:`-x`,type:`boolean`},{flag:`-t`,type:`boolean`},{flag:`-f`,type:`value`,valueHint:`path`},{flag:`-z`,type:`boolean`},{flag:`-j`,type:`boolean`},{flag:`-v`,type:`boolean`},{flag:`-C`,type:`value`,valueHint:`path`},{flag:`--strip-components`,type:`value`,valueHint:`number`},{flag:`--exclude`,type:`value`,valueHint:`pattern`}],needsArgs:!0};export{dt as n,ft as t};
|
|
63
|
-
//# sourceMappingURL=chunk-BRGMQKJV-
|
|
63
|
+
//# sourceMappingURL=chunk-BRGMQKJV-DtyxDw61.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,r as t,t as n}from"./chunk-DXB73IDG-
|
|
1
|
+
import{a as e,r as t,t as n}from"./chunk-DXB73IDG-Bx-Ikbnu.mjs";import{n as r,r as i,t as a}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{open as o}from"node:fs/promises";var s=t(e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else{if(a===c)return o?NaN:(p?-1:1)*(1/0);o+=2**r,a-=l}return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}}),c=t((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}}),l=t((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=i,n.enabled=s,n.humanize=c(),n.destroy=u,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(typeof t>`u`?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n}),u=t((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=l()(e);var{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}}),d=t((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}}),f=t((e,t)=>{var r=n(`os`),i=n(`tty`),a=d(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}t.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}}),p=t((e,t)=>{var r=n(`tty`),i=n(`util`);e.init=p,e.log=c,e.formatArgs=o,e.save=u,e.load=d,e.useColors=a,e.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let t=f();t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in e.inspectOpts?!!e.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:n,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${n} \x1B[0m`;e[0]=a+e[0].split(`
|
|
2
2
|
`).join(`
|
|
3
3
|
`+a),e.push(i+`m+`+t.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+n+` `+e[0]}function s(){return e.inspectOpts.hideDate?``:new Date().toISOString()+` `}function c(...t){return process.stderr.write(i.formatWithOptions(e.inspectOpts,...t)+`
|
|
4
4
|
`)}function u(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function d(){return process.env.DEBUG}function p(t){t.inspectOpts={};let n=Object.keys(e.inspectOpts);for(let r=0;r<n.length;r++)t.inspectOpts[n[r]]=e.inspectOpts[n[r]]}t.exports=l()(e);var{formatters:m}=t.exports;m.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split(`
|
|
@@ -21,4 +21,4 @@ ieee754/index.js:
|
|
|
21
21
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
22
22
|
*/
|
|
23
23
|
export{Oe as n,De as t};
|
|
24
|
-
//# sourceMappingURL=chunk-CR5AFCPT-
|
|
24
|
+
//# sourceMappingURL=chunk-CR5AFCPT-BD_awIEP.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var e=globalThis.SharedArrayBuffer,t=globalThis.Atomics,n=performance.now.bind(performance),r=globalThis.Headers;export{e as i,t as n,n as r,r as t};
|
|
2
|
-
//# sourceMappingURL=chunk-CWQS3NFK-
|
|
2
|
+
//# sourceMappingURL=chunk-CWQS3NFK-DNm_iIwd.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{t as e}from"./chunk-OJDRYQWQ-
|
|
1
|
+
import{t as e}from"./chunk-OJDRYQWQ-LGuZyK6R.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-V0JXh91S.mjs";var r={name:`bash`,summary:`execute shell commands or scripts`,usage:`bash [OPTIONS] [SCRIPT_FILE] [ARGUMENTS...]`,options:[`-c COMMAND execute COMMAND string`,` --help display this help and exit`],notes:[`Without -c, reads and executes commands from SCRIPT_FILE.`,`Arguments are passed as $1, $2, etc. to the script.`,`$0 is set to the script name (or "bash" with -c).`]},i={name:`bash`,async execute(e,i){if(n(e))return t(r);if(e[0]===`-c`&&e.length>=2){let t=e[1];return o(t,e[2]||`bash`,e.slice(3),i)}if(e.length===0)return i.stdin?.trim()?o(i.stdin,`bash`,[],i):{stdout:``,stderr:``,exitCode:0};let a=e[0],s=e.slice(1);try{let e=i.fs.resolvePath(i.cwd,a);return o(await i.fs.readFile(e),a,s,i)}catch{return{stdout:``,stderr:`bash: ${a}: No such file or directory
|
|
2
2
|
`,exitCode:127}}}},a={name:`sh`,async execute(e,i){if(n(e))return t({...r,name:`sh`,summary:`execute shell commands or scripts (POSIX shell)`});if(e[0]===`-c`&&e.length>=2){let t=e[1];return o(t,e[2]||`sh`,e.slice(3),i)}if(e.length===0)return i.stdin?.trim()?o(i.stdin,`sh`,[],i):{stdout:``,stderr:``,exitCode:0};let a=e[0],s=e.slice(1);try{let e=i.fs.resolvePath(i.cwd,a);return o(await i.fs.readFile(e),a,s,i)}catch{return{stdout:``,stderr:`sh: ${a}: No such file or directory
|
|
3
3
|
`,exitCode:127}}}};async function o(t,n,r,i){if(!i.exec)return{stdout:``,stderr:`bash: internal error: exec function not available
|
|
4
4
|
`,exitCode:1};let a=e(i.exportedEnv||{},{0:n,"#":String(r.length),"@":r.join(` `),"*":r.join(` `)});r.forEach((e,t)=>{a[String(t+1)]=e});let o=t;if(o.startsWith(`#!`)){let e=o.indexOf(`
|
|
5
5
|
`);e!==-1&&(o=o.slice(e+1))}return await i.exec(o,{env:a,cwd:i.cwd,stdin:i.stdin,signal:i.signal})}var s={name:`bash`,flags:[{flag:`-c`,type:`value`,valueHint:`string`}],stdinType:`text`},c={name:`sh`,flags:[{flag:`-c`,type:`value`,valueHint:`string`}],stdinType:`text`};export{i,c as n,s as r,a as t};
|
|
6
|
-
//# sourceMappingURL=chunk-D6CWQ5DW-
|
|
6
|
+
//# sourceMappingURL=chunk-D6CWQ5DW-CaV8X9is.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as e}from"./chunk-C94x7I9S.mjs";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(t=>typeof e<`u`?e:typeof Proxy<`u`?new Proxy(t,{get:(t,n)=>(typeof e<`u`?e:t)[n]}):t)(function(t){if(typeof e<`u`)return e.apply(this,arguments);throw Error(`Dynamic require of "`+t+`" is not supported`)}),c=(e,t)=>()=>(e&&(t=e(e=0)),t),l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},d=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!o.call(e,c)&&c!==a&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},f=(e,r,i)=>(i=e==null?{}:t(a(e)),d(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e)),p=e=>d(n({},`__esModule`,{value:!0}),e);export{f as a,u as i,c as n,p as o,l as r,s as t};
|
|
2
|
-
//# sourceMappingURL=chunk-DXB73IDG-
|
|
2
|
+
//# sourceMappingURL=chunk-DXB73IDG-Bx-Ikbnu.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T as e,w as t}from"./src-BkCVz_TJ.mjs";import{c as n}from"./chunk-ICPOFSXX-
|
|
2
|
-
//# sourceMappingURL=chunk-EDXVE4YY-
|
|
1
|
+
import{T as e,w as t}from"./src-BkCVz_TJ.mjs";import{c as n}from"./chunk-ICPOFSXX-D0MVsm4H.mjs";var r=t((t,r,o,s)=>{t.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(t,r);n(t,l,c,s);let f=a(u,d,c,l,r);t.attr(`viewBox`,f),e.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=t((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=t((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t};
|
|
2
|
+
//# sourceMappingURL=chunk-EDXVE4YY-B_wA-KGy.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e}from"./chunk-C94x7I9S.mjs";import{T as t,p as n,w as r}from"./src-BkCVz_TJ.mjs";import{b as i,w as a,y as o}from"./chunk-ICPOFSXX-
|
|
1
|
+
import{s as e}from"./chunk-C94x7I9S.mjs";import{T as t,p as n,w as r}from"./src-BkCVz_TJ.mjs";import{b as i,w as a,y as o}from"./chunk-ICPOFSXX-D0MVsm4H.mjs";import{B as s,F as c,G as l,H as u,I as d,L as f,P as p,R as m,U as h,V as g,W as _,h as v,l as y,z as b}from"./chunk-5PVQY5BW-C5V4E1lO.mjs";import{t as x}from"./line-C62ka-l9.mjs";import{n as S}from"./chunk-U2HBQHQK-DB1SzWgs.mjs";import{i as C,n as w,r as T,t as E}from"./chunk-BSJP7CBP-BG3yJGkJ.mjs";import{n as D}from"./chunk-ZZ45TVLE-CXznFlWR.mjs";import{i as O,n as ee}from"./chunk-X2U36JSP-CqOGcGN3.mjs";import{t as k}from"./rough.cjs-C-63phNL.mjs";import{r as A}from"./chunk-5FUZZQ4R-DFR5eSi-.mjs";var te=e(k(),1),ne=r((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&N(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&N(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),j={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},M=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],N=r((e,n,r,i,a,o,s=!1,c)=>{let l=j[r],u=l&&M.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),re=r(e=>typeof e==`string`?e:i()?.flowchart?.curve,`resolveEdgeCurveType`),P=new Map,F=new Map,I=r(()=>{P.clear(),F.clear()},`clear`),L=r(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),R=r(async(e,r)=>{let o=i(),s=a(o),{labelStyles:c}=O(r);r.labelStyle=c;let l=e.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,r.id),d=r.labelType===`markdown`,f=await S(e,r.label,{style:L(r.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),t.info(`abc82`,r,r.labelType);let p=f.getBBox(),m=p;if(s){let e=f.children[0],t=n(f);p=e.getBoundingClientRect(),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();e&&typeof e.getBBox==`function`&&(m=e.getBBox())}u.attr(`transform`,E(m,s)),P.set(r.id,l),r.width=p.width,r.height=p.height;let h;if(r.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),a=await A(i,r.startLabelLeft,L(r.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,E(o,s)),F.get(r.id)||F.set(r.id,{}),F.get(r.id).startLeft=t,z(h,r.startLabelLeft)}if(r.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),a=await A(i,r.startLabelRight,L(r.labelStyle)||``,!1,!1);h=a,i.node().appendChild(a);let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,E(o,s)),F.get(r.id)||F.set(r.id,{}),F.get(r.id).startRight=t,z(h,r.startLabelRight)}if(r.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),a=await A(i,r.endLabelLeft,L(r.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,E(o,s)),t.node().appendChild(a),F.get(r.id)||F.set(r.id,{}),F.get(r.id).endLeft=t,z(h,r.endLabelLeft)}if(r.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`),a=await A(i,r.endLabelRight,L(r.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,E(o,s)),t.node().appendChild(a),F.get(r.id)||F.set(r.id,{}),F.get(r.id).endRight=t,z(h,r.endLabelRight)}return f},`insertEdgeLabel`);function z(e,t){a(i())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}r(z,`setTerminalWidth`);var B=r((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,P.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:a}=D(i());if(e.label){let i=P.get(e.id),o=e.x,s=e.y;if(r){let i=v.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}i.attr(`transform`,`translate(${o}, ${s+a/2})`)}if(e.startLabelLeft){let t=F.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=F.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=F.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=F.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=v.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),V=r((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),H=r((e,n,r)=>{t.debug(`intersection calc abc89:
|
|
2
2
|
outsidePoint: ${JSON.stringify(n)}
|
|
3
3
|
insidePoint : ${JSON.stringify(r)}
|
|
4
4
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.x<n.x?s-o:s+o,l=e.height/2,u=Math.abs(n.y-r.y),d=Math.abs(n.x-r.x);if(Math.abs(a-n.y)*s>Math.abs(i-n.x)*l){let e=r.y<n.y?n.y-l-a:a-l-n.y;c=d*e/u;let i={x:r.x<n.x?r.x+c:r.x-d+c,y:r.y<n.y?r.y+u-e:r.y-u+e};return c===0&&(i.x=n.x,i.y=n.y),d===0&&(i.x=n.x),u===0&&(i.y=n.y),t.debug(`abc89 top/bottom calc, Q ${u}, q ${e}, R ${d}, r ${c}`,i),i}else{c=r.x<n.x?n.x-s-i:i-s-n.x;let e=u*c/d,a=r.x<n.x?r.x+d-c:r.x-d+c,o=r.y<n.y?r.y+e:r.y-e;return t.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`,{_x:a,_y:o}),c===0&&(a=n.x,o=n.y),d===0&&(a=n.x),u===0&&(o=n.y),{x:a,y:o}}},`intersection`),U=r((e,n)=>{t.warn(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(t.info(`abc88 checking point`,e,n),!V(n,e)&&!a){let o=H(n,i,e);t.debug(`abc88 inside`,e,i,o),t.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?t.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else t.warn(`abc88 outside`,e,i),i=e,a||r.push(e)}),t.debug(`returning points`,r),r},`cutPathAtIntersect`);function W(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}r(W,`extractCornerPoints`);var G=r(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),ie=r(function(e){let{cornerPointPositions:n}=W(e),r=[];for(let i=0;i<e.length;i++)if(n.includes(i)){let n=e[i-1],a=e[i+1],o=e[i],s=G(n,o,5),c=G(a,o,5),l=c.x-s.x,u=c.y-s.y;r.push(s);let d=Math.sqrt(2)*2,f={x:o.x,y:o.y};Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10?(t.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):t.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(e[i]);return r},`fixCorners`),ae=r((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),K=r(function(e,r,a,o,S,T,E,D=!1){if(!E)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:O}=i(),k=r.points,A=!1,j=S;var M=T;let N=[];for(let e in r.cssCompiledStyles)ee(e)||N.push(r.cssCompiledStyles[e]);t.debug(`UIO intersect check`,r.points,M.x,j.x),M.intersect&&j.intersect&&!D&&(k=k.slice(1,r.points.length-1),k.unshift(j.intersect(k[0])),t.debug(`Last point UIO`,r.start,`-->`,r.end,k[k.length-1],M,M.intersect(k[k.length-1])),k.push(M.intersect(k[k.length-1])));let P=btoa(JSON.stringify(k));r.toCluster&&(t.info(`to cluster abc88`,a.get(r.toCluster)),k=U(r.points,a.get(r.toCluster).node),A=!0),r.fromCluster&&(t.debug(`from cluster abc88`,a.get(r.fromCluster),JSON.stringify(k,null,2)),k=U(k.reverse(),a.get(r.fromCluster).node).reverse(),A=!0);let F=k.filter(e=>!Number.isNaN(e.y)),I=re(r.curve);I!==`rounded`&&(F=ie(F));let L=l;switch(I){case`linear`:L=l;break;case`basis`:L=u;break;case`cardinal`:L=g;break;case`bumpX`:L=h;break;case`bumpY`:L=_;break;case`catmullRom`:L=s;break;case`monotoneX`:L=m;break;case`monotoneY`:L=b;break;case`natural`:L=f;break;case`step`:L=d;break;case`stepAfter`:L=p;break;case`stepBefore`:L=c;break;case`rounded`:L=l;break;default:L=u}let{x:R,y:z}=w(r),B=x().x(R).y(z).curve(L),V;switch(r.thickness){case`normal`:V=`edge-thickness-normal`;break;case`thick`:V=`edge-thickness-thick`;break;case`invisible`:V=`edge-thickness-invisible`;break;default:V=`edge-thickness-normal`}switch(r.pattern){case`solid`:V+=` edge-pattern-solid`;break;case`dotted`:V+=` edge-pattern-dotted`;break;case`dashed`:V+=` edge-pattern-dashed`;break;default:V+=` edge-pattern-solid`}let H,W=I===`rounded`?q(Y(F,r),5):B(F),G=Array.isArray(r.style)?r.style:[r.style],K=G.find(e=>e?.startsWith(`stroke:`)),J=``;r.animate&&(J=`edge-animation-fast`),r.animation&&(J=`edge-animation-`+r.animation);let X=!1;if(r.look===`handDrawn`){let t=te.default.svg(e);Object.assign([],F);let i=t.path(W,{roughness:.3,seed:O});V+=` transition`,H=n(i).select(`path`).attr(`id`,`${E}-${r.id}`).attr(`class`,` `+V+(r.classes?` `+r.classes:``)+(J?` `+J:``)).attr(`style`,G?G.reduce((e,t)=>e+`;`+t,``):``);let a=H.attr(`d`);H.attr(`d`,a),e.node().appendChild(H.node())}else{let t=N.join(`;`),n=G?G.reduce((e,t)=>e+t+`;`,``):``,i=(t?t+`;`+n+`;`:n)+`;`+(G?G.reduce((e,t)=>e+`;`+t,``):``);H=e.append(`path`).attr(`d`,W).attr(`id`,`${E}-${r.id}`).attr(`class`,` `+V+(r.classes?` `+r.classes:``)+(J?` `+J:``)).attr(`style`,i),K=i.match(/stroke:([^;]+)/)?.[1],X=r.animate===!0||!!r.animation||t.includes(`animation`);let a=H.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=C[r.arrowTypeStart]||0,c=C[r.arrowTypeEnd]||0;if(r.look===`neo`&&!X){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?ae(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;H.attr(`style`,e+H.attr(`style`))}}H.attr(`data-edge`,!0),H.attr(`data-et`,`edge`),H.attr(`data-id`,r.id),H.attr(`data-points`,P),H.attr(`data-look`,y(r.look)),r.showPoints&&F.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let Z=``;(i().flowchart.arrowMarkerAbsolute||i().state.arrowMarkerAbsolute)&&(Z=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Z=Z.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),t.info(`arrowTypeStart`,r.arrowTypeStart),t.info(`arrowTypeEnd`,r.arrowTypeEnd);let Q=!X&&r?.look===`neo`;ne(H,r,Z,E,o,Q,K);let oe=Math.floor(k.length/2),se=k[oe];v.isLabelCoordinateInPath(se,H.attr(`d`))||(A=!0);let $={};return A&&($.updatedPath=k),$.originalPath=r.points,$},`insertEdge`);function q(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}r(q,`generateRoundedPath`);function J(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}r(J,`calculateDeltaAndAngle`);function Y(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&T[t.arrowTypeStart]){let r=T[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=J(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&T[t.arrowTypeEnd]){let i=T[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=J(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}r(Y,`applyMarkerOffsetsToPoints`);var X=r((e,t,n,r)=>{t.forEach(t=>{Z[t](e,n,r)})},`insertMarkers`),Z={extension:r((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:r((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:r((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:r((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:r((e,t,n)=>{let{themeVariables:r}=o(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:r((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:r((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:r((e,t,n)=>{let{themeVariables:r}=o(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:r((e,t,n)=>{let{themeVariables:r}=o(),{strokeWidth:i,mainBkg:a}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);c.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),c.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:r((e,t,n)=>{let{themeVariables:r}=o(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:r((e,t,n)=>{let{themeVariables:r}=o(),{strokeWidth:i,mainBkg:a}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);c.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),c.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:r((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
|
|
@@ -8,4 +8,4 @@ import{s as e}from"./chunk-C94x7I9S.mjs";import{T as t,p as n,w as r}from"./src-
|
|
|
8
8
|
L20,10
|
|
9
9
|
M20,10
|
|
10
10
|
L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:r((e,t,n)=>{let{themeVariables:r}=o(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},Q=X;export{B as a,Q as i,K as n,R as r,I as t};
|
|
11
|
-
//# sourceMappingURL=chunk-ENJZ2VHE-
|
|
11
|
+
//# sourceMappingURL=chunk-ENJZ2VHE-DwiyImt2.mjs.map
|