@peasant-labs/fairtrade 0.0.47 → 0.0.49
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/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
- package/dist/lib/{adapter-Dulh38C2.js → adapter-CVKibszh.js} +209 -186
- package/dist/lib/arc-1xTxsoRi.js +80 -0
- package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
- package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
- package/dist/lib/array-CApNbSU9.js +6 -0
- package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
- package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
- package/dist/lib/channel-DagAO2vE.js +5 -0
- package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
- package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
- package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
- package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
- package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
- package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
- package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
- package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
- package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
- package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
- package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
- package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
- package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
- package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
- package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
- package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
- package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
- package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
- package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
- package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
- package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
- package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
- package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
- package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
- package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
- package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
- package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
- package/dist/lib/commons.js +729 -729
- package/dist/lib/components.css +1 -1
- package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
- package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
- package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
- package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
- package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
- package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
- package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
- package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
- package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
- package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
- package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
- package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
- package/dist/lib/dist-AMlsjiDX.js +59 -0
- package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
- package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
- package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
- package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
- package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
- package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
- package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
- package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
- package/dist/lib/graphlib-Dndp26xU.js +1267 -0
- package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
- package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
- package/dist/lib/init-Bwwdo3M6.js +15 -0
- package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
- package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
- package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
- package/dist/lib/katex-Dw0PnoPU.js +21850 -0
- package/dist/lib/line-C9krU3Sv.js +34 -0
- package/dist/lib/linear-Cvilv3OA.js +289 -0
- package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
- package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
- package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
- package/dist/lib/ordinal-C55HfHHp.js +65 -0
- package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
- package/dist/lib/path-DNvJyUE8.js +85 -0
- package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
- package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
- package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
- package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
- package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
- package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
- package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
- package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
- package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
- package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
- package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
- package/dist/lib/rough.esm-a8mysczE.js +1352 -0
- package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
- package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
- package/dist/lib/share.js +1 -1
- package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
- package/dist/lib/src-Dcy0zUZH.js +2153 -0
- package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
- package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
- package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
- package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
- package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
- package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
- package/dist/lib/types/AppSidebar.d.ts +14 -1
- package/dist/lib/types/transcript/Collapsible.d.ts +10 -0
- package/dist/lib/types/transcript/FiltersRail.d.ts +1 -0
- package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
- package/dist/lib/types/transcript/Thinking.d.ts +1 -1
- package/dist/lib/types/transcript/ToolCall.d.ts +1 -1
- package/dist/lib/types/transcript/TranscriptViewer.d.ts +2 -2
- package/dist/lib/types/transcript/TurnCard.d.ts +3 -1
- package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
- package/dist/lib/types/transcript/WorkGroup.d.ts +9 -0
- package/dist/lib/types/transcript/action-groups.d.ts +9 -0
- package/dist/lib/types/transcript/adapter.d.ts +12 -0
- package/dist/lib/types/transcript/filters.d.ts +5 -5
- package/dist/lib/types/transcript/index.d.ts +2 -1
- package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
- package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
- package/dist/lib/types/transcript/state-capabilities.d.ts +38 -11
- package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
- package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
- package/dist/lib/types/transcript/view-model.d.ts +19 -0
- package/dist/lib/types/transcript/work-summary.d.ts +8 -0
- package/dist/lib/types/ui/transcript/adapter.d.ts +12 -0
- package/dist/lib/types/ui/transcript/view-model.d.ts +19 -0
- package/dist/lib/{ui-CrH0SVd_.js → ui-Beoq-HpN.js} +5345 -4232
- package/dist/lib/ui.js +6 -6
- package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
- package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
- package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
- package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
- package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
- package/package.json +3 -2
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import { m as e, p as t } from "./src-Dcy0zUZH.js";
|
|
2
|
+
import { T as n } from "./chunk-NGNAAXSQ-D7Dvct7J.js";
|
|
3
|
+
import { n as r } from "./mermaid-parser.core-I7qQ_fxz.js";
|
|
4
|
+
import { n as i } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
|
|
5
|
+
import { C as a, H as o, U as s, X as c, _ as l, a as u, b as d, f, q as p, v as m, y as h, z as g } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
|
|
6
|
+
import { i as ee, t as te, v as _ } from "./chunk-7S6XSTFO-CMt_p-O6.js";
|
|
7
|
+
import { t as ne } from "./chunk-JWPE2WC7-KRpHbrIX.js";
|
|
8
|
+
//#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PFBEJUXE.mjs
|
|
9
|
+
var v = "position frame", y = "frame positioned", b = "position relation", x = "relation positioned", re = /* @__PURE__ */ i(function(t) {
|
|
10
|
+
e.debug("options str", t);
|
|
11
|
+
}, "setOptions"), ie = /* @__PURE__ */ i(function() {
|
|
12
|
+
return {};
|
|
13
|
+
}, "getOptions"), ae = /* @__PURE__ */ i(function() {
|
|
14
|
+
S(), u();
|
|
15
|
+
}, "clear");
|
|
16
|
+
function S() {
|
|
17
|
+
C = {};
|
|
18
|
+
}
|
|
19
|
+
i(S, "reset");
|
|
20
|
+
var oe = f.eventmodeling, se = /* @__PURE__ */ i(() => ee({
|
|
21
|
+
...oe,
|
|
22
|
+
...h().eventmodeling
|
|
23
|
+
}), "getConfig"), C = {};
|
|
24
|
+
function w() {
|
|
25
|
+
let t = ce, { ast: n } = C, r = D();
|
|
26
|
+
if (!n) throw Error("No data for EventModel");
|
|
27
|
+
return n.frames.forEach((i, a) => {
|
|
28
|
+
let o = P(i, n.dataEntities, r);
|
|
29
|
+
t = J(t, {
|
|
30
|
+
$kind: v,
|
|
31
|
+
index: a,
|
|
32
|
+
frame: i,
|
|
33
|
+
textProps: o
|
|
34
|
+
});
|
|
35
|
+
let s;
|
|
36
|
+
V(i) ? (e.debug("source frame", i.sourceFrames), s = n.frames.filter((e) => i.sourceFrames.some((t) => t.$refText === e.name)), s.forEach((e) => {
|
|
37
|
+
t = J(t, {
|
|
38
|
+
$kind: b,
|
|
39
|
+
index: a,
|
|
40
|
+
frame: i,
|
|
41
|
+
sourceFrame: e
|
|
42
|
+
});
|
|
43
|
+
})) : t = J(t, {
|
|
44
|
+
$kind: b,
|
|
45
|
+
index: a,
|
|
46
|
+
frame: i
|
|
47
|
+
});
|
|
48
|
+
}), t = {
|
|
49
|
+
...t,
|
|
50
|
+
sortedSwimlanesArray: R(t.swimlanes)
|
|
51
|
+
}, t;
|
|
52
|
+
}
|
|
53
|
+
i(w, "getState");
|
|
54
|
+
function T(e) {
|
|
55
|
+
C.ast = void 0;
|
|
56
|
+
let t = /* @__PURE__ */ new Set();
|
|
57
|
+
for (let n of e.frames) {
|
|
58
|
+
if (t.has(n.name)) {
|
|
59
|
+
let e = n.$cstNode?.range.start.line, t = e === void 0 ? "" : ` on line ${e + 1}`;
|
|
60
|
+
throw Error(`Duplicate event modeling frame ID "${n.name}"${t}`);
|
|
61
|
+
}
|
|
62
|
+
t.add(n.name);
|
|
63
|
+
}
|
|
64
|
+
C.ast = e;
|
|
65
|
+
}
|
|
66
|
+
i(T, "setAst");
|
|
67
|
+
var E = {
|
|
68
|
+
swimlaneMinHeight: 70,
|
|
69
|
+
swimlanePadding: 15,
|
|
70
|
+
swimlaneGap: 10,
|
|
71
|
+
boxPadding: 10,
|
|
72
|
+
boxOverlap: 90,
|
|
73
|
+
boxDefaultY: 0,
|
|
74
|
+
boxMinWidth: 80,
|
|
75
|
+
boxMaxWidth: 450,
|
|
76
|
+
boxMinHeight: 80,
|
|
77
|
+
boxMaxHeight: 750,
|
|
78
|
+
contentStartX: 250,
|
|
79
|
+
textMaxWidth: 430,
|
|
80
|
+
boxTextFontWeight: "bold",
|
|
81
|
+
boxTextPadding: 10,
|
|
82
|
+
swimlaneTextFontWeight: "bold",
|
|
83
|
+
labelUiAutomation: "UI/Automation",
|
|
84
|
+
labelUiAutomationPrefix: "UI/A: ",
|
|
85
|
+
labelCommandReadModel: "Command/Read Model",
|
|
86
|
+
labelCommandReadModelPrefix: "C/RM: ",
|
|
87
|
+
labelEvents: "Events",
|
|
88
|
+
labelEventsPrefix: "Stream: "
|
|
89
|
+
};
|
|
90
|
+
function D() {
|
|
91
|
+
return E;
|
|
92
|
+
}
|
|
93
|
+
i(D, "getDiagramProps");
|
|
94
|
+
var ce = {
|
|
95
|
+
boxes: [],
|
|
96
|
+
swimlanes: {},
|
|
97
|
+
relations: [],
|
|
98
|
+
maxR: 0,
|
|
99
|
+
sortedSwimlanesArray: []
|
|
100
|
+
};
|
|
101
|
+
function O(e) {
|
|
102
|
+
let t = e.split(".");
|
|
103
|
+
if (t.length === 2) return t[0];
|
|
104
|
+
}
|
|
105
|
+
i(O, "extractNamespace");
|
|
106
|
+
function k(e) {
|
|
107
|
+
let t = e.split(".");
|
|
108
|
+
return t.length === 2 ? t[1] : e;
|
|
109
|
+
}
|
|
110
|
+
i(k, "extractName");
|
|
111
|
+
function A(e, t) {
|
|
112
|
+
if (!(!t || t.length === 0)) return Object.values(e).find((e) => e.namespace === t);
|
|
113
|
+
}
|
|
114
|
+
i(A, "findSwimlaneByNamespace");
|
|
115
|
+
function j(e, t, n) {
|
|
116
|
+
return Math.max(t, ...Object.keys(e).filter((e) => {
|
|
117
|
+
let r = Number.parseInt(e);
|
|
118
|
+
return r > t && r < n;
|
|
119
|
+
}).map((e) => Number.parseInt(e))) + 1;
|
|
120
|
+
}
|
|
121
|
+
i(j, "findNextAvailableIndex");
|
|
122
|
+
function M(e, t) {
|
|
123
|
+
let n = O(e.entityIdentifier), r = A(t, n);
|
|
124
|
+
switch (e.modelEntityType) {
|
|
125
|
+
case "ui":
|
|
126
|
+
case "pcr":
|
|
127
|
+
case "processor": return r ? {
|
|
128
|
+
index: r.index,
|
|
129
|
+
label: r.namespace || E.labelUiAutomation
|
|
130
|
+
} : n ? {
|
|
131
|
+
index: j(t, 0, 100),
|
|
132
|
+
label: E.labelUiAutomationPrefix + n
|
|
133
|
+
} : {
|
|
134
|
+
index: 0,
|
|
135
|
+
label: E.labelUiAutomation
|
|
136
|
+
};
|
|
137
|
+
case "rmo":
|
|
138
|
+
case "readmodel":
|
|
139
|
+
case "cmd":
|
|
140
|
+
case "command": return r ? {
|
|
141
|
+
index: r.index,
|
|
142
|
+
label: r.namespace || E.labelCommandReadModel
|
|
143
|
+
} : n ? {
|
|
144
|
+
index: j(t, 100, 200),
|
|
145
|
+
label: E.labelCommandReadModelPrefix + n
|
|
146
|
+
} : {
|
|
147
|
+
index: 100,
|
|
148
|
+
label: E.labelCommandReadModel
|
|
149
|
+
};
|
|
150
|
+
default: return r ? {
|
|
151
|
+
index: r.index,
|
|
152
|
+
label: r.namespace || E.labelEvents
|
|
153
|
+
} : n ? {
|
|
154
|
+
index: j(t, 200, 300),
|
|
155
|
+
label: E.labelEventsPrefix + n
|
|
156
|
+
} : {
|
|
157
|
+
index: 200,
|
|
158
|
+
label: E.labelEvents
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
i(M, "calculateSwimlaneProps");
|
|
163
|
+
function N(e) {
|
|
164
|
+
let { themeVariables: t } = h();
|
|
165
|
+
switch (e.modelEntityType) {
|
|
166
|
+
case "ui": return {
|
|
167
|
+
fill: t.emUiFill ?? "white",
|
|
168
|
+
stroke: t.emUiStroke ?? "#dbdada"
|
|
169
|
+
};
|
|
170
|
+
case "pcr":
|
|
171
|
+
case "processor": return {
|
|
172
|
+
fill: t.emProcessorFill ?? "#edb3f6",
|
|
173
|
+
stroke: t.emProcessorStroke ?? "#b88cbf"
|
|
174
|
+
};
|
|
175
|
+
case "rmo":
|
|
176
|
+
case "readmodel": return {
|
|
177
|
+
fill: t.emReadModelFill ?? "#d3f1a2",
|
|
178
|
+
stroke: t.emReadModelStroke ?? "#a3b732"
|
|
179
|
+
};
|
|
180
|
+
case "cmd":
|
|
181
|
+
case "command": return {
|
|
182
|
+
fill: t.emCommandFill ?? "#bcd6fe",
|
|
183
|
+
stroke: t.emCommandStroke ?? "#679ac3"
|
|
184
|
+
};
|
|
185
|
+
case "evt":
|
|
186
|
+
case "event": return {
|
|
187
|
+
fill: t.emEventFill ?? "#ffb778",
|
|
188
|
+
stroke: t.emEventStroke ?? "#c19a0f"
|
|
189
|
+
};
|
|
190
|
+
default: return {
|
|
191
|
+
fill: "red",
|
|
192
|
+
stroke: "black"
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
i(N, "calculateEntityVisualProps");
|
|
197
|
+
function P(t, n, r) {
|
|
198
|
+
let i = h(), a = g(k(t.entityIdentifier) ?? "", i), o, s = {
|
|
199
|
+
fontSize: 16,
|
|
200
|
+
fontWeight: 700,
|
|
201
|
+
fontFamily: "\"trebuchet ms\", verdana, arial, sans-serif",
|
|
202
|
+
joinWith: "<br/>"
|
|
203
|
+
}, c = `<b>${_(a, r.textMaxWidth, s)}</b>`;
|
|
204
|
+
if (t.dataInlineValue && (o = t.dataInlineValue, o = o.substring(o.indexOf("{") + 1), o = o.substring(0, o.lastIndexOf("}") - 1), o = g(o, i), o = _(o, r.textMaxWidth, s), o = o.replaceAll(" ", " ")), t.dataReference) {
|
|
205
|
+
let e = n.find((e) => e.name === t.dataReference?.$refText);
|
|
206
|
+
e && (o = e.dataBlockValue, o = o.substring(o.indexOf("{\n") + 2), o = o.substring(0, o.lastIndexOf("}") - 1), o = g(o, i), o = _(o, r.textMaxWidth, s), o = o.replaceAll(" ", " "), o += "<br/>");
|
|
207
|
+
}
|
|
208
|
+
let l = o !== void 0;
|
|
209
|
+
l && (c += `<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${o}</code>`);
|
|
210
|
+
let u = {
|
|
211
|
+
fontSize: s.fontSize,
|
|
212
|
+
fontWeight: s.fontWeight,
|
|
213
|
+
fontFamily: s.fontFamily
|
|
214
|
+
}, d = te(c, u), f = l ? d.width / 3 : d.width, p = {
|
|
215
|
+
content: c,
|
|
216
|
+
width: f,
|
|
217
|
+
height: d.height
|
|
218
|
+
};
|
|
219
|
+
return e.debug(`[${t.name}] ${t.entityIdentifier} text`, p), p;
|
|
220
|
+
}
|
|
221
|
+
i(P, "calculateTextProps");
|
|
222
|
+
function F(e, t) {
|
|
223
|
+
let n = t, r = N(n.frame), i = {
|
|
224
|
+
width: n.textProps.width + 2 * E.boxTextPadding,
|
|
225
|
+
height: n.textProps.height + 2 * E.boxTextPadding
|
|
226
|
+
};
|
|
227
|
+
return [{
|
|
228
|
+
$kind: y,
|
|
229
|
+
frame: n.frame,
|
|
230
|
+
index: n.index,
|
|
231
|
+
visual: r,
|
|
232
|
+
dimension: i,
|
|
233
|
+
textProps: n.textProps
|
|
234
|
+
}];
|
|
235
|
+
}
|
|
236
|
+
i(F, "decidePositionFrame");
|
|
237
|
+
function I(e, t, n) {
|
|
238
|
+
return t === void 0 ? E.contentStartX : t.index === e.index && e.r ? e.r + E.boxPadding : n === void 0 ? E.contentStartX : n.r - E.boxOverlap + E.boxPadding;
|
|
239
|
+
}
|
|
240
|
+
i(I, "calculateX");
|
|
241
|
+
function L(e, t) {
|
|
242
|
+
let n = [...e.map((e) => e.r), t];
|
|
243
|
+
return Math.max(...n);
|
|
244
|
+
}
|
|
245
|
+
i(L, "calculateMaxRight");
|
|
246
|
+
function R(e) {
|
|
247
|
+
return Object.values(e).sort((e, t) => e.index - t.index);
|
|
248
|
+
}
|
|
249
|
+
i(R, "sortedSwimlanesArray");
|
|
250
|
+
function z(e, t) {
|
|
251
|
+
let n = t, r = M(n.frame, e.swimlanes), i;
|
|
252
|
+
i = r.index in e.swimlanes ? e.swimlanes[r.index] : {
|
|
253
|
+
index: r.index,
|
|
254
|
+
label: r.label,
|
|
255
|
+
r: 0,
|
|
256
|
+
y: r.index * E.swimlaneMinHeight + E.swimlaneGap,
|
|
257
|
+
height: E.swimlaneMinHeight,
|
|
258
|
+
maxHeight: E.swimlaneMinHeight
|
|
259
|
+
};
|
|
260
|
+
let a = e.boxes.length > 0 ? e.boxes[e.boxes.length - 1] : void 0, o = e.previousSwimlaneNumber === void 0 ? void 0 : e.swimlanes[e.previousSwimlaneNumber], s = {
|
|
261
|
+
width: Math.max(E.boxMinWidth, Math.min(E.boxMaxWidth, n.dimension.width)) + 2 * E.boxPadding,
|
|
262
|
+
height: Math.max(E.boxMinHeight, Math.min(E.boxMaxHeight, n.dimension.height)) + 2 * E.boxPadding
|
|
263
|
+
}, c = I(i, o, a), l = c + s.width + E.boxPadding, u = L(Object.values(e.swimlanes), l);
|
|
264
|
+
i.r = c + s.width, i.maxHeight = Math.max(i.maxHeight, s.height), i.height = Math.max(E.swimlaneMinHeight, i.maxHeight) + 2 * E.swimlanePadding;
|
|
265
|
+
let d = {
|
|
266
|
+
x: c,
|
|
267
|
+
y: E.swimlanePadding + i.y,
|
|
268
|
+
r: l,
|
|
269
|
+
dimension: s,
|
|
270
|
+
leftSibling: !1,
|
|
271
|
+
swimlane: i,
|
|
272
|
+
visual: n.visual,
|
|
273
|
+
text: n.textProps.content,
|
|
274
|
+
frame: n.frame,
|
|
275
|
+
index: n.index
|
|
276
|
+
}, f = {
|
|
277
|
+
...e,
|
|
278
|
+
boxes: [...e.boxes, d],
|
|
279
|
+
swimlanes: {
|
|
280
|
+
...e.swimlanes,
|
|
281
|
+
[`${i.index}`]: i
|
|
282
|
+
},
|
|
283
|
+
previousSwimlaneNumber: r.index,
|
|
284
|
+
previousFrame: n.frame,
|
|
285
|
+
maxR: u
|
|
286
|
+
}, p = R(f.swimlanes);
|
|
287
|
+
p.length > 0 && (p[0].y = 0);
|
|
288
|
+
for (let e = 1; e < p.length; e++) {
|
|
289
|
+
let t = p[e], n = p[e - 1];
|
|
290
|
+
t.y = n.y + n.height + E.swimlaneGap;
|
|
291
|
+
}
|
|
292
|
+
return f;
|
|
293
|
+
}
|
|
294
|
+
i(z, "evolveFramePositioned");
|
|
295
|
+
function B(e, t) {
|
|
296
|
+
return e === 0 && t.sourceFrames.length === 0;
|
|
297
|
+
}
|
|
298
|
+
i(B, "isFirstFrame");
|
|
299
|
+
function V(e) {
|
|
300
|
+
return e.sourceFrames !== void 0 && e.sourceFrames !== null && e.sourceFrames.length > 0;
|
|
301
|
+
}
|
|
302
|
+
i(V, "hasSourceFrame");
|
|
303
|
+
function H(e, t) {
|
|
304
|
+
if (t != null) return e.find((e) => e.frame.name === t.name);
|
|
305
|
+
}
|
|
306
|
+
i(H, "findBoxByFrame");
|
|
307
|
+
function U(e, t, n) {
|
|
308
|
+
if (!(n < 0)) for (let r = n; r >= 0; r--) {
|
|
309
|
+
let n = e[r];
|
|
310
|
+
if (n.swimlane.index !== t) return n;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
i(U, "findBoxByLineIndex");
|
|
314
|
+
function W(e, t) {
|
|
315
|
+
let r = t;
|
|
316
|
+
if (B(r.index, r.frame)) return [];
|
|
317
|
+
let i = H(e.boxes, r.frame);
|
|
318
|
+
if (i === void 0) throw Error(`Target box not found for frame ${r.frame.name}`);
|
|
319
|
+
let a;
|
|
320
|
+
if (r.sourceFrame) a = H(e.boxes, r.sourceFrame);
|
|
321
|
+
else {
|
|
322
|
+
if (n(r.frame)) return [];
|
|
323
|
+
a = U(e.boxes, i.swimlane.index, r.index - 1);
|
|
324
|
+
}
|
|
325
|
+
return a === void 0 ? [] : [{
|
|
326
|
+
$kind: x,
|
|
327
|
+
frame: r.frame,
|
|
328
|
+
index: r.index,
|
|
329
|
+
sourceBox: a,
|
|
330
|
+
targetBox: i
|
|
331
|
+
}];
|
|
332
|
+
}
|
|
333
|
+
i(W, "decidePositionRelation");
|
|
334
|
+
function G(e, t) {
|
|
335
|
+
let n = t, r = {
|
|
336
|
+
visual: {
|
|
337
|
+
fill: "none",
|
|
338
|
+
stroke: "#000"
|
|
339
|
+
},
|
|
340
|
+
source: {
|
|
341
|
+
x: n.sourceBox.x,
|
|
342
|
+
y: n.sourceBox.y
|
|
343
|
+
},
|
|
344
|
+
target: {
|
|
345
|
+
x: n.targetBox.x,
|
|
346
|
+
y: n.targetBox.y
|
|
347
|
+
},
|
|
348
|
+
sourceBox: n.sourceBox,
|
|
349
|
+
targetBox: n.targetBox
|
|
350
|
+
};
|
|
351
|
+
return {
|
|
352
|
+
...e,
|
|
353
|
+
relations: [...e.relations, r]
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
i(G, "evolveRelationPositioned");
|
|
357
|
+
var le = {
|
|
358
|
+
[v]: F,
|
|
359
|
+
[b]: W
|
|
360
|
+
}, ue = {
|
|
361
|
+
[y]: z,
|
|
362
|
+
[x]: G
|
|
363
|
+
};
|
|
364
|
+
function K(t, n) {
|
|
365
|
+
let r = le[n.$kind];
|
|
366
|
+
if (r == null) return [];
|
|
367
|
+
let i = r(t, n);
|
|
368
|
+
return e.debug("decided events", i), i;
|
|
369
|
+
}
|
|
370
|
+
i(K, "decide");
|
|
371
|
+
function q(t, n) {
|
|
372
|
+
let r = n.reduce((e, t) => {
|
|
373
|
+
let n = ue[t.$kind];
|
|
374
|
+
return n == null ? e : n(e, t);
|
|
375
|
+
}, t);
|
|
376
|
+
return e.debug("evolve events", {
|
|
377
|
+
state: t,
|
|
378
|
+
newState: r,
|
|
379
|
+
events: n
|
|
380
|
+
}), r;
|
|
381
|
+
}
|
|
382
|
+
i(q, "evolve");
|
|
383
|
+
function J(e, t) {
|
|
384
|
+
return q(e, K(e, t));
|
|
385
|
+
}
|
|
386
|
+
i(J, "dispatch");
|
|
387
|
+
var Y = {
|
|
388
|
+
getConfig: se,
|
|
389
|
+
preserveCommentsWhenParsing: !0,
|
|
390
|
+
setOptions: re,
|
|
391
|
+
getOptions: ie,
|
|
392
|
+
clear: ae,
|
|
393
|
+
setAccTitle: s,
|
|
394
|
+
getAccTitle: m,
|
|
395
|
+
getAccDescription: l,
|
|
396
|
+
setAccDescription: o,
|
|
397
|
+
setDiagramTitle: p,
|
|
398
|
+
getDiagramTitle: a,
|
|
399
|
+
setAst: T,
|
|
400
|
+
getDiagramProps: D,
|
|
401
|
+
getState: w
|
|
402
|
+
}, de = { parse: /* @__PURE__ */ i(async (t) => {
|
|
403
|
+
let n = await r("eventmodeling", t);
|
|
404
|
+
e.debug(n), Y.setAst(n), ne(n, Y);
|
|
405
|
+
}, "parse") }, fe = d()?.eventmodeling;
|
|
406
|
+
function X(e, t) {
|
|
407
|
+
return (n) => {
|
|
408
|
+
let r = n.swimlane.y + t.swimlanePadding, i = e.append("g").attr("class", "em-box");
|
|
409
|
+
i.append("rect").attr("x", n.x).attr("y", r).attr("rx", "3").attr("width", n.dimension.width).attr("height", n.dimension.height).attr("stroke", n.visual.stroke).attr("fill", n.visual.fill), i.append("foreignObject").attr("x", n.x + t.boxPadding).attr("y", r + 10).attr("width", n.dimension.width - 2 * t.boxPadding).attr("height", n.dimension.height - 2 * t.boxPadding).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%").append("span").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").html(n.text);
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
i(X, "renderD3Box");
|
|
413
|
+
function Z(e, t) {
|
|
414
|
+
return e > t;
|
|
415
|
+
}
|
|
416
|
+
i(Z, "dirUpwards");
|
|
417
|
+
function Q(t, n, r, i) {
|
|
418
|
+
return (a) => {
|
|
419
|
+
let o = a.sourceBox.swimlane.y + n.swimlanePadding, s = a.targetBox.swimlane.y + n.swimlanePadding, c = Z(o, s), l = a.sourceBox.x + a.sourceBox.dimension.width * 2 / 3, u = a.targetBox.x + a.targetBox.dimension.width / 3, d, f;
|
|
420
|
+
e.debug(`rendering relation up=${c} for `, {
|
|
421
|
+
sourceBox: a.sourceBox,
|
|
422
|
+
targetBox: a.targetBox
|
|
423
|
+
}), c ? (d = o, f = s + a.targetBox.dimension.height) : (d = o + a.sourceBox.dimension.height, f = s);
|
|
424
|
+
let p = i.emRelationStroke ?? a.visual.stroke;
|
|
425
|
+
t.append("path").attr("class", "em-relation").attr("fill", a.visual.fill).attr("stroke", p).attr("stroke-width", "1").attr("marker-end", `url(#${r})`).attr("d", `M${l} ${d} L${u} ${f}`);
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
i(Q, "renderD3Relation");
|
|
429
|
+
function $(e, t, n, r) {
|
|
430
|
+
return (i) => {
|
|
431
|
+
let a = e.append("g").attr("class", "em-swimlane"), o = r.emSwimlaneBackgroundOdd ?? "rgb(250,250,250)", s = r.emSwimlaneBackgroundStroke ?? "rgb(240,240,240)";
|
|
432
|
+
a.append("rect").attr("x", 0).attr("y", i.y).attr("rx", "3").attr("width", t + n.swimlanePadding).attr("height", i.height).attr("fill", o).attr("stroke", s), a.append("text").attr("font-weight", n.swimlaneTextFontWeight).attr("x", 30).attr("y", i.y + 30).text(i.label);
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
i($, "renderD3Swimlane");
|
|
436
|
+
var pe = {
|
|
437
|
+
parser: de,
|
|
438
|
+
db: Y,
|
|
439
|
+
renderer: { draw: /* @__PURE__ */ i(function(n, r, i, a) {
|
|
440
|
+
if (e.debug("in eventmodeling renderer", n + "\n", "id:", r, i), !fe) throw Error("EventModeling config not found");
|
|
441
|
+
let o = a.db, { themeVariables: s, eventmodeling: l } = d(), u = t(`[id="${r}"]`), f = o.getDiagramProps(), p = o.getState(), m = `em-arrowhead-${r}`, h = s.emArrowhead ?? "#000000";
|
|
442
|
+
p.sortedSwimlanesArray.forEach($(u, p.maxR, f, s)), p.boxes.forEach(X(u, f)), p.relations.forEach(Q(u, f, m, s)), u.append("defs").append("marker").attr("id", m).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", h), c(void 0, u, l?.padding ?? 30, l?.useMaxWidth);
|
|
443
|
+
}, "draw") },
|
|
444
|
+
styles: /* @__PURE__ */ i((e) => "", "getStyles")
|
|
445
|
+
};
|
|
446
|
+
//#endregion
|
|
447
|
+
export { pe as diagram };
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { m as e } from "./src-Dcy0zUZH.js";
|
|
2
|
+
import { n as t } from "./mermaid-parser.core-I7qQ_fxz.js";
|
|
3
|
+
import { n } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
|
|
4
|
+
import { C as r, E as i, H as a, U as o, _ as s, a as c, c as l, f as u, q as d, v as f, y as p } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
|
|
5
|
+
import { i as m } from "./chunk-7S6XSTFO-CMt_p-O6.js";
|
|
6
|
+
import { t as h } from "./chunk-OYAV6JZA-B1yICcbU.js";
|
|
7
|
+
import { t as g } from "./chunk-JWPE2WC7-KRpHbrIX.js";
|
|
8
|
+
//#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-RJA3I4VV.mjs
|
|
9
|
+
var _ = {
|
|
10
|
+
showLegend: !0,
|
|
11
|
+
ticks: 5,
|
|
12
|
+
max: null,
|
|
13
|
+
min: 0,
|
|
14
|
+
graticule: "circle"
|
|
15
|
+
}, v = 32, y = {
|
|
16
|
+
axes: [],
|
|
17
|
+
curves: [],
|
|
18
|
+
options: _
|
|
19
|
+
}, b = structuredClone(y), x = u.radar, S = /* @__PURE__ */ n(() => m({
|
|
20
|
+
...x,
|
|
21
|
+
...p().radar
|
|
22
|
+
}), "getConfig"), C = /* @__PURE__ */ n(() => b.axes, "getAxes"), w = /* @__PURE__ */ n(() => b.curves, "getCurves"), T = /* @__PURE__ */ n(() => b.options, "getOptions"), E = /* @__PURE__ */ n((e) => {
|
|
23
|
+
b.axes = e.map((e) => ({
|
|
24
|
+
name: e.name,
|
|
25
|
+
label: e.label ?? e.name
|
|
26
|
+
}));
|
|
27
|
+
}, "setAxes"), D = /* @__PURE__ */ n((e) => {
|
|
28
|
+
b.curves = e.map((e) => ({
|
|
29
|
+
name: e.name,
|
|
30
|
+
label: e.label ?? e.name,
|
|
31
|
+
entries: O(e.entries)
|
|
32
|
+
}));
|
|
33
|
+
}, "setCurves"), O = /* @__PURE__ */ n((e) => {
|
|
34
|
+
if (e[0].axis == null) return e.map((e) => e.value);
|
|
35
|
+
let t = C();
|
|
36
|
+
if (t.length === 0) throw Error("Axes must be populated before curves for reference entries");
|
|
37
|
+
return t.map((t) => {
|
|
38
|
+
let n = e.find((e) => e.axis?.$refText === t.name);
|
|
39
|
+
if (n === void 0) throw Error("Missing entry for axis " + t.label);
|
|
40
|
+
return n.value;
|
|
41
|
+
});
|
|
42
|
+
}, "computeCurveEntries"), k = {
|
|
43
|
+
getAxes: C,
|
|
44
|
+
getCurves: w,
|
|
45
|
+
getOptions: T,
|
|
46
|
+
setAxes: E,
|
|
47
|
+
setCurves: D,
|
|
48
|
+
setOptions: /* @__PURE__ */ n((t) => {
|
|
49
|
+
let n = t.reduce((e, t) => (e[t.name] = t, e), {});
|
|
50
|
+
b.options = {
|
|
51
|
+
showLegend: n.showLegend?.value ?? _.showLegend,
|
|
52
|
+
ticks: n.ticks?.value ?? _.ticks,
|
|
53
|
+
max: n.max?.value ?? _.max,
|
|
54
|
+
min: n.min?.value ?? _.min,
|
|
55
|
+
graticule: n.graticule?.value ?? _.graticule
|
|
56
|
+
}, b.options.ticks > v && (e.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`), b.options.ticks = v);
|
|
57
|
+
}, "setOptions"),
|
|
58
|
+
getConfig: S,
|
|
59
|
+
clear: /* @__PURE__ */ n(() => {
|
|
60
|
+
c(), b = structuredClone(y);
|
|
61
|
+
}, "clear"),
|
|
62
|
+
setAccTitle: o,
|
|
63
|
+
getAccTitle: f,
|
|
64
|
+
setDiagramTitle: d,
|
|
65
|
+
getDiagramTitle: r,
|
|
66
|
+
getAccDescription: s,
|
|
67
|
+
setAccDescription: a
|
|
68
|
+
}, A = /* @__PURE__ */ n((e) => {
|
|
69
|
+
g(e, k);
|
|
70
|
+
let { axes: t, curves: n, options: r } = e;
|
|
71
|
+
k.setAxes(t), k.setCurves(n), k.setOptions(r);
|
|
72
|
+
}, "populate"), j = { parse: /* @__PURE__ */ n(async (n) => {
|
|
73
|
+
let r = await t("radar", n);
|
|
74
|
+
e.debug(r), A(r);
|
|
75
|
+
}, "parse") }, M = /* @__PURE__ */ n((e, t, n, r) => {
|
|
76
|
+
let i = r.db, a = i.getAxes(), o = i.getCurves(), s = i.getOptions(), c = i.getConfig(), l = i.getDiagramTitle(), u = N(h(t), c), d = s.max ?? Math.max(...o.map((e) => Math.max(...e.entries))), f = s.min, p = Math.min(c.width, c.height) / 2;
|
|
77
|
+
P(u, a, p, s.ticks, s.graticule), F(u, a, p, c), I(u, a, o, f, d, s.graticule, c), z(u, o, s.showLegend, c), u.append("text").attr("class", "radarTitle").text(l).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
78
|
+
}, "draw"), N = /* @__PURE__ */ n((e, t) => {
|
|
79
|
+
let n = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, i = {
|
|
80
|
+
x: t.marginLeft + t.width / 2,
|
|
81
|
+
y: t.marginTop + t.height / 2
|
|
82
|
+
};
|
|
83
|
+
return l(e, r, n, t.useMaxWidth ?? !0), e.attr("viewBox", `0 0 ${n} ${r}`).attr("overflow", "visible"), e.append("g").attr("transform", `translate(${i.x}, ${i.y})`);
|
|
84
|
+
}, "drawFrame"), P = /* @__PURE__ */ n((e, t, n, r, i) => {
|
|
85
|
+
if (i === "circle") for (let t = 0; t < r; t++) {
|
|
86
|
+
let i = n * (t + 1) / r;
|
|
87
|
+
e.append("circle").attr("r", i).attr("class", "radarGraticule");
|
|
88
|
+
}
|
|
89
|
+
else if (i === "polygon") {
|
|
90
|
+
let i = t.length;
|
|
91
|
+
for (let a = 0; a < r; a++) {
|
|
92
|
+
let o = n * (a + 1) / r, s = t.map((e, t) => {
|
|
93
|
+
let n = 2 * t * Math.PI / i - Math.PI / 2;
|
|
94
|
+
return `${o * Math.cos(n)},${o * Math.sin(n)}`;
|
|
95
|
+
}).join(" ");
|
|
96
|
+
e.append("polygon").attr("points", s).attr("class", "radarGraticule");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, "drawGraticule"), F = /* @__PURE__ */ n((e, t, n, r) => {
|
|
100
|
+
let i = t.length;
|
|
101
|
+
for (let a = 0; a < i; a++) {
|
|
102
|
+
let o = t[a].label, s = 2 * a * Math.PI / i - Math.PI / 2, c = Math.cos(s), l = Math.sin(s);
|
|
103
|
+
e.append("line").attr("x1", 0).attr("y1", 0).attr("x2", n * r.axisScaleFactor * c).attr("y2", n * r.axisScaleFactor * l).attr("class", "radarAxisLine");
|
|
104
|
+
let u = c > .01 ? "start" : c < -.01 ? "end" : "middle", d = l > .01 ? "hanging" : l < -.01 ? "auto" : "central";
|
|
105
|
+
e.append("text").text(o).attr("x", n * r.axisLabelFactor * c + 4 * c).attr("y", n * r.axisLabelFactor * l + 4 * l).attr("text-anchor", u).attr("dominant-baseline", d).attr("class", "radarAxisLabel");
|
|
106
|
+
}
|
|
107
|
+
}, "drawAxes");
|
|
108
|
+
function I(e, t, n, r, i, a, o) {
|
|
109
|
+
let s = t.length, c = Math.min(o.width, o.height) / 2;
|
|
110
|
+
n.forEach((t, n) => {
|
|
111
|
+
if (t.entries.length !== s) return;
|
|
112
|
+
let l = t.entries.map((e, t) => {
|
|
113
|
+
let n = 2 * Math.PI * t / s - Math.PI / 2, a = L(e, r, i, c);
|
|
114
|
+
return {
|
|
115
|
+
x: a * Math.cos(n),
|
|
116
|
+
y: a * Math.sin(n)
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
a === "circle" ? e.append("path").attr("d", R(l, o.curveTension)).attr("class", `radarCurve-${n}`) : a === "polygon" && e.append("polygon").attr("points", l.map((e) => `${e.x},${e.y}`).join(" ")).attr("class", `radarCurve-${n}`);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
n(I, "drawCurves");
|
|
123
|
+
function L(e, t, n, r) {
|
|
124
|
+
return r * (Math.min(Math.max(e, t), n) - t) / (n - t);
|
|
125
|
+
}
|
|
126
|
+
n(L, "relativeRadius");
|
|
127
|
+
function R(e, t) {
|
|
128
|
+
let n = e.length, r = `M${e[0].x},${e[0].y}`;
|
|
129
|
+
for (let i = 0; i < n; i++) {
|
|
130
|
+
let a = e[(i - 1 + n) % n], o = e[i], s = e[(i + 1) % n], c = e[(i + 2) % n], l = {
|
|
131
|
+
x: o.x + (s.x - a.x) * t,
|
|
132
|
+
y: o.y + (s.y - a.y) * t
|
|
133
|
+
}, u = {
|
|
134
|
+
x: s.x - (c.x - o.x) * t,
|
|
135
|
+
y: s.y - (c.y - o.y) * t
|
|
136
|
+
};
|
|
137
|
+
r += ` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`;
|
|
138
|
+
}
|
|
139
|
+
return `${r} Z`;
|
|
140
|
+
}
|
|
141
|
+
n(R, "closedRoundCurve");
|
|
142
|
+
function z(e, t, n, r) {
|
|
143
|
+
if (!n) return;
|
|
144
|
+
let i = (r.width / 2 + r.marginRight) * 3 / 4, a = -(r.height / 2 + r.marginTop) * 3 / 4;
|
|
145
|
+
t.forEach((t, n) => {
|
|
146
|
+
let r = e.append("g").attr("transform", `translate(${i}, ${a + n * 20})`);
|
|
147
|
+
r.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${n}`), r.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(t.label);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
n(z, "drawLegend");
|
|
151
|
+
var B = { draw: M }, V = /* @__PURE__ */ n((e, t) => {
|
|
152
|
+
let n = "";
|
|
153
|
+
for (let r = 0; r < e.THEME_COLOR_LIMIT; r++) {
|
|
154
|
+
let i = e[`cScale${r}`];
|
|
155
|
+
n += `
|
|
156
|
+
.radarCurve-${r} {
|
|
157
|
+
color: ${i};
|
|
158
|
+
fill: ${i};
|
|
159
|
+
fill-opacity: ${t.curveOpacity};
|
|
160
|
+
stroke: ${i};
|
|
161
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
162
|
+
}
|
|
163
|
+
.radarLegendBox-${r} {
|
|
164
|
+
fill: ${i};
|
|
165
|
+
fill-opacity: ${t.curveOpacity};
|
|
166
|
+
stroke: ${i};
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
}
|
|
170
|
+
return n;
|
|
171
|
+
}, "genIndexStyles"), H = /* @__PURE__ */ n((e) => {
|
|
172
|
+
let t = m(i(), p().themeVariables);
|
|
173
|
+
return {
|
|
174
|
+
themeVariables: t,
|
|
175
|
+
radarOptions: m(t.radar, e)
|
|
176
|
+
};
|
|
177
|
+
}, "buildRadarStyleOptions"), U = {
|
|
178
|
+
parser: j,
|
|
179
|
+
db: k,
|
|
180
|
+
renderer: B,
|
|
181
|
+
styles: /* @__PURE__ */ n(({ radar: e } = {}) => {
|
|
182
|
+
let { themeVariables: t, radarOptions: n } = H(e);
|
|
183
|
+
return `
|
|
184
|
+
.radarTitle {
|
|
185
|
+
font-size: ${t.fontSize};
|
|
186
|
+
color: ${t.titleColor};
|
|
187
|
+
dominant-baseline: hanging;
|
|
188
|
+
text-anchor: middle;
|
|
189
|
+
}
|
|
190
|
+
.radarAxisLine {
|
|
191
|
+
stroke: ${n.axisColor};
|
|
192
|
+
stroke-width: ${n.axisStrokeWidth};
|
|
193
|
+
}
|
|
194
|
+
.radarAxisLabel {
|
|
195
|
+
font-size: ${n.axisLabelFontSize}px;
|
|
196
|
+
color: ${n.axisColor};
|
|
197
|
+
}
|
|
198
|
+
.radarGraticule {
|
|
199
|
+
fill: ${n.graticuleColor};
|
|
200
|
+
fill-opacity: ${n.graticuleOpacity};
|
|
201
|
+
stroke: ${n.graticuleColor};
|
|
202
|
+
stroke-width: ${n.graticuleStrokeWidth};
|
|
203
|
+
}
|
|
204
|
+
.radarLegendText {
|
|
205
|
+
text-anchor: start;
|
|
206
|
+
font-size: ${n.legendFontSize}px;
|
|
207
|
+
dominant-baseline: hanging;
|
|
208
|
+
}
|
|
209
|
+
${V(t, n)}
|
|
210
|
+
`;
|
|
211
|
+
}, "styles")
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
214
|
+
export { U as diagram };
|