wikied 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -11
- package/dist/cli/index.js +1 -1
- package/dist/client/assets/{arc-BGbUjP6l.js → arc-BcNRNWhT.js} +1 -1
- package/dist/client/assets/architecture-7EHR7CIX-BGHsj3Sd.js +1 -0
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-B4z3Bib0.js → architectureDiagram-3BPJPVTR-PrKBtz_N.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-CM9yoR1c.js → blockDiagram-GPEHLZMM-Cu6_nrob.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-BJuYwiU6.js → c4Diagram-AAUBKEIU-XAOiDGD3.js} +1 -1
- package/dist/client/assets/channel-CPmtBTYe.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-CElL4Bkg.js → chunk-2J33WTMH-C6gxPqIL.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-4pLcLIM5.js → chunk-4BX2VUAB-BF6pxt2R.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BCehx-77.js → chunk-55IACEB6-BgFb2EGJ.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-7cRbWNAI.js → chunk-727SXJPM-CGa5zkpd.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-CdZ5KEq0.js → chunk-AQP2D5EJ-BG2Gm9Jj.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-CX3tOevw.js → chunk-FMBD7UC4-9PjtkE8N.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-BIe2czkN.js → chunk-ND2GUHAM-BkwAMldP.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-CugKC9yc.js +1 -0
- package/dist/client/assets/classDiagram-4FO5ZUOK-CgZje55M.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CD8O_LKr.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BZ5-BOtV.js → cose-bilkent-S5V4N54A-DJMnAWsu.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-BF4eE7Vq.js → dagre-BM42HDAG-DxhB7WC5.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-CBD1vPsC.js → diagram-2AECGRRQ-Bm6bCjKV.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-BKVF6D-v.js → diagram-5GNKFQAL-5JYUOXRk.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-B4tg5Sq2.js → diagram-KO2AKTUF-DGpZHYq_.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-CrtzqKHR.js → diagram-LMA3HP47-CHk9wsYZ.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-B1U1l2z9.js → diagram-OG6HWLK6-CfWuAKz7.js} +1 -1
- package/dist/client/assets/{dist-2tmgITdd.js → dist-BR2D9joR.js} +1 -1
- package/dist/client/assets/{dist-BMnytQui.js → dist-BjXWQdR7.js} +1 -1
- package/dist/client/assets/{dist-BdtcHXh3.js → dist-BtQr4_T2.js} +1 -1
- package/dist/client/assets/{dist-BAyNC3jS.js → dist-C24Am8Vy.js} +1 -1
- package/dist/client/assets/{dist-BGAr6uGo.js → dist-CAQl_JeH.js} +1 -1
- package/dist/client/assets/{dist-BiKkiCmA.js → dist-CN5BUgsL.js} +1 -1
- package/dist/client/assets/{dist-DLRVIfbL.js → dist-CYBm04dn.js} +1 -1
- package/dist/client/assets/{dist-CDbDhEh_.js → dist-CqO8fBRP.js} +1 -1
- package/dist/client/assets/{dist-CHFPp6QK.js → dist-D1HFoNWi.js} +1 -1
- package/dist/client/assets/{dist-BD40sG-g.js → dist-D2gqg6XD.js} +1 -1
- package/dist/client/assets/{dist-CZj-wKzk.js → dist-DKiO2E1b.js} +1 -1
- package/dist/client/assets/{dist-BnHFa9WX.js → dist-Dgs9dPpZ.js} +1 -1
- package/dist/client/assets/{dist-4GL-blwo.js → dist-K-OE26Yi.js} +1 -1
- package/dist/client/assets/{dist-0-z0Cnty.js → dist-Pl3rvXUl.js} +1 -1
- package/dist/client/assets/{dist-44lkZ2T8.js → dist-PodDLKOH.js} +1 -1
- package/dist/client/assets/{dist--hLEDvOf.js → dist-ckTWnBTv.js} +1 -1
- package/dist/client/assets/{dist-Q6A1c5I0.js → dist-sjFMLj70.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-B62HhqZg.js → erDiagram-TEJ5UH35-xeNgkSAy.js} +1 -1
- package/dist/client/assets/eventmodeling-FCH6USID-DphoJcXR.js +1 -0
- package/dist/client/assets/{flowDiagram-I6XJVG4X-Bgr5YjhY.js → flowDiagram-I6XJVG4X-Diocribv.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-CD_17vBt.js → ganttDiagram-6RSMTGT7-xTdTc-El.js} +1 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-BTW4f9fi.js +1 -0
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-BaRvMOzh.js → gitGraphDiagram-PVQCEYII-DmKIUOJx.js} +1 -1
- package/dist/client/assets/{index-BPa7ldDk.css → index-BGCXi2uF.css} +1 -1
- package/dist/client/assets/index-Cvvt5420.js +532 -0
- package/dist/client/assets/info-J43DQDTF-Cw2HNDaO.js +1 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-B4RQ7JzR.js → infoDiagram-5YYISTIA-D4cfvBEb.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-Bbrza3Oj.js → ishikawaDiagram-YF4QCWOH-K2NTS-gk.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-BNSA0bV7.js → journeyDiagram-JHISSGLW-D6ZE_T8d.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-BShOC1Nf.js → kanban-definition-UN3LZRKU-NeD0uRbJ.js} +1 -1
- package/dist/client/assets/{linear-B_52T76x.js → linear-BB-hRShj.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-2kO9DfMJ.js → mermaid-parser.core-BGxRxHQl.js} +2 -2
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-CYrR5n4p.js → mindmap-definition-RKZ34NQL-re0v-Abf.js} +1 -1
- package/dist/client/assets/packet-YPE3B663-CrHs8zQk.js +1 -0
- package/dist/client/assets/pie-LRSECV5Y-DN2X-C7c.js +1 -0
- package/dist/client/assets/{pieDiagram-4H26LBE5-BPBPJDOL.js → pieDiagram-4H26LBE5-CVgGRPUj.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-7qeZA_5K.js → quadrantDiagram-W4KKPZXB-hvgg5ND-.js} +1 -1
- package/dist/client/assets/radar-GUYGQ44K-CGfUK9B7.js +1 -0
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-Bn_o0XyB.js → requirementDiagram-4Y6WPE33-BDRcpjKM.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-C7tq1iBN.js → sankeyDiagram-5OEKKPKP-CZMAxFS8.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-CVntHqub.js → sequenceDiagram-3UESZ5HK-tCo417FM.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-6CbiQtH2.js → stateDiagram-AJRCARHV-BiiCMTOc.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-BeuZpgnp.js +1 -0
- package/dist/client/assets/{timeline-definition-PNZ67QCA-8O7m6KY3.js → timeline-definition-PNZ67QCA-CwdU_R2S.js} +1 -1
- package/dist/client/assets/treeView-BLDUP644-Bf0-7Ltp.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-jGeMHPB3.js +1 -0
- package/dist/client/assets/{vennDiagram-CIIHVFJN-BPYk8Ngd.js → vennDiagram-CIIHVFJN-BLHvlGvY.js} +1 -1
- package/dist/client/assets/wardley-L42UT6IY-BUzbFhcv.js +1 -0
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-BFpz-Hih.js → wardleyDiagram-YWT4CUSO-C6CXsYNa.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-B11s2eQY.js → xychartDiagram-2RQKCTM6-Bq_1XgNP.js} +1 -1
- package/dist/client/index.html +2 -2
- package/docs/project/README.md +2 -2
- package/docs/project/architecture.md +257 -257
- package/docs/project/changelog.md +19 -0
- package/docs/project/design.md +190 -190
- package/docs/project/how-to/package-local.md +5 -5
- package/docs/project/how-to/run.md +2 -2
- package/package.json +1 -1
- package/dist/client/assets/arc-BQ8FQIxG.js +0 -1
- package/dist/client/assets/arc-D29HaK0-.js +0 -1
- package/dist/client/assets/arc-DN1TRxdV.js +0 -1
- package/dist/client/assets/arc-EsqL9E_k.js +0 -1
- package/dist/client/assets/arc-lxhneEjK.js +0 -1
- package/dist/client/assets/architecture-7EHR7CIX-BqNz3w30.js +0 -1
- package/dist/client/assets/architecture-7EHR7CIX-CFJQjcdg.js +0 -1
- package/dist/client/assets/architecture-7EHR7CIX-ClbxVUwJ.js +0 -1
- package/dist/client/assets/architecture-7EHR7CIX-CyNbBoe0.js +0 -1
- package/dist/client/assets/architecture-7EHR7CIX-DSRN3R9m.js +0 -1
- package/dist/client/assets/architecture-7EHR7CIX-PtlJ4dOt.js +0 -1
- package/dist/client/assets/architectureDiagram-3BPJPVTR-BcWhK0P7.js +0 -36
- package/dist/client/assets/architectureDiagram-3BPJPVTR-CFDO5Pht.js +0 -36
- package/dist/client/assets/architectureDiagram-3BPJPVTR-YHMi__Re.js +0 -36
- package/dist/client/assets/architectureDiagram-3BPJPVTR-tkcUxvnc.js +0 -36
- package/dist/client/assets/architectureDiagram-3BPJPVTR-uohXcL3U.js +0 -36
- package/dist/client/assets/blockDiagram-GPEHLZMM-CmuICidh.js +0 -132
- package/dist/client/assets/blockDiagram-GPEHLZMM-Cw-DTpkY.js +0 -132
- package/dist/client/assets/blockDiagram-GPEHLZMM-D8CFcow6.js +0 -132
- package/dist/client/assets/blockDiagram-GPEHLZMM-DITm6e9a.js +0 -132
- package/dist/client/assets/blockDiagram-GPEHLZMM-sRYCtT3R.js +0 -132
- package/dist/client/assets/c4Diagram-AAUBKEIU-CAKSwn1Q.js +0 -10
- package/dist/client/assets/c4Diagram-AAUBKEIU-CQNX7g2f.js +0 -10
- package/dist/client/assets/c4Diagram-AAUBKEIU-Cmr0FZN2.js +0 -10
- package/dist/client/assets/c4Diagram-AAUBKEIU-hz6fXX48.js +0 -10
- package/dist/client/assets/c4Diagram-AAUBKEIU-jMpUd_wV.js +0 -10
- package/dist/client/assets/channel-BLySICXj.js +0 -1
- package/dist/client/assets/channel-BhTl1myF.js +0 -1
- package/dist/client/assets/channel-C6YaMftE.js +0 -1
- package/dist/client/assets/channel-DCmlVXgL.js +0 -1
- package/dist/client/assets/channel-DGNLHxy4.js +0 -1
- package/dist/client/assets/channel-x4T-_YD7.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-CbW3CBuf.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-Cwe8zhoU.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-D3_CoMp1.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-DN_GVUWe.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-zDzeRZN5.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-9XalwBpW.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-B5EdDr8j.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-BFtetfgd.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-DGIU4KKY.js +0 -1
- package/dist/client/assets/chunk-4BX2VUAB-jTIxI8DZ.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-BPpZck88.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-BV23knRO.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-C0d8c7Vo.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-CQ_t4_xx.js +0 -1
- package/dist/client/assets/chunk-55IACEB6-JZcTe9lc.js +0 -1
- package/dist/client/assets/chunk-727SXJPM-BSL_F1Le.js +0 -206
- package/dist/client/assets/chunk-727SXJPM-D47mkitj.js +0 -206
- package/dist/client/assets/chunk-727SXJPM-D9_MqMP5.js +0 -206
- package/dist/client/assets/chunk-727SXJPM-RyJFEFm-.js +0 -206
- package/dist/client/assets/chunk-727SXJPM-nDNND1Fi.js +0 -206
- package/dist/client/assets/chunk-AQP2D5EJ-CtXh86Eg.js +0 -231
- package/dist/client/assets/chunk-AQP2D5EJ-CwxUU4hk.js +0 -231
- package/dist/client/assets/chunk-AQP2D5EJ-D0baAcg1.js +0 -231
- package/dist/client/assets/chunk-AQP2D5EJ-DCPlWaAh.js +0 -231
- package/dist/client/assets/chunk-AQP2D5EJ-J_DkonSc.js +0 -231
- package/dist/client/assets/chunk-FMBD7UC4-BbZ1AGyL.js +0 -15
- package/dist/client/assets/chunk-FMBD7UC4-BdGnGsSk.js +0 -15
- package/dist/client/assets/chunk-FMBD7UC4-CVSNIJCH.js +0 -15
- package/dist/client/assets/chunk-FMBD7UC4-CqUEgFjs.js +0 -15
- package/dist/client/assets/chunk-FMBD7UC4-DC5BOUfb.js +0 -15
- package/dist/client/assets/chunk-ND2GUHAM-BSN4IQif.js +0 -1
- package/dist/client/assets/chunk-ND2GUHAM-CnGwaH5L.js +0 -1
- package/dist/client/assets/chunk-ND2GUHAM-DNiW6T9n.js +0 -1
- package/dist/client/assets/chunk-ND2GUHAM-DlypeIxK.js +0 -1
- package/dist/client/assets/chunk-ND2GUHAM-dO9yBJ9c.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-BHbu3UP6.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-BpYsV_6y.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-CO1iLMuP.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-DXTWyPl6.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-Dp-LTU9i.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-kXi8OW4-.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-AtKel0XH.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-B0NpKzPr.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-Bk7OZQQT.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CUT5SOh1.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DR6twz9n.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-XKa3UYeT.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-C10EkiwP.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CYNm9k9j.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-Cu6f4_Qr.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DVtSKtsc.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DdsQ5sc8.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-M8Y05qZy.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-C5IwfIBU.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-C6fAtGoM.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-CDm9Oap6.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-CRCh_MP2.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-D-iXlubx.js +0 -1
- package/dist/client/assets/dagre-BM42HDAG-C1UxjNQo.js +0 -4
- package/dist/client/assets/dagre-BM42HDAG-CN_eUZpE.js +0 -4
- package/dist/client/assets/dagre-BM42HDAG-DG3qHB9n.js +0 -4
- package/dist/client/assets/dagre-BM42HDAG-DGqTKLQn.js +0 -4
- package/dist/client/assets/dagre-BM42HDAG-HhxsMVKO.js +0 -4
- package/dist/client/assets/diagram-2AECGRRQ-CPsbxJxF.js +0 -43
- package/dist/client/assets/diagram-2AECGRRQ-DFQSvODp.js +0 -43
- package/dist/client/assets/diagram-2AECGRRQ-DMEfdrj9.js +0 -43
- package/dist/client/assets/diagram-2AECGRRQ-DlJ7PqUC.js +0 -43
- package/dist/client/assets/diagram-2AECGRRQ-DvCOeQpl.js +0 -43
- package/dist/client/assets/diagram-5GNKFQAL-CV0_MyBI.js +0 -10
- package/dist/client/assets/diagram-5GNKFQAL-Cz34sKoA.js +0 -10
- package/dist/client/assets/diagram-5GNKFQAL-DP3pe1RC.js +0 -10
- package/dist/client/assets/diagram-5GNKFQAL-DxF6k7UP.js +0 -10
- package/dist/client/assets/diagram-5GNKFQAL-iSa2z6P6.js +0 -10
- package/dist/client/assets/diagram-KO2AKTUF-BRgzZSvK.js +0 -3
- package/dist/client/assets/diagram-KO2AKTUF-CIV3uGBq.js +0 -3
- package/dist/client/assets/diagram-KO2AKTUF-CTH7FURo.js +0 -3
- package/dist/client/assets/diagram-KO2AKTUF-C_2zZZh0.js +0 -3
- package/dist/client/assets/diagram-KO2AKTUF-Cuss_t-R.js +0 -3
- package/dist/client/assets/diagram-LMA3HP47-D0uf37D2.js +0 -24
- package/dist/client/assets/diagram-LMA3HP47-DCJWcert.js +0 -24
- package/dist/client/assets/diagram-LMA3HP47-DHLGCfmQ.js +0 -24
- package/dist/client/assets/diagram-LMA3HP47-DqcX8v1J.js +0 -24
- package/dist/client/assets/diagram-LMA3HP47-Y_acETft.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-Bpl1By3g.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-BpniHTDY.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-CPIuiHbu.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-CYWwbYrm.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-CmxjZhDt.js +0 -24
- package/dist/client/assets/dist-B6O_DpEm.js +0 -1
- package/dist/client/assets/dist-BMcGXJl_.js +0 -1
- package/dist/client/assets/dist-BMrfqEff.js +0 -1
- package/dist/client/assets/dist-BNzWMaB6.js +0 -1
- package/dist/client/assets/dist-BP22L48M.js +0 -1
- package/dist/client/assets/dist-BQFQYyOf.js +0 -1
- package/dist/client/assets/dist-BS_Wb5ek.js +0 -1
- package/dist/client/assets/dist-BTSt8RmS.js +0 -1
- package/dist/client/assets/dist-BTqWikmn.js +0 -9
- package/dist/client/assets/dist-BU-v7eOh.js +0 -1
- package/dist/client/assets/dist-BW9zpavZ.js +0 -1
- package/dist/client/assets/dist-BYpLoh88.js +0 -1
- package/dist/client/assets/dist-Ba2VBCEx.js +0 -1
- package/dist/client/assets/dist-BbyHZUWl.js +0 -1
- package/dist/client/assets/dist-Bj-AtBpB.js +0 -1
- package/dist/client/assets/dist-BkIFud2w.js +0 -2
- package/dist/client/assets/dist-BkJurX-Q.js +0 -2
- package/dist/client/assets/dist-BmvzHEa6.js +0 -1
- package/dist/client/assets/dist-BrtuoXw3.js +0 -1
- package/dist/client/assets/dist-Bv1_rpJY.js +0 -2
- package/dist/client/assets/dist-BxJTQCfI.js +0 -1
- package/dist/client/assets/dist-By195sxY.js +0 -1
- package/dist/client/assets/dist-C0PJTPJf.js +0 -1
- package/dist/client/assets/dist-C70w0n6j.js +0 -1
- package/dist/client/assets/dist-C7zhb6ia.js +0 -1
- package/dist/client/assets/dist-CFQ-7y4O.js +0 -1
- package/dist/client/assets/dist-CJvz1rI0.js +0 -2
- package/dist/client/assets/dist-CKq8Ue0B.js +0 -1
- package/dist/client/assets/dist-CL-xNTXw.js +0 -1
- package/dist/client/assets/dist-CRDAhP-_.js +0 -9
- package/dist/client/assets/dist-CS16K7fI.js +0 -1
- package/dist/client/assets/dist-CTOPKEFU.js +0 -1
- package/dist/client/assets/dist-C_7Kdz86.js +0 -1
- package/dist/client/assets/dist-Catly5LE.js +0 -1
- package/dist/client/assets/dist-Cf5WqFxW.js +0 -1
- package/dist/client/assets/dist-ChpghJfy.js +0 -9
- package/dist/client/assets/dist-ChvQZ65S.js +0 -1
- package/dist/client/assets/dist-Cj50abYe.js +0 -1
- package/dist/client/assets/dist-CmE34U3l.js +0 -1
- package/dist/client/assets/dist-CnEAsIWK.js +0 -11
- package/dist/client/assets/dist-Cokhcc-e.js +0 -1
- package/dist/client/assets/dist-Cp5GrNtz.js +0 -1
- package/dist/client/assets/dist-Ct9nOXP2.js +0 -1
- package/dist/client/assets/dist-CuQa92y3.js +0 -1
- package/dist/client/assets/dist-Cu_x7LYJ.js +0 -1
- package/dist/client/assets/dist-D0wTN10c.js +0 -2
- package/dist/client/assets/dist-D6XIhlK2.js +0 -1
- package/dist/client/assets/dist-D96yzPvR.js +0 -1
- package/dist/client/assets/dist-DIbBkegB.js +0 -1
- package/dist/client/assets/dist-DLMHIC1t.js +0 -1
- package/dist/client/assets/dist-DNA1Z08m.js +0 -1
- package/dist/client/assets/dist-DNKDt2SL.js +0 -9
- package/dist/client/assets/dist-DNbCIPJZ.js +0 -1
- package/dist/client/assets/dist-DRO62xNi.js +0 -11
- package/dist/client/assets/dist-DSuqFJZG.js +0 -1
- package/dist/client/assets/dist-DVQbjcvW.js +0 -1
- package/dist/client/assets/dist-DWY4UZzp.js +0 -1
- package/dist/client/assets/dist-DYo-CenB.js +0 -1
- package/dist/client/assets/dist-DZdkfueI.js +0 -1
- package/dist/client/assets/dist-Dd92cuCD.js +0 -1
- package/dist/client/assets/dist-Dhrxncs7.js +0 -1
- package/dist/client/assets/dist-DkBb8pyD.js +0 -1
- package/dist/client/assets/dist-DpfF9ujP.js +0 -1
- package/dist/client/assets/dist-DsXVGesw.js +0 -1
- package/dist/client/assets/dist-DzHWpwvC.js +0 -9
- package/dist/client/assets/dist-FD0Pk5v3.js +0 -1
- package/dist/client/assets/dist-HEJhLJLi.js +0 -11
- package/dist/client/assets/dist-JvwHRPyx.js +0 -1
- package/dist/client/assets/dist-LeORtSWk.js +0 -1
- package/dist/client/assets/dist-Lt0tqjQf.js +0 -1
- package/dist/client/assets/dist-M8PzXy6d.js +0 -1
- package/dist/client/assets/dist-MQmNzVLE.js +0 -1
- package/dist/client/assets/dist-PXqLsMmX.js +0 -1
- package/dist/client/assets/dist-VLVu-KW2.js +0 -1
- package/dist/client/assets/dist-YLM2KsVW.js +0 -1
- package/dist/client/assets/dist-bfKL2iu_.js +0 -1
- package/dist/client/assets/dist-h-MwnblL.js +0 -1
- package/dist/client/assets/dist-hXXcIbxU.js +0 -1
- package/dist/client/assets/dist-llL-i6i2.js +0 -1
- package/dist/client/assets/dist-mQxXzSBY.js +0 -1
- package/dist/client/assets/dist-ogHbs9vd.js +0 -1
- package/dist/client/assets/dist-os_6esOz.js +0 -1
- package/dist/client/assets/dist-t0zWlbUu.js +0 -11
- package/dist/client/assets/dist-uL3SbE3I.js +0 -11
- package/dist/client/assets/dist-xIpUAkiA.js +0 -1
- package/dist/client/assets/erDiagram-TEJ5UH35-BXxzMHpX.js +0 -85
- package/dist/client/assets/erDiagram-TEJ5UH35-CTM4iRPt.js +0 -85
- package/dist/client/assets/erDiagram-TEJ5UH35-DaaUCEf-.js +0 -85
- package/dist/client/assets/erDiagram-TEJ5UH35-DnwoJhSL.js +0 -85
- package/dist/client/assets/erDiagram-TEJ5UH35-Dofm20uI.js +0 -85
- package/dist/client/assets/eventmodeling-FCH6USID-CG8-lqF5.js +0 -1
- package/dist/client/assets/eventmodeling-FCH6USID-Ckn2qnKs.js +0 -1
- package/dist/client/assets/eventmodeling-FCH6USID-DsmiUeUD.js +0 -1
- package/dist/client/assets/eventmodeling-FCH6USID-IsJECylp.js +0 -1
- package/dist/client/assets/eventmodeling-FCH6USID-TfS978Hk.js +0 -1
- package/dist/client/assets/eventmodeling-FCH6USID-rDVHKK_z.js +0 -1
- package/dist/client/assets/flowDiagram-I6XJVG4X-CwbJrsAH.js +0 -162
- package/dist/client/assets/flowDiagram-I6XJVG4X-DB8NE8dO.js +0 -162
- package/dist/client/assets/flowDiagram-I6XJVG4X-DG3xWBhm.js +0 -162
- package/dist/client/assets/flowDiagram-I6XJVG4X-SHBvldeJ.js +0 -162
- package/dist/client/assets/flowDiagram-I6XJVG4X-lRhOrZDv.js +0 -162
- package/dist/client/assets/ganttDiagram-6RSMTGT7-BKybsoxO.js +0 -292
- package/dist/client/assets/ganttDiagram-6RSMTGT7-CO57UxDH.js +0 -292
- package/dist/client/assets/ganttDiagram-6RSMTGT7-CV4c0bxZ.js +0 -292
- package/dist/client/assets/ganttDiagram-6RSMTGT7-D5PiNC8A.js +0 -292
- package/dist/client/assets/ganttDiagram-6RSMTGT7-DdVvDmnp.js +0 -292
- package/dist/client/assets/gitGraph-WXDBUCRP-B5abLcfr.js +0 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-CEUAsiWg.js +0 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-CPPxqCrS.js +0 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-Cj9_uihB.js +0 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-Q72MkpNg.js +0 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-ojGUgaVb.js +0 -1
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-BckLmYy0.js +0 -106
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-CQvq0IhO.js +0 -106
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-D547DZF5.js +0 -106
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-DOFs1eg8.js +0 -106
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-Dba8FK50.js +0 -106
- package/dist/client/assets/index-8YKIjcJe.js +0 -532
- package/dist/client/assets/index-Bc6bzkA8.js +0 -532
- package/dist/client/assets/index-BewIyJmj.js +0 -532
- package/dist/client/assets/index-BhJ9ao0y.js +0 -532
- package/dist/client/assets/index-CzvLoUvF.js +0 -532
- package/dist/client/assets/index-ckENP4pU.js +0 -532
- package/dist/client/assets/info-J43DQDTF-BOKPpojc.js +0 -1
- package/dist/client/assets/info-J43DQDTF-CWf75QJC.js +0 -1
- package/dist/client/assets/info-J43DQDTF-Db_7Q2r9.js +0 -1
- package/dist/client/assets/info-J43DQDTF-DfyyKBT0.js +0 -1
- package/dist/client/assets/info-J43DQDTF-Esf2TaF1.js +0 -1
- package/dist/client/assets/info-J43DQDTF-bdterZJm.js +0 -1
- package/dist/client/assets/infoDiagram-5YYISTIA-C6MmRXdl.js +0 -2
- package/dist/client/assets/infoDiagram-5YYISTIA-CJx1aJYH.js +0 -2
- package/dist/client/assets/infoDiagram-5YYISTIA-DAFFEaMX.js +0 -2
- package/dist/client/assets/infoDiagram-5YYISTIA-DPPbj55q.js +0 -2
- package/dist/client/assets/infoDiagram-5YYISTIA-LrF3QIgt.js +0 -2
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-BeqvjDIl.js +0 -70
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-D1voQ_A3.js +0 -70
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-DQVs-e5F.js +0 -70
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-DellCRrr.js +0 -70
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-j2svCPD_.js +0 -70
- package/dist/client/assets/journeyDiagram-JHISSGLW-ByjUcNIQ.js +0 -139
- package/dist/client/assets/journeyDiagram-JHISSGLW-CjmHTXWw.js +0 -139
- package/dist/client/assets/journeyDiagram-JHISSGLW-CyW3uYgl.js +0 -139
- package/dist/client/assets/journeyDiagram-JHISSGLW-DHG9tEO9.js +0 -139
- package/dist/client/assets/journeyDiagram-JHISSGLW-DMhylUSs.js +0 -139
- package/dist/client/assets/kanban-definition-UN3LZRKU-By6J-toY.js +0 -89
- package/dist/client/assets/kanban-definition-UN3LZRKU-CPmisIY0.js +0 -89
- package/dist/client/assets/kanban-definition-UN3LZRKU-DJq0v7yA.js +0 -89
- package/dist/client/assets/kanban-definition-UN3LZRKU-Odm95TPd.js +0 -89
- package/dist/client/assets/kanban-definition-UN3LZRKU-RhdfI1Go.js +0 -89
- package/dist/client/assets/linear-CCnRmQWj.js +0 -1
- package/dist/client/assets/linear-CLY6mbcf.js +0 -1
- package/dist/client/assets/linear-D2PqFEbl.js +0 -1
- package/dist/client/assets/linear-U4CTwA5d.js +0 -1
- package/dist/client/assets/linear-fC_JigXY.js +0 -1
- package/dist/client/assets/mermaid-parser.core-BaqVS2PS.js +0 -161
- package/dist/client/assets/mermaid-parser.core-CXSSSULW.js +0 -161
- package/dist/client/assets/mermaid-parser.core-D4wkA2RA.js +0 -161
- package/dist/client/assets/mermaid-parser.core-DJaMK5f0.js +0 -161
- package/dist/client/assets/mermaid-parser.core-Dg7giF1T.js +0 -161
- package/dist/client/assets/mindmap-definition-RKZ34NQL-CakoPsMY.js +0 -96
- package/dist/client/assets/mindmap-definition-RKZ34NQL-Ck-hSWI1.js +0 -96
- package/dist/client/assets/mindmap-definition-RKZ34NQL-DQ6OHT_i.js +0 -96
- package/dist/client/assets/mindmap-definition-RKZ34NQL-DUC927Xf.js +0 -96
- package/dist/client/assets/mindmap-definition-RKZ34NQL-DeFA1j35.js +0 -96
- package/dist/client/assets/packet-YPE3B663-B3KOrKph.js +0 -1
- package/dist/client/assets/packet-YPE3B663-BZYQ3FCV.js +0 -1
- package/dist/client/assets/packet-YPE3B663-CCp5WtTq.js +0 -1
- package/dist/client/assets/packet-YPE3B663-CfJJ9tXN.js +0 -1
- package/dist/client/assets/packet-YPE3B663-Ctl6nY1w.js +0 -1
- package/dist/client/assets/packet-YPE3B663-_U-6UVls.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-BAnVLQEp.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-BbZVTGZg.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-CYEccf3s.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-DlRiXmmJ.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-Dm3u76QZ.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-X0vz9XKi.js +0 -1
- package/dist/client/assets/pieDiagram-4H26LBE5-CAXyv9NR.js +0 -30
- package/dist/client/assets/pieDiagram-4H26LBE5-Cp_atO_B.js +0 -30
- package/dist/client/assets/pieDiagram-4H26LBE5-CzJrKJr4.js +0 -30
- package/dist/client/assets/pieDiagram-4H26LBE5-JffHRhRs.js +0 -30
- package/dist/client/assets/pieDiagram-4H26LBE5-pmEU7Uu5.js +0 -30
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-B0JKtXGW.js +0 -7
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-CkJY1wkN.js +0 -7
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-DDnjiiYP.js +0 -7
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-DR-dJSMY.js +0 -7
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-Dg9KCwo0.js +0 -7
- package/dist/client/assets/radar-GUYGQ44K-8ZjjdwFn.js +0 -1
- package/dist/client/assets/radar-GUYGQ44K-BbAfN5-x.js +0 -1
- package/dist/client/assets/radar-GUYGQ44K-Bwdc6UPK.js +0 -1
- package/dist/client/assets/radar-GUYGQ44K-CXCenk63.js +0 -1
- package/dist/client/assets/radar-GUYGQ44K-CuJfIW1O.js +0 -1
- package/dist/client/assets/radar-GUYGQ44K-D7_r3KxN.js +0 -1
- package/dist/client/assets/requirementDiagram-4Y6WPE33-BwXGdVNn.js +0 -84
- package/dist/client/assets/requirementDiagram-4Y6WPE33-D6YIEesF.js +0 -84
- package/dist/client/assets/requirementDiagram-4Y6WPE33-DP0YrPiG.js +0 -84
- package/dist/client/assets/requirementDiagram-4Y6WPE33-DqqKjv9b.js +0 -84
- package/dist/client/assets/requirementDiagram-4Y6WPE33-Sc9Ib_Ju.js +0 -84
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-CTglKOYH.js +0 -40
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-Cdn5hR-T.js +0 -40
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-CtjDOI1d.js +0 -40
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-D1JvUXfm.js +0 -40
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-DmlH_EuV.js +0 -40
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-B1l_RYCD.js +0 -162
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-BODENHDd.js +0 -162
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-BfXBRbtn.js +0 -162
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-ZsntJaDA.js +0 -162
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-g0S6cpjA.js +0 -162
- package/dist/client/assets/stateDiagram-AJRCARHV-BH3emNVA.js +0 -1
- package/dist/client/assets/stateDiagram-AJRCARHV-Bfy4u1jj.js +0 -1
- package/dist/client/assets/stateDiagram-AJRCARHV-DTL_BeMw.js +0 -1
- package/dist/client/assets/stateDiagram-AJRCARHV-DuMfvw76.js +0 -1
- package/dist/client/assets/stateDiagram-AJRCARHV-bEyFJqkt.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-BeBJn9Ia.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-BySjtxL0.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CJJ1ZY2Q.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CewRZjoh.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Ctaegh5b.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Duq_b4Yy.js +0 -1
- package/dist/client/assets/timeline-definition-PNZ67QCA-BrvVyhY0.js +0 -120
- package/dist/client/assets/timeline-definition-PNZ67QCA-BtixI1WS.js +0 -120
- package/dist/client/assets/timeline-definition-PNZ67QCA-D9KAhtfV.js +0 -120
- package/dist/client/assets/timeline-definition-PNZ67QCA-XT2bwWOB.js +0 -120
- package/dist/client/assets/timeline-definition-PNZ67QCA-aOxVtn0E.js +0 -120
- package/dist/client/assets/treeView-BLDUP644-B0kTb_g3.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-B6UCevyB.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-ClAwlEqa.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-SGGobL-X.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-UtXcJa80.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-X3LRngOg.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-BVDdbYmy.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-CSUALSge.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-D7lbGl6O.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-DDMghpbA.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-FsJUYG1s.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-Kcw-WZrd.js +0 -1
- package/dist/client/assets/vennDiagram-CIIHVFJN-ByGExN5N.js +0 -34
- package/dist/client/assets/vennDiagram-CIIHVFJN-CTqKsU3a.js +0 -34
- package/dist/client/assets/vennDiagram-CIIHVFJN-Dra5j7V2.js +0 -34
- package/dist/client/assets/vennDiagram-CIIHVFJN-JUG6MMjw.js +0 -34
- package/dist/client/assets/vennDiagram-CIIHVFJN-vqKQtTQi.js +0 -34
- package/dist/client/assets/wardley-L42UT6IY-BCqwgr28.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-BYdsv-7d.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-DJ-60DT_.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-DdTJfznk.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-DznNraZH.js +0 -1
- package/dist/client/assets/wardley-L42UT6IY-R3qTlKe5.js +0 -1
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-BNMsJ5dX.js +0 -78
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-CJbjncot.js +0 -78
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-DGMk2w-Q.js +0 -78
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-Xyf3f312.js +0 -78
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-bCQqSS9Y.js +0 -78
- package/dist/client/assets/xychartDiagram-2RQKCTM6-BppcNHGA.js +0 -7
- package/dist/client/assets/xychartDiagram-2RQKCTM6-CGoX_9dB.js +0 -7
- package/dist/client/assets/xychartDiagram-2RQKCTM6-Cbjyvu2C.js +0 -7
- package/dist/client/assets/xychartDiagram-2RQKCTM6-DiHjc_ea.js +0 -7
- package/dist/client/assets/xychartDiagram-2RQKCTM6-Dit8uJrh.js +0 -7
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import{An as e,Dn as t,Hn as n,Nn as r,On as i,Vn as a,Vt as o,Wn as s,ir as c,jn as l,kn as u,nt as d,rr as f,wn as p,xn as m}from"./index-8YKIjcJe.js";import{t as h}from"./mermaid-parser.core-DJaMK5f0.js";import{t as g}from"./chunk-4BX2VUAB-BFtetfgd.js";var _=f((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=f((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=f(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=f(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=f((e,t)=>{if(g(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:f(async e=>{let t=await h(`wardley`,e);c.debug(t);let n=S.parser?.yy;if(!n||typeof n.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(t,n)},`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{f(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 e()[`wardley-beta`]}f(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})}f(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}f(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}f(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}f(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}f(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}f(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}f(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}f(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}f(N,`setSize`);function P(e){C.startPipeline(e)}f(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}f(F,`addPipelineComponent`);function I(e){C.setAxes(e)}f(I,`updateAxes`);function L(e){return C.getNode(e)}f(L,`getNode`);function R(e){return C.resolveNodeId(e)}f(R,`resolveNodeId`);function z(){return C.build()}f(z,`getWardleyData`);function B(){C.clear(),m()}f(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:n,getAccTitle:i,setDiagramTitle:s,getDiagramTitle:l,getAccDescription:t,setAccDescription:a},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=f(()=>{let{themeVariables:t}=e();return{backgroundColor:t.wardley?.backgroundColor??t.background??`#fff`,axisColor:t.wardley?.axisColor??`#000`,axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??`#222`,gridColor:t.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:t.wardley?.componentFill??`#fff`,componentStroke:t.wardley?.componentStroke??`#000`,componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??`#222`,linkStroke:t.wardley?.linkStroke??`#000`,evolutionStroke:t.wardley?.evolutionStroke??`#dc3545`,annotationStroke:t.wardley?.annotationStroke??`#000`,annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??`#222`,annotationFill:t.wardley?.annotationFill??t.background??`#fff`}},`getTheme`),W=f(()=>{let t=e()[`wardley-beta`];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:f((e,t,n,r)=>{c.debug(`Rendering Wardley map
|
|
2
|
-
`+e);let i=W(),a=U(),s=i.nodeRadius*1.6,l=r.db,u=l.getWardleyData(),d=l.getDiagramTitle(),m=u.size?.width??i.width,h=u.size?.height??i.height,g=o(t);g.selectAll(`*`).remove(),p(g,h,m,i.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${t}`).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`,a.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,a.backgroundColor);let y=m-i.padding*2,b=h-i.padding*2;d&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,i.padding/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let x=f(e=>i.padding+e/100*y,`projectX`),S=f(e=>h-i.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,i.padding).attr(`x2`,i.padding).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1);let w=u.axes.xLabel??`Evolution`,T=u.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,i.padding+y/2).attr(`y`,h-i.padding/4).attr(`fill`,a.axisTextColor).attr(`font-size`,i.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`,i.padding/3).attr(`y`,i.padding+b/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${i.padding/3} ${i.padding+b/2})`).text(T);let E=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=u.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 o=n[r],s=i.padding+o.start*y,c=(s+(i.padding+o.end*y))/2;r>0&&e.append(`line`).attr(`x1`,s).attr(`x2`,s).attr(`y1`,i.padding).attr(`y2`,h-i.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-i.padding/1.5).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(i.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=i.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding-b*n).attr(`y2`,h-i.padding-b*n).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(u.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),u.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);u.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:u.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`,a.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let o=1/0,c=-1/0,l=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(o=Math.min(o,t.x),c=Math.max(c,t.x),l=t.y)}),o!==1/0&&c!==-1/0){let t=i.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(o+c)/2,u.y=r-s/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,o-15).attr(`y`,r).attr(`width`,c-o+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;u.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=u.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=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.x+a/c*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.y+o/c*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.x+a/c*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.y+o/c*r}).attr(`stroke`,a.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-${t})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${t})`: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`,a.axisTextColor).attr(`font-size`,i.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=u.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),a=n-t.x,o=r-t.y,s=Math.sqrt(a*a+o*o),c=i.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-a/s*c:n,adjustedY2:s>c?r-o/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`,a.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${t})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(u.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`,i.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,a.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`,i.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,a.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`,i.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`,i.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,a.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`,i.nodeRadius).attr(`fill`,a.componentFill).attr(`stroke`,a.componentStroke).attr(`stroke-width`,1);let F=i.nodeRadius*.7,I=i.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`,a.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`,a.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`,a.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`,a.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`,a.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`,a.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-s/2).attr(`y`,e=>D.get(e.id).y-s/2).attr(`width`,s).attr(`height`,s).attr(`fill`,a.componentFill).attr(`stroke`,a.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?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y+n/2}).attr(`stroke`,a.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=i.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=-i.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`?a.evolutionStroke:e.className===`anchor`?`#000`:a.componentLabelColor).attr(`font-size`,i.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),u.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(u.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`,a.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),u.annotationsBox){let t=x(u.annotationsBox.x),n=S(u.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),o=[...u.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),s=[];if(o.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`,a.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);s.push(o)}),s.length>0){let e=0,c=0;s.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=o.length*16+20+c/2,d=i.padding,f=m-i.padding-l,p=i.padding,g=h-i.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),s.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`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(u.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);u.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(u.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(u.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:f(({wardley:e}={})=>{let t=d(d(r(),u().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};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import{An as e,Dn as t,Hn as n,Nn as r,On as i,Vn as a,Vt as o,Wn as s,ir as c,jn as l,kn as u,nt as d,rr as f,wn as p,xn as m}from"./index-Bc6bzkA8.js";import{t as h}from"./mermaid-parser.core-BaqVS2PS.js";import{t as g}from"./chunk-4BX2VUAB-9XalwBpW.js";var _=f((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=f((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=f(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=f(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=f((e,t)=>{if(g(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:f(async e=>{let t=await h(`wardley`,e);c.debug(t);let n=S.parser?.yy;if(!n||typeof n.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(t,n)},`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{f(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 e()[`wardley-beta`]}f(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})}f(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}f(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}f(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}f(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}f(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}f(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}f(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}f(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}f(N,`setSize`);function P(e){C.startPipeline(e)}f(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}f(F,`addPipelineComponent`);function I(e){C.setAxes(e)}f(I,`updateAxes`);function L(e){return C.getNode(e)}f(L,`getNode`);function R(e){return C.resolveNodeId(e)}f(R,`resolveNodeId`);function z(){return C.build()}f(z,`getWardleyData`);function B(){C.clear(),m()}f(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:n,getAccTitle:i,setDiagramTitle:s,getDiagramTitle:l,getAccDescription:t,setAccDescription:a},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=f(()=>{let{themeVariables:t}=e();return{backgroundColor:t.wardley?.backgroundColor??t.background??`#fff`,axisColor:t.wardley?.axisColor??`#000`,axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??`#222`,gridColor:t.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:t.wardley?.componentFill??`#fff`,componentStroke:t.wardley?.componentStroke??`#000`,componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??`#222`,linkStroke:t.wardley?.linkStroke??`#000`,evolutionStroke:t.wardley?.evolutionStroke??`#dc3545`,annotationStroke:t.wardley?.annotationStroke??`#000`,annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??`#222`,annotationFill:t.wardley?.annotationFill??t.background??`#fff`}},`getTheme`),W=f(()=>{let t=e()[`wardley-beta`];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:f((e,t,n,r)=>{c.debug(`Rendering Wardley map
|
|
2
|
-
`+e);let i=W(),a=U(),s=i.nodeRadius*1.6,l=r.db,u=l.getWardleyData(),d=l.getDiagramTitle(),m=u.size?.width??i.width,h=u.size?.height??i.height,g=o(t);g.selectAll(`*`).remove(),p(g,h,m,i.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${t}`).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`,a.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,a.backgroundColor);let y=m-i.padding*2,b=h-i.padding*2;d&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,i.padding/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let x=f(e=>i.padding+e/100*y,`projectX`),S=f(e=>h-i.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,i.padding).attr(`x2`,i.padding).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1);let w=u.axes.xLabel??`Evolution`,T=u.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,i.padding+y/2).attr(`y`,h-i.padding/4).attr(`fill`,a.axisTextColor).attr(`font-size`,i.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`,i.padding/3).attr(`y`,i.padding+b/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${i.padding/3} ${i.padding+b/2})`).text(T);let E=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=u.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 o=n[r],s=i.padding+o.start*y,c=(s+(i.padding+o.end*y))/2;r>0&&e.append(`line`).attr(`x1`,s).attr(`x2`,s).attr(`y1`,i.padding).attr(`y2`,h-i.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-i.padding/1.5).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(i.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=i.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding-b*n).attr(`y2`,h-i.padding-b*n).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(u.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),u.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);u.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:u.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`,a.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let o=1/0,c=-1/0,l=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(o=Math.min(o,t.x),c=Math.max(c,t.x),l=t.y)}),o!==1/0&&c!==-1/0){let t=i.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(o+c)/2,u.y=r-s/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,o-15).attr(`y`,r).attr(`width`,c-o+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;u.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=u.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=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.x+a/c*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.y+o/c*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.x+a/c*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.y+o/c*r}).attr(`stroke`,a.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-${t})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${t})`: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`,a.axisTextColor).attr(`font-size`,i.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=u.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),a=n-t.x,o=r-t.y,s=Math.sqrt(a*a+o*o),c=i.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-a/s*c:n,adjustedY2:s>c?r-o/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`,a.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${t})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(u.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`,i.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,a.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`,i.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,a.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`,i.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`,i.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,a.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`,i.nodeRadius).attr(`fill`,a.componentFill).attr(`stroke`,a.componentStroke).attr(`stroke-width`,1);let F=i.nodeRadius*.7,I=i.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`,a.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`,a.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`,a.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`,a.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`,a.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`,a.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-s/2).attr(`y`,e=>D.get(e.id).y-s/2).attr(`width`,s).attr(`height`,s).attr(`fill`,a.componentFill).attr(`stroke`,a.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?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y+n/2}).attr(`stroke`,a.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=i.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=-i.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`?a.evolutionStroke:e.className===`anchor`?`#000`:a.componentLabelColor).attr(`font-size`,i.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),u.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(u.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`,a.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),u.annotationsBox){let t=x(u.annotationsBox.x),n=S(u.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),o=[...u.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),s=[];if(o.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`,a.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);s.push(o)}),s.length>0){let e=0,c=0;s.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=o.length*16+20+c/2,d=i.padding,f=m-i.padding-l,p=i.padding,g=h-i.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),s.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`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(u.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);u.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(u.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(u.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:f(({wardley:e}={})=>{let t=d(d(r(),u().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};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import{An as e,Dn as t,Hn as n,Nn as r,On as i,Vn as a,Vt as o,Wn as s,ir as c,jn as l,kn as u,nt as d,rr as f,wn as p,xn as m}from"./index-ckENP4pU.js";import{t as h}from"./mermaid-parser.core-2kO9DfMJ.js";import{t as g}from"./chunk-4BX2VUAB-B5EdDr8j.js";var _=f((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=f((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=f(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=f(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=f((e,t)=>{if(g(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:f(async e=>{let t=await h(`wardley`,e);c.debug(t);let n=S.parser?.yy;if(!n||typeof n.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(t,n)},`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{f(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 e()[`wardley-beta`]}f(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})}f(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}f(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}f(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}f(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}f(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}f(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}f(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}f(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}f(N,`setSize`);function P(e){C.startPipeline(e)}f(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}f(F,`addPipelineComponent`);function I(e){C.setAxes(e)}f(I,`updateAxes`);function L(e){return C.getNode(e)}f(L,`getNode`);function R(e){return C.resolveNodeId(e)}f(R,`resolveNodeId`);function z(){return C.build()}f(z,`getWardleyData`);function B(){C.clear(),m()}f(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:n,getAccTitle:i,setDiagramTitle:s,getDiagramTitle:l,getAccDescription:t,setAccDescription:a},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=f(()=>{let{themeVariables:t}=e();return{backgroundColor:t.wardley?.backgroundColor??t.background??`#fff`,axisColor:t.wardley?.axisColor??`#000`,axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??`#222`,gridColor:t.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:t.wardley?.componentFill??`#fff`,componentStroke:t.wardley?.componentStroke??`#000`,componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??`#222`,linkStroke:t.wardley?.linkStroke??`#000`,evolutionStroke:t.wardley?.evolutionStroke??`#dc3545`,annotationStroke:t.wardley?.annotationStroke??`#000`,annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??`#222`,annotationFill:t.wardley?.annotationFill??t.background??`#fff`}},`getTheme`),W=f(()=>{let t=e()[`wardley-beta`];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:f((e,t,n,r)=>{c.debug(`Rendering Wardley map
|
|
2
|
-
`+e);let i=W(),a=U(),s=i.nodeRadius*1.6,l=r.db,u=l.getWardleyData(),d=l.getDiagramTitle(),m=u.size?.width??i.width,h=u.size?.height??i.height,g=o(t);g.selectAll(`*`).remove(),p(g,h,m,i.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${t}`).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`,a.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,a.backgroundColor);let y=m-i.padding*2,b=h-i.padding*2;d&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,i.padding/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let x=f(e=>i.padding+e/100*y,`projectX`),S=f(e=>h-i.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,i.padding).attr(`x2`,i.padding).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1);let w=u.axes.xLabel??`Evolution`,T=u.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,i.padding+y/2).attr(`y`,h-i.padding/4).attr(`fill`,a.axisTextColor).attr(`font-size`,i.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`,i.padding/3).attr(`y`,i.padding+b/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${i.padding/3} ${i.padding+b/2})`).text(T);let E=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=u.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 o=n[r],s=i.padding+o.start*y,c=(s+(i.padding+o.end*y))/2;r>0&&e.append(`line`).attr(`x1`,s).attr(`x2`,s).attr(`y1`,i.padding).attr(`y2`,h-i.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-i.padding/1.5).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(i.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=i.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding-b*n).attr(`y2`,h-i.padding-b*n).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(u.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),u.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);u.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:u.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`,a.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let o=1/0,c=-1/0,l=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(o=Math.min(o,t.x),c=Math.max(c,t.x),l=t.y)}),o!==1/0&&c!==-1/0){let t=i.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(o+c)/2,u.y=r-s/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,o-15).attr(`y`,r).attr(`width`,c-o+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;u.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=u.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=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.x+a/c*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.y+o/c*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.x+a/c*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.y+o/c*r}).attr(`stroke`,a.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-${t})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${t})`: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`,a.axisTextColor).attr(`font-size`,i.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=u.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),a=n-t.x,o=r-t.y,s=Math.sqrt(a*a+o*o),c=i.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-a/s*c:n,adjustedY2:s>c?r-o/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`,a.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${t})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(u.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`,i.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,a.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`,i.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,a.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`,i.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`,i.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,a.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`,i.nodeRadius).attr(`fill`,a.componentFill).attr(`stroke`,a.componentStroke).attr(`stroke-width`,1);let F=i.nodeRadius*.7,I=i.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`,a.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`,a.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`,a.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`,a.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`,a.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`,a.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-s/2).attr(`y`,e=>D.get(e.id).y-s/2).attr(`width`,s).attr(`height`,s).attr(`fill`,a.componentFill).attr(`stroke`,a.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?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y+n/2}).attr(`stroke`,a.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=i.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=-i.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`?a.evolutionStroke:e.className===`anchor`?`#000`:a.componentLabelColor).attr(`font-size`,i.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),u.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(u.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`,a.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),u.annotationsBox){let t=x(u.annotationsBox.x),n=S(u.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),o=[...u.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),s=[];if(o.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`,a.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);s.push(o)}),s.length>0){let e=0,c=0;s.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=o.length*16+20+c/2,d=i.padding,f=m-i.padding-l,p=i.padding,g=h-i.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),s.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`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(u.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);u.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(u.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(u.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:f(({wardley:e}={})=>{let t=d(d(r(),u().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};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import{An as e,Dn as t,Hn as n,Nn as r,On as i,Vn as a,Vt as o,Wn as s,ir as c,jn as l,kn as u,nt as d,rr as f,wn as p,xn as m}from"./index-BhJ9ao0y.js";import{t as h}from"./mermaid-parser.core-CXSSSULW.js";import{t as g}from"./chunk-4BX2VUAB-4pLcLIM5.js";var _=f((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=f((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=f(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=f(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=f((e,t)=>{if(g(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:f(async e=>{let t=await h(`wardley`,e);c.debug(t);let n=S.parser?.yy;if(!n||typeof n.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(t,n)},`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{f(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 e()[`wardley-beta`]}f(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})}f(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}f(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}f(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}f(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}f(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}f(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}f(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}f(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}f(N,`setSize`);function P(e){C.startPipeline(e)}f(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}f(F,`addPipelineComponent`);function I(e){C.setAxes(e)}f(I,`updateAxes`);function L(e){return C.getNode(e)}f(L,`getNode`);function R(e){return C.resolveNodeId(e)}f(R,`resolveNodeId`);function z(){return C.build()}f(z,`getWardleyData`);function B(){C.clear(),m()}f(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:n,getAccTitle:i,setDiagramTitle:s,getDiagramTitle:l,getAccDescription:t,setAccDescription:a},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=f(()=>{let{themeVariables:t}=e();return{backgroundColor:t.wardley?.backgroundColor??t.background??`#fff`,axisColor:t.wardley?.axisColor??`#000`,axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??`#222`,gridColor:t.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:t.wardley?.componentFill??`#fff`,componentStroke:t.wardley?.componentStroke??`#000`,componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??`#222`,linkStroke:t.wardley?.linkStroke??`#000`,evolutionStroke:t.wardley?.evolutionStroke??`#dc3545`,annotationStroke:t.wardley?.annotationStroke??`#000`,annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??`#222`,annotationFill:t.wardley?.annotationFill??t.background??`#fff`}},`getTheme`),W=f(()=>{let t=e()[`wardley-beta`];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:f((e,t,n,r)=>{c.debug(`Rendering Wardley map
|
|
2
|
-
`+e);let i=W(),a=U(),s=i.nodeRadius*1.6,l=r.db,u=l.getWardleyData(),d=l.getDiagramTitle(),m=u.size?.width??i.width,h=u.size?.height??i.height,g=o(t);g.selectAll(`*`).remove(),p(g,h,m,i.useMaxWidth),g.attr(`viewBox`,`0 0 ${m} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${t}`).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`,a.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${t}`).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`,a.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,m).attr(`height`,h).attr(`fill`,a.backgroundColor);let y=m-i.padding*2,b=h-i.padding*2;d&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,m/2).attr(`y`,i.padding/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let x=f(e=>i.padding+e/100*y,`projectX`),S=f(e=>h-i.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,i.padding).attr(`x2`,i.padding).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.axisColor).attr(`stroke-width`,1);let w=u.axes.xLabel??`Evolution`,T=u.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,i.padding+y/2).attr(`y`,h-i.padding/4).attr(`fill`,a.axisTextColor).attr(`font-size`,i.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`,i.padding/3).attr(`y`,i.padding+b/2).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${i.padding/3} ${i.padding+b/2})`).text(T);let E=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=u.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 o=n[r],s=i.padding+o.start*y,c=(s+(i.padding+o.end*y))/2;r>0&&e.append(`line`).attr(`x1`,s).attr(`x2`,s).attr(`y1`,i.padding).attr(`y2`,h-i.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-i.padding/1.5).attr(`fill`,a.axisTextColor).attr(`font-size`,i.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(i.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=i.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,i.padding).attr(`y2`,h-i.padding).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,i.padding).attr(`x2`,m-i.padding).attr(`y1`,h-i.padding-b*n).attr(`y2`,h-i.padding-b*n).attr(`stroke`,a.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(u.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),u.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);u.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:u.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`,a.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let o=1/0,c=-1/0,l=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(o=Math.min(o,t.x),c=Math.max(c,t.x),l=t.y)}),o!==1/0&&c!==-1/0){let t=i.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(o+c)/2,u.y=r-s/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,o-15).attr(`y`,r).attr(`width`,c-o+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;u.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=u.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=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.x+a/c*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.source).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=n.x-t.x,o=n.y-t.y,c=Math.sqrt(a*a+o*o);return t.y+o/c*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.x+a/c*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=u.nodes.find(t=>t.id===e.target).isPipelineParent?s/Math.sqrt(2):i.nodeRadius,a=t.x-n.x,o=t.y-n.y,c=Math.sqrt(a*a+o*o);return n.y+o/c*r}).attr(`stroke`,a.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-${t})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${t})`: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`,a.axisTextColor).attr(`font-size`,i.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=u.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),a=n-t.x,o=r-t.y,s=Math.sqrt(a*a+o*o),c=i.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-a/s*c:n,adjustedY2:s>c?r-o/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`,a.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${t})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(u.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`,i.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,a.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`,i.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,a.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`,i.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`,i.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,a.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`,i.nodeRadius).attr(`fill`,a.componentFill).attr(`stroke`,a.componentStroke).attr(`stroke-width`,1);let F=i.nodeRadius*.7,I=i.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`,a.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`,a.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`,a.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`,a.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`,a.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`,a.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-s/2).attr(`y`,e=>D.get(e.id).y-s/2).attr(`width`,s).attr(`height`,s).attr(`fill`,a.componentFill).attr(`stroke`,a.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?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s/2+15:i.nodeRadius+15;return e.sourceStrategy&&(n+=i.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?s:i.nodeRadius*2;return t.y+n/2}).attr(`stroke`,a.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=i.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=-i.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`?a.evolutionStroke:e.className===`anchor`?`#000`:a.componentLabelColor).attr(`font-size`,i.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),u.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(u.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`,a.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),u.annotationsBox){let t=x(u.annotationsBox.x),n=S(u.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),o=[...u.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),s=[];if(o.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`,a.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);s.push(o)}),s.length>0){let e=0,c=0;s.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=o.length*16+20+c/2,d=i.padding,f=m-i.padding-l,p=i.padding,g=h-i.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(p,Math.min(n,g)),s.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`,a.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(u.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);u.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(u.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(u.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);u.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`,a.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`,a.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:f(({wardley:e}={})=>{let t=d(d(r(),u().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};
|