@inkeep/open-knowledge 0.49.0 → 0.49.2
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/abnfDiagram-VRR7QNED-DWDzSKGM.mjs +2 -0
- package/dist/acp-harness-probe-O9BEMpdb.mjs +3 -0
- package/dist/alias-JE7RI5QX-BLuOrjl2.mjs +7 -0
- package/dist/alias-JE7RI5QX-VxEqWoTW.mjs +1 -0
- package/dist/arc-DXUbbcxK.mjs +2 -0
- package/dist/architecture-TIHT7OUA-Bl3hpxt3.mjs +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-HYEpY7T3.mjs +37 -0
- package/dist/array-BbgQa93P.mjs +2 -0
- package/dist/awk2-BBAGSFUB-ClUuupKf.mjs +21 -0
- package/dist/awk2-BBAGSFUB-Dq-YdAGA.mjs +1 -0
- package/dist/banner-Be20aAVc.mjs +3 -0
- package/dist/base64-4YMZCVJ5-CtkujsXK.mjs +6 -0
- package/dist/base64-4YMZCVJ5-dXz6vbV-.mjs +1 -0
- package/dist/basename-AA2KJYZQ-BhoOTAHi.mjs +1 -0
- package/dist/basename-AA2KJYZQ-CEdH80GO.mjs +6 -0
- package/dist/bash-IJWYRKFO-BDtU-lTC.mjs +6 -0
- package/dist/bash-IJWYRKFO-jaJEvAZe.mjs +1 -0
- package/dist/blockDiagram-677ZJIJ3-yJugV29e.mjs +133 -0
- package/dist/c4Diagram-LMCZKHZV-BFQQLctA.mjs +11 -0
- package/dist/cat-RDUMLXKC-D1H4LA3Z.mjs +6 -0
- package/dist/cat-RDUMLXKC-DFuXWxVq.mjs +1 -0
- package/dist/channel-Cjp51EO_.mjs +2 -0
- package/dist/chmod-SYMGL4JA-ByMUk130.mjs +1 -0
- package/dist/chmod-SYMGL4JA-lEGJICyB.mjs +8 -0
- package/dist/chokidar-dh8zokRd.mjs +4 -0
- package/dist/chunk-24IMIIXA-RjlBWJtr.mjs +2 -0
- package/dist/chunk-2Q5K7J3B-Ck8oGqYt.mjs +2 -0
- package/dist/chunk-2TRDZQLB-AH-I_6yN.mjs +18 -0
- package/dist/chunk-2TRDZQLB-ZoW1EBbl.mjs +18 -0
- package/dist/chunk-32BRIVSS-Dwq69mnI.mjs +2 -0
- package/dist/chunk-3BS5SKQH-DpdUzS0R.mjs +140 -0
- package/dist/chunk-3H6UQG3A-BWCaN15a.mjs +9 -0
- package/dist/chunk-3THT3N7L-DYkTD3HD.mjs +2 -0
- package/dist/chunk-3ZUFRYJ4-H1A1hWy1.mjs +2 -0
- package/dist/chunk-3ZUFRYJ4-ekaYB_vG.mjs +2 -0
- package/dist/chunk-44UOCSGV-D1FZHMOP.mjs +2 -0
- package/dist/chunk-4GTNDTRF-Cx89i2Y1.mjs +8 -0
- package/dist/chunk-4HHKTUW3-Dk2l1S8J.mjs +3 -0
- package/dist/chunk-4Q4SM6WR-CGuvvBWe.mjs +5 -0
- package/dist/chunk-52WLFC77-Cn-qt8h-.mjs +11 -0
- package/dist/chunk-55VFSPNA-D2U7n2ka.mjs +3 -0
- package/dist/chunk-5FCAYU7R-DszODYLe.mjs +2 -0
- package/dist/chunk-5HE753X5-DDnyF29o.mjs +2 -0
- package/dist/chunk-5JV3BV7I-BkeVAZnj.mjs +2 -0
- package/dist/chunk-5QMZ5MUS-C5NTf5Rj.mjs +5 -0
- package/dist/chunk-5QVNJEHU-DS9zA_YV.mjs +9 -0
- package/dist/chunk-5TONJI2A-CzUNHQPX.mjs +3 -0
- package/dist/chunk-5V6VZH6T-DBFenjXz.mjs +2 -0
- package/dist/chunk-5VM5RSS4-C8vNNqW0.mjs +16 -0
- package/dist/chunk-62RKD26F-C4qK_fA-.mjs +21 -0
- package/dist/chunk-64BAICW3-BupSxcu5.mjs +2 -0
- package/dist/chunk-6Z5SFZXK-Cz0C4bhB.mjs +288 -0
- package/dist/chunk-74CEPOFO-BUVWiXkJ.mjs +23 -0
- package/dist/chunk-74CEPOFO-BYrCYxKO.mjs +23 -0
- package/dist/chunk-7BUUIJ7U-D7hE25H9.mjs +2 -0
- package/dist/chunk-7L36YK2X-CGwYuotX.mjs +3 -0
- package/dist/chunk-7L36YK2X-DAp-upAs.mjs +3 -0
- package/dist/chunk-7TSDKFEO-CE_P23TY.mjs +2 -0
- package/dist/chunk-7TSDKFEO-DBB10vPw.mjs +2 -0
- package/dist/chunk-A4HU7SVR-BZJ8xDMo.mjs +3 -0
- package/dist/chunk-A4JSPFCI-Dej71yGP.mjs +7 -0
- package/dist/chunk-A5O5YHGN-CczwCZ4d.mjs +2 -0
- package/dist/chunk-A65PWWJC-C-0S-s_f.mjs +3 -0
- package/dist/chunk-A7A2DBEE-DCXJ1xmx.mjs +7 -0
- package/dist/chunk-A7ICOL4V-BQZ9JZ1A.mjs +14 -0
- package/dist/chunk-ALLTKNUZ-D2ZOfcEz.mjs +6 -0
- package/dist/chunk-APT7OOP2-D-DaFB7K.mjs +2 -0
- package/dist/chunk-B74TABJS-BJwhrR8a.mjs +34 -0
- package/dist/chunk-BIQX33UG-Bmho6v3L.mjs +2 -0
- package/dist/chunk-C7G6YPKG-BAX_SClW.mjs +2 -0
- package/dist/chunk-CQNSW5MT-FekKjn0i.mjs +2 -0
- package/dist/chunk-CWQS3NFK-CcBWgb8o.mjs +2 -0
- package/dist/chunk-CYSBUYHQ-BftsYwRW.mjs +2 -0
- package/dist/chunk-D4J545R4-Br_5qOnE.mjs +12 -0
- package/dist/chunk-D6CWQ5DW-3AWPydfx.mjs +6 -0
- package/dist/chunk-D7MEQ3VN-Df6An2jd.mjs +5 -0
- package/dist/chunk-DBKNVD4L-B3hX287s.mjs +10 -0
- package/dist/chunk-DBKNVD4L-DNQP2COw.mjs +10 -0
- package/dist/chunk-DCAAORBQ-BDLVpBG2.mjs +2 -0
- package/dist/chunk-DHbaKqs-.mjs +1 -0
- package/dist/chunk-DXB73IDG-BBwE27jK.mjs +2 -0
- package/dist/chunk-EEXR5ZDP-CE452hsE.mjs +3 -0
- package/dist/chunk-EEXR5ZDP-Df-EPnbj.mjs +3 -0
- package/dist/chunk-EIZGF4BS-86nrMkyt.mjs +9 -0
- package/dist/chunk-EIZGF4BS-CSFp0aUh.mjs +9 -0
- package/dist/chunk-EMLP6XTP-C2yfLzVC.mjs +2 -0
- package/dist/chunk-EX3LRPZG-Chp9b-Lc.mjs +232 -0
- package/dist/chunk-F23WWYKW-qKke1WqP.mjs +17 -0
- package/dist/chunk-FWX5IMBZ-Cn1xNcn5.mjs +2 -0
- package/dist/chunk-GCTKCWKD-D0obXRun.mjs +4 -0
- package/dist/chunk-GFQRA5P5-XqPO4cim.mjs +3 -0
- package/dist/chunk-GOV5EKKI-CDovwI7Z.mjs +10 -0
- package/dist/chunk-GXVXFKBA-D-BGCybM.mjs +6 -0
- package/dist/chunk-HDQ56CKY-CI8IkhlS.mjs +16 -0
- package/dist/chunk-HDQ56CKY-Pa-7c4rC.mjs +16 -0
- package/dist/chunk-HJQJAYMS-BHzb4Ncl.mjs +3 -0
- package/dist/chunk-HJWBQKYG-B-KESSoV.mjs +6 -0
- package/dist/chunk-HKLCLINH-Bgw53oZd.mjs +63 -0
- package/dist/chunk-HL6NGDO2-CftrHAlX.mjs +24 -0
- package/dist/chunk-HOUHSVGY-C3h3PdhC.mjs +2 -0
- package/dist/chunk-HWKDQ44K-CGcvROg-.mjs +4 -0
- package/dist/chunk-HWKDQ44K-D3ZbaPl8.mjs +4 -0
- package/dist/chunk-I57KEIP3-_HYA-njf.mjs +11 -0
- package/dist/chunk-I57KEIP3-iiTO2OC-.mjs +11 -0
- package/dist/chunk-ICXQ74PX-DbJy3VdO.mjs +3 -0
- package/dist/chunk-IPJHKYVM-3ANqAo3C.mjs +2 -0
- package/dist/chunk-JG7HCLWE-lUInQ_44.mjs +3 -0
- package/dist/chunk-JVPRLUMK-FzUEFQw9.mjs +8 -0
- package/dist/chunk-JWPE2WC7-iDbhfJR-.mjs +2 -0
- package/dist/chunk-K6LIBGJA-BXxOXTjI.mjs +12 -0
- package/dist/chunk-KEIR6QF5-BLwvtFl6.mjs +176 -0
- package/dist/chunk-KMEYNNUA-1KiUKBQV.mjs +16 -0
- package/dist/chunk-KRBPSX3W-DeaaVEij.mjs +6 -0
- package/dist/chunk-KRBPSX3W-YDdgrCmf.mjs +6 -0
- package/dist/chunk-LL3S3NLB-D0lLKwVi.mjs +2 -0
- package/dist/chunk-LTZRCH7N-DpPs5vSq.mjs +32 -0
- package/dist/chunk-LWEGUNWT-DOK-XWMd.mjs +8 -0
- package/dist/chunk-MDDMCKUK-CTA6qEdN.mjs +7 -0
- package/dist/chunk-MDLLFABN-B2tA3LLA.mjs +73 -0
- package/dist/chunk-MHTUABJP-CrR3MfDw.mjs +9 -0
- package/dist/chunk-MIZPJHVH-d3bhRfh4.mjs +8 -0
- package/dist/chunk-MLXIYONF-C0S_CKb1.mjs +16 -0
- package/dist/chunk-MOJQB5TN-CUt4IiNv.mjs +89 -0
- package/dist/chunk-MOZMSUNE-DCxwDKn7.mjs +2 -0
- package/dist/chunk-MYE6AGBJ-CMoRJzYM.mjs +17 -0
- package/dist/chunk-NAERJDUW-Ck-SZ2Ps.mjs +9 -0
- package/dist/chunk-NCNPKYJZ-BxqfYu6d.mjs +3 -0
- package/dist/chunk-NUYSJFDK-DfaBzW-k.mjs +8 -0
- package/dist/chunk-OCLXQMOG-DC3689MV.mjs +7 -0
- package/dist/chunk-OCS6LSEM-BY3_3dNt.mjs +14 -0
- package/dist/chunk-OGEWGWER-DgPAesMA.mjs +2 -0
- package/dist/chunk-OJDRYQWQ-B9KRyRFZ.mjs +2 -0
- package/dist/chunk-OSBZ3O6U-BVpvamr7.mjs +2 -0
- package/dist/chunk-PBXLG62G-C12xrBbG.mjs +9 -0
- package/dist/chunk-PP6PSHAB-tlM6YKyg.mjs +5 -0
- package/dist/chunk-PUDLZKDR-CIWYIjrF.mjs +157 -0
- package/dist/chunk-PXTK5WE2-DNbfUrIy.mjs +22 -0
- package/dist/chunk-PXTK5WE2-e9kxtsgu.mjs +22 -0
- package/dist/chunk-PYSFUGCK-DqdcBhD4.mjs +11 -0
- package/dist/chunk-Q4XR5HBZ-jWirJQsj.mjs +71 -0
- package/dist/chunk-QBLGF6JB-hMrl9lGc.mjs +2 -0
- package/dist/chunk-QCDB2VPH-Cv7mIZWG.mjs +7 -0
- package/dist/chunk-QJ7O6ZN3-BRN048sn.mjs +6 -0
- package/dist/chunk-R6QSAL5T-CxzbKF59.mjs +2 -0
- package/dist/chunk-R6VWJ2ZL-DmUcUF0z.mjs +2 -0
- package/dist/chunk-R7FJI6CG-bmCS8vOS.mjs +2 -0
- package/dist/chunk-RPNGRAAP-BTpXCNpb.mjs +8 -0
- package/dist/chunk-RYQCIY6F-Dt7I2-Oy.mjs +2 -0
- package/dist/chunk-SDNKECQQ-BNRfy-15.mjs +6 -0
- package/dist/chunk-SNN4IESC-CZPQ88bY.mjs +2 -0
- package/dist/chunk-SNN4IESC-oXVGT9qo.mjs +2 -0
- package/dist/chunk-T56QNPHK-lY6QjpkL.mjs +15 -0
- package/dist/chunk-TLSUDHID-BP7dARSe.mjs +7 -0
- package/dist/chunk-TOMNU26N-BFsBBT9j.mjs +5 -0
- package/dist/chunk-TP4BZANS-C6KGxaUf.mjs +21 -0
- package/dist/chunk-TXBZCHCQ-DxPX5PCF.mjs +6 -0
- package/dist/chunk-U6XO7XAA-BHty90wb.mjs +3 -0
- package/dist/chunk-V5MWI2OL-DApVl_z4.mjs +5 -0
- package/dist/chunk-V7JOEXUC-DNM56rwe.mjs +207 -0
- package/dist/chunk-V7TAPXDL-CrGsULIH.mjs +28 -0
- package/dist/chunk-VAUOI2AC-BdotBBDE.mjs +2 -0
- package/dist/chunk-VJFXDYWH-DXnppZsu.mjs +11 -0
- package/dist/chunk-VOBGTVA6-_4QbVbSJ.mjs +7 -0
- package/dist/chunk-VR4S4FIN-RUJ5PgRH.mjs +2 -0
- package/dist/chunk-VYOJP4TV-DG_cm0JM.mjs +14 -0
- package/dist/chunk-WKFATFPP-DygaP6No.mjs +5 -0
- package/dist/chunk-WYO6CB5R-DN1R0VLx.mjs +130 -0
- package/dist/chunk-X2AJGDEF-BXjUENXL.mjs +2 -0
- package/dist/chunk-X2AJGDEF-ivzQBp_p.mjs +2 -0
- package/dist/chunk-XKQRETAK-CYJSOFLN.mjs +2 -0
- package/dist/chunk-XKWWSDBF-BTj39eCO.mjs +37 -0
- package/dist/chunk-XVDPCNWR-BSVT7Ttz.mjs +12 -0
- package/dist/chunk-XXDRQBXY-D1gFTzjI.mjs +2 -0
- package/dist/chunk-Y2CYZVJY-acXC9Sbb.mjs +2 -0
- package/dist/chunk-YMMW5UAP-CE-EQ2Is.mjs +33 -0
- package/dist/chunk-YOTPTUD7-63S9b4Z2.mjs +2 -0
- package/dist/chunk-YTNYSM6T-DFPh_641.mjs +12 -0
- package/dist/chunk-YULBWSET-B6FKJjk9.mjs +14 -0
- package/dist/chunk-Z6LRHWXI-BCgawaNX.mjs +14 -0
- package/dist/chunk-Z7JVV2SM-CTUpikzI.mjs +12 -0
- package/dist/chunk-ZGVPDNZ5-CyyHBEs2.mjs +63 -0
- package/dist/chunk-ZIRB5QZD-K23GvNu-.mjs +39 -0
- package/dist/chunk-ZZO3UDB3-MiEiJy8J.mjs +100 -0
- package/dist/classDiagram-OUVF2IWQ-0ApI9cDS.mjs +2 -0
- package/dist/classDiagram-v2-EOCWNBFH-DfQYJWNe.mjs +2 -0
- package/dist/clear-5CZ5X4YR-9EZyt4MH.mjs +2 -0
- package/dist/clear-5CZ5X4YR-BICGLF_r.mjs +1 -0
- package/dist/cli.mjs +22 -22
- package/dist/column-WLPMMSTS-D0I9TpQ2.mjs +1 -0
- package/dist/column-WLPMMSTS-Do8HgL6q.mjs +8 -0
- package/dist/comm-5SLSESQG-0igXzBnl.mjs +12 -0
- package/dist/comm-5SLSESQG-D2Rs9Jmo.mjs +1 -0
- package/dist/constants-C3InsrBS.mjs +2 -0
- package/dist/cose-bilkent-JH36ORCC-B1gjUwU3.mjs +2 -0
- package/dist/cp-XOYR4ABJ-CpnwcT2f.mjs +8 -0
- package/dist/cp-XOYR4ABJ-OfwEEWhR.mjs +1 -0
- package/dist/curl-47BFPSFW-Ko1BcK_R.mjs +26 -0
- package/dist/cut-OPC3VAGB-BAhJz0Qh.mjs +1 -0
- package/dist/cut-OPC3VAGB-nJAw1cEp.mjs +6 -0
- package/dist/cynefin-VYW2F7L2-C-aICrN-.mjs +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-CoESbhp4.mjs +63 -0
- package/dist/cytoscape.esm-D6l9Lhue.mjs +332 -0
- package/dist/dagre-BkPA5x_w.mjs +2 -0
- package/dist/dagre-VKFMJZFB-BhCtWAkc.mjs +5 -0
- package/dist/date-DD7FVA2V-BGJ9-l0O.mjs +1 -0
- package/dist/date-DD7FVA2V-W_sbdO4n.mjs +5 -0
- package/dist/defaultLocale-DN4qDyCE.mjs +2 -0
- package/dist/diagram-FQU43EPY-BdshpOzp.mjs +4 -0
- package/dist/diagram-G47NLZAW-Lw1fB9_w.mjs +25 -0
- package/dist/diagram-NH7WQ7WH-DnzwFaQq.mjs +25 -0
- package/dist/diagram-OA4YK3LP-BXU-URV1.mjs +31 -0
- package/dist/diagram-WEI45ONY-CD_Zpcvk.mjs +42 -0
- package/dist/diff-HJF2MPDN-CQAaA8lM.mjs +1 -0
- package/dist/diff-HJF2MPDN-EjmLU95d.mjs +7 -0
- package/dist/dirname-LEMTZZFS-BG01-R4_.mjs +1 -0
- package/dist/dirname-LEMTZZFS-Dg3ijqjM.mjs +5 -0
- package/dist/dist-CMZz8-Ge.mjs +2 -0
- package/dist/du-WO2ENHXQ-jqWYqk_n.mjs +8 -0
- package/dist/du-WO2ENHXQ-oQRVbsEF.mjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-D-647A1u.mjs +2 -0
- package/dist/echo-O45JWWI2-BPosfKdD.mjs +1 -0
- package/dist/echo-O45JWWI2-gk6mEMAU.mjs +4 -0
- package/dist/env-5EPCWSXR-BU5zTNDV.mjs +9 -0
- package/dist/env-5EPCWSXR-DygzVPiG.mjs +1 -0
- package/dist/erDiagram-Q63AITRT-DviwoNdm.mjs +86 -0
- package/dist/eventmodeling-45OFAUF4-CJqJ2hnR.mjs +1 -0
- package/dist/execAsync-BLKHjfg7.mjs +2 -0
- package/dist/execAsync-C5ympCkf.mjs +2 -0
- package/dist/expand-DTNXU4LQ-D2bEx87V.mjs +11 -0
- package/dist/expand-DTNXU4LQ-XU44HrWp.mjs +1 -0
- package/dist/expr-YYCVMXE3-DI2glLwn.mjs +1 -0
- package/dist/expr-YYCVMXE3-wI0boF3e.mjs +5 -0
- package/dist/file-IGDTDPLG-DkYMcmTl.mjs +24 -0
- package/dist/file-IGDTDPLG-sPfWVy9T.mjs +1 -0
- package/dist/find-DH2ALKQS-B6bMjuwo.mjs +12 -0
- package/dist/find-DH2ALKQS-CEKaRkgJ.mjs +1 -0
- package/dist/flag-coverage-6JEX67RU-QmoBigPs.mjs +2 -0
- package/dist/flowDiagram-23GEKE2U-Dhi3SNHm.mjs +1 -0
- package/dist/fold-LDSORVYE-Dhx0k6vg.mjs +12 -0
- package/dist/fold-LDSORVYE-DumfsCQO.mjs +1 -0
- package/dist/fs-traced-DVpoNaQJ.mjs +12 -0
- package/dist/fs-traced-_QGcVmcb.mjs +1 -0
- package/dist/ganttDiagram-NO4QXBWP-DnN5cTGV.mjs +293 -0
- package/dist/getMachineId-bsd-B_NuwbXS.mjs +2 -0
- package/dist/getMachineId-bsd-neTWr-l3.mjs +2 -0
- package/dist/getMachineId-darwin-BP4aVKkL.mjs +3 -0
- package/dist/getMachineId-darwin-DKDl-xYO.mjs +3 -0
- package/dist/getMachineId-linux-Bexb2iRT.mjs +2 -0
- package/dist/getMachineId-linux-YTb5epZX.mjs +2 -0
- package/dist/getMachineId-unsupported-Ddv20ynQ.mjs +2 -0
- package/dist/getMachineId-unsupported-DdwXS_Q3.mjs +2 -0
- package/dist/getMachineId-win-BNx0EbPq.mjs +2 -0
- package/dist/getMachineId-win-D8cNuBNk.mjs +2 -0
- package/dist/git-handle-DBSzQutT.mjs +1 -0
- package/dist/git-handle-r3d7s3VF.mjs +10 -0
- package/dist/gitGraph-TEB2WS4Q-_V7TMkJv.mjs +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-Bs2N855t.mjs +107 -0
- package/dist/graphlib-DXQPHTiH.mjs +2 -0
- package/dist/grep-2HUTXO5U-9G7xEEms.mjs +9 -0
- package/dist/grep-2HUTXO5U-DG5Ulinc.mjs +1 -0
- package/dist/gzip-AQXSGOVS-BcGYw5wM.mjs +32 -0
- package/dist/gzip-AQXSGOVS-D6UYmM0C.mjs +1 -0
- package/dist/head-HT2B6D2J-B5ybc-my.mjs +2 -0
- package/dist/head-HT2B6D2J-CHIR76LI.mjs +1 -0
- package/dist/help-VVWX7SA5-Bb8T3djf.mjs +16 -0
- package/dist/help-VVWX7SA5-BbK0QLPX.mjs +1 -0
- package/dist/history-J4QRNGRO-5XgHJL_Q.mjs +1 -0
- package/dist/history-J4QRNGRO-DesXbqi2.mjs +3 -0
- package/dist/hostname-BK6HG2DE-Clwz043m.mjs +1 -0
- package/dist/hostname-BK6HG2DE-DTiGP5th.mjs +3 -0
- package/dist/html-to-markdown-TFCECAGV-BsVwcc4T.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-DLUGt6pW.mjs +73 -0
- package/dist/index.d.mts +6867 -242
- package/dist/index.mjs +1521 -1
- package/dist/info-DKCQHKI2-DIsEz1l_.mjs +1 -0
- package/dist/infoDiagram-FWYZ7A6U-CD5T72Pd.mjs +3 -0
- package/dist/init-Cg1MczGq.mjs +638 -0
- package/dist/init-D8OKme52.mjs +2 -0
- package/dist/init-DnqdKHDS.mjs +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs +71 -0
- package/dist/join-GG2LDHE5-7k4Syl20.mjs +14 -0
- package/dist/join-GG2LDHE5-BIH_-8vD.mjs +1 -0
- package/dist/journeyDiagram-5HDEW3XC-BywkQV2b.mjs +140 -0
- package/dist/jq-LYZFFBZB-BZ4XP29I.mjs +14 -0
- package/dist/jq-LYZFFBZB-Dlyx6Y7w.mjs +1 -0
- package/dist/js-exec-VXN6TZ7U-BrugyKqi.mjs +97 -0
- package/dist/js-exec-VXN6TZ7U-Ds5SsewK.mjs +97 -0
- package/dist/kanban-definition-HUTT4EX6-DIgH0tMg.mjs +90 -0
- package/dist/launch-json-removal-DFF5AXyX.mjs +2 -0
- package/dist/lib-B2tLN_O_.mjs +2 -0
- package/dist/lib-DuDqLKFD.mjs +195 -0
- package/dist/lib-ozx_WsjS.mjs +2 -0
- package/dist/libesm-qUf-Au5c.mjs +14 -0
- package/dist/line-eTDW_zUy.mjs +2 -0
- package/dist/linear-Cn1royVQ.mjs +2 -0
- package/dist/ln-4TRFBYAT-B0hi-FAf.mjs +1 -0
- package/dist/ln-4TRFBYAT-DGrhTL40.mjs +9 -0
- package/dist/loader-4hXM3EID.mjs +1 -0
- package/dist/loader-CJynt8EV.mjs +2 -0
- package/dist/logger-DFxEUjvj.mjs +39 -0
- package/dist/ls-KSXFZCWH-C_kbnNdU.mjs +1 -0
- package/dist/ls-KSXFZCWH-GOWXktO9.mjs +28 -0
- package/dist/lzma-CD6C2vYw.mjs +2 -0
- package/dist/lzma-CG6o9sq-.mjs +2 -0
- package/dist/map-bDB3k8vA.mjs +2 -0
- package/dist/md-manager-BbSzMHHE.mjs +2 -0
- package/dist/md5sum-INMIK4DX-BlgGpdCD.mjs +2 -0
- package/dist/md5sum-INMIK4DX-DGvi_A-E.mjs +1 -0
- package/dist/mermaid-parser.core-uwQfwzUX.mjs +4 -0
- package/dist/mermaid.core-BgpKViY0.mjs +16 -0
- package/dist/mindmap-definition-LN4V7U3C-H3p7uT-G.mjs +97 -0
- package/dist/mkdir-TDEMSB6C-BVcgITXm.mjs +7 -0
- package/dist/mkdir-TDEMSB6C-CMOt1jIT.mjs +1 -0
- package/dist/mv-Z6MORUFL-CqyCV_Ze.mjs +1 -0
- package/dist/mv-Z6MORUFL-El0zMsEA.mjs +7 -0
- package/dist/nl-U5YJDM32-BO1kUpkn.mjs +1 -0
- package/dist/nl-U5YJDM32-Y_hGSMac.mjs +17 -0
- package/dist/od-VJEF2UR5-CueTpZ68.mjs +5 -0
- package/dist/od-VJEF2UR5-DxUGtlve.mjs +1 -0
- package/dist/open-browser-BgReR_t5.mjs +2 -0
- package/dist/ordinal-BFK2XMXf.mjs +2 -0
- package/dist/packet-7NZHBO7P-B64OS2eJ.mjs +1 -0
- package/dist/parse-worker.d.mts +6626 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/paste-7N6AFSDS-BJHZcYXH.mjs +1 -0
- package/dist/paste-7N6AFSDS-BnqApCW_.mjs +8 -0
- package/dist/path-CIoCsClp.mjs +2 -0
- package/dist/pegDiagram-2B236MQR-PBU61CXk.mjs +2 -0
- package/dist/pie-RZYD4A2V-B313HDTA.mjs +1 -0
- package/dist/pieDiagram-ENE6RG2P-ClZWrO6e.mjs +40 -0
- package/dist/preview-BnqROnAm.mjs +1 -0
- package/dist/preview-Dnob-x-p.mjs +3 -0
- package/dist/printf-CX64KX2P-841sNxew.mjs +1 -0
- package/dist/printf-CX64KX2P-B_vWcqAL.mjs +15 -0
- package/dist/public/assets/ActivityModeContent-H-D1VX7m.js +1 -0
- package/dist/public/assets/AgentDiffPane-B-gK5PsE.js +2 -0
- package/dist/public/assets/ChangedOutsideBadge-D741mWRP.js +1 -0
- package/dist/public/assets/DocumentContext-CIVf31K9.js +38 -0
- package/dist/public/assets/FeedbackForm-YmqhKCxZ.js +1 -0
- package/dist/public/assets/ImportSkillDialog-DQBS4ypC.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-CE_UbtEZ.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-CawqG1nH.js +2 -0
- package/dist/public/assets/SessionsHost-Bp7gQA1o.js +2 -0
- package/dist/public/assets/SettingsDialogBody-BLpulm10.js +12 -0
- package/dist/public/assets/SkillToolbarControls-oKXEehFt.js +1 -0
- package/dist/public/assets/SourceEditor-C6NdTjpn.js +1 -0
- package/dist/public/assets/TerminalWindowApp-DDnvJYMu.js +1 -0
- package/dist/public/assets/ThreadView-CGjBIs53.js +10 -0
- package/dist/public/assets/TimelineDiffPane-BWfU5B2x.js +2 -0
- package/dist/public/assets/agent-diff-store-CwO6mhOq.js +1 -0
- package/dist/public/assets/auth-state-cache-BBgW3LTD.js +11 -0
- package/dist/public/assets/comment-chips-h8GZFVHH.js +5 -0
- package/dist/public/assets/follow-file-CJHokzM7.js +1 -0
- package/dist/public/assets/index-B6VepqFk.js +2097 -0
- package/dist/public/assets/selection-context-iNNNmmJS.js +4 -0
- package/dist/public/assets/skill-actions-8q8e7e5S.js +2 -0
- package/dist/public/assets/typing-burst-detector-D_ygX_hf.js +8 -0
- package/dist/public/assets/use-activity-panel-pkBl8bMj.js +1 -0
- package/dist/public/assets/use-open-skill-Mk41LRxd.js +1 -0
- package/dist/public/assets/use-skill-directory-Dzvfx2id.js +1 -0
- package/dist/public/assets/use-timeline-entry-diff-Dk10Z55V.js +6 -0
- package/dist/public/index.html +13 -13
- package/dist/pwd-D4OZ7N27-C41v1g3B.mjs +1 -0
- package/dist/pwd-D4OZ7N27-NYST_A3S.mjs +3 -0
- package/dist/python3-DNGS4G3E-DaBJervu.mjs +12 -0
- package/dist/python3-DNGS4G3E-OzxoFG34.mjs +12 -0
- package/dist/quadrantDiagram-ABIIQ3AL-Z4PbVL1N.mjs +8 -0
- package/dist/radar-I7S5WNFK-BdiwGd2_.mjs +1 -0
- package/dist/railroad-3IZDKUUU-O4nBw7jb.mjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-CDaO5Dcu.mjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-CS4l_gpR.mjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-bbLhALeS.mjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-ZSRYpY_p.mjs +2 -0
- package/dist/readlink-MI4GCHJF-CQlQ03aa.mjs +1 -0
- package/dist/readlink-MI4GCHJF-Dl1Uxmrf.mjs +6 -0
- package/dist/repair-launch-json-DF-pHfel.mjs +2 -0
- package/dist/repair-mcp-configs-Cr9jCNwk.mjs +2 -0
- package/dist/repair-skills-DADI6iaT.mjs +4 -0
- package/dist/repair-skills-DKwDAoHc.mjs +1 -0
- package/dist/requirementDiagram-TGXJPOKE-H6OWjjJE.mjs +85 -0
- package/dist/rev-XOSYPP45-BYe7prl1.mjs +1 -0
- package/dist/rev-XOSYPP45-D6eJxPKd.mjs +7 -0
- package/dist/rg-XNF3R3II-CmxxmmUf.mjs +1 -0
- package/dist/rg-XNF3R3II-vKB7djPZ.mjs +33 -0
- package/dist/rm-RTZG23RL-Bl5s9ltJ.mjs +1 -0
- package/dist/rm-RTZG23RL-sCMTtbxP.mjs +8 -0
- package/dist/rmdir-XTQXT7RK-C1ccje2_.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-DZfv6Zfz.mjs +14 -0
- package/dist/rough.cjs-BGkc0Naf.mjs +2 -0
- package/dist/sankeyDiagram-HTMAVEWB-CtBVJJox.mjs +41 -0
- package/dist/sed-JAPPVBEU-C7wh6RxT.mjs +100 -0
- package/dist/sed-JAPPVBEU-D9bYEx2I.mjs +1 -0
- package/dist/seq-RN5ZUASB-CFySG-xk.mjs +1 -0
- package/dist/seq-RN5ZUASB-R5HjEVux.mjs +7 -0
- package/dist/sequenceDiagram-DBY2YBRQ-DDLm4Ak_.mjs +163 -0
- package/dist/server-lock-U8YDpJpq.mjs +1 -0
- package/dist/server-lock-aXnDVUI8.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DfzpfxJ-.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DgLJCjAg.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-DZ42pgY3.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-DrKtnAPK.mjs +2 -0
- package/dist/sizeCapture-X5ZJPWSS-Izaz24Pi.mjs +2 -0
- package/dist/skill-teardown-onVYT1VF.mjs +2 -0
- package/dist/sleep-VZFPZFWA-5fZFI3Vy.mjs +1 -0
- package/dist/sleep-VZFPZFWA-CBARUnrz.mjs +10 -0
- package/dist/sort-DCNRDA7U-RFl0HYBr.mjs +1 -0
- package/dist/sort-DCNRDA7U-vT57Mw8o.mjs +16 -0
- package/dist/split-SITCSYCZ-BdATfTxU.mjs +1 -0
- package/dist/split-SITCSYCZ-Ci_IfVPT.mjs +17 -0
- package/dist/sqlite3-TE5AIOTF-BIRMe0xz.mjs +1 -0
- package/dist/sqlite3-TE5AIOTF-BhXSdz7U.mjs +37 -0
- package/dist/src-BPVU4Y0o.mjs +2 -0
- package/dist/src-BmS3oGY4.mjs +1 -0
- package/dist/src-Dt5dAyFQ.mjs +2032 -0
- package/dist/src-TKCctdpc.mjs +348 -0
- package/dist/src-cRpQSbXB.mjs +1 -0
- package/dist/src-pUQbXiSN.mjs +20 -0
- package/dist/start-DQdc8wXO.mjs +4 -0
- package/dist/start-XIVqnuqY.mjs +1 -0
- package/dist/stat-BT5A227F-CEZPXJ9_.mjs +9 -0
- package/dist/stat-BT5A227F-Dd-OyLQQ.mjs +1 -0
- package/dist/stateDiagram-2N3HPSRC-pAn2bDnn.mjs +2 -0
- package/dist/stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs +2 -0
- package/dist/strings-7PLOGTPD-CiVw0Uh4.mjs +14 -0
- package/dist/strings-7PLOGTPD-v3qEuUEm.mjs +1 -0
- package/dist/swimlanes-5IMT3BWC-nSsjdSnj.mjs +2 -0
- package/dist/swimlanesDiagram-G3AALYLV-CdQlHesp.mjs +9 -0
- package/dist/tac-SJGXQ4T2-BL4Xd7y6.mjs +9 -0
- package/dist/tac-SJGXQ4T2-DphHfCAY.mjs +1 -0
- package/dist/tail-S5ULNTJU-Cfa1pDQZ.mjs +2 -0
- package/dist/tail-S5ULNTJU-D6qRQZwV.mjs +1 -0
- package/dist/tar-MZQD7NO4-HJsWmzu9.mjs +63 -0
- package/dist/tar-MZQD7NO4-oAQoyk28.mjs +1 -0
- package/dist/tee-O7VXZDCO-D95l5L5Z.mjs +3 -0
- package/dist/tee-O7VXZDCO-odVO6Wjw.mjs +1 -0
- package/dist/time-DEUO3QV2-CviQF55F.mjs +1 -0
- package/dist/time-DEUO3QV2-DwnT4FOS.mjs +14 -0
- package/dist/timeline-definition-FHXFAJF6-CnTXJoEq.mjs +121 -0
- package/dist/timeout-VRKMCG72-DFU5EkCe.mjs +12 -0
- package/dist/timeout-VRKMCG72-jeMAkAMc.mjs +1 -0
- package/dist/touch-DX2IJOQ4-CRX6GYeb.mjs +7 -0
- package/dist/touch-DX2IJOQ4-CyiMRd7b.mjs +1 -0
- package/dist/tr-2HXZRDSW-ByYmbFae.mjs +21 -0
- package/dist/tr-2HXZRDSW-CCce6lU_.mjs +1 -0
- package/dist/tree-LYXBS7DC-Dq6aWetx.mjs +12 -0
- package/dist/tree-LYXBS7DC-pAC77Hbt.mjs +1 -0
- package/dist/treeView-QDETBFTQ-BCAjffnq.mjs +1 -0
- package/dist/treemap-6X3UGDF4-Dv-54pyt.mjs +1 -0
- package/dist/true-WHJNXCHG-Dzdq7R5f.mjs +1 -0
- package/dist/true-WHJNXCHG-XC4ZnbBw.mjs +2 -0
- package/dist/unexpand-RGTMIGZM-B06mOUPB.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-BL5sZ5_Z.mjs +11 -0
- package/dist/uniq-SUNANL47-BIgIOFSf.mjs +1 -0
- package/dist/uniq-SUNANL47-DBRSkw7j.mjs +5 -0
- package/dist/vennDiagram-L72KCM5P-CqTzYRfa.mjs +35 -0
- package/dist/wardley-OPB4EBWU-DSvo57UC.mjs +1 -0
- package/dist/wardleyDiagram-EHGQE667-WhxG-nRT.mjs +79 -0
- package/dist/wc-TQB3VNOX-9RyJlZXB.mjs +1 -0
- package/dist/wc-TQB3VNOX-DqHFY4jy.mjs +6 -0
- package/dist/which-XZHEH76L-CbmRVw8E.mjs +3 -0
- package/dist/which-XZHEH76L-SMFjHhz2.mjs +1 -0
- package/dist/whoami-DGKU3D2X-BDJh39KM.mjs +3 -0
- package/dist/whoami-DGKU3D2X-BIUooLXE.mjs +1 -0
- package/dist/write-project-skill-DOogyZge.mjs +56 -0
- package/dist/xan-UD7JYIL2-DAuAMQ0H.mjs +1 -0
- package/dist/xan-UD7JYIL2-DQo9f-1a.mjs +140 -0
- package/dist/xan-view-OW2TB7Z3-BhVOL6hm.mjs +1 -0
- package/dist/xan-view-OW2TB7Z3-CwG0zS53.mjs +1 -0
- package/dist/xargs-I6EZUCYF-C_ZtmUCd.mjs +5 -0
- package/dist/xargs-I6EZUCYF-INAdKqnR.mjs +1 -0
- package/dist/xychartDiagram-FW5EYKEG-DDE7TRrw.mjs +8 -0
- package/dist/yazl-BlMyAOcT.mjs +2 -0
- package/dist/yq-OAKYHSXH-C1fFFHD4.mjs +1 -0
- package/dist/yq-OAKYHSXH-COzSqY4J.mjs +288 -0
- package/package.json +7 -6
- package/dist/abnfDiagram-VRR7QNED-DQjgDcgA.mjs +0 -2
- package/dist/acp-harness-probe-DOXp9Wx4.mjs +0 -3
- package/dist/alias-JE7RI5QX-BfILuEvo.mjs +0 -1
- package/dist/arc-CO8jsQkL.mjs +0 -2
- package/dist/architecture-TIHT7OUA-CScIhnar.mjs +0 -1
- package/dist/architectureDiagram-ZJ3FMSHR-CkUIG8wd.mjs +0 -37
- package/dist/array-Cerc_8W3.mjs +0 -2
- package/dist/awk2-BBAGSFUB-BH8WxyhW.mjs +0 -1
- package/dist/banner-CIK2GwPx.mjs +0 -3
- package/dist/base64-4YMZCVJ5-CDuRvFBG.mjs +0 -1
- package/dist/basename-AA2KJYZQ-sv8gJZXS.mjs +0 -1
- package/dist/bash-IJWYRKFO-DKUaUgF9.mjs +0 -1
- package/dist/blockDiagram-677ZJIJ3-sLhYyPCr.mjs +0 -133
- package/dist/c4Diagram-LMCZKHZV-Cg6dfUXU.mjs +0 -11
- package/dist/cat-RDUMLXKC-BtNo16C3.mjs +0 -1
- package/dist/channel-DRk0OEK0.mjs +0 -2
- package/dist/chmod-SYMGL4JA-B15Xlp42.mjs +0 -1
- package/dist/chokidar-CVNrjmRM.mjs +0 -4
- package/dist/chunk-2Q5K7J3B-2Es1K_NO.mjs +0 -2
- package/dist/chunk-2TRDZQLB-G1LvPXqq.mjs +0 -18
- package/dist/chunk-32BRIVSS-ok2xg0Je.mjs +0 -2
- package/dist/chunk-3BS5SKQH-CFcrGLDG.mjs +0 -140
- package/dist/chunk-3H6UQG3A-Dx5ykWR0.mjs +0 -9
- package/dist/chunk-3ZUFRYJ4-DzbWfyzV.mjs +0 -2
- package/dist/chunk-4GTNDTRF-COTPYeV6.mjs +0 -8
- package/dist/chunk-4HHKTUW3-BkuKGebe.mjs +0 -3
- package/dist/chunk-4Q4SM6WR-i8tiQRv3.mjs +0 -5
- package/dist/chunk-52WLFC77-BaT5_S-q.mjs +0 -11
- package/dist/chunk-55VFSPNA-Ct9maI6O.mjs +0 -3
- package/dist/chunk-5FCAYU7R-of7BBDNL.mjs +0 -2
- package/dist/chunk-5HE753X5-9kILZ5Nr.mjs +0 -2
- package/dist/chunk-5JV3BV7I-BKVVlFxh.mjs +0 -2
- package/dist/chunk-5QVNJEHU-CvZ-NmqQ.mjs +0 -9
- package/dist/chunk-5TONJI2A-CGHpmUrS.mjs +0 -3
- package/dist/chunk-5V6VZH6T-DdeqP2TW.mjs +0 -2
- package/dist/chunk-5VM5RSS4-COK1ErrI.mjs +0 -16
- package/dist/chunk-62RKD26F-RtrcFE7S.mjs +0 -21
- package/dist/chunk-64BAICW3-0h-yIc1e.mjs +0 -2
- package/dist/chunk-6Z5SFZXK-C5owNg1o.mjs +0 -288
- package/dist/chunk-74CEPOFO--xsxhUFC.mjs +0 -23
- package/dist/chunk-7BUUIJ7U-_1oXd84C.mjs +0 -2
- package/dist/chunk-7L36YK2X-VlH7dlrD.mjs +0 -3
- package/dist/chunk-7TSDKFEO-BjOrsK6M.mjs +0 -2
- package/dist/chunk-A4HU7SVR-oMNSpej4.mjs +0 -3
- package/dist/chunk-A4JSPFCI-DtnWqT5O.mjs +0 -7
- package/dist/chunk-A65PWWJC-LctFeUxK.mjs +0 -3
- package/dist/chunk-A7A2DBEE-DuuhuGG1.mjs +0 -7
- package/dist/chunk-A7ICOL4V-CzYDHdxM.mjs +0 -14
- package/dist/chunk-ALLTKNUZ-BnLIZXEI.mjs +0 -6
- package/dist/chunk-APT7OOP2-DESh647P.mjs +0 -2
- package/dist/chunk-BIQX33UG-BVtPexox.mjs +0 -2
- package/dist/chunk-C7G6YPKG-DpNJWc2e.mjs +0 -2
- package/dist/chunk-CQNSW5MT-B6mAd0WS.mjs +0 -2
- package/dist/chunk-CYSBUYHQ-CTWbbsmm.mjs +0 -2
- package/dist/chunk-D4J545R4-Dy3lcp_X.mjs +0 -12
- package/dist/chunk-D6CWQ5DW-Dl4tJcwX.mjs +0 -6
- package/dist/chunk-D7MEQ3VN-B-Qyxyo5.mjs +0 -5
- package/dist/chunk-DBKNVD4L-Y2Mnp5lC.mjs +0 -10
- package/dist/chunk-DCAAORBQ-BxtVrSMT.mjs +0 -2
- package/dist/chunk-EEXR5ZDP-BcjEP2wd.mjs +0 -3
- package/dist/chunk-EIZGF4BS-DYiqM1Ss.mjs +0 -9
- package/dist/chunk-EMLP6XTP-AFimKO17.mjs +0 -2
- package/dist/chunk-EX3LRPZG-BYcqQlY8.mjs +0 -232
- package/dist/chunk-F23WWYKW-BuCITNd6.mjs +0 -17
- package/dist/chunk-FWX5IMBZ-BFNo8SGu.mjs +0 -2
- package/dist/chunk-GCTKCWKD-jz3yOk3f.mjs +0 -4
- package/dist/chunk-GOV5EKKI-IRzA9ik3.mjs +0 -10
- package/dist/chunk-GXVXFKBA-CGc4vqMu.mjs +0 -6
- package/dist/chunk-HDQ56CKY-Svz-iz8m.mjs +0 -16
- package/dist/chunk-HJQJAYMS-SgZmT_QE.mjs +0 -3
- package/dist/chunk-HJWBQKYG-BqFDM0xp.mjs +0 -6
- package/dist/chunk-HKLCLINH-DKx243zB.mjs +0 -63
- package/dist/chunk-HL6NGDO2-B9GCn41X.mjs +0 -24
- package/dist/chunk-HOUHSVGY-Cg_2_CUd.mjs +0 -2
- package/dist/chunk-HWKDQ44K-CVxg-h0V.mjs +0 -4
- package/dist/chunk-I57KEIP3-FVl4IVXz.mjs +0 -11
- package/dist/chunk-ICXQ74PX-CewdqzeE.mjs +0 -3
- package/dist/chunk-JG7HCLWE-BgiWVzAI.mjs +0 -3
- package/dist/chunk-JVPRLUMK-CH7w4zyh.mjs +0 -8
- package/dist/chunk-JWPE2WC7-cMhWwV9I.mjs +0 -2
- package/dist/chunk-K6LIBGJA-DI9ZkJey.mjs +0 -12
- package/dist/chunk-KEIR6QF5-BhaMJNB5.mjs +0 -176
- package/dist/chunk-KMEYNNUA-CabTsa7P.mjs +0 -16
- package/dist/chunk-KRBPSX3W-ciCGjpAL.mjs +0 -6
- package/dist/chunk-LL3S3NLB-r8mDpVuz.mjs +0 -2
- package/dist/chunk-LTZRCH7N-Cj1hz7m7.mjs +0 -32
- package/dist/chunk-LWEGUNWT-C3ON4AHi.mjs +0 -8
- package/dist/chunk-MDDMCKUK-D3MZs3FF.mjs +0 -7
- package/dist/chunk-MDLLFABN-DgTeOfIY.mjs +0 -73
- package/dist/chunk-MHTUABJP-BbSobv_U.mjs +0 -9
- package/dist/chunk-MIZPJHVH-CzqfuBdK.mjs +0 -8
- package/dist/chunk-MLXIYONF-BcM04nM_.mjs +0 -16
- package/dist/chunk-MOJQB5TN-CidbQQ7m.mjs +0 -89
- package/dist/chunk-MOZMSUNE-DTiZcqZ1.mjs +0 -2
- package/dist/chunk-MYE6AGBJ-B3ukegXT.mjs +0 -17
- package/dist/chunk-NAERJDUW-CoAYVGR3.mjs +0 -9
- package/dist/chunk-NCNPKYJZ-C1KcgrGe.mjs +0 -3
- package/dist/chunk-NUYSJFDK-sPbPxu4W.mjs +0 -8
- package/dist/chunk-OCLXQMOG-BdLZfp3D.mjs +0 -7
- package/dist/chunk-OCS6LSEM-7beNWT9m.mjs +0 -14
- package/dist/chunk-OGEWGWER-B-Vr80Fa.mjs +0 -2
- package/dist/chunk-OSBZ3O6U-DwDyo3Ly.mjs +0 -2
- package/dist/chunk-PBXLG62G-ww-bn-Tp.mjs +0 -9
- package/dist/chunk-PP6PSHAB-xKRHmmOd.mjs +0 -5
- package/dist/chunk-PUDLZKDR-CI0pacGF.mjs +0 -157
- package/dist/chunk-PXTK5WE2-Dfi2FrE5.mjs +0 -22
- package/dist/chunk-PYSFUGCK-BHwvxY2Q.mjs +0 -11
- package/dist/chunk-Q4XR5HBZ-4H-m7p0G.mjs +0 -71
- package/dist/chunk-QBLGF6JB-B_tvtCRO.mjs +0 -2
- package/dist/chunk-QCDB2VPH-DHsQu4h6.mjs +0 -7
- package/dist/chunk-QJ7O6ZN3-CTKdWbns.mjs +0 -6
- package/dist/chunk-R6QSAL5T-DA60heK6.mjs +0 -2
- package/dist/chunk-R7FJI6CG-BVR1ae7y.mjs +0 -2
- package/dist/chunk-RPNGRAAP-df7FdhI4.mjs +0 -8
- package/dist/chunk-RYQCIY6F-C8F82Uai.mjs +0 -2
- package/dist/chunk-SDNKECQQ-BuTL-ot2.mjs +0 -6
- package/dist/chunk-SNN4IESC-DVqEOGsL.mjs +0 -2
- package/dist/chunk-T56QNPHK-COZC2A_r.mjs +0 -15
- package/dist/chunk-TLSUDHID-DAREQN9J.mjs +0 -7
- package/dist/chunk-TOMNU26N-C3JZDC96.mjs +0 -5
- package/dist/chunk-TP4BZANS-C2Z-CHHA.mjs +0 -21
- package/dist/chunk-TXBZCHCQ-DOaoE5TV.mjs +0 -6
- package/dist/chunk-U6XO7XAA-BpjdcG5R.mjs +0 -3
- package/dist/chunk-V5MWI2OL-D8SKWVO_.mjs +0 -5
- package/dist/chunk-V7JOEXUC-CdEIYYNc.mjs +0 -207
- package/dist/chunk-V7TAPXDL-CQbB1mLa.mjs +0 -28
- package/dist/chunk-VAUOI2AC-Ds6ZNp2p.mjs +0 -2
- package/dist/chunk-VJFXDYWH-C7Lg-Yts.mjs +0 -11
- package/dist/chunk-VOBGTVA6-CKl2LR-K.mjs +0 -7
- package/dist/chunk-VR4S4FIN-mH-q10Uq.mjs +0 -2
- package/dist/chunk-VYOJP4TV-DFxaC5Uc.mjs +0 -14
- package/dist/chunk-WKFATFPP-R7B51gCW.mjs +0 -5
- package/dist/chunk-WYO6CB5R-Cg1RXhAT.mjs +0 -130
- package/dist/chunk-X2AJGDEF-D97qevlv.mjs +0 -2
- package/dist/chunk-XKQRETAK-BTmmMuta.mjs +0 -2
- package/dist/chunk-XKWWSDBF-BGzAOrO3.mjs +0 -37
- package/dist/chunk-XVDPCNWR-3ajbQWzU.mjs +0 -12
- package/dist/chunk-XXDRQBXY-BvbdToKZ.mjs +0 -2
- package/dist/chunk-Y2CYZVJY-C7FmC3Cl.mjs +0 -2
- package/dist/chunk-YMMW5UAP-DbBgrudQ.mjs +0 -33
- package/dist/chunk-YOTPTUD7-BSOqhRr-.mjs +0 -2
- package/dist/chunk-YTNYSM6T-CoxqCaLl.mjs +0 -12
- package/dist/chunk-YULBWSET-CuKhTv4j.mjs +0 -14
- package/dist/chunk-Z6LRHWXI-CujGXDs8.mjs +0 -14
- package/dist/chunk-Z7JVV2SM-CiJwkxuY.mjs +0 -12
- package/dist/chunk-ZGVPDNZ5-BE_qYP6z.mjs +0 -63
- package/dist/chunk-ZIRB5QZD-mhYZnDzb.mjs +0 -39
- package/dist/chunk-ZZO3UDB3-DCkJjNN2.mjs +0 -100
- package/dist/classDiagram-OUVF2IWQ-rKP7gcsT.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-BoWf4tYI.mjs +0 -2
- package/dist/clear-5CZ5X4YR-BNXs_KRD.mjs +0 -1
- package/dist/column-WLPMMSTS-BrY1gQI1.mjs +0 -1
- package/dist/comm-5SLSESQG-aGB098lH.mjs +0 -1
- package/dist/constants-J4-mibQ1.mjs +0 -2
- package/dist/cose-bilkent-JH36ORCC-CMfIp4st.mjs +0 -2
- package/dist/cp-XOYR4ABJ-D0LUaMQT.mjs +0 -1
- package/dist/curl-47BFPSFW-d1TMPUJw.mjs +0 -26
- package/dist/cut-OPC3VAGB-FXZX1WQM.mjs +0 -1
- package/dist/cynefin-VYW2F7L2-DtazLHUs.mjs +0 -1
- package/dist/cynefinDiagram-TSTJHNR4-CFbt5v4d.mjs +0 -63
- package/dist/cytoscape.esm-Dq6ZD9GH.mjs +0 -332
- package/dist/dagre-CbI1Ylqw.mjs +0 -2
- package/dist/dagre-VKFMJZFB-BWP36rMX.mjs +0 -5
- package/dist/date-DD7FVA2V-7hk1aW9g.mjs +0 -1
- package/dist/defaultLocale-9SlCuWEL.mjs +0 -2
- package/dist/diagram-FQU43EPY-D2pf7IBH.mjs +0 -4
- package/dist/diagram-G47NLZAW-BlOXaBe6.mjs +0 -25
- package/dist/diagram-NH7WQ7WH-DOwRNWDI.mjs +0 -25
- package/dist/diagram-OA4YK3LP-uyGYHUoX.mjs +0 -31
- package/dist/diagram-WEI45ONY-CmW1X9Kx.mjs +0 -42
- package/dist/diff-HJF2MPDN-bcOaHvDo.mjs +0 -1
- package/dist/dirname-LEMTZZFS-RRQ5Ar_Z.mjs +0 -1
- package/dist/dist-BmYngy7b.mjs +0 -2
- package/dist/du-WO2ENHXQ-Cg71FvLi.mjs +0 -1
- package/dist/ebnfDiagram-CCIWWBDH-BpBYlrRH.mjs +0 -2
- package/dist/echo-O45JWWI2-BacOdfFs.mjs +0 -1
- package/dist/env-5EPCWSXR-T8XCKOX_.mjs +0 -1
- package/dist/erDiagram-Q63AITRT-ChoKKmxG.mjs +0 -86
- package/dist/eventmodeling-45OFAUF4-BIXp-P6z.mjs +0 -1
- package/dist/execAsync-BKp2jujj.mjs +0 -2
- package/dist/execAsync-BuUKdKlz.mjs +0 -2
- package/dist/expand-DTNXU4LQ-BD32VJaK.mjs +0 -1
- package/dist/expr-YYCVMXE3-CgQib9F9.mjs +0 -1
- package/dist/file-IGDTDPLG-BAlm5q29.mjs +0 -1
- package/dist/find-DH2ALKQS-z-G7VPmU.mjs +0 -1
- package/dist/flag-coverage-6JEX67RU-Cj_NycUm.mjs +0 -2
- package/dist/flowDiagram-23GEKE2U-B4VrCGdr.mjs +0 -1
- package/dist/fold-LDSORVYE-CDU-6eOS.mjs +0 -1
- package/dist/fs-traced-By5aY-RE.mjs +0 -12
- package/dist/fs-traced-CkLhqsEn.mjs +0 -1
- package/dist/ganttDiagram-NO4QXBWP-Cv7sGb-R.mjs +0 -293
- package/dist/getMachineId-bsd-DtFrm1Uy.mjs +0 -2
- package/dist/getMachineId-bsd-GFl1-Bje.mjs +0 -2
- package/dist/getMachineId-darwin--IR8MP8d.mjs +0 -3
- package/dist/getMachineId-darwin-28jQHa_N.mjs +0 -3
- package/dist/getMachineId-linux-BZgyplQ5.mjs +0 -2
- package/dist/getMachineId-linux-Bzx3S652.mjs +0 -2
- package/dist/getMachineId-unsupported-CyTjujlI.mjs +0 -2
- package/dist/getMachineId-unsupported-DuB0leRF.mjs +0 -2
- package/dist/getMachineId-win-BmvAZEMa.mjs +0 -2
- package/dist/getMachineId-win-CuOFQQ73.mjs +0 -2
- package/dist/git-handle-BDmbIWwd.mjs +0 -1
- package/dist/git-handle-BHe1p04S.mjs +0 -10
- package/dist/gitGraph-TEB2WS4Q-BaTdqV7-.mjs +0 -1
- package/dist/gitGraphDiagram-IHSO6WYX-DxsFHicP.mjs +0 -107
- package/dist/graphlib-DKEQBDTz.mjs +0 -2
- package/dist/grep-2HUTXO5U-CsEE08ya.mjs +0 -1
- package/dist/gzip-AQXSGOVS-CmMf6H0r.mjs +0 -1
- package/dist/head-HT2B6D2J-DSBJixLD.mjs +0 -1
- package/dist/help-VVWX7SA5-BncYWg0B.mjs +0 -1
- package/dist/history-J4QRNGRO-CULSDkzp.mjs +0 -1
- package/dist/hostname-BK6HG2DE-CaZb-T_R.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-CF0t8_d3.mjs +0 -1
- package/dist/index-1MIt1xrM.d.mts +0 -6628
- package/dist/info-DKCQHKI2-BxlpeeVn.mjs +0 -1
- package/dist/infoDiagram-FWYZ7A6U-CbPpTq2x.mjs +0 -3
- package/dist/init-Buw5jj4Q.mjs +0 -2
- package/dist/init-DDwncQha.mjs +0 -1
- package/dist/init-ZOWQ1Th4.mjs +0 -643
- package/dist/ishikawaDiagram-FXEZZL3T-Dd5BEpOv.mjs +0 -71
- package/dist/join-GG2LDHE5-kABASDPB.mjs +0 -1
- package/dist/journeyDiagram-5HDEW3XC-W6Nbr96_.mjs +0 -140
- package/dist/jq-LYZFFBZB-CIwp4u6h.mjs +0 -1
- package/dist/js-exec-VXN6TZ7U-1yyCDQqM.mjs +0 -97
- package/dist/kanban-definition-HUTT4EX6-xcwe5vNg.mjs +0 -90
- package/dist/launch-json-removal-CcFuFFS1.mjs +0 -2
- package/dist/lib-BCIeHFfP.mjs +0 -2
- package/dist/lib-TLTWf9qr.mjs +0 -195
- package/dist/line-Cq-NoiNn.mjs +0 -2
- package/dist/linear-DPbvcrPk.mjs +0 -2
- package/dist/ln-4TRFBYAT-Dhr3hBr6.mjs +0 -1
- package/dist/loader-BcwbnY_K.mjs +0 -1
- package/dist/loader-ji3pPcXi.mjs +0 -2
- package/dist/logger-BZPV1wv8.mjs +0 -39
- package/dist/ls-KSXFZCWH-BEv3e7-2.mjs +0 -1
- package/dist/lzma-Dh_aFpqW.mjs +0 -2
- package/dist/map-CFzSl60r.mjs +0 -2
- package/dist/md-manager-B4-M0hXs.mjs +0 -2
- package/dist/md5sum-INMIK4DX-CJ1G9gTe.mjs +0 -1
- package/dist/mermaid-parser.core-DejmtVwC.mjs +0 -4
- package/dist/mermaid.core-CB8v9A8r.mjs +0 -16
- package/dist/mindmap-definition-LN4V7U3C-BiYp6fzL.mjs +0 -97
- package/dist/mkdir-TDEMSB6C-BY7IIkok.mjs +0 -1
- package/dist/mv-Z6MORUFL-C4m2WG8E.mjs +0 -1
- package/dist/nl-U5YJDM32-CrNZhLtI.mjs +0 -1
- package/dist/od-VJEF2UR5-5RFpmlxK.mjs +0 -1
- package/dist/open-browser-CxnOIVsL.mjs +0 -2
- package/dist/ordinal-D5S_JXYv.mjs +0 -2
- package/dist/packet-7NZHBO7P-DJoR1MQJ.mjs +0 -1
- package/dist/paste-7N6AFSDS-DQNANxpk.mjs +0 -1
- package/dist/path-D4ahAhVD.mjs +0 -2
- package/dist/pegDiagram-2B236MQR-DMP1ng8V.mjs +0 -2
- package/dist/pie-RZYD4A2V-Ba8iL0H-.mjs +0 -1
- package/dist/pieDiagram-ENE6RG2P-CSKXRjGQ.mjs +0 -40
- package/dist/preview-2rQXoRuM.mjs +0 -3
- package/dist/preview-MV-qHfzy.mjs +0 -1
- package/dist/printf-CX64KX2P-CKuJk-Cs.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-C08FYohG.js +0 -1
- package/dist/public/assets/AgentDiffPane-T499-ugv.js +0 -2
- package/dist/public/assets/ChangedOutsideBadge-GeQfL_b-.js +0 -1
- package/dist/public/assets/DocumentContext-C-Lo65-_.js +0 -38
- package/dist/public/assets/FeedbackForm-CmdTz11F.js +0 -1
- package/dist/public/assets/ImportSkillDialog-ChsGV6eb.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B1ZA0ofn.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +0 -1
- package/dist/public/assets/SessionsHost-BobZkNwc.js +0 -2
- package/dist/public/assets/SettingsDialogBody-COTbFRqi.js +0 -12
- package/dist/public/assets/SkillToolbarControls-PvRY_LHn.js +0 -1
- package/dist/public/assets/SourceEditor-Duqpede9.js +0 -1
- package/dist/public/assets/TerminalWindowApp-CgWp2eC-.js +0 -1
- package/dist/public/assets/ThreadView-VqdgemBS.js +0 -10
- package/dist/public/assets/TimelineDiffPane-DnaRcvCk.js +0 -2
- package/dist/public/assets/agent-diff-store-B7oQn7l7.js +0 -1
- package/dist/public/assets/auth-state-cache-BUYyIMUZ.js +0 -11
- package/dist/public/assets/comment-chips-BhvfCPCk.js +0 -5
- package/dist/public/assets/follow-file-CWSsUd-S.js +0 -1
- package/dist/public/assets/index-Dmlpu4P1.js +0 -2097
- package/dist/public/assets/selection-context-CSP8zK1H.js +0 -4
- package/dist/public/assets/skill-actions-98H3SnCL.js +0 -2
- package/dist/public/assets/typing-burst-detector-BOmjXV-P.js +0 -8
- package/dist/public/assets/use-activity-panel-BwANCYjg.js +0 -1
- package/dist/public/assets/use-open-skill-DCSEJ3jJ.js +0 -1
- package/dist/public/assets/use-skill-directory-D9S5f8By.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-CB_cI1yy.js +0 -6
- package/dist/pwd-D4OZ7N27-CSTLotxZ.mjs +0 -1
- package/dist/python3-DNGS4G3E-BZ5fPY5e.mjs +0 -12
- package/dist/quadrantDiagram-ABIIQ3AL-Do93EPf_.mjs +0 -8
- package/dist/radar-I7S5WNFK-HP72Fmhl.mjs +0 -1
- package/dist/railroad-3IZDKUUU-DC3PWo_6.mjs +0 -1
- package/dist/railroad-abnf-AHOZXSZD-Vgpa9_KI.mjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-B4SmMMsT.mjs +0 -1
- package/dist/railroad-peg-LSFZ7HO6-DLlDiUuB.mjs +0 -1
- package/dist/railroadDiagram-RFXS5EU6-BBHONGQu.mjs +0 -2
- package/dist/readlink-MI4GCHJF-V9fwXBrg.mjs +0 -1
- package/dist/repair-launch-json-Cq9ghST3.mjs +0 -2
- package/dist/repair-mcp-configs-DY0FS2-y.mjs +0 -2
- package/dist/repair-skills-CkZZbtNk.mjs +0 -4
- package/dist/repair-skills-l9Id0gzv.mjs +0 -1
- package/dist/requirementDiagram-TGXJPOKE-CAGy_wFo.mjs +0 -85
- package/dist/rev-XOSYPP45-G2PvMYC2.mjs +0 -1
- package/dist/rg-XNF3R3II-CuFYIwNn.mjs +0 -1
- package/dist/rm-RTZG23RL-BOvMrhon.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-Dk19R-p8.mjs +0 -1
- package/dist/rough.cjs-LxmwwhvT.mjs +0 -2
- package/dist/sankeyDiagram-HTMAVEWB-B59ayZ_U.mjs +0 -41
- package/dist/sed-JAPPVBEU-BUaK4riL.mjs +0 -1
- package/dist/seq-RN5ZUASB-D5aLn_so.mjs +0 -1
- package/dist/sequenceDiagram-DBY2YBRQ-BqY5gm2k.mjs +0 -163
- package/dist/server-lock-BleUv9m0.mjs +0 -2
- package/dist/server-lock-uucDARDL.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-DnTKth9v.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-Z-xtGDHc.mjs +0 -1
- package/dist/sizeCapture-X5ZJPWSS-D7Nqbe-W.mjs +0 -2
- package/dist/skill-teardown-CZnemDLF.mjs +0 -2
- package/dist/sleep-VZFPZFWA-DcISab6N.mjs +0 -1
- package/dist/sort-DCNRDA7U-C1gRzOOY.mjs +0 -1
- package/dist/split-SITCSYCZ-D4U2N_sH.mjs +0 -1
- package/dist/sqlite3-TE5AIOTF-DcjYN7WW.mjs +0 -1
- package/dist/src-9BFQh559.mjs +0 -348
- package/dist/src-9I3GiOoK.mjs +0 -2032
- package/dist/src-BuBt_xnY.mjs +0 -2
- package/dist/src-Dl8P6sfz.mjs +0 -20
- package/dist/src-h5dDPK2z.mjs +0 -1
- package/dist/start-BYY0acPS.mjs +0 -1
- package/dist/start-C4KuZHu5.mjs +0 -4
- package/dist/stat-BT5A227F-B4qwqNn_.mjs +0 -1
- package/dist/stateDiagram-2N3HPSRC-BD1FBZi9.mjs +0 -2
- package/dist/stateDiagram-v2-6OUMAXLB-CqmBRdZY.mjs +0 -2
- package/dist/strings-7PLOGTPD-BJ6vWsQi.mjs +0 -1
- package/dist/swimlanes-5IMT3BWC-D2eO0gTx.mjs +0 -2
- package/dist/swimlanesDiagram-G3AALYLV-BiRCZWbo.mjs +0 -9
- package/dist/tac-SJGXQ4T2-D-bfDFKg.mjs +0 -1
- package/dist/tail-S5ULNTJU-CWnyTuXg.mjs +0 -1
- package/dist/tar-MZQD7NO4-Cx5bpVMY.mjs +0 -1
- package/dist/tee-O7VXZDCO-B_duU1hV.mjs +0 -1
- package/dist/time-DEUO3QV2-CekCKA2I.mjs +0 -1
- package/dist/timeline-definition-FHXFAJF6-DZHpuaV_.mjs +0 -121
- package/dist/timeout-VRKMCG72-DaJVXXR3.mjs +0 -1
- package/dist/touch-DX2IJOQ4-CZteiICw.mjs +0 -1
- package/dist/tr-2HXZRDSW-D4XuTGWg.mjs +0 -1
- package/dist/tree-LYXBS7DC-CUIzQKTG.mjs +0 -1
- package/dist/treeView-QDETBFTQ-C9yOsbGY.mjs +0 -1
- package/dist/treemap-6X3UGDF4-iowse2nY.mjs +0 -1
- package/dist/true-WHJNXCHG-BzxCUQFd.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-x3XCmR3I.mjs +0 -1
- package/dist/uniq-SUNANL47-DpupkNiO.mjs +0 -1
- package/dist/vennDiagram-L72KCM5P-CGoW4QcS.mjs +0 -35
- package/dist/wardley-OPB4EBWU-BL1Dan_S.mjs +0 -1
- package/dist/wardleyDiagram-EHGQE667-DHS8jBWZ.mjs +0 -79
- package/dist/wc-TQB3VNOX-D8llmcL9.mjs +0 -1
- package/dist/which-XZHEH76L-imZgNd5x.mjs +0 -1
- package/dist/whoami-DGKU3D2X-CzLNG51j.mjs +0 -1
- package/dist/write-project-skill-WXZSbQlg.mjs +0 -56
- package/dist/xan-UD7JYIL2-_38Iv1cI.mjs +0 -1
- package/dist/xan-view-OW2TB7Z3-RT-IKMgr.mjs +0 -1
- package/dist/xargs-I6EZUCYF-Bu8VhXV_.mjs +0 -1
- package/dist/xychartDiagram-FW5EYKEG-CG0DSvm_.mjs +0 -8
- package/dist/yq-OAKYHSXH-BcCBaLJN.mjs +0 -1
- /package/dist/{expansion-VBDYWVZR-CeY6vkty.mjs → expansion-VBDYWVZR-CpX0YZMb.mjs} +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-C7FmC3Cl.mjs";import{p as n}from"./src-BuBt_xnY.mjs";import{H as r,K as i,U as a,a as o,b as s,c,et as l,f as u,nt as d,rt as f,tt as p,v as m,w as h,y as g}from"./chunk-WYO6CB5R-Cg1RXhAT.mjs";import{i as _}from"./chunk-ICXQ74PX-CewdqzeE.mjs";import{t as v}from"./chunk-VAUOI2AC-Ds6ZNp2p.mjs";import{t as y}from"./rough.cjs-LxmwwhvT.mjs";const b=(e,t)=>d(e,`a`,-t),x=1e-10;function S(e,t){let n=w(e),r=n.filter(t=>C(t,e)),i=0,a=0,o=[];if(r.length>1){let t=k(r);for(let e=0;e<r.length;++e){let n=r[e];n.angle=Math.atan2(n.x-t.x,n.y-t.y)}r.sort((e,t)=>t.angle-e.angle);let n=r[r.length-1];for(let t=0;t<r.length;++t){let s=r[t];a+=(n.x+s.x)*(s.y-n.y);let c={x:(s.x+n.x)/2,y:(s.y+n.y)/2},l=null;for(let t=0;t<s.parentIndex.length;++t)if(n.parentIndex.includes(s.parentIndex[t])){let r=e[s.parentIndex[t]],i=Math.atan2(s.x-r.x,s.y-r.y),a=Math.atan2(n.x-r.x,n.y-r.y),o=a-i;o<0&&(o+=2*Math.PI);let u=a-o/2,d=E(c,{x:r.x+r.radius*Math.sin(u),y:r.y+r.radius*Math.cos(u)});d>r.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=T(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;n<e.length;++n)e[n].radius<t.radius&&(t=e[n]);let n=!1;for(let r=0;r<e.length;++r)if(E(e[r],t)>Math.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-x,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function C(e,t){return t.every(t=>E(e,t)<t.radius+x)}function w(e){let t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){let i=O(e[n],e[r]);for(let e of i)e.parentIndex=[n,r],t.push(e)}return t}function T(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function E(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function D(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return T(e,r)+T(t,i)}function O(e,t){let n=E(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function k(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function A(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n<i;++n){c/=2;let n=t+c,r=e(n);if(r*o>=0&&(t=n),Math.abs(c)<a||r===0)return n}return t+c}function j(e){let t=Array(e);for(let n=0;n<e;++n)t[n]=0;return t}function M(e,t){return j(e).map(()=>j(t))}function N(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function P(e){return Math.sqrt(N(e,e))}function F(e,t,n){for(let r=0;r<t.length;++r)e[r]=t[r]*n}function I(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function L(e,t,n){n||={};let r=n.maxIterations||t.length*200,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,c=n.rho===void 0?1:n.rho,l=n.chi===void 0?2:n.chi,u=n.psi===void 0?-.5:n.psi,d=n.sigma===void 0?.5:n.sigma,f,p=t.length,m=Array(p+1);m[0]=t,m[0].fx=e(t),m[0].id=0;for(let n=0;n<p;++n){let r=t.slice();r[n]=r[n]?r[n]*i:a,m[n+1]=r,m[n+1].fx=e(r),m[n+1].id=n+1}function h(e){for(let t=0;t<e.length;t++)m[p][t]=e[t];m[p].fx=e.fx}let g=(e,t)=>e.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t<r;++t){if(m.sort(g),n.history){let e=m.map(e=>{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e<p;++e)f=Math.max(f,Math.abs(m[0][e]-m[1][e]));if(Math.abs(m[0].fx-m[p].fx)<o&&f<s)break;for(let e=0;e<p;++e){_[e]=0;for(let t=0;t<p;++t)_[e]+=m[t][e];_[e]/=p}let t=m[p];if(I(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)I(b,1+l,_,-l,t),b.fx=e(b),b.fx<v.fx?h(b):h(v);else if(v.fx>=m[p-1].fx){let n=!1;if(v.fx>t.fx?(I(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(I(y,1-u*c,_,u*c,t),y.fx=e(y),y.fx<v.fx?h(y):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)I(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(v)}return m.sort(g),{fx:m[0].fx,x:m[0]}}function ee(e,t,n,r,i,a,o){let s=n.fx,c=N(n.fxprime,t),l=s,u=s,d=c,f=0;i||=1,a||=1e-6,o||=.1;function p(u,f,p){for(let m=0;m<16;++m)if(i=(u+f)/2,I(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=N(r.fxprime,t),l>s+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(I(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=N(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function te(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),F(o,r.fxprime,-1);for(let t=0;t<l;++t){if(c=ee(e,o,r,i,c),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),!c)F(o,r.fxprime,-1);else{I(a,1,i.fxprime,-1,r.fxprime);let e=N(r.fxprime,r.fxprime),t=Math.max(0,N(a,i.fxprime)/e);I(o,t,o,-1,i.fxprime),s=r,r=i,i=s}if(P(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:c}),r}function ne(e,t={}){t.maxIterations=t.maxIterations||500;let n=t.initialLayout||se,r=t.lossFunction||z,i=ie(e,t),a=n(i,t),o=Object.keys(a),s=[];for(let e of o)s.push(a[e].x),s.push(a[e].y);let c=L(e=>{let t={};for(let n=0;n<o.length;++n){let r=o[n];t[r]={x:e[2*n],y:e[2*n+1],radius:a[r].radius}}return r(t,i)},s,t).x;for(let e=0;e<o.length;++e){let t=o[e];a[t].x=c[2*e],a[t].y=c[2*e+1]}return a}const re=1e-10;function R(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+re?Math.abs(e-t):A(r=>D(e,t,r)-n,0,e+t)}function ie(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;n<t.sets.length;n++){let r=String(t.sets[n]);e.set(r,t.size+(e.get(r)||0));for(let i=n+1;i<t.sets.length;i++){let n=String(t.sets[i]),a=`${r};${n}`,o=`${n};${r}`;e.set(a,t.size+(e.get(a)||0)),e.set(o,t.size+(e.get(o)||0))}}for(let t of r)t.sets.length<3&&(t.size=e.get(i(t.sets)))}let a=[],o=new Set;for(let e of r)if(e.sets.length===1)a.push(e.sets[0]);else if(e.sets.length===2){let t=e.sets[0],n=e.sets[1];o.add(i(e.sets)),o.add(i([n,t]))}a.sort((e,t)=>e===t?0:e<t?-1:1);for(let e=0;e<a.length;++e){let t=a[e];for(let n=e+1;n<a.length;++n){let e=a[n];o.has(i([t,e]))||r.push({sets:[t,e],size:0})}}return r}function ae(e,t,n){let r=M(t.length,t.length),i=M(t.length,t.length);return e.filter(e=>e.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=R(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function oe(e,t,n,r){for(let e=0;e<t.length;++e)t[e]=0;let i=0;for(let a=0;a<n.length;++a){let o=e[2*a],s=e[2*a+1];for(let c=a+1;c<n.length;++c){let l=e[2*c],u=e[2*c+1],d=n[a][c],f=r[a][c],p=(l-o)*(l-o)+(u-s)*(u-s),m=Math.sqrt(p),h=p-d*d;f>0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function se(e,t={}){let n=le(e,t),r=t.lossFunction||z;if(e.length>=8){let i=ce(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function ce(e,t={}){let n=t.restarts||10,r=[],i={};for(let t of e)t.sets.length===1&&(i[t.sets[0]]=r.length,r.push(t));let{distances:a,constraints:o}=ae(e,r,i),s=P(a.map(P))/a.length;a=a.map(e=>e.map(e=>e/s));let c=(e,t)=>oe(e,t,a,o),l=null;for(let e=0;e<n;++e){let e=te(c,j(a.length*2).map(Math.random),t);(!l||e.fx<l.fx)&&(l=e)}let u=l.x,d={};for(let e=0;e<r.length;++e){let t=r[e];d[t.sets[0]]={x:u[2*e]*s,y:u[2*e+1]*s,radius:Math.sqrt(t.size/Math.PI)}}if(t.history)for(let e of t.history)F(e.x,s);return d}function le(e,t){let n=t&&t.lossFunction?t.lossFunction:z,r={},i={};for(let t of e)if(t.sets.length===1){let e=t.sets[0];r[e]={x:1e10,y:1e10,rowid:r.length,size:t.size,radius:Math.sqrt(t.size/Math.PI)},i[e]=[]}e=e.filter(e=>e.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+re>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;n<i[e].length;++n)t+=i[e][n].size*i[e][n].weight;a.push({set:e,size:t})});function o(e,t){return t.size-e.size}a.sort(o);let s={};function c(e){return e.set in s}function l(e,t){r[t].x=e.x,r[t].y=e.y,s[t]=!0}l({x:0,y:0},a[0].set);for(let t=1;t<a.length;++t){let s=a[t].set,d=i[s].filter(c),f=r[s];if(d.sort(o),d.length===0)throw`ERROR: missing pairwise overlap information`;let p=[];for(var u=0;u<d.length;++u){let e=r[d[u].set],t=R(f.radius,e.radius,d[u].size);p.push({x:e.x+t,y:e.y}),p.push({x:e.x-t,y:e.y}),p.push({y:e.y+t,x:e.x}),p.push({y:e.y-t,x:e.x});for(let n=u+1;n<d.length;++n){let i=r[d[n].set],a=R(f.radius,i.radius,d[n].size),o=O({x:e.x,y:e.y,radius:t},{x:i.x,y:i.y,radius:a});p.push(...o)}}let m=1e50,h=p[0];for(let t of p){r[s].x=t.x,r[s].y=t.y;let i=n(r,e);i<m&&(m=i,h=t)}l(h,s)}return r}function z(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=D(n.radius,i.radius,E(n,i))}else t=S(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ue(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=D(n.radius,i.radius,E(n,i))}else t=S(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function de(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&E(e[0],e[1])<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y),e.length>1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function fe(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t<e.length;++t)for(let r=t+1;r<e.length;++r){let i=e[t].radius+e[r].radius;E(e[t],e[r])+1e-10<i&&n(e[r],e[t])}let r=new Map;for(let n=0;n<e.length;++n){let i=t(e[n]).parent.setid;r.has(i)||r.set(i,[]),r.get(i).push(e[n])}return e.forEach(e=>{delete e.parent}),Array.from(r.values())}function B(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function pe(e,t,n){t??=Math.PI/2;let r=ge(e).map(e=>Object.assign({},e)),i=fe(r);for(let e of i){de(e,t,n);let r=B(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c<i.length;)s(i[c],!0,!1),s(i[c+1],!1,!0),s(i[c+2],!0,!0),c+=3,a=B(r);return he(r)}function me(e,t,n,r,i){let a=ge(e);t-=2*r,n-=2*r;let{xRange:o,yRange:s}=B(a);if(o.max===o.min||s.max===s.min)return console.log(`not scaling solution: zero size detected`),e;let c,l;if(i){let e=Math.sqrt(i/Math.PI)*2;c=t/e,l=n/e}else c=t/(o.max-o.min),l=n/(s.max-s.min);let u=Math.min(l,c),d=(t-(o.max-o.min)*u)/2,f=(n-(s.max-s.min)*u)/2;return he(a.map(e=>({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function he(e){let t={};for(let n of e)t[n.setid]=n;return t}function ge(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function _e(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ne,x=z;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=pe(e,o,f)),S=me(e,n,r,i,c),C=be(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=Se(t))});function k(e){return t=>we(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>we(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,V(S,T)):I.each(`end`,V(S,T)):I.each(V(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let ee=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),ee.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e===`default`?z:e===`logRatio`?ue:e,S):x},S}function V(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function H(e,t,n){let r=t[0].radius-E(t[0],e);for(let n=1;n<t.length;++n){let i=t[n].radius-E(t[n],e);i<=r&&(r=i)}for(let t=0;t<n.length;++t){let i=E(n[t],e)-n[t].radius;i<=r&&(r=i)}return r}function ve(e,t,n){let r=[];for(let t of e)r.push({x:t.x,y:t.y}),r.push({x:t.x+t.radius/2,y:t.y}),r.push({x:t.x-t.radius/2,y:t.y}),r.push({x:t.x,y:t.y+t.radius/2}),r.push({x:t.x,y:t.y-t.radius/2});let i=r[0],a=H(r[0],e,t);for(let n=1;n<r.length;++n){let o=H(r[n],e,t);o>=a&&(i=r[n],a=o)}let o=L(n=>-1*H({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(E(s,t)>t.radius){c=!1;break}for(let e of t)if(E(s,e)<e.radius){c=!1;break}if(c)return s;if(e.length==1)return{x:e[0].x,y:e[0].y};let l={};return S(e,l),l.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:l.arcs.length==1?{x:l.arcs[0].circle.x,y:l.arcs[0].circle.y}:t.length?ve(e,[]):k(l.arcs.map(e=>e.p1))}function ye(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r<n.length;r++){let i=n[r],a=e[i];for(let o=r+1;o<n.length;++o){let r=n[o],s=e[r],c=E(a,s);c+s.radius<=a.radius+1e-10?t[r].push(i):c+a.radius<=s.radius+1e-10&&t[i].push(r)}}return t}function be(e,t,n){let r={},i=ye(e);for(let a=0;a<t.length;++a){let o=t[a].sets,s={},c={};for(let e=0;e<o.length;++e){s[o[e]]=!0;let t=i[o[e]];for(let e=0;e<t.length;++e)c[t[e]]=!0}let l=[],u=[];for(let t in e)t in s?l.push(e[t]):t in c||u.push(e[t]);let d=ve(l,u,n);r[o]=d,d.disjoint&&t[a].size>0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function xe(e,t,n){let r=[];return r.push(`
|
|
2
|
-
M`,e,t),r.push(`
|
|
3
|
-
m`,-n,0),r.push(`
|
|
4
|
-
a`,n,n,0,1,0,n*2,0),r.push(`
|
|
5
|
-
a`,n,n,0,1,0,-n*2,0),r.join(` `)}function Se(e){let t=e.split(` `);return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function Ce(e){if(e.length===0)return[];let t={};return S(e,t),t.arcs}function U(e,t){if(e.length===0)return`M 0 0`;let n=10**(t||0),r=t==null?e=>e:e=>Math.round(e*n)/n;if(e.length==1){let t=e[0].circle;return xe(r(t.x),r(t.y),r(t.radius))}let i=[`
|
|
6
|
-
M`,r(e[0].p2.x),r(e[0].p2.y)];for(let t of e){let e=r(t.circle.radius);i.push(`
|
|
7
|
-
A`,e,e,0,+!!t.large,+!!t.sweep,r(t.p1.x),r(t.p1.y))}return i.join(` `)}function we(e,t){return U(Ce(e),t)}function Te(e,t={}){let{lossFunction:n,layoutFunction:r=ne,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:o,width:s=600,height:c=350,padding:l=15,scaleToFit:u=!1,symmetricalTextCentre:d=!1,distinct:f,round:p=2}=t,m=r(e,{lossFunction:n===`default`||!n?z:n===`logRatio`?ue:n,distinct:f});i&&(m=pe(m,a,o));let h=me(m,s,c,l,u),g=be(h,e,d),_=new Map(Object.keys(h).map(e=>[e,{set:e,x:h[e].x,y:h[e].y,radius:h[e].radius}])),v=e.map(e=>{let t=e.sets.map(e=>_.get(e)),n=Ce(t);return{circles:t,arcs:n,path:U(n,p),area:e,has:new Set(e.sets)}});function y(e){let t=``;for(let n of v)n.has.size>e.length&&e.every(e=>n.has.has(e))&&(t+=` `+n.path);return t}return v.map(({circles:e,arcs:t,path:n,area:r})=>({data:r,text:g[r.sets],circles:e,arcs:t,path:n,distinctPath:n+y(r.sets)}))}var Ee=e(y(),1),W=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],a=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],c=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],h=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:`error`,5:`VENN`,7:`EOF`,8:`NEWLINE`,11:`TITLE`,12:`SET`,14:`BRACKET_LABEL`,15:`COLON`,16:`NUMERIC`,17:`UNION`,19:`TEXT`,20:`IDENTIFIER`,21:`STRING`,22:`INDENT_TEXT`,24:`STYLE`,27:`COMMA`,31:`HEXCOLOR`,32:`RGBCOLOR`,33:`RGBACOLOR`},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[s];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSubsetData([a[s]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[s-1]],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[s].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s]),r.addSubsetData(a[s],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-1]),r.addSubsetData(a[s-1],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-2]),r.addSubsetData(a[s-2],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-3]),r.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:r.addTextData(a[s-2],a[s-1],a[s]);break;case 23:r.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s],void 0);break;case 27:case 28:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s-1],a[s]);break;case 29:case 41:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(` `);break;case 34:this.$=[a[s]];break;case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 43:case 44:this.$=a[s];break}},`anonymous`),table:[e(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(r,[2,4],{6:5}),e(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),e(r,[2,8]),{13:16,20:i,21:a},{13:20,18:19,20:i,21:a},{13:20,18:21,20:i,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:a},e(r,[2,9],{14:[1,27],15:[1,28]}),e(o,[2,43]),e(o,[2,44]),e(r,[2,13],{14:[1,29],15:[1,30],27:s}),e(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},e(r,[2,22]),e(r,[2,24],{14:[1,35]}),e(r,[2,25],{14:[1,36]}),e(r,[2,26]),{20:c,25:37,26:38,27:s},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:a},e(r,[2,17],{14:[1,45]}),e(r,[2,18],{14:[1,46]}),e(r,[2,19]),e(r,[2,27]),e(r,[2,28]),e(r,[2,23],{27:[1,47]}),e(l,[2,29]),{15:[1,48]},{16:[1,49]},e(r,[2,11]),{16:[1,50]},e(r,[2,15]),e(o,[2,42]),e(r,[2,20]),e(r,[2,21]),{20:c,26:51},{16:u,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},e(r,[2,12]),e(r,[2,16]),e(l,[2,30]),e(l,[2,31]),e(l,[2,32]),e(l,[2,33],{30:61,16:u,20:d,31:f,32:p,33:m}),e(h,[2,34]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),e(h,[2,39]),e(h,[2,40]),e(h,[2,35])],defaultActions:{6:[2,1]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
8
|
-
`+h.showPosition()+`
|
|
9
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
10
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
11
|
-
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
12
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin(`INITIAL`),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin(`INITIAL`),this.unput(t.yytext);break;case 6:return this.begin(`bol`),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(e.consumeIndentText)e.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}})();function _(){this.yy={}}return t(_,`Parser`),_.prototype=g,g.Parser=_,new _})();W.parser=W;var De=W,G=[],K=[],q=[],J=new Set,Y,X=!1,Oe=t((e,t,n)=>{let r=Q(e).sort(),i=n??10/e.length**2;Y=r,r.length===1&&J.add(r[0]),G.push({sets:r,size:i,label:t?Z(t):void 0})},`addSubsetData`),ke=t(()=>G,`getSubsetData`),Z=t(e=>{let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t},`normalizeText`),Ae=t(e=>e&&Z(e),`normalizeStyleValue`),je=t((e,t,n)=>{let r=Z(t);K.push({sets:Q(e).sort(),id:r,label:n?Z(n):void 0})},`addTextData`),Me=t((e,t)=>{let n=Q(e).sort(),r={};for(let[e,n]of t)r[e]=Ae(n)??n;q.push({targets:n,styles:r})},`addStyleData`),Ne=t(()=>q,`getStyleData`),Q=t(e=>e.map(e=>Z(e)),`normalizeIdentifierList`),Pe=t(e=>{let t=Q(e).filter(e=>!J.has(e));if(t.length>0)throw Error(`unknown set identifier: ${t.join(`, `)}`)},`validateUnionIdentifiers`),Fe=t(()=>K,`getTextData`),Ie=t(()=>Y,`getCurrentSets`),Le=t(()=>X,`getIndentMode`),Re=t(e=>{X=e},`setIndentMode`),ze=u.venn;function Be(){return _(ze,s().venn)}t(Be,`getConfig`);var Ve={getConfig:Be,clear:t(()=>{o(),G.length=0,K.length=0,q.length=0,J.clear(),Y=void 0,X=!1},`customClear`),setAccTitle:a,getAccTitle:g,setDiagramTitle:i,getDiagramTitle:h,getAccDescription:m,setAccDescription:r,addSubsetData:Oe,getSubsetData:ke,addTextData:je,addStyleData:Me,validateUnionIdentifiers:Pe,getTextData:Fe,getStyleData:Ne,getCurrentSets:Ie,getIndentMode:Le,setIndentMode:Re},He=t(e=>`
|
|
13
|
-
.venn-title {
|
|
14
|
-
font-size: 32px;
|
|
15
|
-
fill: ${e.vennTitleTextColor};
|
|
16
|
-
font-family: ${e.fontFamily};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.venn-circle text {
|
|
20
|
-
font-size: 48px;
|
|
21
|
-
font-family: ${e.fontFamily};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.venn-intersection text {
|
|
25
|
-
font-size: 48px;
|
|
26
|
-
fill: ${e.vennSetTextColor};
|
|
27
|
-
font-family: ${e.fontFamily};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.venn-text-node {
|
|
31
|
-
font-family: ${e.fontFamily};
|
|
32
|
-
color: ${e.vennSetTextColor};
|
|
33
|
-
}
|
|
34
|
-
`,`getStyles`);function Ue(e){let t=new Map;for(let n of e){let e=n.targets.join(`|`),r=t.get(e);r?Object.assign(r,n.styles):t.set(e,{...n.styles})}return t}t(Ue,`buildStyleByKey`);var We=t((e,t,r,i)=>{let a=i.db,o=a.getConfig?.(),{themeVariables:u,look:d,handDrawnSeed:m}=s(),h=d===`handDrawn`,g=[u.venn1,u.venn2,u.venn3,u.venn4,u.venn5,u.venn6,u.venn7,u.venn8].filter(Boolean),_=a.getDiagramTitle?.(),y=a.getSubsetData(),x=a.getTextData(),S=Ue(a.getStyleData()),C=Ke(y),w=o?.width??800,T=o?.height??450,E=w/1600,D=_?48*E:0,O=u.primaryTextColor??u.textColor,k=v(t);k.attr(`viewBox`,`0 0 ${w} ${T}`),_&&k.append(`text`).text(_).attr(`class`,`venn-title`).attr(`font-size`,`${32*E}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*E).style(`fill`,u.vennTitleTextColor||u.titleColor);let A=n(document.createElement(`div`)),j=_e().width(w).height(T-D);A.datum(C).call(j);let M=h?Ee.default.svg(A.select(`svg`).node()):void 0,N=Te(C,{width:w,height:T-D,padding:o?.padding??15}),P=new Map;for(let e of N){let t=$([...e.data.sets].sort());P.set(t,e)}x.length>0&&Ge(o,P,A,x,E,S);let F=f(u.background||`#f4f4f4`);A.selectAll(`.venn-circle`).each(function(e,t){let r=n(this),i=$([...e.sets].sort()),a=S.get(i),o=a?.fill||g[t%g.length]||u.primaryColor;r.classed(`venn-set-${t%8}`,!0);let s=a?.[`fill-opacity`]??.1,c=a?.stroke||o,d=a?.[`stroke-width`]||`${5*E}`;if(h&&M){let e=P.get(i);if(e&&e.circles.length>0){let n=e.circles[0],i=M.circle(n.x,n.y,n.radius*2,{roughness:.7,seed:m,fill:b(o,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+t*60,stroke:c,strokeWidth:parseFloat(String(d))});r.select(`path`).remove(),r.node()?.insertBefore(i,r.select(`text`).node())}}else r.select(`path`).style(`fill`,o).style(`fill-opacity`,s).style(`stroke`,c).style(`stroke-width`,d).style(`stroke-opacity`,.95);let f=a?.color||(F?p(o,30):l(o,30));r.select(`text`).style(`font-size`,`${48*E}px`).style(`fill`,f)}),h&&M?A.selectAll(`.venn-intersection`).each(function(e){let t=n(this),r=$([...e.sets].sort()),i=S.get(r),a=i?.fill;if(a){let e=t.select(`path`),n=e.attr(`d`);if(n){let t=M.path(n,{roughness:.7,seed:m,fill:b(a,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r?.parentNode?.insertBefore(t,r),e.remove()}}else t.select(`path`).style(`fill-opacity`,0);t.select(`text`).style(`font-size`,`${48*E}px`).style(`fill`,i?.color??u.vennSetTextColor??O)}):(A.selectAll(`.venn-intersection text`).style(`font-size`,`${48*E}px`).style(`fill`,e=>{let t=$([...e.sets].sort());return S.get(t)?.color??u.vennSetTextColor??O}),A.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{let t=$([...e.sets].sort());return+!!S.get(t)?.fill}).style(`fill`,e=>{let t=$([...e.sets].sort());return S.get(t)?.fill??`transparent`}));let I=k.append(`g`).attr(`transform`,`translate(0, ${D})`),L=A.select(`svg`).node();if(L&&`childNodes`in L)for(let e of[...L.childNodes])I.node()?.appendChild(e);c(k,T,w,o?.useMaxWidth??!0)},`draw`);function $(e){return e.join(`|`)}t($,`stableSetsKey`);function Ge(e,t,n,r,i,a){let o=e?.useDebugLayout??!1,s=n.select(`svg`).append(`g`).attr(`class`,`venn-text-nodes`),c=new Map;for(let e of r){let t=$(e.sets),n=c.get(t);n?n.push(e):c.set(t,[e])}for(let[e,n]of c.entries()){let r=t.get(e);if(!r?.text)continue;let c=r.text.x,l=r.text.y,u=Math.min(...r.circles.map(e=>e.radius)),d=Math.min(...r.circles.map(e=>e.radius-Math.hypot(c-e.x,l-e.y))),f=Number.isFinite(d)?Math.max(0,d):0;f===0&&Number.isFinite(u)&&(f=u*.6);let p=s.append(`g`).attr(`class`,`venn-text-area`).attr(`font-size`,`${40*i}px`);o&&p.append(`circle`).attr(`class`,`venn-text-debug-circle`).attr(`cx`,c).attr(`cy`,l).attr(`r`,f).attr(`fill`,`none`).attr(`stroke`,`purple`).attr(`stroke-width`,1.5*i).attr(`stroke-dasharray`,`${6*i} ${4*i}`);let m=Math.max(80*i,f*2*.95),h=Math.max(60*i,f*2*.95),g=(r.data.label&&r.data.label.length>0?Math.min(32*i,f*.25):0)+(n.length<=2?30*i:0),_=c-m/2,v=l-h/2+g,y=Math.max(1,Math.ceil(Math.sqrt(n.length))),b=Math.max(1,Math.ceil(n.length/y)),x=m/y,S=h/b;for(let[e,t]of n.entries()){let n=e%y,r=Math.floor(e/y),s=_+x*(n+.5),c=v+S*(r+.5);o&&p.append(`rect`).attr(`class`,`venn-text-debug-cell`).attr(`x`,_+x*n).attr(`y`,v+S*r).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`stroke`,`teal`).attr(`stroke-width`,1*i).attr(`stroke-dasharray`,`${4*i} ${3*i}`);let l=x*.9,u=S*.9,d=p.append(`foreignObject`).attr(`class`,`venn-text-node-fo`).attr(`width`,l).attr(`height`,u).attr(`x`,s-l/2).attr(`y`,c-u/2).attr(`overflow`,`visible`),f=a.get(t.id)?.color,m=d.append(`xhtml:span`).attr(`class`,`venn-text-node`).style(`display`,`flex`).style(`width`,`100%`).style(`height`,`100%`).style(`white-space`,`normal`).style(`align-items`,`center`).style(`justify-content`,`center`).style(`text-align`,`center`).style(`overflow-wrap`,`normal`).style(`word-break`,`normal`).text(t.label??t.id);f&&m.style(`color`,f)}}}t(Ge,`renderTextNodes`);function Ke(e){let t=new Set(e.map(e=>[...e.sets].sort().join(`|`))),n=new Map(e.filter(e=>e.sets.length===1&&e.size!==void 0).map(e=>[e.sets[0],e.size])),r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i<e.length-1;i++)for(let a=i+1;a<e.length;a++){let o=[e[i],e[a]],s=o.join(`|`);if(!t.has(s)){t.add(s);let e=n.get(o[0]),i=n.get(o[1]),a=e!==void 0&&i!==void 0?Math.min(e,i)/4:2.5;r.push({sets:o,size:a,label:``})}}}return r.length>0?[...e,...r]:e}t(Ke,`ensurePairwiseSubsets`);var qe={parser:De,db:Ve,renderer:{draw:We},styles:He};export{qe as diagram};
|
|
35
|
-
//# sourceMappingURL=vennDiagram-L72KCM5P-CGoW4QcS.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BhaMJNB5.mjs";import{n as e}from"./chunk-5FCAYU7R-of7BBDNL.mjs";export{e as createWardleyServices};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-C7FmC3Cl.mjs";import{m as t}from"./src-BuBt_xnY.mjs";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-Cg1RXhAT.mjs";import{i as p}from"./chunk-ICXQ74PX-CewdqzeE.mjs";import{t as m}from"./chunk-VAUOI2AC-Ds6ZNp2p.mjs";import{t as h}from"./chunk-JWPE2WC7-cMhWwV9I.mjs";import{n as g}from"./mermaid-parser.core-DejmtVwC.mjs";var _=e((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=e((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=e(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=e(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=e((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:e(async e=>{let n=await g(`wardley`,e);t.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}e(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}e(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}e(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}e(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}e(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}e(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}e(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}e(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}e(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}e(N,`setSize`);function P(e){C.startPipeline(e)}e(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}e(F,`addPipelineComponent`);function I(e){C.setAxes(e)}e(I,`updateAxes`);function L(e){return C.getNode(e)}e(L,`getNode`);function R(e){return C.resolveNodeId(e)}e(R,`resolveNodeId`);function z(){return C.build()}e(z,`getWardleyData`);function B(){C.clear(),o()}e(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=e(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=e(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:e((n,r,i,a)=>{t.debug(`Rendering Wardley map
|
|
2
|
-
`+n);let o=W(),s=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,h=d.size?.height??o.height,g=m(r);g.selectAll(`*`).remove(),c(g,h,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=e(e=>o.padding+e/100*y,`projectX`),S=e(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,c=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),c=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=c-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,m=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(m,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
|
|
3
|
-
M ${n} ${r-30/2}
|
|
4
|
-
L ${n+60-20} ${r-30/2}
|
|
5
|
-
L ${n+60-20} ${r-30/2-8}
|
|
6
|
-
L ${n+60} ${r}
|
|
7
|
-
L ${n+60-20} ${r+30/2+8}
|
|
8
|
-
L ${n+60-20} ${r+30/2}
|
|
9
|
-
L ${n} ${r+30/2}
|
|
10
|
-
Z
|
|
11
|
-
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(d.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);d.deaccelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
|
|
12
|
-
M ${n+60} ${r-30/2}
|
|
13
|
-
L ${n+20} ${r-30/2}
|
|
14
|
-
L ${n+20} ${r-30/2-8}
|
|
15
|
-
L ${n} ${r}
|
|
16
|
-
L ${n+20} ${r+30/2+8}
|
|
17
|
-
L ${n+20} ${r+30/2}
|
|
18
|
-
L ${n+60} ${r+30/2}
|
|
19
|
-
Z
|
|
20
|
-
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:e(({wardley:e}={})=>{let t=p(p(n(),s().themeVariables).wardley,e);return`
|
|
21
|
-
.wardley-background {
|
|
22
|
-
fill: ${t.backgroundColor};
|
|
23
|
-
}
|
|
24
|
-
.wardley-axes line, .wardley-axes path {
|
|
25
|
-
stroke: ${t.axisColor};
|
|
26
|
-
}
|
|
27
|
-
.wardley-axis-label {
|
|
28
|
-
fill: ${t.axisTextColor};
|
|
29
|
-
}
|
|
30
|
-
.wardley-stage-label {
|
|
31
|
-
fill: ${t.axisTextColor};
|
|
32
|
-
}
|
|
33
|
-
.wardley-grid line {
|
|
34
|
-
stroke: ${t.gridColor};
|
|
35
|
-
}
|
|
36
|
-
.wardley-node circle {
|
|
37
|
-
fill: ${t.componentFill};
|
|
38
|
-
stroke: ${t.componentStroke};
|
|
39
|
-
}
|
|
40
|
-
.wardley-node-label {
|
|
41
|
-
fill: ${t.componentLabelColor};
|
|
42
|
-
}
|
|
43
|
-
.wardley-link {
|
|
44
|
-
stroke: ${t.linkStroke};
|
|
45
|
-
}
|
|
46
|
-
.wardley-link--dashed {
|
|
47
|
-
stroke-dasharray: 4 4;
|
|
48
|
-
}
|
|
49
|
-
.wardley-link-label {
|
|
50
|
-
fill: ${t.axisTextColor};
|
|
51
|
-
}
|
|
52
|
-
.wardley-trend line {
|
|
53
|
-
stroke: ${t.evolutionStroke};
|
|
54
|
-
}
|
|
55
|
-
.wardley-annotation-line {
|
|
56
|
-
stroke: ${t.annotationStroke};
|
|
57
|
-
}
|
|
58
|
-
.wardley-annotation circle {
|
|
59
|
-
fill: ${t.annotationFill};
|
|
60
|
-
stroke: ${t.annotationStroke};
|
|
61
|
-
}
|
|
62
|
-
.wardley-annotation text {
|
|
63
|
-
fill: ${t.annotationTextColor};
|
|
64
|
-
}
|
|
65
|
-
.wardley-annotations-box rect {
|
|
66
|
-
fill: ${t.annotationFill};
|
|
67
|
-
stroke: ${t.annotationStroke};
|
|
68
|
-
}
|
|
69
|
-
.wardley-annotations-box text {
|
|
70
|
-
fill: ${t.annotationTextColor};
|
|
71
|
-
}
|
|
72
|
-
.wardley-pipeline-box {
|
|
73
|
-
stroke: ${t.componentStroke};
|
|
74
|
-
}
|
|
75
|
-
.wardley-notes text {
|
|
76
|
-
fill: ${t.axisTextColor};
|
|
77
|
-
}
|
|
78
|
-
`},`styles`)};export{G as diagram};
|
|
79
|
-
//# sourceMappingURL=wardleyDiagram-EHGQE667-DHS8jBWZ.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-GXVXFKBA-CGc4vqMu.mjs";export{e as wcCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-A65PWWJC-LctFeUxK.mjs";export{e as whichCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-HJQJAYMS-SgZmT_QE.mjs";export{e as whoami};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Jo as r,Po as i,Uo as a,Wo as o}from"./src-9BFQh559.mjs";import{Ir as s,gr as c}from"./src-9I3GiOoK.mjs";import{basename as l,dirname as u,isAbsolute as d,join as f,posix as p,relative as m,resolve as h,sep as g,win32 as _}from"node:path";import{cpSync as ee,existsSync as v,lstatSync as te,mkdirSync as ne,readFileSync as re,realpathSync as y,rmSync as b,statSync as x}from"node:fs";import{homedir as S}from"node:os";var C=n((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),w=n((e=>{let{InvalidArgumentError:t}=C();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),T=n((e=>{let{humanReadableArgName:t}=w();var n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
|
|
2
|
-
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
3
|
-
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
4
|
-
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),E=n((e=>{let{InvalidArgumentError:t}=C();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r===void 0?!1:r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
5
|
-
- a short flag is a single dash and a single character
|
|
6
|
-
- either use a single dash and a single character (for a short flag)
|
|
7
|
-
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(t)?Error(`${n}
|
|
8
|
-
- too many short flags`):i.test(t)?Error(`${n}
|
|
9
|
-
- too many long flags`):Error(`${n}
|
|
10
|
-
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),ie=n((e=>{function t(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a=1;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function n(e,n){if(!n||n.length===0)return``;n=Array.from(new Set(n));let r=e.startsWith(`--`);r&&(e=e.slice(2),n=n.map(e=>e.slice(2)));let i=[],a=3;return n.forEach(n=>{if(n.length<=1)return;let r=t(e,n),o=Math.max(e.length,n.length);(o-r)/o>.4&&(r<a?(a=r,i=[n]):r===a&&i.push(n))}),i.sort((e,t)=>e.localeCompare(t)),r&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(`, `)}?)`:i.length===1?`\n(Did you mean ${i[0]}?)`:``}e.suggestSimilar=n})),ae=n((t=>{let n=e(`node:events`).EventEmitter,r=e(`node:child_process`),i=e(`node:path`),a=e(`node:fs`),o=e(`node:process`),{Argument:s,humanReadableArgName:c}=w(),{CommanderError:l}=C(),{Help:u,stripColor:d}=T(),{Option:f,DualOptions:p}=E(),{suggestSimilar:m}=ie();var h=class e extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>o.stdout.write(e),writeErr:e=>o.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>o.stdout.isTTY?o.stdout.columns:void 0,getErrHelpWidth:()=>o.stderr.isTTY?o.stderr.columns:void 0,getOutHasColors:()=>_()??(o.stdout.isTTY&&o.stdout.hasColors?.()),getErrHasColors:()=>_()??(o.stderr.isTTY&&o.stderr.hasColors?.()),stripColor:e=>d(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
|
|
11
|
-
- specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new s(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
|
|
12
|
-
Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new l(e,t,n)),o.exit(e)}action(e){let t=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new f(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
13
|
-
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,`default`)}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{r(t,`error: option '${e.flags}' argument '${t}' is invalid.`,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{r(t,`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof f)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){o.versions?.electron&&(t.from=`electron`);let e=o.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=o.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:o.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
14
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(a.existsSync(e))return;let r=`'${e}' does not exist
|
|
15
|
-
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
16
|
-
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
17
|
-
- ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function c(e,t){let n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;let r=s.find(e=>a.existsSync(`${n}${e}`));if(r)return`${n}${r}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u));let f;o.platform===`win32`?(this._checkForMissingExecutable(u,d,e._name),t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.execPath,t,{stdio:`inherit`})):n?(t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.argv[0],t,{stdio:`inherit`})):f=r.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{o.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e??=1,p?p(new l(e,`commander.executeSubCommandAsync`,`(close)`)):o.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(u,d,e._name);else if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)o.exit(1);else{let e=new l(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)===void 0?!1:this.getOptionValueSource(t)!==`default`});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}else if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
18
|
-
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in o.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new p(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=m(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>c(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(o.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
19
|
-
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function g(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function _(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}t.Command=h,t.useColor=_}));const{program:oe,createCommand:se,createArgument:ce,createOption:le,CommanderError:ue,InvalidArgumentError:D,InvalidOptionArgumentError:de,Command:fe,Argument:pe,Option:me,Help:he}=t(n((e=>{let{Argument:t}=w(),{Command:n}=ae(),{CommanderError:r,InvalidArgumentError:i}=C(),{Help:a}=T(),{Option:o}=E();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default,O=a,k=o,ge=r,A=`node`,j={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`},M=`# ok-mcp-v2
|
|
20
|
-
USER_BUNDLE="$HOME/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
21
|
-
[ -f "$USER_BUNDLE" ] && [ -x "$USER_BUNDLE" ] && exec "$USER_BUNDLE" mcp
|
|
22
|
-
BUNDLE="/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
23
|
-
[ -f "$BUNDLE" ] && [ -x "$BUNDLE" ] && exec "$BUNDLE" mcp
|
|
24
|
-
DEB_BUNDLE="/opt/OpenKnowledge/resources/cli/bin/ok.sh"
|
|
25
|
-
[ -f "$DEB_BUNDLE" ] && [ -x "$DEB_BUNDLE" ] && exec "$DEB_BUNDLE" mcp
|
|
26
|
-
command -v npx >/dev/null 2>&1 && exec npx -y @inkeep/open-knowledge@latest mcp
|
|
27
|
-
for d in "$HOME/.nvm/versions/node"/*/bin "$HOME/.fnm/node-versions"/*/installation/bin "$HOME/.asdf/installs/nodejs"/*/bin /opt/homebrew/bin /usr/local/bin "$HOME/.local/bin" "$HOME/.volta/bin"; do
|
|
28
|
-
[ -f "$d/npx" ] && [ -x "$d/npx" ] && exec "$d/npx" -y @inkeep/open-knowledge@latest mcp
|
|
29
|
-
done
|
|
30
|
-
echo "OpenKnowledge: install OK Desktop or Node.js 24+, then restart your editor" >&2
|
|
31
|
-
exit 127`,N=`# ok-mcp-win-v1
|
|
32
|
-
if ($env:PATHEXT -notmatch 'CMD') { $env:PATHEXT = '.COM;.EXE;.BAT;.CMD;' + $env:PATHEXT }
|
|
33
|
-
if ($env:APPDATA) {
|
|
34
|
-
$shim = Join-Path $env:APPDATA 'npm\\ok.cmd'
|
|
35
|
-
if (Test-Path -LiteralPath $shim -PathType Leaf) { & $shim mcp; exit $LASTEXITCODE }
|
|
36
|
-
}
|
|
37
|
-
$ok = Get-Command ok.cmd -CommandType Application -ErrorAction SilentlyContinue
|
|
38
|
-
if ($ok) { & $ok.Source mcp; exit $LASTEXITCODE }
|
|
39
|
-
$npx = Get-Command npx.cmd -CommandType Application -ErrorAction SilentlyContinue
|
|
40
|
-
if ($npx) { & $npx.Source -y '@inkeep/open-knowledge@latest' mcp; exit $LASTEXITCODE }
|
|
41
|
-
$dirs = @()
|
|
42
|
-
if ($env:ProgramFiles) { $dirs += Join-Path $env:ProgramFiles 'nodejs' }
|
|
43
|
-
if ($env:NVM_SYMLINK) { $dirs += $env:NVM_SYMLINK }
|
|
44
|
-
if ($env:LOCALAPPDATA) {
|
|
45
|
-
$dirs += Join-Path $env:LOCALAPPDATA 'fnm\\aliases\\default'
|
|
46
|
-
$dirs += Join-Path $env:LOCALAPPDATA 'Volta\\bin'
|
|
47
|
-
$dirs += Join-Path $env:LOCALAPPDATA 'pnpm'
|
|
48
|
-
}
|
|
49
|
-
if ($env:USERPROFILE) { $dirs += Join-Path $env:USERPROFILE 'scoop\\shims' }
|
|
50
|
-
foreach ($d in $dirs) {
|
|
51
|
-
$probe = Join-Path $d 'npx.cmd'
|
|
52
|
-
if (Test-Path -LiteralPath $probe -PathType Leaf) { & $probe -y '@inkeep/open-knowledge@latest' mcp; exit $LASTEXITCODE }
|
|
53
|
-
}
|
|
54
|
-
[Console]::Error.WriteLine('OpenKnowledge: install Node.js 24+ (npm i -g @inkeep/open-knowledge), then restart your editor')
|
|
55
|
-
exit 127`,P=`// ok-pi-bridge`,F=`${P}-v1`,I=`ok-pi-managed-extension`;function L(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command===`/bin/sh`){if(!Array.isArray(t.args)||t.args[0]!==`-l`||t.args[1]!==`-c`)return!1;let e=t.args[2];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command===`powershell`){if(!Array.isArray(t.args)||t.args[0]!==`-NoProfile`||t.args[1]!==`-NonInteractive`||t.args[2]!==`-Command`)return!1;let e=t.args[3];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}if(t.type===`local`&&Array.isArray(t.command)){if(t.command[0]===`/bin/sh`){if(t.command[1]!==`-l`||t.command[2]!==`-c`)return!1;let e=t.command[3];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command[0]===`powershell`){if(t.command[1]!==`-NoProfile`||t.command[2]!==`-NonInteractive`||t.command[3]!==`-Command`)return!1;let e=t.command[4];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}return!1}if(t.command===`ok-pi-managed-extension`){if(!Array.isArray(t.args))return!1;let e=t.args[0];return typeof e==`string`&&e.startsWith(F)}return!1}function R(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=h(e);if(l(t)===`cli.mjs`&&l(u(t))===`dist`)return t;let n=t.split(g),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return f(i.length===0?g:i.join(g),`packages`,`cli`,`dist`,`cli.mjs`)}function z(e={}){return e.mode===`dev`?{command:A,args:[R(),`mcp`],env:{...j}}:(e.platformName??process.platform)===`win32`?{command:`powershell`,args:[`-NoProfile`,`-NonInteractive`,`-Command`,N]}:{command:`/bin/sh`,args:[`-l`,`-c`,M]}}function _e(e={}){return e.mode===`dev`?{type:`local`,enabled:!0,command:[A,R(),`mcp`],environment:{...j}}:(e.platformName??process.platform)===`win32`?{type:`local`,enabled:!0,command:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,N]}:{type:`local`,enabled:!0,command:[`/bin/sh`,`-l`,`-c`,M]}}function ve(e){if(typeof e!=`object`||!e)return!1;let t=e;return B(t,z({mode:`published`,platformName:`darwin`}))||B(t,z({mode:`published`,platformName:`win32`}))}function B(e,t){return Object.keys(e).length===Object.keys(t).length?ye(e,t):!1}function ye(e,t){if(e.command!==t.command)return!1;let n=t.args;return!Array.isArray(n)||!Array.isArray(e.args)||e.args.length!==n.length?!1:e.args.every((e,t)=>e===n[t])}function V(e,t){let n=e=>typeof e==`string`&&e.includes(`# ok-mcp`);return t===`/bin/sh`?e[0]===`-l`&&e[1]===`-c`&&n(e[2]):t===`powershell`?e[0]===`-NoProfile`&&e[1]===`-NonInteractive`&&e[2]===`-Command`&&n(e[3]):!1}function be(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.enabled===!1||typeof t.command!=`string`||!Array.isArray(t.args)?!1:V(t.args,t.command)}function xe(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`local`||t.enabled===!1||!Array.isArray(t.command))return!1;let[n,...r]=t.command;return typeof n==`string`&&V(r,n)}function H(e){return e===`win32`?_:p}function Se(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env,i=H(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function Ce(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.claude.json`)}function U(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env;if(t===`darwin`)return p.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??_.join(n,`AppData`,`Roaming`);return _.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.cursor`,`mcp.json`)}function we(e={}){let t=e.platformName??process.platform,n=e.home??S();return(e.env??process.env).CODEX_HOME??H(t).join(n,`.codex`)}function G(e={}){return H(e.platformName??process.platform).join(we(e),`config.toml`)}function K(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=(e.env??process.env).COPILOT_HOME??H(t).join(n,`.copilot`);return H(t).join(r,`mcp-config.json`)}function Te(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env,i=H(t);if(t===`win32`){let e=r.APPDATA??i.join(n,`AppData`,`Roaming`);return i.join(e,`opencode`)}let a=r.XDG_CONFIG_HOME??i.join(n,`.config`);return i.join(a,`opencode`)}function q(e={}){return H(e.platformName??process.platform).join(Te(e),`opencode.json`)}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.openclaw`,`openclaw.json`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.hermes`,`config.yaml`)}function Oe(e={}){let t=e.platformName??process.platform,n=e.home??S();return(e.env??process.env).PI_CODING_AGENT_DIR??H(t).join(n,`.pi`,`agent`)}function ke(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.gemini`,`config`,`mcp_config.json`)}function Ae(e,t){let n=H(t),r=n.join(e,`.lmstudio`,`mcp.json`),i=n.join(e,`.cache`,`lm-studio`,`mcp.json`);return t===`darwin`?[i,r]:[r,i]}function J(e={}){let t=e.platformName??process.platform,n=Ae(e.home??S(),t);return n.find(e=>v(e))||n.find(e=>v(u(e)))||n[0]}function je(e){let t=e.serverName(``);return e.format===`toml`?`[${e.topLevelKey}.${t}]`:[e.topLevelKey,e.serverMapSubKey,t].filter(Boolean).join(`.`)}function Me(e,t){let n;try{n=e.configPath(``,t)}catch{return null}return n.startsWith(`${t}/`)?`~${n.slice(t.length)}`:n}const Y={claude:{id:`claude`,label:k.claude,configPath:(e,t)=>Ce({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.claude`),projectConfigPath:e=>f(e,`.mcp.json`),projectSkillPath:e=>f(e,`.claude`,`skills`,`open-knowledge`,`SKILL.md`)},"claude-desktop":{id:`claude-desktop`,label:k[`claude-desktop`],configPath:(e,t)=>U({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(U({home:t}))},cursor:{id:`cursor`,label:k.cursor,configPath:(e,t)=>W({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(W({home:t})),projectConfigPath:e=>f(e,`.cursor`,`mcp.json`),projectSkillPath:e=>f(e,`.cursor`,`skills`,`open-knowledge`,`SKILL.md`)},codex:{id:`codex`,label:k.codex,configPath:(e,t)=>G({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(G({home:t})),projectConfigPath:e=>f(e,`.codex`,`config.toml`),projectSkillPath:e=>f(e,`.codex`,`skills`,`open-knowledge`,`SKILL.md`)},copilot:{id:`copilot`,label:k.copilot,configPath:(e,t)=>K({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(K({home:t})),projectSkillPath:e=>f(e,`.github`,`skills`,`open-knowledge`,`SKILL.md`)},opencode:{id:`opencode`,label:k.opencode,configPath:(e,t)=>q({home:t}),format:`json`,topLevelKey:`mcp`,serverName:()=>i,buildEntry:(e,t)=>_e(t),scope:`global`,detectPath:(e,t)=>u(q({home:t})),projectConfigPath:e=>f(e,`opencode.json`),projectSkillPath:e=>f(e,`.opencode`,`skills`,`open-knowledge`,`SKILL.md`)},openclaw:{id:`openclaw`,label:k.openclaw,configPath:(e,t)=>Ee({home:t}),format:`json`,topLevelKey:`mcp`,serverMapSubKey:`servers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.openclaw`),offerOnlyWhenDetected:!0},pi:{id:`pi`,label:k.pi,configPath:()=>{throw Error("Pi has no user-global MCP config; OK's integration is the project-scoped bridge extension at .pi/extensions/open-knowledge.ts (run `ok init` in the project).")},format:`file`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:()=>{throw Error(`Pi has no MCP entry shape; the managed bridge file is built by buildPiExtensionSource (integrations/pi-extension.ts).`)},scope:`project`,detectPath:(e,t)=>Oe({home:t}),projectConfigPath:e=>f(e,`.pi`,`extensions`,`open-knowledge.ts`),projectSkillPath:e=>f(e,`.pi`,`skills`,`open-knowledge`,`SKILL.md`)},antigravity:{id:`antigravity`,label:k.antigravity,configPath:(e,t)=>ke({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.gemini`),offerOnlyWhenDetected:!0},"lm-studio":{id:`lm-studio`,label:k[`lm-studio`],configPath:(e,t)=>J({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(J({home:t})),offerOnlyWhenDetected:!0},hermes:{id:`hermes`,label:k.hermes,configPath:(e,t)=>De({home:t}),format:`yaml`,topLevelKey:`mcp_servers`,serverName:()=>i,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.hermes`),offerOnlyWhenDetected:!0}};function Ne(e){let t=e.filter(e=>!Object.hasOwn(Y,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${O.join(`, `)}`);return e.map(e=>Y[e])}function X(e,t){let n;try{n=te(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(n?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);Q(e,t)}function Z(e,t){Q(e,t)}function Q(e,t){let n;try{n=y(t)}catch{n=h(t)}let r=u(e);for(;r.length>1&&r!==g;){let t;try{t=y(r)}catch(e){if(e.code===`ENOENT`){r=u(r);continue}throw e}let i=m(n,t);if(i===``||!i.startsWith(`..`)&&!d(i))return;throw Error(`Refusing to write at ${e}: ancestor ${r} resolves to ${t}, which is outside the project directory ${n}. A symbolic link in the path likely escapes the project. Remove the symlink and re-run project setup.`)}}function $(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pe(e,t,n){try{if(x(n).size>10485760)return!1}catch{return!1}let r;try{r=re(n,`utf-8`)}catch{return!1}let i=[],a=s(r.charCodeAt(0)===65279?r.slice(1):r,i,{allowTrailingComma:!0,disallowComments:!1});if(i.length>0||!$(a))return!1;let o=a[e.topLevelKey];if(!$(o))return!1;let c=e.serverMapSubKey?o[e.serverMapSubKey]:o;return $(c)?$(c[e.serverName(t)]):!1}function Fe(e,t,n={}){if(e.id!==`copilot`)return!0;try{return Pe(e,t,e.configPath(t,n.home))}catch{return!1}}function Ie(e,t,n={}){let r=e.projectSkillPath?.(t);if(!r)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};if(!Fe(e,t,n))return{editorId:e.id,label:e.label,action:`skipped-prerequisite`,path:r};try{let n=c(`project`,{checkDesktop:!0}),i=u(r);X(i,t);let a=v(r)?`overwritten`:`written`;return b(i,{recursive:!0,force:!0}),ne(u(i),{recursive:!0}),ee(n,i,{recursive:!0}),{editorId:e.id,label:e.label,action:a,path:r}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}function Le(e,t){let n=e.projectSkillPath?.(t);if(!n)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};try{let r=u(n);return v(n)?(Z(r,t),b(r,{recursive:!0,force:!0}),{editorId:e.id,label:e.label,action:`removed`,path:n}):{editorId:e.id,label:e.label,action:`not-present`,path:n}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}export{me as C,D as S,ve as _,O as a,Ne as b,ge as c,I as d,z as f,L as g,be as h,Ie as i,P as l,je as m,Z as n,k as o,Me as p,Le as r,Y as s,X as t,F as u,xe as v,fe as x,Se as y};
|
|
56
|
-
//# sourceMappingURL=write-project-skill-WXZSbQlg.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-B74TABJS-BSazPoW8.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-24IMIIXA-BQtWA2ag.mjs";import"./chunk-PXTK5WE2-Dfi2FrE5.mjs";import"./chunk-7TSDKFEO-BjOrsK6M.mjs";import"./chunk-KRBPSX3W-ciCGjpAL.mjs";import"./chunk-DBKNVD4L-Y2Mnp5lC.mjs";import{t as e}from"./chunk-3BS5SKQH-CFcrGLDG.mjs";export{e as xanCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-PXTK5WE2-Dfi2FrE5.mjs";import{c as e}from"./chunk-DBKNVD4L-Y2Mnp5lC.mjs";export{e as cmdView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-TOMNU26N-C3JZDC96.mjs";export{e as xargsCommand};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-C7FmC3Cl.mjs";import{m as t}from"./src-BuBt_xnY.mjs";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-WYO6CB5R-Cg1RXhAT.mjs";import{t as m}from"./linear-DPbvcrPk.mjs";import{t as h}from"./ordinal-D5S_JXYv.mjs";import{t as g}from"./init-Buw5jj4Q.mjs";import{i as _}from"./chunk-ICXQ74PX-CewdqzeE.mjs";import{t as v}from"./line-Cq-NoiNn.mjs";import{t as y}from"./chunk-VAUOI2AC-Ds6ZNp2p.mjs";import"./chunk-HOUHSVGY-Cg_2_CUd.mjs";import{t as b}from"./chunk-Q4XR5HBZ-4H-m7p0G.mjs";function x(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function S(){var e=h().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=x(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return S(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},g.apply(d(),arguments)}var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],k=[26,28],A={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[t(n,r,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},t(n,r,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),t(n,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(c,[2,36]),t(c,[2,37]),t(c,[2,38]),{1:[2,1]},t(n,r,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},t(c,[2,5]),t(n,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},t(T,[2,18]),{1:[2,2]},t(T,[2,8]),t(T,[2,9]),t(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),t(E,[2,40]),t(E,[2,41]),t(D,[2,42]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(D,[2,52]),t(D,[2,53]),t(T,[2,10]),t(T,[2,24],{32:41,31:56,24:x,29:S}),t(T,[2,26]),t(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,11]),t(T,[2,32],{35:60,29:C}),t(T,[2,34]),{33:[1,61]},t(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},t(T,[2,14]),{17:66,24:w},t(T,[2,16]),t(T,[2,17]),t(D,[2,43]),t(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(T,[2,33]),{29:[1,70]},t(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(k,[2,23],{30:[1,73]}),t(T,[2,15]),t(T,[2,28]),t(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},t(T,[2,35]),t(T,[2,19]),{25:75,27:64,29:O},t(k,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return e(j,`Parser`),j.prototype=A,A.Parser=j,new j})();C.parser=C;var w=C;function T(e){return e.type===`bar`}e(T,`isBarPlot`);function E(e){return e.type===`band`}e(E,`isBandAxisData`);function D(e){return e.type===`linear`}e(D,`isLinearAxisData`);var O=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=b(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},k=.7,A=.2,j=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){k*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(k*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},M=class extends j{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=S().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),t.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ee=class extends j{static{e(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=m().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=m().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function N(e,t,n,r){let i=new O(r);return E(e)?new M(t,n,e.categories,e.title,i):new ee(t,n,[e.min,e.max],e.title,i)}e(N,`getAxis`);var te=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function ne(e,t,n,r){return new te(new O(r),e,t,n)}e(ne,`getChartTitleComponent`);var re=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?v().y(e=>e[0]).x(e=>e[1])(e):v().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},ie=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ae=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new re(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new ie(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function P(e,t,n){return new ae(e,t,n)}e(P,`getPlotComponent`);var oe=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:ne(e,t,n,r),plot:P(e,t,n),xAxis:N(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:N(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},se=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new oe(e,t,n,r).getDrawableElement()}},F=0,I,L=W(),R=U(),z=G(),B=R.plotColorPalette.split(`,`).map(e=>e.trim()),V=!1,H=!1;function U(){let e=n(),t=s();return _(e.xyChart,t.themeVariables.xyChart)}e(U,`getChartDefaultThemeConfig`);function W(){let e=s();return _(l.xyChart,e.xyChart)}e(W,`getChartDefaultConfig`);function G(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(G,`getChartDefaultData`);function K(e){let t=s();return p(e.trim(),t)}e(K,`textSanitizer`);function q(e){I=e}e(q,`setTmpSVGG`);function J(e){e===`horizontal`?L.chartOrientation=`horizontal`:L.chartOrientation=`vertical`}e(J,`setOrientation`);function Y(e){z.xAxis.title=K(e.text)}e(Y,`setXAxisTitle`);function X(e,t){z.xAxis={type:`linear`,title:z.xAxis.title,min:e,max:t},V=!0}e(X,`setXAxisRangeData`);function ce(e){z.xAxis={type:`band`,title:z.xAxis.title,categories:e.map(e=>K(e.text))},V=!0}e(ce,`setXAxisBand`);function le(e){z.yAxis.title=K(e.text)}e(le,`setYAxisTitle`);function ue(e,t){z.yAxis={type:`linear`,title:z.yAxis.title,min:e,max:t},H=!0}e(ue,`setYAxisRangeData`);function de(e){let t=Math.min(...e),n=Math.max(...e),r=D(z.yAxis)?z.yAxis.min:1/0,i=D(z.yAxis)?z.yAxis.max:-1/0;z.yAxis={type:`linear`,title:z.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(de,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!V){let t=D(z.xAxis)?z.xAxis.min:1/0,n=D(z.xAxis)?z.xAxis.max:-1/0;X(Math.min(t,1),Math.max(n,e.length))}if(E(z.xAxis)&&e.length>z.xAxis.categories.length&&(e=e.slice(0,z.xAxis.categories.length)),H||de(e),E(z.xAxis)&&(t=z.xAxis.categories.map((t,n)=>[t,e[n]])),D(z.xAxis)){let n=z.xAxis.min,r=z.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}e(Z,`transformDataWithoutCategory`);function Q(e){return B[e===0?0:e%B.length]}e(Q,`getPlotColorFromPalette`);function fe(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?K(e.label):``),i=Z(n),a=r.some(e=>e!==``);z.plots.push({type:`line`,strokeFill:Q(F),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),F++}e(fe,`setLineData`);function pe(e,t){let n=Z(t.map(e=>e.value));z.plots.push({type:`bar`,fill:Q(F),data:n}),F++}e(pe,`setBarData`);function me(){if(z.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return z.title=d(),se.build(L,z,R,I)}e(me,`getDrawableElem`);function he(){return R}e(he,`getChartThemeConfig`);function ge(){return L}e(ge,`getChartConfig`);function $(){return z}e($,`getXYChartData`);var _e={parser:w,db:{getDrawableElem:me,clear:e(function(){o(),F=0,L=W(),z=G(),R=U(),B=R.plotColorPalette.split(`,`).map(e=>e.trim()),V=!1,H=!1},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r,setOrientation:J,setXAxisTitle:Y,setXAxisRangeData:X,setXAxisBand:ce,setYAxisTitle:le,setYAxisRangeData:ue,setLineData:fe,setBarData:pe,setTmpSVGG:q,getChartThemeConfig:he,getChartConfig:ge,getXYChartData:$},renderer:{draw:e((n,r,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),l=o.getChartConfig(),u=o.getXYChartData().plots[0].data.map(e=>e[1]);function d(e){return e===`top`?`text-before-edge`:`middle`}e(d,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(p,`getTextTransformation`),t.debug(`Rendering xychart chart
|
|
7
|
-
`+n);let m=y(r),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,l.width).attr(`height`,l.height).attr(`class`,`background`);c(m,l.height,l.width,!0),m.attr(`viewBox`,`0 0 ${l.width} ${l.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let _=o.getDrawableElem(),v={};function b(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&v[n]&&(i=v[n]),n+=e[r],t=v[n],t||=v[n]=i.append(`g`).attr(`class`,e[r])}return t}e(b,`getGroup`);for(let t of _){if(t.data.length===0)continue;let n=b(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),l.showDataLabel){let r=l.showDataLabelOutsideBar;if(l.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};e(i,`fitsHorizontally`);let a=.7,o=10,c=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),l=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...l)),f=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),l=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,l).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>d(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};export{_e as diagram};
|
|
8
|
-
//# sourceMappingURL=xychartDiagram-FW5EYKEG-CG0DSvm_.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-B74TABJS-BSazPoW8.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-24IMIIXA-BQtWA2ag.mjs";import"./chunk-PXTK5WE2-Dfi2FrE5.mjs";import"./chunk-7TSDKFEO-BjOrsK6M.mjs";import"./chunk-KRBPSX3W-ciCGjpAL.mjs";import{t as e}from"./chunk-6Z5SFZXK-C5owNg1o.mjs";export{e as yqCommand};
|
|
File without changes
|