@pb33f/cowboy-components 0.14.0 → 0.14.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/dist/{_baseUniq-DxKTOiyd.js → _baseUniq-CcG8uZM_.js} +1 -1
- package/dist/{_baseUniq-BCBHARBa.cjs → _baseUniq-Co8RB71y.cjs} +1 -1
- package/dist/{arc-BuSUjh0s.js → arc-CZ9OyfV-.js} +1 -1
- package/dist/{arc-CH-0H1TF.cjs → arc-D5LG9aVl.cjs} +1 -1
- package/dist/{architecture-YZFGNWBL-BPn_727R.cjs → architecture-YZFGNWBL-CuyaOcgJ.cjs} +1 -1
- package/dist/{architecture-YZFGNWBL-BTpBH05L.js → architecture-YZFGNWBL-ne59NWt0.js} +1 -1
- package/dist/{architectureDiagram-Q4EWVU46-DiD3e6PQ.cjs → architectureDiagram-Q4EWVU46-CxErVIKm.cjs} +1 -1
- package/dist/{architectureDiagram-Q4EWVU46-CYewkKfJ.js → architectureDiagram-Q4EWVU46-ibaXfmmT.js} +3 -3
- package/dist/{blockDiagram-DXYQGD6D-C1Xzgnrv.js → blockDiagram-DXYQGD6D-D5vqojm8.js} +5 -5
- package/dist/{blockDiagram-DXYQGD6D-B1FzGfTA.cjs → blockDiagram-DXYQGD6D-iFIpSW7Y.cjs} +1 -1
- package/dist/{c4Diagram-AHTNJAMY-c5bsYT5q.cjs → c4Diagram-AHTNJAMY-Av_INk2v.cjs} +1 -1
- package/dist/{c4Diagram-AHTNJAMY-L6Az2dvx.js → c4Diagram-AHTNJAMY-B7t5p6jA.js} +2 -2
- package/dist/{channel-Bo_TnECw.js → channel-BvR-WhLo.js} +1 -1
- package/dist/{channel-BR_Krb9l.cjs → channel-DO31wbvk.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-B1uaSl0e.cjs → chunk-4BX2VUAB-DHdTrTTD.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-ClX8oE7L.js → chunk-4BX2VUAB-DQ4rU_AZ.js} +1 -1
- package/dist/{chunk-4TB4RGXK-DzEEAztK.js → chunk-4TB4RGXK-BK_uuzSP.js} +5 -5
- package/dist/{chunk-4TB4RGXK-D0JpJZOs.cjs → chunk-4TB4RGXK-BlskfrH8.cjs} +1 -1
- package/dist/{chunk-55IACEB6-DL_DHCyZ.js → chunk-55IACEB6-BauZDeFH.js} +1 -1
- package/dist/{chunk-55IACEB6-595ZDi6s.cjs → chunk-55IACEB6-CRJ5yCrP.cjs} +1 -1
- package/dist/{chunk-EDXVE4YY-CQbtNtXr.cjs → chunk-EDXVE4YY-BrlRuHp3.cjs} +1 -1
- package/dist/{chunk-EDXVE4YY-BII9TpbV.js → chunk-EDXVE4YY-DPpXfrr8.js} +1 -1
- package/dist/{chunk-FMBD7UC4-BO92YnlB.cjs → chunk-FMBD7UC4-0x38b8wg.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-cN7XywSK.js → chunk-FMBD7UC4-CtyzUnzx.js} +1 -1
- package/dist/{chunk-OYMX7WX6-BxqhsynN.cjs → chunk-OYMX7WX6-DU4Zqa7r.cjs} +1 -1
- package/dist/{chunk-OYMX7WX6-DTXPUCgU.js → chunk-OYMX7WX6-U53KZXxw.js} +3 -3
- package/dist/{chunk-QZHKN3VN-Biauj3yN.js → chunk-QZHKN3VN-BhntY1rB.js} +1 -1
- package/dist/{chunk-QZHKN3VN-C-mnteH7.cjs → chunk-QZHKN3VN-Dyhr8mWm.cjs} +1 -1
- package/dist/{chunk-YZCP3GAM-eo-UEr6G.js → chunk-YZCP3GAM--UtgfYoK.js} +1 -1
- package/dist/{chunk-YZCP3GAM-WiD5REgL.cjs → chunk-YZCP3GAM-B_2rYHHe.cjs} +1 -1
- package/dist/{classDiagram-v2-HSJHXN6E-8kzuzUL4.js → classDiagram-6PBFFD2Q-DX5nDbg5.js} +2 -2
- package/dist/{classDiagram-6PBFFD2Q-ay2Efc0y.cjs → classDiagram-6PBFFD2Q-w916JDya.cjs} +1 -1
- package/dist/{classDiagram-6PBFFD2Q-8kzuzUL4.js → classDiagram-v2-HSJHXN6E-DX5nDbg5.js} +2 -2
- package/dist/{classDiagram-v2-HSJHXN6E-ay2Efc0y.cjs → classDiagram-v2-HSJHXN6E-w916JDya.cjs} +1 -1
- package/dist/{clone-CC2YvoOD.js → clone-DFz4YXr3.js} +1 -1
- package/dist/clone-D_c-FYGd.cjs +1 -0
- package/dist/components/model-renderer/rendered-node.css.js +10 -0
- package/dist/components/model-renderer/rendered-node.d.ts +2 -0
- package/dist/components/model-renderer/rendered-node.js +16 -4
- package/dist/controllers/diagramatron-controller.d.ts +2 -6
- package/dist/controllers/diagramatron-controller.js +4 -1
- package/dist/{cose-bilkent-S5V4N54A-CjLPT2aq.cjs → cose-bilkent-S5V4N54A-CKHB3cR8.cjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-BvU_SKfP.js → cose-bilkent-S5V4N54A-DcUKlxlF.js} +1 -1
- package/dist/{cowboy-components-DMQv-nwp.cjs → cowboy-components-CjgqXqkM.cjs} +912 -899
- package/dist/{cowboy-components-B5MDHQs5.js → cowboy-components-CxawaKWM.js} +928 -909
- package/dist/{dagre-KV5264BT-BJ3g2OfF.cjs → dagre-KV5264BT-B2JWO01l.cjs} +1 -1
- package/dist/{dagre-KV5264BT-CZZ7IWMJ.js → dagre-KV5264BT-Nl_VfI8a.js} +5 -5
- package/dist/{diagram-5BDNPKRD-C8f_rKrj.cjs → diagram-5BDNPKRD-BKI_3vWy.cjs} +1 -1
- package/dist/{diagram-5BDNPKRD-BtgWDNH6.js → diagram-5BDNPKRD-TI1X3fNz.js} +4 -4
- package/dist/{diagram-G4DWMVQ6-Cvo7MOEn.js → diagram-G4DWMVQ6-CFqOAmuK.js} +4 -4
- package/dist/{diagram-G4DWMVQ6-CdbbbjZ1.cjs → diagram-G4DWMVQ6-DFBdN4sf.cjs} +1 -1
- package/dist/{diagram-MMDJMWI5-BBZMNBAZ.js → diagram-MMDJMWI5-BSsV2xaN.js} +3 -3
- package/dist/{diagram-MMDJMWI5-CmuOqtUd.cjs → diagram-MMDJMWI5-CFuTCrVQ.cjs} +1 -1
- package/dist/{diagram-TYMM5635-BJ6YAfrg.js → diagram-TYMM5635-BP1f-EB_.js} +3 -3
- package/dist/{diagram-TYMM5635-BDWJ5rTp.cjs → diagram-TYMM5635-CrgW2ZZO.cjs} +1 -1
- package/dist/{erDiagram-SMLLAGMA-oQiAbd77.cjs → erDiagram-SMLLAGMA-C3caLNRz.cjs} +1 -1
- package/dist/{erDiagram-SMLLAGMA-CYctRkDG.js → erDiagram-SMLLAGMA-rVfyZdO4.js} +4 -4
- package/dist/events/doctor.d.ts +1 -0
- package/dist/{flowDiagram-DWJPFMVM-Cl2ZAgx-.cjs → flowDiagram-DWJPFMVM-Ce_HVRt5.cjs} +1 -1
- package/dist/{flowDiagram-DWJPFMVM-XzVvDcKE.js → flowDiagram-DWJPFMVM-DqFXC8zL.js} +6 -6
- package/dist/{ganttDiagram-T4ZO3ILL-Bw3whz8Z.js → ganttDiagram-T4ZO3ILL-BmNOX7yf.js} +2 -2
- package/dist/{ganttDiagram-T4ZO3ILL-D6p69Xut.cjs → ganttDiagram-T4ZO3ILL-HHFgf8w4.cjs} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-Dc00T47S.cjs → gitGraph-7Q5UKJZL-DgndfdDH.cjs} +1 -1
- package/dist/{gitGraph-7Q5UKJZL-CV8uXlc6.js → gitGraph-7Q5UKJZL-kCDkIMWc.js} +1 -1
- package/dist/{gitGraphDiagram-UUTBAWPF-DyF52xzw.js → gitGraphDiagram-UUTBAWPF-C-Ahhj_h.js} +4 -4
- package/dist/{gitGraphDiagram-UUTBAWPF-DO7-Vg9n.cjs → gitGraphDiagram-UUTBAWPF-DaVjvjth.cjs} +1 -1
- package/dist/{graph-BNtv6wPN.js → graph-Dfys1tzR.js} +2 -2
- package/dist/{graph-nnOjqfSF.cjs → graph-DyZUkQBU.cjs} +1 -1
- package/dist/{info-OMHHGYJF-DenwEztT.cjs → info-OMHHGYJF-Cb_sFFZS.cjs} +1 -1
- package/dist/info-OMHHGYJF-KL9K6Ofp.js +5 -0
- package/dist/{infoDiagram-42DDH7IO-D5ZWT_PY.js → infoDiagram-42DDH7IO-BP_YOQpC.js} +2 -2
- package/dist/{infoDiagram-42DDH7IO-CDwaPJgE.cjs → infoDiagram-42DDH7IO-C09CiT2v.cjs} +1 -1
- package/dist/{ishikawaDiagram-UXIWVN3A-DgxKja6G.cjs → ishikawaDiagram-UXIWVN3A-CjAoGU0v.cjs} +1 -1
- package/dist/{ishikawaDiagram-UXIWVN3A-DO1TQj8y.js → ishikawaDiagram-UXIWVN3A-DwW6fn0e.js} +1 -1
- package/dist/{journeyDiagram-VCZTEJTY-BOrvmHFC.js → journeyDiagram-VCZTEJTY-Bk7z4VA2.js} +4 -4
- package/dist/{journeyDiagram-VCZTEJTY-CJCEu2Bp.cjs → journeyDiagram-VCZTEJTY-CZnSwt6p.cjs} +1 -1
- package/dist/{kanban-definition-6JOO6SKY-DbcLaE1y.js → kanban-definition-6JOO6SKY-BiN4nM1i.js} +2 -2
- package/dist/{kanban-definition-6JOO6SKY-DEuqG8My.cjs → kanban-definition-6JOO6SKY-DZF8xgYV.cjs} +1 -1
- package/dist/{layout-US8yryxu.js → layout-BDanDonD.js} +4 -4
- package/dist/{layout-C5IxZs51.cjs → layout-rTQtAIwn.cjs} +1 -1
- package/dist/{linear-Bmlq6WJ8.cjs → linear-CuHSYSeN.cjs} +1 -1
- package/dist/{linear-D6nUCk2i.js → linear-DFB2dCGq.js} +1 -1
- package/dist/{mermaid-parser.core-DvOBQD0s.js → mermaid-parser.core-CCHvxUQl.js} +12 -12
- package/dist/{mermaid-parser.core-COvBhcPG.cjs → mermaid-parser.core-fjh_cn2l.cjs} +2 -2
- package/dist/{min-BeG6JEx2.cjs → min-h6fs1hPk.cjs} +1 -1
- package/dist/{min-gCZaz5eW.js → min-rDRC9KDF.js} +2 -2
- package/dist/{mindmap-definition-QFDTVHPH-Bh_mtad8.cjs → mindmap-definition-QFDTVHPH-BbUJ3LHd.cjs} +1 -1
- package/dist/{mindmap-definition-QFDTVHPH-Bf7uOPBO.js → mindmap-definition-QFDTVHPH-CZMHHnKO.js} +3 -3
- package/dist/{packet-4T2RLAQJ-EX3JjNtR.cjs → packet-4T2RLAQJ-BRTuQgpj.cjs} +1 -1
- package/dist/{packet-4T2RLAQJ-CnjxgpUP.js → packet-4T2RLAQJ-Bl5gBk4Q.js} +1 -1
- package/dist/{pie-ZZUOXDRM-S9g0lXgu.cjs → pie-ZZUOXDRM-BbZyrtOg.cjs} +1 -1
- package/dist/pie-ZZUOXDRM-CpENjo0C.js +5 -0
- package/dist/{pieDiagram-DEJITSTG-DIkSdQCd.js → pieDiagram-DEJITSTG-BNTE6R98.js} +4 -4
- package/dist/{pieDiagram-DEJITSTG-An0q-g5y.cjs → pieDiagram-DEJITSTG-BpiMiYGL.cjs} +1 -1
- package/dist/{quadrantDiagram-34T5L4WZ-B5f35ihC.cjs → quadrantDiagram-34T5L4WZ-DODOOGae.cjs} +1 -1
- package/dist/{quadrantDiagram-34T5L4WZ-CBlxIaIn.js → quadrantDiagram-34T5L4WZ-JjtOrhxB.js} +2 -2
- package/dist/radar-PYXPWWZC-BiAwm-jb.js +5 -0
- package/dist/{radar-PYXPWWZC-C0zC2ZSo.cjs → radar-PYXPWWZC-CSH1N71W.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-C2bJ8iZf.cjs → requirementDiagram-MS252O5E-CjMpy00l.cjs} +1 -1
- package/dist/{requirementDiagram-MS252O5E-CLQv0oWl.js → requirementDiagram-MS252O5E-CwV2UGNb.js} +3 -3
- package/dist/{sankeyDiagram-XADWPNL6--gS8yJdi.cjs → sankeyDiagram-XADWPNL6-BzayPzy0.cjs} +1 -1
- package/dist/{sankeyDiagram-XADWPNL6-BPSHvjZ8.js → sankeyDiagram-XADWPNL6-rri4GWAM.js} +1 -1
- package/dist/{sequenceDiagram-FGHM5R23-Pz7V2MNd.js → sequenceDiagram-FGHM5R23-BwBriXF1.js} +3 -3
- package/dist/{sequenceDiagram-FGHM5R23-C8D7r5pW.cjs → sequenceDiagram-FGHM5R23-D-YegsL-.cjs} +1 -1
- package/dist/{stateDiagram-FHFEXIEX-BAF5DJ1S.cjs → stateDiagram-FHFEXIEX-Cq2H2XQO.cjs} +1 -1
- package/dist/{stateDiagram-FHFEXIEX-D5m6EHM0.js → stateDiagram-FHFEXIEX-jfwjGp1O.js} +4 -4
- package/dist/{stateDiagram-v2-QKLJ7IA2-Bewn3XVh.js → stateDiagram-v2-QKLJ7IA2-Bw4Xgr7w.js} +2 -2
- package/dist/{stateDiagram-v2-QKLJ7IA2-D8ygFuIi.cjs → stateDiagram-v2-QKLJ7IA2-DKL73VEs.cjs} +1 -1
- package/dist/{timeline-definition-GMOUNBTQ-D_q_Aq0R.js → timeline-definition-GMOUNBTQ-CpABxKM5.js} +2 -2
- package/dist/{timeline-definition-GMOUNBTQ-DGnNWVK8.cjs → timeline-definition-GMOUNBTQ-DP1yCayj.cjs} +1 -1
- package/dist/{treeView-SZITEDCU-D_h6_ShC.cjs → treeView-SZITEDCU-BizNBkAv.cjs} +1 -1
- package/dist/{treeView-SZITEDCU-CJ-dtg22.js → treeView-SZITEDCU-BtaLEQ3S.js} +1 -1
- package/dist/{treemap-W4RFUUIX-BtKxSF22.cjs → treemap-W4RFUUIX-Cbbx2tbB.cjs} +1 -1
- package/dist/{treemap-W4RFUUIX-B9GQw9aZ.js → treemap-W4RFUUIX-CmVVUeZj.js} +1 -1
- package/dist/{vennDiagram-DHZGUBPP-JEim8wmH.js → vennDiagram-DHZGUBPP-C0edoxsg.js} +1 -1
- package/dist/{vennDiagram-DHZGUBPP-amyk4YMx.cjs → vennDiagram-DHZGUBPP-Dv3ZX8SJ.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-Cni1Bfk_.cjs → wardley-RL74JXVD-BndLe7vL.cjs} +1 -1
- package/dist/{wardley-RL74JXVD-sMbm0y_r.js → wardley-RL74JXVD-DdQvN9q5.js} +1 -1
- package/dist/{wardleyDiagram-NUSXRM2D-C2MLJ-IT.js → wardleyDiagram-NUSXRM2D-DCChf1Y2.js} +3 -3
- package/dist/{wardleyDiagram-NUSXRM2D-BxrRpNG2.cjs → wardleyDiagram-NUSXRM2D-DpluOG7a.cjs} +1 -1
- package/dist/{xychartDiagram-5P7HB3ND-CpDJRyka.cjs → xychartDiagram-5P7HB3ND-B7y6-7BP.cjs} +1 -1
- package/dist/{xychartDiagram-5P7HB3ND-CSCEAZnj.js → xychartDiagram-5P7HB3ND-BWvz1AY8.js} +2 -2
- package/package.json +1 -1
- package/dist/clone-DAIpdsWe.cjs +0 -1
- package/dist/info-OMHHGYJF-BEJOj8rC.js +0 -5
- package/dist/pie-ZZUOXDRM-B0-esN8S.js +0 -5
- package/dist/radar-PYXPWWZC-1Ezs-b76.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as R, a as W, S as N } from "./chunk-OYMX7WX6-
|
|
2
|
-
import { _ as f, c as t, d as H, l as S, e as P, k as z, O as _, u as U } from "./cowboy-components-
|
|
3
|
-
import { G as C } from "./graph-
|
|
4
|
-
import { l as F } from "./layout-
|
|
1
|
+
import { s as R, a as W, S as N } from "./chunk-OYMX7WX6-U53KZXxw.js";
|
|
2
|
+
import { _ as f, c as t, d as H, l as S, e as P, k as z, O as _, u as U } from "./cowboy-components-CxawaKWM.js";
|
|
3
|
+
import { G as C } from "./graph-Dfys1tzR.js";
|
|
4
|
+
import { l as F } from "./layout-BDanDonD.js";
|
|
5
5
|
import { l as O, c as J } from "./change-list-item-Bu_mPv-k.js";
|
|
6
6
|
var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), D = /* @__PURE__ */ f((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), Y = /* @__PURE__ */ f((e, i) => {
|
|
7
7
|
const d = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = d.node().getBBox();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as a, b as t, a as r, S as s } from "./chunk-OYMX7WX6-
|
|
2
|
-
import { _ as i } from "./cowboy-components-
|
|
1
|
+
import { s as a, b as t, a as r, S as s } from "./chunk-OYMX7WX6-U53KZXxw.js";
|
|
2
|
+
import { _ as i } from "./cowboy-components-CxawaKWM.js";
|
|
3
3
|
var _ = {
|
|
4
4
|
parser: r,
|
|
5
5
|
get db() {
|
package/dist/{stateDiagram-v2-QKLJ7IA2-D8ygFuIi.cjs → stateDiagram-v2-QKLJ7IA2-DKL73VEs.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunk-OYMX7WX6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunk-OYMX7WX6-DU4Zqa7r.cjs"),r=require("./cowboy-components-CjgqXqkM.cjs");var a={parser:t.stateDiagram_default,get db(){return new t.StateDB(2)},renderer:t.stateRenderer_v3_unified_default,styles:t.styles_default,init:r.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=a;
|
package/dist/{timeline-definition-GMOUNBTQ-D_q_Aq0R.js → timeline-definition-GMOUNBTQ-CpABxKM5.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o, D as pt, T as Ct, U as Rt, V as Wt, c as gt, l as E, I as Pt, N as Bt, W as ft, d as K, C as Vt, X as Ft, z as zt } from "./cowboy-components-
|
|
2
|
-
import { d as ot } from "./arc-
|
|
1
|
+
import { _ as o, D as pt, T as Ct, U as Rt, V as Wt, c as gt, l as E, I as Pt, N as Bt, W as ft, d as K, C as Vt, X as Ft, z as zt } from "./cowboy-components-CxawaKWM.js";
|
|
2
|
+
import { d as ot } from "./arc-CZ9OyfV-.js";
|
|
3
3
|
var tt = (function() {
|
|
4
4
|
var e = /* @__PURE__ */ o(function(k, s, d, l) {
|
|
5
5
|
for (d = d || {}, l = k.length; l--; d[k[l]] = s) ;
|
package/dist/{timeline-definition-GMOUNBTQ-DGnNWVK8.cjs → timeline-definition-GMOUNBTQ-DP1yCayj.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./cowboy-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./cowboy-components-CjgqXqkM.cjs"),st=require("./arc-D5LG9aVl.cjs");var Q=(function(){var e=r.__name(function(x,s,d,c){for(d=d||{},c=x.length;c--;d[x[c]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],a=[1,14],h=[1,15],l=[1,16],o=[1,19],f=[1,20],p={trace:r.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:r.__name(function(s,d,c,g,y,u,S){var k=u.length-1;switch(y){case 1:return u[k-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[k-1].push(u[k]),this.$=u[k-1];break;case 7:case 8:this.$=u[k];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[k].substr(6)),this.$=u[k].substr(6);break;case 12:this.$=u[k].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[k].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[k].substr(8)),this.$=u[k].substr(8);break;case 18:g.addTask(u[k],0,""),this.$=u[k];break;case 19:g.addEvent(u[k].substr(2)),this.$=u[k];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:a,19:h,20:l,21:17,22:18,23:o,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:a,19:h,20:l,21:17,22:18,23:o,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:r.__name(function(s,d){if(d.recoverable)this.trace(s);else{var c=new Error(s);throw c.hash=d,c}},"parseError"),parse:r.__name(function(s){var d=this,c=[0],g=[],y=[null],u=[],S=this.table,k="",N=0,A=0,R=2,O=1,H=u.slice.call(arguments,1),w=Object.create(this.lexer),I={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(I.yy[B]=this.yy[B]);w.setInput(s,I.yy),I.yy.lexer=w,I.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var V=w.yylloc;u.push(V);var q=w.options&&w.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $(M){c.length=c.length-2*M,y.length=y.length-M,u.length=u.length-M}r.__name($,"popStack");function v(){var M;return M=g.pop()||w.lex()||O,typeof M!="number"&&(M instanceof Array&&(g=M,M=g.pop()),M=d.symbols_[M]||M),M}r.__name(v,"lex");for(var b,T,E,W,C={},z,P,j,K;;){if(T=c[c.length-1],this.defaultActions[T]?E=this.defaultActions[T]:((b===null||typeof b>"u")&&(b=v()),E=S[T]&&S[T][b]),typeof E>"u"||!E.length||!E[0]){var J="";K=[];for(z in S[T])this.terminals_[z]&&z>R&&K.push("'"+this.terminals_[z]+"'");w.showPosition?J="Parse error on line "+(N+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[b]||b)+"'":J="Parse error on line "+(N+1)+": Unexpected "+(b==O?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(J,{text:w.match,token:this.terminals_[b]||b,line:w.yylineno,loc:V,expected:K})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(E[0]){case 1:c.push(b),y.push(w.yytext),u.push(w.yylloc),c.push(E[1]),b=null,A=w.yyleng,k=w.yytext,N=w.yylineno,V=w.yylloc;break;case 2:if(P=this.productions_[E[1]][1],C.$=y[y.length-P],C._$={first_line:u[u.length-(P||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(P||1)].first_column,last_column:u[u.length-1].last_column},q&&(C._$.range=[u[u.length-(P||1)].range[0],u[u.length-1].range[1]]),W=this.performAction.apply(C,[k,A,N,I.yy,E[1],y,u].concat(H)),typeof W<"u")return W;P&&(c=c.slice(0,-1*P*2),y=y.slice(0,-1*P),u=u.slice(0,-1*P)),c.push(this.productions_[E[1]][0]),y.push(C.$),u.push(C._$),j=S[c[c.length-2]][c[c.length-1]],c.push(j);break;case 3:return!0}}return!0},"parse")},_=(function(){var x={EOF:1,parseError:r.__name(function(d,c){if(this.yy.parser)this.yy.parser.parseError(d,c);else throw new Error(d)},"parseError"),setInput:r.__name(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:r.__name(function(s){var d=s.length,c=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===g.length?this.yylloc.first_column:0)+g[g.length-c.length].length-c[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:r.__name(function(){return this._more=!0,this},"more"),reject:r.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r.__name(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-fjh_cn2l.cjs");exports.TreeViewModule=e.TreeViewModule;exports.createTreeViewServices=e.createTreeViewServices;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-fjh_cn2l.cjs");exports.TreemapModule=e.TreemapModule;exports.createTreemapServices=e.createTreemapServices;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { az as Gt, _ as w, s as Wt, g as Kt, q as Ht, p as Yt, a as Xt, b as Zt, D as wt, I as Jt, d as ot, ao as Qt, T as $t, U as te, V as ee, e as ne, z as se, F as ie, G as oe } from "./cowboy-components-
|
|
1
|
+
import { az as Gt, _ as w, s as Wt, g as Kt, q as Ht, p as Yt, a as Xt, b as Zt, D as wt, I as Jt, d as ot, ao as Qt, T as $t, U as te, V as ee, e as ne, z as se, F as ie, G as oe } from "./cowboy-components-CxawaKWM.js";
|
|
2
2
|
const kt = (t, n) => Gt(t, "a", -n), _t = 1e-10;
|
|
3
3
|
function st(t, n) {
|
|
4
4
|
const s = ae(t), e = s.filter((c) => re(c, t));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./cowboy-components-DMQv-nwp.cjs"),vt=(t,n)=>k.adjustChannel(t,"a",-n),Mt=1e-10;function st(t,n){const s=Ut(t),e=s.filter(c=>qt(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=wt(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const x={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const y=t[r.parentIndex[b]],M=Math.atan2(r.x-y.x,r.y-y.y),A=Math.atan2(h.x-y.x,h.y-y.y);let T=A-M;T<0&&(T+=2*Math.PI);const S=A-T/2;let g=q(x,{x:y.x+y.radius*Math.sin(S),y:y.y+y.radius*Math.cos(S)});g>y.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:r,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(a.push(d),i+=at(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-Mt,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function qt(t,n){return n.every(s=>q(t,s)<s.radius+Mt)}function Ut(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=St(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function gt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}function St(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function wt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function Gt(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,x=t(r);if(x*a>=0&&(n=r),Math.abs(h)<o||x===0)return r}return n+h}function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function It(t,n){return lt(t).map(()=>lt(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ct(t){return Math.sqrt($(t,t))}function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function Tt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,y=new Array(b+1);y[0]=n,y[0].fx=t(n),y[0].id=0;for(let _=0;_<b;++_){const l=n.slice();l[_]=l[_]?l[_]*i:o,y[_+1]=l,y[_+1].fx=t(l),y[_+1].id=_+1}function M(_){for(let l=0;l<_.length;l++)y[b][l]=_[l];y[b].fx=_.fx}const A=(_,l)=>_.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let _=0;_<e;++_){if(y.sort(A),s.history){const p=y.map(f=>{const O=f.slice();return O.fx=f.fx,O.id=f.id,O});p.sort((f,O)=>f.id-O.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(y[0][p]-y[1][p]));if(Math.abs(y[0].fx-y[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){T[p]=0;for(let f=0;f<b;++f)T[p]+=y[f][p];T[p]/=b}const l=y[b];if(J(S,1+h,T,-h,l),S.fx=t(S),S.fx<y[0].fx)J(m,1+u,T,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=y[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,T,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(x>=1)break;for(let f=1;f<y.length;++f)J(y[f],1-x,y[0],x,y[f]),y[f].fx=t(y[f])}}else M(S)}return y.sort(A),{fx:y[0].fx,x:y[0]}}function Wt(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,x=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(y,M,A){for(let T=0;T<16;++T)if(i=(y+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(x)<=-a*h)return i;x*(M-y)>=0&&(M=y),y=i,A=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=$(e.fxprime,n),u>c+o*i*h||y&&u>=r)return b(d,i,r);if(Math.abs(x)<=-a*h)return i;if(x>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function Kt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ut(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=Wt(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ut(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const x=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/x);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function Et(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||Zt,e=n.lossFunction||tt,i=Ht(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=Tt(r=>{const x={};for(let d=0;d<a.length;++d){const b=a[d];x[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(x,i)},c,n).x;for(let r=0;r<a.length;++r){const x=a[r];o[x].x=u[2*r],o[x].y=u[2*r+1]}return o}const zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+zt?Math.abs(t-n):Gt(e=>gt(t,n,e)-s,0,t+n)}function Ht(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let x=u+1;x<h.sets.length;x++){const d=String(h.sets[x]),b=`${r};${d}`,y=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(y,h.size+(c.get(y)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function Yt(t,n,s){const e=It(n.length,n.length),i=It(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ft(h,u,o.size);e[a][c]=e[c][a]=r;let x=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?x=1:o.size<=1e-10&&(x=-1),i[a][c]=i[c][a]=x}),{distances:e,constraints:i}}function Xt(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],x=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),y=Math.sqrt(b),M=b-x*x;d>0&&y<=x||d<0&&y>=x||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function Zt(t,n={}){let s=Qt(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=Jt(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function Jt(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=Yt(t,e,i);const c=ct(o.map(ct))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>Xt(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=lt(o.length*2).map(Math.random),y=Kt(h,b,n);(!u||y.fx<u.fx)&&(u=y)}const r=u.x,x={};for(let d=0;d<e.length;++d){const b=e[d];x[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ut(d.x,c);return x}function Qt(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const x of t)if(x.sets.length===1){const d=x.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[d]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let d=x.weight!=null?x.weight:1;const b=x.sets[0],y=x.sets[1];x.size+zt>=Math.min(e[b].size,e[y].size)&&(d=0),i[b].push({set:y,size:x.size,weight:d}),i[y].push({set:b,size:x.size,weight:d})}const o=[];Object.keys(i).forEach(x=>{let d=0;for(let b=0;b<i[x].length;++b)d+=i[x][b].size*i[x][b].weight;o.push({set:x,size:d})});function a(x,d){return d.size-x.size}o.sort(a);const c={};function h(x){return x.set in c}function u(x,d){e[d].x=x.x,e[d].y=x.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const d=o[x].set,b=i[d].filter(h),y=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ft(y.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const _=e[b[m].set],l=ft(y.radius,_.radius,b[m].size),p=St({x:S.x,y:S.y,radius:g},{x:_.x,y:_.y,radius:l});M.push(...p)}}let A=1e50,T=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,T=S)}u(T,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=gt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function At(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=gt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function $t(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function te(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function ht(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ot(t).map(u=>Object.assign({},u));const i=te(e);for(const u of i){$t(u,n,s);const r=ht(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,x){if(!u)return;const d=u.bounds;let b,y;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(x)y=o.yRange.max-d.yRange.min+a;else{y=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=b,M.y+=y,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=ht(e);return Rt(e)}function Ct(t,n,s,e,i){const o=Ot(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=ht(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),x=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Rt(o.map(b=>({radius:r*b.radius,x:e+x+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Rt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ot(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ee(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,x=null,d=null,b=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=Et,_=tt;function l(p){let f=p.datum();const O=new Set;f.forEach(I=>{I.size==0&&I.sets.length==1&&O.add(I.sets[0])}),f=f.filter(I=>!I.sets.some(F=>O.has(F)));let v={},C={};if(f.length>0){let I=m(f,{lossFunction:_,distinct:b});c&&(I=Dt(I,a,d)),v=Ct(I,s,e,i,h),C=Ft(v,f,M)}const U={};f.forEach(I=>{I.label&&(U[I.sets]=I.label)});function j(I){if(I.sets in U)return U[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([v]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const D={};let w=!1;E.selectAll(".venn-area path").each(function(I){const F=this.getAttribute("d");I.sets.length==1&&F&&!b&&(w=!0,D[I.sets[0]]=ie(F))});function P(I){return F=>{const H=I.sets.map(et=>{let Y=D[et],Z=v[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return kt(H,y)}}const V=E.selectAll(".venn-area").data(f,I=>I.sets),N=V.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),B=N.append("path"),W=N.append("text").attr("class","label").text(I=>j(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),W.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function K(I){return typeof I.transition=="function"?I.transition("venn").duration(o):I}let z=p;w&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",I=>kt(I.sets.map(F=>v[F])),y);const L=z.selectAll("text").filter(I=>I.sets in C).text(I=>j(I)).attr("x",I=>Math.floor(C[I.sets].x)).attr("y",I=>Math.floor(C[I.sets].y));u&&(w?"on"in L?L.on("end",ot(v,j)):L.each("end",ot(v,j)):L.each(ot(v,j)));const R=K(V.exit()).remove();typeof V.transition=="function"&&R.selectAll("path").attrTween("d",P);const X=R.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(W.style("font-size","0px"),L.style("font-size",x),X.style("font-size","0px")),{circles:v,textCentres:C,nodes:V,enter:N,update:z,exit:R}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(x=p,l):x},l.round=function(p){return arguments.length?(y=p,l):y},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(_=p==="default"?tt:p==="logRatio"?At:p,l):_},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],x=0;const d=1.1;e.textContent=null;const b=[];function y(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=y(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=y(u),x++)}const A=.35-x*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function rt(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Nt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=rt(e[0],t,n);for(let r=1;r<e.length;++r){const x=rt(e[r],t,n);x>=o&&(i=e[r],o=x)}const a=Tt(r=>-1*rt({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Nt(t,[]):wt(u.arcs.map(r=>r.p1))}function ne(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function Ft(t,n,s){const e={},i=ne(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let y=0;y<b.length;++y)h[b[y]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const x=Nt(u,r,s);e[a]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function se(t,n,s){const e=[];return e.push(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./cowboy-components-CjgqXqkM.cjs"),vt=(t,n)=>k.adjustChannel(t,"a",-n),Mt=1e-10;function st(t,n){const s=Ut(t),e=s.filter(c=>qt(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=wt(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const x={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const y=t[r.parentIndex[b]],M=Math.atan2(r.x-y.x,r.y-y.y),A=Math.atan2(h.x-y.x,h.y-y.y);let T=A-M;T<0&&(T+=2*Math.PI);const S=A-T/2;let g=q(x,{x:y.x+y.radius*Math.sin(S),y:y.y+y.radius*Math.cos(S)});g>y.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:r,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(a.push(d),i+=at(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-Mt,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function qt(t,n){return n.every(s=>q(t,s)<s.radius+Mt)}function Ut(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=St(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function at(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function gt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return at(t,e)+at(n,i)}function St(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function wt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function Gt(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,x=t(r);if(x*a>=0&&(n=r),Math.abs(h)<o||x===0)return r}return n+h}function lt(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function It(t,n){return lt(t).map(()=>lt(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ct(t){return Math.sqrt($(t,t))}function ut(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function Tt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,x=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,y=new Array(b+1);y[0]=n,y[0].fx=t(n),y[0].id=0;for(let _=0;_<b;++_){const l=n.slice();l[_]=l[_]?l[_]*i:o,y[_+1]=l,y[_+1].fx=t(l),y[_+1].id=_+1}function M(_){for(let l=0;l<_.length;l++)y[b][l]=_[l];y[b].fx=_.fx}const A=(_,l)=>_.fx-l.fx,T=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let _=0;_<e;++_){if(y.sort(A),s.history){const p=y.map(f=>{const O=f.slice();return O.fx=f.fx,O.id=f.id,O});p.sort((f,O)=>f.id-O.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(y[0][p]-y[1][p]));if(Math.abs(y[0].fx-y[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){T[p]=0;for(let f=0;f<b;++f)T[p]+=y[f][p];T[p]/=b}const l=y[b];if(J(S,1+h,T,-h,l),S.fx=t(S),S.fx<y[0].fx)J(m,1+u,T,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=y[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,T,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,T,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(x>=1)break;for(let f=1;f<y.length;++f)J(y[f],1-x,y[0],x,y[f]),y[f].fx=t(y[f])}}else M(S)}return y.sort(A),{fx:y[0].fx,x:y[0]}}function Wt(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,x=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(y,M,A){for(let T=0;T<16;++T)if(i=(y+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(x)<=-a*h)return i;x*(M-y)>=0&&(M=y),y=i,A=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),x=$(e.fxprime,n),u>c+o*i*h||y&&u>=r)return b(d,i,r);if(Math.abs(x)<=-a*h)return i;if(x>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function Kt(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ut(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=Wt(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ut(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const x=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/x);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ct(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function Et(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||Zt,e=n.lossFunction||tt,i=Ht(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=Tt(r=>{const x={};for(let d=0;d<a.length;++d){const b=a[d];x[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(x,i)},c,n).x;for(let r=0;r<a.length;++r){const x=a[r];o[x].x=u[2*r],o[x].y=u[2*r+1]}return o}const zt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+zt?Math.abs(t-n):Gt(e=>gt(t,n,e)-s,0,t+n)}function Ht(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let x=u+1;x<h.sets.length;x++){const d=String(h.sets[x]),b=`${r};${d}`,y=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(y,h.size+(c.get(y)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function Yt(t,n,s){const e=It(n.length,n.length),i=It(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ft(h,u,o.size);e[a][c]=e[c][a]=r;let x=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?x=1:o.size<=1e-10&&(x=-1),i[a][c]=i[c][a]=x}),{distances:e,constraints:i}}function Xt(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],x=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),y=Math.sqrt(b),M=b-x*x;d>0&&y<=x||d<0&&y>=x||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function Zt(t,n={}){let s=Qt(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=Jt(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function Jt(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=Yt(t,e,i);const c=ct(o.map(ct))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>Xt(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=lt(o.length*2).map(Math.random),y=Kt(h,b,n);(!u||y.fx<u.fx)&&(u=y)}const r=u.x,x={};for(let d=0;d<e.length;++d){const b=e[d];x[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ut(d.x,c);return x}function Qt(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const x of t)if(x.sets.length===1){const d=x.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:x.size,radius:Math.sqrt(x.size/Math.PI)},i[d]=[]}t=t.filter(x=>x.sets.length===2);for(const x of t){let d=x.weight!=null?x.weight:1;const b=x.sets[0],y=x.sets[1];x.size+zt>=Math.min(e[b].size,e[y].size)&&(d=0),i[b].push({set:y,size:x.size,weight:d}),i[y].push({set:b,size:x.size,weight:d})}const o=[];Object.keys(i).forEach(x=>{let d=0;for(let b=0;b<i[x].length;++b)d+=i[x][b].size*i[x][b].weight;o.push({set:x,size:d})});function a(x,d){return d.size-x.size}o.sort(a);const c={};function h(x){return x.set in c}function u(x,d){e[d].x=x.x,e[d].y=x.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let x=1;x<o.length;++x){const d=o[x].set,b=i[d].filter(h),y=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ft(y.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const _=e[b[m].set],l=ft(y.radius,_.radius,b[m].size),p=St({x:S.x,y:S.y,radius:g},{x:_.x,y:_.y,radius:l});M.push(...p)}}let A=1e50,T=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,T=S)}u(T,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=gt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function At(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=gt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function $t(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function te(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function ht(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ot(t).map(u=>Object.assign({},u));const i=te(e);for(const u of i){$t(u,n,s);const r=ht(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,x){if(!u)return;const d=u.bounds;let b,y;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(x)y=o.yRange.max-d.yRange.min+a;else{y=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=b,M.y+=y,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=ht(e);return Rt(e)}function Ct(t,n,s,e,i){const o=Ot(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=ht(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),x=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Rt(o.map(b=>({radius:r*b.radius,x:e+x+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Rt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ot(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ee(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,x=null,d=null,b=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=T[S];return S+=1,S>=T.length&&(S=0),f},m=Et,_=tt;function l(p){let f=p.datum();const O=new Set;f.forEach(I=>{I.size==0&&I.sets.length==1&&O.add(I.sets[0])}),f=f.filter(I=>!I.sets.some(F=>O.has(F)));let v={},C={};if(f.length>0){let I=m(f,{lossFunction:_,distinct:b});c&&(I=Dt(I,a,d)),v=Ct(I,s,e,i,h),C=Ft(v,f,M)}const U={};f.forEach(I=>{I.label&&(U[I.sets]=I.label)});function j(I){if(I.sets in U)return U[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([v]).enter().append("svg");const E=p.select("svg");n?E.attr("viewBox",`0 0 ${s} ${e}`):E.attr("width",s).attr("height",e);const D={};let w=!1;E.selectAll(".venn-area path").each(function(I){const F=this.getAttribute("d");I.sets.length==1&&F&&!b&&(w=!0,D[I.sets[0]]=ie(F))});function P(I){return F=>{const H=I.sets.map(et=>{let Y=D[et],Z=v[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return kt(H,y)}}const V=E.selectAll(".venn-area").data(f,I=>I.sets),N=V.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),B=N.append("path"),W=N.append("text").attr("class","label").text(I=>j(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),W.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function K(I){return typeof I.transition=="function"?I.transition("venn").duration(o):I}let z=p;w&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",I=>kt(I.sets.map(F=>v[F])),y);const L=z.selectAll("text").filter(I=>I.sets in C).text(I=>j(I)).attr("x",I=>Math.floor(C[I.sets].x)).attr("y",I=>Math.floor(C[I.sets].y));u&&(w?"on"in L?L.on("end",ot(v,j)):L.each("end",ot(v,j)):L.each(ot(v,j)));const R=K(V.exit()).remove();typeof V.transition=="function"&&R.selectAll("path").attrTween("d",P);const X=R.selectAll("text").attr("x",s/2).attr("y",e/2);return x!==null&&(W.style("font-size","0px"),L.style("font-size",x),X.style("font-size","0px")),{circles:v,textCentres:C,nodes:V,enter:N,update:z,exit:R}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(x=p,l):x},l.round=function(p){return arguments.length?(y=p,l):y},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(_=p==="default"?tt:p==="logRatio"?At:p,l):_},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],x=0;const d=1.1;e.textContent=null;const b=[];function y(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=y(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=y(u),x++)}const A=.35-x*d/2,T=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",T),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function rt(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Nt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=rt(e[0],t,n);for(let r=1;r<e.length;++r){const x=rt(e[r],t,n);x>=o&&(i=e[r],o=x)}const a=Tt(r=>-1*rt({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Nt(t,[]):wt(u.arcs.map(r=>r.p1))}function ne(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function Ft(t,n,s){const e={},i=ne(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let y=0;y<b.length;++y)h[b[y]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const x=Nt(u,r,s);e[a]=x,x.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function se(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-fjh_cn2l.cjs");exports.WardleyModule=e.WardleyModule;exports.createWardleyServices=e.createWardleyServices;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as y, s as Mt, g as Ct, q as Nt, p as zt, a as Lt, b as Xt, l as Q, I as At, e as Et, z as Tt, c as H, i as Yt } from "./cowboy-components-
|
|
2
|
-
import { p as Bt } from "./chunk-4BX2VUAB-
|
|
3
|
-
import { p as Rt } from "./mermaid-parser.core-
|
|
1
|
+
import { _ as y, s as Mt, g as Ct, q as Nt, p as zt, a as Lt, b as Xt, l as Q, I as At, e as Et, z as Tt, c as H, i as Yt } from "./cowboy-components-CxawaKWM.js";
|
|
2
|
+
import { p as Bt } from "./chunk-4BX2VUAB-DQ4rU_AZ.js";
|
|
3
|
+
import { p as Rt } from "./mermaid-parser.core-CCHvxUQl.js";
|
|
4
4
|
var q = /* @__PURE__ */ y((a, r) => {
|
|
5
5
|
const e = a <= 1 ? a * 100 : a;
|
|
6
6
|
if (e < 0 || e > 100)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./cowboy-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./cowboy-components-CjgqXqkM.cjs"),_t=require("./chunk-4BX2VUAB-DHdTrTTD.cjs"),St=require("./mermaid-parser.core-fjh_cn2l.cjs");var G=h.__name((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),T=h.__name((a,r,e)=>({x:G(r,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),J=h.__name(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Mt=h.__name(a=>{if(!a?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(a)?.[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Ct=h.__name((a,r)=>{if(_t.populateCommonDb(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(n=>n.secondName?`${n.name.trim()} / ${n.secondName.trim()}`:n.name.trim()),x=a.evolution.stages.filter(n=>n.boundary!==void 0).map(n=>n.boundary);r.updateAxes({stages:e,stageBoundaries:x})}if(a.anchors.forEach(e=>{const x=T(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,x.x,x.y,"anchor")}),a.components.forEach(e=>{const x=T(e.visibility,e.evolution,`Component "${e.name}"`),n=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=e.decorator?.strategy;r.addNode(e.name,e.name,x.x,x.y,"component",n,d,e.inertia,m)}),a.notes.forEach(e=>{const x=T(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,x.x,x.y)}),a.pipelines.forEach(e=>{const x=r.getNode(e.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const n=x.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,M=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,u=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,F,n,"pipeline-component",M,u),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const x=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let n=J(e.fromPort)??J(e.toPort);const{flow:d,label:m}=Mt(e.arrow);!n&&d&&(n=d);const M=e.linkLabel,u=m??M;r.addLink(e.from,e.to,x,u,n)}),a.evolves.forEach(e=>{const x=r.getNode(e.component);if(x?.y!==void 0){const n=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,n,x.y)}}),a.annotations.length>0){const e=a.annotations[0],x=T(e.x,e.y,"Annotations box");r.setAnnotationsBox(x.x,x.y)}a.annotation.forEach(e=>{const x=T(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:x.x,y:x.y}],e.text)}),a.accelerators.forEach(e=>{const x=T(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,x.x,x.y)}),a.deaccelerators.forEach(e=>{const x=T(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,x.x,x.y)})},"populateDb"),K={parser:{yy:void 0},parse:h.__name(async a=>{const r=await St.parse("wardley",a);h.log.debug(r);const e=K.parser?.yy;if(!e||typeof e.addNode!="function")throw new 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.");Ct(r,e)},"parse")},E,$t=(E=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={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},x={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,x)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const x=this.pipelines.get(r);x&&x.componentIds.push(e);const n=this.nodes.get(e);n&&(n.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,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}},h.__name(E,"WardleyBuilder"),E),P=new $t;function S(a){const r=h.getConfig2();return h.sanitizeText(a.trim(),r)}h.__name(S,"textSanitizer");function Q(){return h.getConfig2()["wardley-beta"]}h.__name(Q,"getConfig");function tt(a,r,e,x,n,d,m,M,u){P.addNode({id:a,label:S(r),x:e,y:x,className:n,labelOffsetX:d,labelOffsetY:m,inertia:M,sourceStrategy:u})}h.__name(tt,"addNode");function et(a,r,e=!1,x,n){P.addLink({source:a,target:r,dashed:e,label:x,flow:n})}h.__name(et,"addLink");function at(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}h.__name(at,"addTrend");function rt(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?S(e):void 0})}h.__name(rt,"addAnnotation");function ot(a,r,e){P.addNote({text:S(a),x:r,y:e})}h.__name(ot,"addNote");function nt(a,r,e){P.addAccelerator({name:S(a),x:r,y:e})}h.__name(nt,"addAccelerator");function st(a,r,e){P.addDeaccelerator({name:S(a),x:r,y:e})}h.__name(st,"addDeaccelerator");function it(a,r){P.setAnnotationsBox(a,r)}h.__name(it,"setAnnotationsBox");function dt(a,r){P.setSize(a,r)}h.__name(dt,"setSize");function lt(a){P.startPipeline(a)}h.__name(lt,"startPipeline");function ct(a,r){P.addPipelineComponent(a,r)}h.__name(ct,"addPipelineComponent");function pt(a){const r={};a.xLabel&&(r.xLabel=S(a.xLabel)),a.yLabel&&(r.yLabel=S(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>S(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}h.__name(pt,"updateAxes");function gt(a){return P.getNode(a)}h.__name(gt,"getNode");function ht(){return P.build()}h.__name(ht,"getWardleyData");function ft(){P.clear(),h.clear()}h.__name(ft,"clear");var Nt={getConfig:Q,addNode:tt,addLink:et,addTrend:at,addAnnotation:rt,addNote:ot,addAccelerator:nt,addDeaccelerator:st,setAnnotationsBox:it,setSize:dt,startPipeline:lt,addPipelineComponent:ct,updateAxes:pt,getNode:gt,getWardleyData:ht,clear:ft,setAccTitle:h.setAccTitle,getAccTitle:h.getAccTitle,setDiagramTitle:h.setDiagramTitle,getDiagramTitle:h.getDiagramTitle,getAccDescription:h.getAccDescription,setAccDescription:h.setAccDescription},Lt=["Genesis","Custom Built","Product","Commodity"],zt=h.__name(()=>{const{themeVariables:a}=h.getConfig2();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),At=h.__name(()=>{const a=h.getConfig2()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),Tt=h.__name((a,r,e,x)=>{h.log.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const n=At(),d=zt(),m=n.nodeRadius*1.6,M=x.db,u=M.getWardleyData(),F=M.getDiagramTitle(),C=u.size?.width??n.width,b=u.size?.height??n.height,B=h.selectSvgElement(r);B.selectAll("*").remove(),h.configureSvgSize(B,b,C,n.useMaxWidth),B.attr("viewBox",`0 0 ${C} ${b}`);const v=B.append("g").attr("class","wardley-map"),q=B.append("defs");q.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",C).attr("height",b).attr("fill",d.backgroundColor);const Y=C-n.padding*2,O=b-n.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",C/2).attr("y",n.padding/2).attr("fill",d.axisTextColor).attr("font-size",n.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const L=h.__name(t=>n.padding+t/100*Y,"projectX"),z=h.__name(t=>b-n.padding-t/100*O,"projectY"),D=v.append("g").attr("class","wardley-axes");D.append("line").attr("x1",n.padding).attr("x2",C-n.padding).attr("y1",b-n.padding).attr("y2",b-n.padding).attr("stroke",d.axisColor).attr("stroke-width",1),D.append("line").attr("x1",n.padding).attr("x2",n.padding).attr("y1",n.padding).attr("y2",b-n.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const xt=u.axes.xLabel??"Evolution",ut=u.axes.yLabel??"Visibility";D.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",n.padding+Y/2).attr("y",b-n.padding/4).attr("fill",d.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(xt),D.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",n.padding/3).attr("y",n.padding+O/2).attr("fill",d.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${n.padding/3} ${n.padding+O/2})`).text(ut);const R=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:Lt;if(R.length>0){const t=v.append("g").attr("class","wardley-stages"),s=u.axes.stageBoundaries,o=[];if(s&&s.length===R.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/R.length;R.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}R.forEach((i,p)=>{const l=o[p],g=n.padding+l.start*Y,f=n.padding+l.end*Y,y=(g+f)/2;p>0&&t.append("line").attr("x1",g).attr("x2",g).attr("y1",n.padding).attr("y2",b-n.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-n.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",n.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(n.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=n.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",n.padding).attr("y2",b-n.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",n.padding).attr("x2",C-n.padding).attr("y1",b-n.padding-O*o).attr("y2",b-n.padding-O*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(u.nodes.forEach(t=>{c.set(t.id,{x:L(t.x),y:z(t.y),node:t})}),u.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(f=>({id:f,pos:c.get(f),node:u.nodes.find(y=>y.id===f)})).filter(f=>f.pos&&f.node).sort((f,y)=>f.node.x-y.node.x);for(let f=0;f<i.length-1;f++){const y=i[f],w=i[f+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,g=0;if(o.componentIds.forEach(f=>{const y=c.get(f);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),g=y.y)}),p!==1/0&&l!==-1/0){const y=n.nodeRadius*4,w=g-y/2,_=c.get(o.nodeId);if(_){const N=(p+l)/2;_.x=N,_.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),U=new Map;u.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const Z=u.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||U.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=u.nodes.find(y=>y.id===t.source).isPipelineParent?m/Math.sqrt(2):n.nodeRadius,l=o.x-s.x,g=o.y-s.y,f=Math.sqrt(l*l+g*g);return s.x+l/f*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=u.nodes.find(y=>y.id===t.source).isPipelineParent?m/Math.sqrt(2):n.nodeRadius,l=o.x-s.x,g=o.y-s.y,f=Math.sqrt(l*l+g*g);return s.y+g/f*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=u.nodes.find(y=>y.id===t.target).isPipelineParent?m/Math.sqrt(2):n.nodeRadius,l=s.x-o.x,g=s.y-o.y,f=Math.sqrt(l*l+g*g);return o.x+l/f*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=u.nodes.find(y=>y.id===t.target).isPipelineParent?m/Math.sqrt(2):n.nodeRadius,l=s.x-o.x,g=s.y-o.y,f=Math.sqrt(l*l+g*g);return o.y+g/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,g=Math.sqrt(l*l+p*p),f=8,y=p/g;return i+y*f}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,g=Math.sqrt(p*p+l*l),f=8,y=-p/g;return i+y*f}).attr("fill",d.axisTextColor).attr("font-size",n.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,g=o.y-s.y,f=Math.sqrt(l*l+g*g),y=8,w=g/f,_=-l/f,N=i+w*y,I=p+_*y;let X=Math.atan2(g,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${I})`}).text(t=>t.label);const yt=v.append("g").attr("class","wardley-trends"),mt=u.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=L(t.targetX),i=z(t.targetY),p=o-s.x,l=i-s.y,g=Math.sqrt(p*p+l*l),f=n.nodeRadius+2,y=g>f?o-p/g*f:o,w=g>f?i-l/g*f:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:w}}).filter(t=>t!==null);yt.selectAll("line").data(mt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const $=v.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));$.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),$.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),$.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const A=$.filter(t=>t.sourceStrategy==="market");A.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),$.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",n.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=n.nodeRadius*.7,k=n.nodeRadius*1.2;if(A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),$.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),$.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?m/2+15:n.nodeRadius+15;return t.sourceStrategy&&(o+=n.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?m:n.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?m/2+15:n.nodeRadius+15;return t.sourceStrategy&&(o+=n.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?m:n.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),$.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=n.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-n.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",n.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),u.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(u.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:L(i.x),y:z(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),u.annotationsBox){let s=L(u.annotationsBox.x),o=z(u.annotationsBox.y);const i=10,p=16,l=11,g=t.append("g").attr("class","wardley-annotations-box"),f=[...u.annotations].filter(w=>w.text).sort((w,_)=>w.number-_.number),y=[];if(f.forEach((w,_)=>{const N=g.append("text").attr("x",s+i).attr("y",o+i+(_+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);y.push(N)}),y.length>0){let w=0,_=0;y.forEach(j=>{const W=j.node(),Pt=W.getComputedTextLength();w=Math.max(w,Pt);const vt=W.getBBox();_=Math.max(_,vt.height)});const N=w+i*2+105,I=f.length*p+i*2+_/2,X=n.padding,wt=C-n.padding-N,bt=n.padding,kt=b-n.padding-I;s=Math.max(X,Math.min(s,wt)),o=Math.max(bt,Math.min(o,kt)),y.forEach((j,W)=>{j.attr("x",s+i).attr("y",o+i+(W+1)*p)}),g.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",I).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){const t=v.append("g").attr("class","wardley-notes");u.notes.forEach(s=>{const o=L(s.x),i=z(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(u.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");u.accelerators.forEach(s=>{const o=L(s.x),i=z(s.y),p=60,l=30,g=20,f=`
|
|
3
3
|
M ${o} ${i-l/2}
|
|
4
4
|
L ${o+p-g} ${i-l/2}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./cowboy-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./cowboy-components-CjgqXqkM.cjs"),he=require("./init-CHZsXQcr.cjs"),le=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-CuHSYSeN.cjs"),Wt=require("./change-list-item-4xBSo3-U.cjs");function ce(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function _t(){var i=le.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,u,p=!1,f=0,R=0,P=.5;delete i.unknown;function S(){var y=t().length,E=a<s,v=E?a:s,L=E?s:a;o=(L-v)/Math.max(1,y-f+R*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var M=ce(y).map(function(m){return v+o*m});return e(E?M.reverse():M)}return i.domain=function(y){return arguments.length?(t(y),S()):t()},i.range=function(y){return arguments.length?([s,a]=y,s=+s,a=+a,S()):[s,a]},i.rangeRound=function(y){return[s,a]=y,s=+s,a=+a,p=!0,S()},i.bandwidth=function(){return u},i.step=function(){return o},i.round=function(y){return arguments.length?(p=!!y,S()):p},i.padding=function(y){return arguments.length?(f=Math.min(1,R=+y),S()):f},i.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),S()):f},i.paddingOuter=function(y){return arguments.length?(R=+y,S()):R},i.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),S()):P},i.copy=function(){return _t(t(),[s,a]).round(p).paddingInner(f).paddingOuter(R).align(P)},he.initRange.apply(S(),arguments)}var bt=(function(){var i=n.__name(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],R=[1,26],P=[1,28],S=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],M=[1,34],m=[1,35],T=[1,36],l=[1,37],W=[1,43],z=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],V={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n.__name(function(h,c,g,x,w,r,rt){var d=r.length-1;switch(w){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:u}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:u}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(p,[2,34]),i(p,[2,35]),i(p,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:u}),{1:[2,3]},i(p,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:u}),{11:23,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:49,17:48,24:Y,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{11:52,17:51,24:Y,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},{20:[1,53]},{22:[1,54]},i(C,[2,18]),{1:[2,2]},i(C,[2,8]),i(C,[2,9]),i(U,[2,37],{40:55,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l}),i(U,[2,38]),i(U,[2,39]),i(_,[2,40]),i(_,[2,42]),i(_,[2,43]),i(_,[2,44]),i(_,[2,45]),i(_,[2,46]),i(_,[2,47]),i(_,[2,48]),i(_,[2,49]),i(_,[2,50]),i(_,[2,51]),i(C,[2,10]),i(C,[2,22],{30:41,29:56,24:W,27:z}),i(C,[2,24]),i(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},i(C,[2,11]),i(C,[2,30],{33:60,27:X}),i(C,[2,32]),{31:[1,61]},i(C,[2,12]),{17:62,24:Y},{25:63,27:A},i(C,[2,14]),{17:65,24:Y},i(C,[2,16]),i(C,[2,17]),i(_,[2,41]),i(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(C,[2,31]),{27:[1,69]},i(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(C,[2,15]),i(C,[2,26]),i(C,[2,27]),{11:59,32:72,37:24,38:f,39:R,40:27,41:P,42:S,43:y,44:E,45:v,46:L,47:M,48:m,49:T,50:l},i(C,[2,33]),i(C,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:n.__name(function(h){var c=this,g=[0],x=[],w=[null],r=[],rt=this.table,d="",ct=0,Et=0,ne=2,Mt=1,ae=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var re=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(B){g.length=g.length-2*B,w.length=w.length-B,r.length=r.length-B}n.__name(oe,"popStack");function It(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}n.__name(It,"lex");for(var I,q,O,mt,j={},ut,N,Vt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?O=this.defaultActions[q]:((I===null||typeof I>"u")&&(I=It()),O=rt[q]&&rt[q][I]),typeof O>"u"||!O.length||!O[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>ne&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:pt,expected:gt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+I);switch(O[0]){case 1:g.push(I),w.push(D.yytext),r.push(D.yylloc),g.push(O[1]),I=null,Et=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[O[1]][1],j.$=w[w.length-N],j._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},re&&(j._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(j,[d,Et,ct,$.yy,O[1],w,r].concat(ae)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),w.push(j.$),r.push(j._$),Vt=rt[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:n.__name(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:n.__name(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n.__name(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Yt, I as mi, e as yi, z as bi, D as _t, F as Nt, G as Ai, K as wi, i as Ci, ay as Si } from "./cowboy-components-
|
|
1
|
+
import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Yt, I as mi, e as yi, z as bi, D as _t, F as Nt, G as Ai, K as wi, i as Ci, ay as Si } from "./cowboy-components-CxawaKWM.js";
|
|
2
2
|
import { i as _i } from "./init-DjUOC4st.js";
|
|
3
3
|
import { o as ki } from "./ordinal-DfAQgscy.js";
|
|
4
|
-
import { l as Wt } from "./linear-
|
|
4
|
+
import { l as Wt } from "./linear-DFB2dCGq.js";
|
|
5
5
|
import { l as zt } from "./change-list-item-Bu_mPv-k.js";
|
|
6
6
|
function Ri(e, t, i) {
|
|
7
7
|
e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Princess Beef Heavy Industries Cowboy Components",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
|
-
"version": "0.14.
|
|
6
|
+
"version": "0.14.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/cowboy-components.umd.cjs",
|
|
9
9
|
"module": "./dist/cowboy-components.js",
|
package/dist/clone-DAIpdsWe.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./graph-nnOjqfSF.cjs");var r=4;function c(e){return n.baseClone(e,r)}exports.clone=c;
|