@antdv-next/x 0.2.0 → 1.0.0
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/attachments/index.d.ts +0 -4
- package/dist/attachments/index.js +0 -5
- package/dist/index.esm.js +4 -32
- package/dist/index.umd.js +4 -32
- package/dist/mermaid/Mermaid.d.ts +1 -1
- package/dist/mermaid/Mermaid.js +1 -0
- package/dist/package.js +1 -1
- package/dist/prompts/Prompts.d.ts +1 -10
- package/dist/prompts/Prompts.js +1 -7
- package/dist/prompts/interface.d.ts +0 -1
- package/dist/sources/Sources.d.ts +0 -9
- package/dist/sources/Sources.js +0 -5
- package/dist/sources/interface.d.ts +0 -1
- package/dist/suggestion/Suggestion.d.ts +0 -18
- package/dist/suggestion/Suggestion.js +1 -14
- package/dist/suggestion/interface.d.ts +0 -2
- package/dist-browser/Serializer-y_SfSPKv.js +262 -0
- package/dist-browser/_basePickBy-Cy7KVmkk.js +166 -0
- package/dist-browser/_baseUniq-Ch3HuHeT.js +682 -0
- package/dist-browser/arc-caEkbRYF.js +80 -0
- package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +3 -0
- package/dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js +4045 -0
- package/dist-browser/array-CWNufkl9.js +6 -0
- package/dist-browser/bash-CXEwhtGQ.js +3 -0
- package/dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js +3025 -0
- package/dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js +2964 -0
- package/dist-browser/channel-DoEe9DF9.js +5 -0
- package/dist-browser/chunk-4BX2VUAB-fLFD6XW0.js +8 -0
- package/dist-browser/chunk-55IACEB6-OtyKJzCH.js +8 -0
- package/dist-browser/chunk-7E7YKBS2-C1dd36rm.js +23 -0
- package/dist-browser/chunk-7R4GIKGN-DuTRhdsf.js +2596 -0
- package/dist-browser/chunk-C72U2L5F-ClmZGhFC.js +23 -0
- package/dist-browser/chunk-EGIJ26TM-Bar_u1MN.js +23 -0
- package/dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js +5 -0
- package/dist-browser/chunk-GEFDOKGD-P7WhyrTU.js +1121 -0
- package/dist-browser/chunk-GLR3WWYH-BvazRgdo.js +41 -0
- package/dist-browser/chunk-HHEYEP7N-rv5s5WD4.js +9 -0
- package/dist-browser/chunk-JSJVCQXG-89HUGe9V.js +60 -0
- package/dist-browser/chunk-KX2RTZJC-pMHnNRQg.js +25 -0
- package/dist-browser/chunk-KYZI473N-DJmSs1gK.js +3434 -0
- package/dist-browser/chunk-L3YUKLVL-Ck54qytQ.js +23 -0
- package/dist-browser/chunk-MX3YWQON-MkpK3uBD.js +80 -0
- package/dist-browser/chunk-NQ4KR5QH-DGshodQv.js +2002 -0
- package/dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js +511 -0
- package/dist-browser/chunk-OZEHJAEY-DULNd43V.js +64 -0
- package/dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js +67 -0
- package/dist-browser/chunk-PU5JKC2W-DkEFvrjH.js +1885 -0
- package/dist-browser/chunk-QZHKN3VN-qww1plfw.js +15 -0
- package/dist-browser/chunk-R5LLSJPH-BERXSDGJ.js +35 -0
- package/dist-browser/chunk-WL4C6EOR-C-d8WPS7.js +3194 -0
- package/dist-browser/chunk-WQLz0Won.js +20 -0
- package/dist-browser/chunk-XIRO2GV7-CFHofxVB.js +30 -0
- package/dist-browser/chunk-XPW4576I-DgvoNZkW.js +1146 -0
- package/dist-browser/chunk-XZSTWKYB-k8_EXrSa.js +15797 -0
- package/dist-browser/chunk-YBOYWFTD-BUW4AzEX.js +32 -0
- package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +29 -0
- package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +29 -0
- package/dist-browser/clone-BXDbKCDu.js +8 -0
- package/dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js +2250 -0
- package/dist-browser/css-D9vrnIUE.js +2 -0
- package/dist-browser/css-Dh17kjFY.js +3 -0
- package/dist-browser/cytoscape.esm-BY3wHcbp.js +18100 -0
- package/dist-browser/dagre-BJOzGlhW.js +1483 -0
- package/dist-browser/dagre-KLK3FWXG-CFC0naVr.js +294 -0
- package/dist-browser/defaultLocale-BaPFSbai.js +201 -0
- package/dist-browser/diagram-E7M64L7V-DxuJj8ZG.js +527 -0
- package/dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js +213 -0
- package/dist-browser/diagram-P4PSJMXO--ChDmcya.js +133 -0
- package/dist-browser/diff-BSu5dsa2.js +3 -0
- package/dist-browser/dist-DltyvPj3.js +50 -0
- package/dist-browser/erDiagram-INFDFZHY-BA3m-v87.js +1666 -0
- package/dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js +4161 -0
- package/dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js +3075 -0
- package/dist-browser/gitGraph-HDMCJU4V-DbzpICZW.js +3 -0
- package/dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js +625 -0
- package/dist-browser/graphlib-C7ysKz4u.js +225 -0
- package/dist-browser/html-BmZO1Eoo.js +10 -0
- package/dist-browser/html-DnTYsv5k.js +2 -0
- package/dist-browser/index.es.js +56149 -0
- package/dist-browser/index.umd.js +3281 -0
- package/dist-browser/info-3K5VOQVL-CpUiQuel.js +3 -0
- package/dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js +19 -0
- package/dist-browser/init-PAs0hR-b.js +15 -0
- package/dist-browser/isArrayLikeObject-y3HlYDaX.js +578 -0
- package/dist-browser/isEmpty-2JxdWtc-.js +35 -0
- package/dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js +717 -0
- package/dist-browser/javascript-BXHK_bZ2.js +3 -0
- package/dist-browser/javascript-NV_FQBab.js +2 -0
- package/dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js +883 -0
- package/dist-browser/json-C8Y9C4Ne.js +2 -0
- package/dist-browser/json-DZ_9-j3Q.js +3 -0
- package/dist-browser/jsx-CxlNNvOI.js +3 -0
- package/dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js +971 -0
- package/dist-browser/katex-b-xdokOf.js +22000 -0
- package/dist-browser/line-h2iCTGsE.js +34 -0
- package/dist-browser/linear-Bv7XrZCH.js +289 -0
- package/dist-browser/markdown-BKwT7HWz.js +3 -0
- package/dist-browser/math-DPzKeDKn.js +10 -0
- package/dist-browser/mermaid-C1RUu_Iw.js +3 -0
- package/dist-browser/mermaid-parser.core-kTgpNO7M.js +59 -0
- package/dist-browser/mermaid.core-DRuUNxpC.js +680 -0
- package/dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js +964 -0
- package/dist-browser/ordinal-D8PKtxfM.js +65 -0
- package/dist-browser/packet-RMMSAZCW-UTFQ0FQx.js +3 -0
- package/dist-browser/path-DZ-6AyWK.js +85 -0
- package/dist-browser/pie-UPGHQEXC-CarAcBSi.js +3 -0
- package/dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js +165 -0
- package/dist-browser/python-BQM8giqx.js +3 -0
- package/dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js +1974 -0
- package/dist-browser/radar-KQ55EAFF-NXK5PC9R.js +3 -0
- package/dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js +2201 -0
- package/dist-browser/rough.esm-C_hJ3ICT.js +1352 -0
- package/dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js +920 -0
- package/dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js +4109 -0
- package/dist-browser/src-BukXhifV.js +2146 -0
- package/dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js +217 -0
- package/dist-browser/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +27 -0
- package/dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js +830 -0
- package/dist-browser/treemap-KZPCXAKY-Cj9QakFB.js +3 -0
- package/dist-browser/tsx-DIYEV_g7.js +3 -0
- package/dist-browser/typescript-B6MWEsBH.js +3 -0
- package/dist-browser/typescript-CR48gG1F.js +2 -0
- package/dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js +1858 -0
- package/dist-browser/vue-BJ0ov2CZ.js +21 -0
- package/dist-browser/vue-html-D0gyDbfn.js +5 -0
- package/dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js +2041 -0
- package/dist-browser/yaml-Y0CqUPTQ.js +3 -0
- package/package.json +15 -3
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import { g as e, h as t, p as n } from "./src-BukXhifV.js";
|
|
2
|
+
import { C as r, D as i, E as a, O as o, S as s, T as c, _ as l, b as u, h as d, v as f, w as p, x as m, y as h } from "./chunk-GEFDOKGD-P7WhyrTU.js";
|
|
3
|
+
import { b as g, w as _ } from "./chunk-7R4GIKGN-DuTRhdsf.js";
|
|
4
|
+
import { t as v } from "./line-h2iCTGsE.js";
|
|
5
|
+
import { n as y } from "./chunk-PU5JKC2W-DkEFvrjH.js";
|
|
6
|
+
import { i as b, n as x, r as S, t as C } from "./chunk-MX3YWQON-MkpK3uBD.js";
|
|
7
|
+
import { n as w } from "./chunk-YBOYWFTD-BUW4AzEX.js";
|
|
8
|
+
import { i as T, n as E } from "./chunk-PQ6SQG4A-CQ9Csv7s.js";
|
|
9
|
+
import { t as D } from "./rough.esm-C_hJ3ICT.js";
|
|
10
|
+
import { r as O } from "./chunk-KYZI473N-DJmSs1gK.js";
|
|
11
|
+
//#region ../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-O4XLMI2P.mjs
|
|
12
|
+
var ee = /* @__PURE__ */ t((e, t, n, r, i, a) => {
|
|
13
|
+
t.arrowTypeStart && A(e, "start", t.arrowTypeStart, n, r, i, a), t.arrowTypeEnd && A(e, "end", t.arrowTypeEnd, n, r, i, a);
|
|
14
|
+
}, "addEdgeMarkers"), k = {
|
|
15
|
+
arrow_cross: {
|
|
16
|
+
type: "cross",
|
|
17
|
+
fill: !1
|
|
18
|
+
},
|
|
19
|
+
arrow_point: {
|
|
20
|
+
type: "point",
|
|
21
|
+
fill: !0
|
|
22
|
+
},
|
|
23
|
+
arrow_barb: {
|
|
24
|
+
type: "barb",
|
|
25
|
+
fill: !0
|
|
26
|
+
},
|
|
27
|
+
arrow_circle: {
|
|
28
|
+
type: "circle",
|
|
29
|
+
fill: !1
|
|
30
|
+
},
|
|
31
|
+
aggregation: {
|
|
32
|
+
type: "aggregation",
|
|
33
|
+
fill: !1
|
|
34
|
+
},
|
|
35
|
+
extension: {
|
|
36
|
+
type: "extension",
|
|
37
|
+
fill: !1
|
|
38
|
+
},
|
|
39
|
+
composition: {
|
|
40
|
+
type: "composition",
|
|
41
|
+
fill: !0
|
|
42
|
+
},
|
|
43
|
+
dependency: {
|
|
44
|
+
type: "dependency",
|
|
45
|
+
fill: !0
|
|
46
|
+
},
|
|
47
|
+
lollipop: {
|
|
48
|
+
type: "lollipop",
|
|
49
|
+
fill: !1
|
|
50
|
+
},
|
|
51
|
+
only_one: {
|
|
52
|
+
type: "onlyOne",
|
|
53
|
+
fill: !1
|
|
54
|
+
},
|
|
55
|
+
zero_or_one: {
|
|
56
|
+
type: "zeroOrOne",
|
|
57
|
+
fill: !1
|
|
58
|
+
},
|
|
59
|
+
one_or_more: {
|
|
60
|
+
type: "oneOrMore",
|
|
61
|
+
fill: !1
|
|
62
|
+
},
|
|
63
|
+
zero_or_more: {
|
|
64
|
+
type: "zeroOrMore",
|
|
65
|
+
fill: !1
|
|
66
|
+
},
|
|
67
|
+
requirement_arrow: {
|
|
68
|
+
type: "requirement_arrow",
|
|
69
|
+
fill: !1
|
|
70
|
+
},
|
|
71
|
+
requirement_contains: {
|
|
72
|
+
type: "requirement_contains",
|
|
73
|
+
fill: !1
|
|
74
|
+
}
|
|
75
|
+
}, A = /* @__PURE__ */ t((t, n, r, i, a, o, s) => {
|
|
76
|
+
let c = k[r];
|
|
77
|
+
if (!c) {
|
|
78
|
+
e.warn(`Unknown arrow type: ${r}`);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
let l = `${a}_${o}-${c.type}${n === "start" ? "Start" : "End"}`;
|
|
82
|
+
if (s && s.trim() !== "") {
|
|
83
|
+
let e = `${l}_${s.replace(/[^\dA-Za-z]/g, "_")}`;
|
|
84
|
+
if (!document.getElementById(e)) {
|
|
85
|
+
let t = document.getElementById(l);
|
|
86
|
+
if (t) {
|
|
87
|
+
let n = t.cloneNode(!0);
|
|
88
|
+
n.id = e, n.querySelectorAll("path, circle, line").forEach((e) => {
|
|
89
|
+
e.setAttribute("stroke", s), c.fill && e.setAttribute("fill", s);
|
|
90
|
+
}), t.parentNode?.appendChild(n);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
t.attr(`marker-${n}`, `url(${i}#${e})`);
|
|
94
|
+
} else t.attr(`marker-${n}`, `url(${i}#${l})`);
|
|
95
|
+
}, "addEdgeMarker"), te = /* @__PURE__ */ t((e) => typeof e == "string" ? e : g()?.flowchart?.curve, "resolveEdgeCurveType"), j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ t(() => {
|
|
96
|
+
j.clear(), M.clear();
|
|
97
|
+
}, "clear"), P = /* @__PURE__ */ t((e) => e ? typeof e == "string" ? e : e.reduce((e, t) => e + ";" + t, "") : "", "getLabelStyles"), F = /* @__PURE__ */ t(async (t, r) => {
|
|
98
|
+
let i = g(), a = _(i), { labelStyles: o } = T(r);
|
|
99
|
+
r.labelStyle = o;
|
|
100
|
+
let s = t.insert("g").attr("class", "edgeLabel"), c = s.insert("g").attr("class", "label").attr("data-id", r.id), l = r.labelType === "markdown", u = await y(t, r.label, {
|
|
101
|
+
style: P(r.labelStyle),
|
|
102
|
+
useHtmlLabels: a,
|
|
103
|
+
addSvgBackground: !0,
|
|
104
|
+
isNode: !1,
|
|
105
|
+
markdown: l,
|
|
106
|
+
width: void 0
|
|
107
|
+
}, i);
|
|
108
|
+
c.node().appendChild(u), e.info("abc82", r, r.labelType);
|
|
109
|
+
let d = u.getBBox(), f = d;
|
|
110
|
+
if (a) {
|
|
111
|
+
let e = u.children[0], t = n(u);
|
|
112
|
+
d = e.getBoundingClientRect(), f = d, t.attr("width", d.width), t.attr("height", d.height);
|
|
113
|
+
} else {
|
|
114
|
+
let e = n(u).select("text").node();
|
|
115
|
+
e && typeof e.getBBox == "function" && (f = e.getBBox());
|
|
116
|
+
}
|
|
117
|
+
c.attr("transform", C(f, a)), j.set(r.id, s), r.width = d.width, r.height = d.height;
|
|
118
|
+
let p;
|
|
119
|
+
if (r.startLabelLeft) {
|
|
120
|
+
let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.startLabelLeft, P(r.labelStyle) || "", !1, !1);
|
|
121
|
+
p = o;
|
|
122
|
+
let s = o.getBBox();
|
|
123
|
+
if (a) {
|
|
124
|
+
let e = o.children[0], t = n(o);
|
|
125
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
126
|
+
}
|
|
127
|
+
i.attr("transform", C(s, a)), M.get(r.id) || M.set(r.id, {}), M.get(r.id).startLeft = e, I(p, r.startLabelLeft);
|
|
128
|
+
}
|
|
129
|
+
if (r.startLabelRight) {
|
|
130
|
+
let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.startLabelRight, P(r.labelStyle) || "", !1, !1);
|
|
131
|
+
p = o, i.node().appendChild(o);
|
|
132
|
+
let s = o.getBBox();
|
|
133
|
+
if (a) {
|
|
134
|
+
let e = o.children[0], t = n(o);
|
|
135
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
136
|
+
}
|
|
137
|
+
i.attr("transform", C(s, a)), M.get(r.id) || M.set(r.id, {}), M.get(r.id).startRight = e, I(p, r.startLabelRight);
|
|
138
|
+
}
|
|
139
|
+
if (r.endLabelLeft) {
|
|
140
|
+
let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.endLabelLeft, P(r.labelStyle) || "", !1, !1);
|
|
141
|
+
p = o;
|
|
142
|
+
let s = o.getBBox();
|
|
143
|
+
if (a) {
|
|
144
|
+
let e = o.children[0], t = n(o);
|
|
145
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
146
|
+
}
|
|
147
|
+
i.attr("transform", C(s, a)), e.node().appendChild(o), M.get(r.id) || M.set(r.id, {}), M.get(r.id).endLeft = e, I(p, r.endLabelLeft);
|
|
148
|
+
}
|
|
149
|
+
if (r.endLabelRight) {
|
|
150
|
+
let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.endLabelRight, P(r.labelStyle) || "", !1, !1);
|
|
151
|
+
p = o;
|
|
152
|
+
let s = o.getBBox();
|
|
153
|
+
if (a) {
|
|
154
|
+
let e = o.children[0], t = n(o);
|
|
155
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
156
|
+
}
|
|
157
|
+
i.attr("transform", C(s, a)), e.node().appendChild(o), M.get(r.id) || M.set(r.id, {}), M.get(r.id).endRight = e, I(p, r.endLabelRight);
|
|
158
|
+
}
|
|
159
|
+
return u;
|
|
160
|
+
}, "insertEdgeLabel");
|
|
161
|
+
function I(e, t) {
|
|
162
|
+
_(g()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
163
|
+
}
|
|
164
|
+
t(I, "setTerminalWidth");
|
|
165
|
+
var L = /* @__PURE__ */ t((t, n) => {
|
|
166
|
+
e.debug("Moving label abc88 ", t.id, t.label, j.get(t.id), n);
|
|
167
|
+
let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = w(g());
|
|
168
|
+
if (t.label) {
|
|
169
|
+
let a = j.get(t.id), o = t.x, s = t.y;
|
|
170
|
+
if (r) {
|
|
171
|
+
let i = d.calcLabelPosition(r);
|
|
172
|
+
e.debug("Moving label " + t.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (o = i.x, s = i.y);
|
|
173
|
+
}
|
|
174
|
+
a.attr("transform", `translate(${o}, ${s + i / 2})`);
|
|
175
|
+
}
|
|
176
|
+
if (t.startLabelLeft) {
|
|
177
|
+
let e = M.get(t.id).startLeft, n = t.x, i = t.y;
|
|
178
|
+
if (r) {
|
|
179
|
+
let e = d.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
|
|
180
|
+
n = e.x, i = e.y;
|
|
181
|
+
}
|
|
182
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
183
|
+
}
|
|
184
|
+
if (t.startLabelRight) {
|
|
185
|
+
let e = M.get(t.id).startRight, n = t.x, i = t.y;
|
|
186
|
+
if (r) {
|
|
187
|
+
let e = d.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", r);
|
|
188
|
+
n = e.x, i = e.y;
|
|
189
|
+
}
|
|
190
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
191
|
+
}
|
|
192
|
+
if (t.endLabelLeft) {
|
|
193
|
+
let e = M.get(t.id).endLeft, n = t.x, i = t.y;
|
|
194
|
+
if (r) {
|
|
195
|
+
let e = d.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
|
|
196
|
+
n = e.x, i = e.y;
|
|
197
|
+
}
|
|
198
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
199
|
+
}
|
|
200
|
+
if (t.endLabelRight) {
|
|
201
|
+
let e = M.get(t.id).endRight, n = t.x, i = t.y;
|
|
202
|
+
if (r) {
|
|
203
|
+
let e = d.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
|
|
204
|
+
n = e.x, i = e.y;
|
|
205
|
+
}
|
|
206
|
+
e.attr("transform", `translate(${n}, ${i})`);
|
|
207
|
+
}
|
|
208
|
+
}, "positionEdgeLabel"), R = /* @__PURE__ */ t((e, t) => {
|
|
209
|
+
let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
|
|
210
|
+
return i >= o || a >= s;
|
|
211
|
+
}, "outsideNode"), z = /* @__PURE__ */ t((t, n, r) => {
|
|
212
|
+
e.debug(`intersection calc abc89:
|
|
213
|
+
outsidePoint: ${JSON.stringify(n)}
|
|
214
|
+
insidePoint : ${JSON.stringify(r)}
|
|
215
|
+
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
|
|
216
|
+
let i = t.x, a = t.y, o = Math.abs(i - r.x), s = t.width / 2, c = r.x < n.x ? s - o : s + o, l = t.height / 2, u = Math.abs(n.y - r.y), d = Math.abs(n.x - r.x);
|
|
217
|
+
if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
|
|
218
|
+
let t = r.y < n.y ? n.y - l - a : a - l - n.y;
|
|
219
|
+
c = d * t / u;
|
|
220
|
+
let i = {
|
|
221
|
+
x: r.x < n.x ? r.x + c : r.x - d + c,
|
|
222
|
+
y: r.y < n.y ? r.y + u - t : r.y - u + t
|
|
223
|
+
};
|
|
224
|
+
return c === 0 && (i.x = n.x, i.y = n.y), d === 0 && (i.x = n.x), u === 0 && (i.y = n.y), e.debug(`abc89 top/bottom calc, Q ${u}, q ${t}, R ${d}, r ${c}`, i), i;
|
|
225
|
+
} else {
|
|
226
|
+
c = r.x < n.x ? n.x - s - i : i - s - n.x;
|
|
227
|
+
let t = u * c / d, a = r.x < n.x ? r.x + d - c : r.x - d + c, o = r.y < n.y ? r.y + t : r.y - t;
|
|
228
|
+
return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`, {
|
|
229
|
+
_x: a,
|
|
230
|
+
_y: o
|
|
231
|
+
}), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
|
|
232
|
+
x: a,
|
|
233
|
+
y: o
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}, "intersection"), B = /* @__PURE__ */ t((t, n) => {
|
|
237
|
+
e.warn("abc88 cutPathAtIntersect", t, n);
|
|
238
|
+
let r = [], i = t[0], a = !1;
|
|
239
|
+
return t.forEach((t) => {
|
|
240
|
+
if (e.info("abc88 checking point", t, n), !R(n, t) && !a) {
|
|
241
|
+
let o = z(n, i, t);
|
|
242
|
+
e.debug("abc88 inside", t, i, o), e.debug("abc88 intersection", o, n);
|
|
243
|
+
let s = !1;
|
|
244
|
+
r.forEach((e) => {
|
|
245
|
+
s ||= e.x === o.x && e.y === o.y;
|
|
246
|
+
}), r.some((e) => e.x === o.x && e.y === o.y) ? e.warn("abc88 no intersect", o, r) : r.push(o), a = !0;
|
|
247
|
+
} else e.warn("abc88 outside", t, i), i = t, a || r.push(t);
|
|
248
|
+
}), e.debug("returning points", r), r;
|
|
249
|
+
}, "cutPathAtIntersect");
|
|
250
|
+
function V(e) {
|
|
251
|
+
let t = [], n = [];
|
|
252
|
+
for (let r = 1; r < e.length - 1; r++) {
|
|
253
|
+
let i = e[r - 1], a = e[r], o = e[r + 1];
|
|
254
|
+
(i.x === a.x && a.y === o.y && Math.abs(a.x - o.x) > 5 && Math.abs(a.y - i.y) > 5 || i.y === a.y && a.x === o.x && Math.abs(a.x - i.x) > 5 && Math.abs(a.y - o.y) > 5) && (t.push(a), n.push(r));
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
cornerPoints: t,
|
|
258
|
+
cornerPointPositions: n
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
t(V, "extractCornerPoints");
|
|
262
|
+
var H = /* @__PURE__ */ t(function(e, t, n) {
|
|
263
|
+
let r = t.x - e.x, i = t.y - e.y, a = n / Math.sqrt(r * r + i * i);
|
|
264
|
+
return {
|
|
265
|
+
x: t.x - a * r,
|
|
266
|
+
y: t.y - a * i
|
|
267
|
+
};
|
|
268
|
+
}, "findAdjacentPoint"), ne = /* @__PURE__ */ t(function(t) {
|
|
269
|
+
let { cornerPointPositions: n } = V(t), r = [];
|
|
270
|
+
for (let i = 0; i < t.length; i++) if (n.includes(i)) {
|
|
271
|
+
let n = t[i - 1], a = t[i + 1], o = t[i], s = H(n, o, 5), c = H(a, o, 5), l = c.x - s.x, u = c.y - s.y;
|
|
272
|
+
r.push(s);
|
|
273
|
+
let d = Math.sqrt(2) * 2, f = {
|
|
274
|
+
x: o.x,
|
|
275
|
+
y: o.y
|
|
276
|
+
};
|
|
277
|
+
Math.abs(a.x - n.x) > 10 && Math.abs(a.y - n.y) >= 10 ? (e.debug("Corner point fixing", Math.abs(a.x - n.x), Math.abs(a.y - n.y)), f = o.x === s.x ? {
|
|
278
|
+
x: l < 0 ? s.x - 5 + d : s.x + 5 - d,
|
|
279
|
+
y: u < 0 ? s.y - d : s.y + d
|
|
280
|
+
} : {
|
|
281
|
+
x: l < 0 ? s.x - d : s.x + d,
|
|
282
|
+
y: u < 0 ? s.y - 5 + d : s.y + 5 - d
|
|
283
|
+
}) : e.debug("Corner point skipping fixing", Math.abs(a.x - n.x), Math.abs(a.y - n.y)), r.push(f, c);
|
|
284
|
+
} else r.push(t[i]);
|
|
285
|
+
return r;
|
|
286
|
+
}, "fixCorners"), re = /* @__PURE__ */ t((e, t, n) => {
|
|
287
|
+
let r = e - t - n, i = Math.floor(r / 4);
|
|
288
|
+
return `0 ${t} ${Array(i).fill("2 2").join(" ")} ${n}`;
|
|
289
|
+
}, "generateDashArray"), U = /* @__PURE__ */ t(function(t, _, y, S, C, w, T, O = !1) {
|
|
290
|
+
let { handDrawnSeed: k } = g(), A = _.points, j = !1, M = C;
|
|
291
|
+
var N = w;
|
|
292
|
+
let P = [];
|
|
293
|
+
for (let e in _.cssCompiledStyles) E(e) || P.push(_.cssCompiledStyles[e]);
|
|
294
|
+
e.debug("UIO intersect check", _.points, N.x, M.x), N.intersect && M.intersect && !O && (A = A.slice(1, _.points.length - 1), A.unshift(M.intersect(A[0])), e.debug("Last point UIO", _.start, "-->", _.end, A[A.length - 1], N, N.intersect(A[A.length - 1])), A.push(N.intersect(A[A.length - 1])));
|
|
295
|
+
let F = btoa(JSON.stringify(A));
|
|
296
|
+
_.toCluster && (e.info("to cluster abc88", y.get(_.toCluster)), A = B(_.points, y.get(_.toCluster).node), j = !0), _.fromCluster && (e.debug("from cluster abc88", y.get(_.fromCluster), JSON.stringify(A, null, 2)), A = B(A.reverse(), y.get(_.fromCluster).node).reverse(), j = !0);
|
|
297
|
+
let I = A.filter((e) => !Number.isNaN(e.y)), L = te(_.curve);
|
|
298
|
+
L !== "rounded" && (I = ne(I));
|
|
299
|
+
let R = o;
|
|
300
|
+
switch (L) {
|
|
301
|
+
case "linear":
|
|
302
|
+
R = o;
|
|
303
|
+
break;
|
|
304
|
+
case "basis":
|
|
305
|
+
R = c;
|
|
306
|
+
break;
|
|
307
|
+
case "cardinal":
|
|
308
|
+
R = p;
|
|
309
|
+
break;
|
|
310
|
+
case "bumpX":
|
|
311
|
+
R = a;
|
|
312
|
+
break;
|
|
313
|
+
case "bumpY":
|
|
314
|
+
R = i;
|
|
315
|
+
break;
|
|
316
|
+
case "catmullRom":
|
|
317
|
+
R = r;
|
|
318
|
+
break;
|
|
319
|
+
case "monotoneX":
|
|
320
|
+
R = m;
|
|
321
|
+
break;
|
|
322
|
+
case "monotoneY":
|
|
323
|
+
R = s;
|
|
324
|
+
break;
|
|
325
|
+
case "natural":
|
|
326
|
+
R = u;
|
|
327
|
+
break;
|
|
328
|
+
case "step":
|
|
329
|
+
R = h;
|
|
330
|
+
break;
|
|
331
|
+
case "stepAfter":
|
|
332
|
+
R = l;
|
|
333
|
+
break;
|
|
334
|
+
case "stepBefore":
|
|
335
|
+
R = f;
|
|
336
|
+
break;
|
|
337
|
+
case "rounded":
|
|
338
|
+
R = o;
|
|
339
|
+
break;
|
|
340
|
+
default: R = c;
|
|
341
|
+
}
|
|
342
|
+
let { x: z, y: V } = x(_), H = v().x(z).y(V).curve(R), U;
|
|
343
|
+
switch (_.thickness) {
|
|
344
|
+
case "normal":
|
|
345
|
+
U = "edge-thickness-normal";
|
|
346
|
+
break;
|
|
347
|
+
case "thick":
|
|
348
|
+
U = "edge-thickness-thick";
|
|
349
|
+
break;
|
|
350
|
+
case "invisible":
|
|
351
|
+
U = "edge-thickness-invisible";
|
|
352
|
+
break;
|
|
353
|
+
default: U = "edge-thickness-normal";
|
|
354
|
+
}
|
|
355
|
+
switch (_.pattern) {
|
|
356
|
+
case "solid":
|
|
357
|
+
U += " edge-pattern-solid";
|
|
358
|
+
break;
|
|
359
|
+
case "dotted":
|
|
360
|
+
U += " edge-pattern-dotted";
|
|
361
|
+
break;
|
|
362
|
+
case "dashed":
|
|
363
|
+
U += " edge-pattern-dashed";
|
|
364
|
+
break;
|
|
365
|
+
default: U += " edge-pattern-solid";
|
|
366
|
+
}
|
|
367
|
+
let G, q = L === "rounded" ? W(K(I, _), 5) : H(I), J = Array.isArray(_.style) ? _.style : [_.style], Y = J.find((e) => e?.startsWith("stroke:")), X = "";
|
|
368
|
+
_.animate && (X = "edge-animation-fast"), _.animation && (X = "edge-animation-" + _.animation);
|
|
369
|
+
let Z = !1;
|
|
370
|
+
if (_.look === "handDrawn") {
|
|
371
|
+
let e = D.svg(t);
|
|
372
|
+
Object.assign([], I);
|
|
373
|
+
let r = e.path(q, {
|
|
374
|
+
roughness: .3,
|
|
375
|
+
seed: k
|
|
376
|
+
});
|
|
377
|
+
U += " transition", G = n(r).select("path").attr("id", _.id).attr("class", " " + U + (_.classes ? " " + _.classes : "") + (X ? " " + X : "")).attr("style", J ? J.reduce((e, t) => e + ";" + t, "") : "");
|
|
378
|
+
let i = G.attr("d");
|
|
379
|
+
G.attr("d", i), t.node().appendChild(G.node());
|
|
380
|
+
} else {
|
|
381
|
+
let e = P.join(";"), n = J ? J.reduce((e, t) => e + t + ";", "") : "", r = (e ? e + ";" + n + ";" : n) + ";" + (J ? J.reduce((e, t) => e + ";" + t, "") : "");
|
|
382
|
+
G = t.append("path").attr("d", q).attr("id", _.id).attr("class", " " + U + (_.classes ? " " + _.classes : "") + (X ? " " + X : "")).attr("style", r), Y = r.match(/stroke:([^;]+)/)?.[1], Z = _.animate === !0 || !!_.animation || e.includes("animation");
|
|
383
|
+
let i = G.node(), a = typeof i.getTotalLength == "function" ? i.getTotalLength() : 0, o = b[_.arrowTypeStart] || 0, s = b[_.arrowTypeEnd] || 0;
|
|
384
|
+
if (_.look === "neo" && !Z) {
|
|
385
|
+
let e = `stroke-dasharray: ${_.pattern === "dotted" || _.pattern === "dashed" ? re(a, o, s) : `0 ${o} ${a - o - s} ${s}`}; stroke-dashoffset: 0;`;
|
|
386
|
+
G.attr("style", e + G.attr("style"));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
G.attr("data-edge", !0), G.attr("data-et", "edge"), G.attr("data-id", _.id), G.attr("data-points", F), _.showPoints && I.forEach((e) => {
|
|
390
|
+
t.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", e.x).attr("cy", e.y);
|
|
391
|
+
});
|
|
392
|
+
let Q = "";
|
|
393
|
+
(g().flowchart.arrowMarkerAbsolute || g().state.arrowMarkerAbsolute) && (Q = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Q = Q.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), e.info("arrowTypeStart", _.arrowTypeStart), e.info("arrowTypeEnd", _.arrowTypeEnd), ee(G, _, Q, T, S, Y);
|
|
394
|
+
let ie = Math.floor(A.length / 2), ae = A[ie];
|
|
395
|
+
d.isLabelCoordinateInPath(ae, G.attr("d")) || (j = !0);
|
|
396
|
+
let $ = {};
|
|
397
|
+
return j && ($.updatedPath = A), $.originalPath = _.points, $;
|
|
398
|
+
}, "insertEdge");
|
|
399
|
+
function W(e, t) {
|
|
400
|
+
if (e.length < 2) return "";
|
|
401
|
+
let n = "", r = e.length, i = 1e-5;
|
|
402
|
+
for (let a = 0; a < r; a++) {
|
|
403
|
+
let o = e[a], s = e[a - 1], c = e[a + 1];
|
|
404
|
+
if (a === 0) n += `M${o.x},${o.y}`;
|
|
405
|
+
else if (a === r - 1) n += `L${o.x},${o.y}`;
|
|
406
|
+
else {
|
|
407
|
+
let e = o.x - s.x, r = o.y - s.y, a = c.x - o.x, l = c.y - o.y, u = Math.hypot(e, r), d = Math.hypot(a, l);
|
|
408
|
+
if (u < i || d < i) {
|
|
409
|
+
n += `L${o.x},${o.y}`;
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
let f = e / u, p = r / u, m = a / d, h = l / d, g = f * m + p * h, _ = Math.acos(Math.max(-1, Math.min(1, g)));
|
|
413
|
+
if (_ < i || Math.abs(Math.PI - _) < i) {
|
|
414
|
+
n += `L${o.x},${o.y}`;
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
let v = Math.min(t / Math.sin(_ / 2), u / 2, d / 2), y = o.x - f * v, b = o.y - p * v, x = o.x + m * v, S = o.y + h * v;
|
|
418
|
+
n += `L${y},${b}`, n += `Q${o.x},${o.y} ${x},${S}`;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
return n;
|
|
422
|
+
}
|
|
423
|
+
t(W, "generateRoundedPath");
|
|
424
|
+
function G(e, t) {
|
|
425
|
+
if (!e || !t) return {
|
|
426
|
+
angle: 0,
|
|
427
|
+
deltaX: 0,
|
|
428
|
+
deltaY: 0
|
|
429
|
+
};
|
|
430
|
+
let n = t.x - e.x, r = t.y - e.y;
|
|
431
|
+
return {
|
|
432
|
+
angle: Math.atan2(r, n),
|
|
433
|
+
deltaX: n,
|
|
434
|
+
deltaY: r
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
t(G, "calculateDeltaAndAngle");
|
|
438
|
+
function K(e, t) {
|
|
439
|
+
let n = e.map((e) => ({ ...e }));
|
|
440
|
+
if (e.length >= 2 && S[t.arrowTypeStart]) {
|
|
441
|
+
let r = S[t.arrowTypeStart], i = e[0], a = e[1], { angle: o } = G(i, a), s = r * Math.cos(o), c = r * Math.sin(o);
|
|
442
|
+
n[0].x = i.x + s, n[0].y = i.y + c;
|
|
443
|
+
}
|
|
444
|
+
let r = e.length;
|
|
445
|
+
if (r >= 2 && S[t.arrowTypeEnd]) {
|
|
446
|
+
let i = S[t.arrowTypeEnd], a = e[r - 1], o = e[r - 2], { angle: s } = G(o, a), c = i * Math.cos(s), l = i * Math.sin(s);
|
|
447
|
+
n[r - 1].x = a.x - c, n[r - 1].y = a.y - l;
|
|
448
|
+
}
|
|
449
|
+
return n;
|
|
450
|
+
}
|
|
451
|
+
t(K, "applyMarkerOffsetsToPoints");
|
|
452
|
+
var q = /* @__PURE__ */ t((e, t, n, r) => {
|
|
453
|
+
t.forEach((t) => {
|
|
454
|
+
J[t](e, n, r);
|
|
455
|
+
});
|
|
456
|
+
}, "insertMarkers"), J = {
|
|
457
|
+
extension: /* @__PURE__ */ t((t, n, r) => {
|
|
458
|
+
e.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionStart").attr("class", "marker extension " + n).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionEnd").attr("class", "marker extension " + n).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
459
|
+
}, "extension"),
|
|
460
|
+
composition: /* @__PURE__ */ t((e, t, n) => {
|
|
461
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
462
|
+
}, "composition"),
|
|
463
|
+
aggregation: /* @__PURE__ */ t((e, t, n) => {
|
|
464
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
465
|
+
}, "aggregation"),
|
|
466
|
+
dependency: /* @__PURE__ */ t((e, t, n) => {
|
|
467
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
468
|
+
}, "dependency"),
|
|
469
|
+
lollipop: /* @__PURE__ */ t((e, t, n) => {
|
|
470
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
471
|
+
}, "lollipop"),
|
|
472
|
+
point: /* @__PURE__ */ t((e, t, n) => {
|
|
473
|
+
e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
474
|
+
}, "point"),
|
|
475
|
+
circle: /* @__PURE__ */ t((e, t, n) => {
|
|
476
|
+
e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
477
|
+
}, "circle"),
|
|
478
|
+
cross: /* @__PURE__ */ t((e, t, n) => {
|
|
479
|
+
e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
480
|
+
}, "cross"),
|
|
481
|
+
barb: /* @__PURE__ */ t((e, t, n) => {
|
|
482
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
483
|
+
}, "barb"),
|
|
484
|
+
only_one: /* @__PURE__ */ t((e, t, n) => {
|
|
485
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-onlyOneStart").attr("class", "marker onlyOne " + t).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18"), e.append("defs").append("marker").attr("id", n + "_" + t + "-onlyOneEnd").attr("class", "marker onlyOne " + t).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
|
|
486
|
+
}, "only_one"),
|
|
487
|
+
zero_or_one: /* @__PURE__ */ t((e, t, n) => {
|
|
488
|
+
let r = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + t).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
489
|
+
r.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("d", "M9,0 L9,18");
|
|
490
|
+
let i = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + t).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
491
|
+
i.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), i.append("path").attr("d", "M21,0 L21,18");
|
|
492
|
+
}, "zero_or_one"),
|
|
493
|
+
one_or_more: /* @__PURE__ */ t((e, t, n) => {
|
|
494
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-oneOrMoreStart").attr("class", "marker oneOrMore " + t).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), e.append("defs").append("marker").attr("id", n + "_" + t + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + t).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
|
|
495
|
+
}, "one_or_more"),
|
|
496
|
+
zero_or_more: /* @__PURE__ */ t((e, t, n) => {
|
|
497
|
+
let r = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + t).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
498
|
+
r.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
|
|
499
|
+
let i = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + t).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
500
|
+
i.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), i.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
|
|
501
|
+
}, "zero_or_more"),
|
|
502
|
+
requirement_arrow: /* @__PURE__ */ t((e, t, n) => {
|
|
503
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20");
|
|
504
|
+
}, "requirement_arrow"),
|
|
505
|
+
requirement_contains: /* @__PURE__ */ t((e, t, n) => {
|
|
506
|
+
let r = e.append("defs").append("marker").attr("id", n + "_" + t + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
|
|
507
|
+
r.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), r.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), r.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
|
|
508
|
+
}, "requirement_contains")
|
|
509
|
+
}, Y = q;
|
|
510
|
+
//#endregion
|
|
511
|
+
export { L as a, Y as i, U as n, F as r, N as t };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, m as i, n as a, p as o, s, t as c } from "./chunk-XZSTWKYB-k8_EXrSa.js";
|
|
2
|
+
//#region ../../node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-OZEHJAEY.mjs
|
|
3
|
+
var l = class extends c {
|
|
4
|
+
static {
|
|
5
|
+
t(this, "TreemapTokenBuilder");
|
|
6
|
+
}
|
|
7
|
+
constructor() {
|
|
8
|
+
super(["treemap"]);
|
|
9
|
+
}
|
|
10
|
+
}, u = /classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/, d = class extends a {
|
|
11
|
+
static {
|
|
12
|
+
t(this, "TreemapValueConverter");
|
|
13
|
+
}
|
|
14
|
+
runCustomConverter(e, t, n) {
|
|
15
|
+
if (e.name === "NUMBER2") return parseFloat(t.replace(/,/g, ""));
|
|
16
|
+
if (e.name === "SEPARATOR" || e.name === "STRING2") return t.substring(1, t.length - 1);
|
|
17
|
+
if (e.name === "INDENTATION") return t.length;
|
|
18
|
+
if (e.name === "ClassDef") {
|
|
19
|
+
if (typeof t != "string") return t;
|
|
20
|
+
let e = u.exec(t);
|
|
21
|
+
if (e) return {
|
|
22
|
+
$type: "ClassDefStatement",
|
|
23
|
+
className: e[1],
|
|
24
|
+
styleText: e[2] || void 0
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
function f(e) {
|
|
30
|
+
let t = e.validation.TreemapValidator, n = e.validation.ValidationRegistry;
|
|
31
|
+
if (n) {
|
|
32
|
+
let e = { Treemap: t.checkSingleRoot.bind(t) };
|
|
33
|
+
n.register(e, t);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
t(f, "registerValidationChecks");
|
|
37
|
+
var p = class {
|
|
38
|
+
static {
|
|
39
|
+
t(this, "TreemapValidator");
|
|
40
|
+
}
|
|
41
|
+
checkSingleRoot(e, t) {
|
|
42
|
+
let n;
|
|
43
|
+
for (let r of e.TreemapRows) r.item && (n === void 0 && r.indent === void 0 ? n = 0 : (r.indent === void 0 || n !== void 0 && n >= parseInt(r.indent, 10)) && t("error", "Multiple root nodes are not allowed in a treemap.", {
|
|
44
|
+
node: r,
|
|
45
|
+
property: "item"
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}, m = {
|
|
49
|
+
parser: {
|
|
50
|
+
TokenBuilder: /* @__PURE__ */ t(() => new l(), "TokenBuilder"),
|
|
51
|
+
ValueConverter: /* @__PURE__ */ t(() => new d(), "ValueConverter")
|
|
52
|
+
},
|
|
53
|
+
validation: { TreemapValidator: /* @__PURE__ */ t(() => new p(), "TreemapValidator") }
|
|
54
|
+
};
|
|
55
|
+
function h(t = o) {
|
|
56
|
+
let a = i(n(t), s), c = i(r({ shared: a }), e, m);
|
|
57
|
+
return a.ServiceRegistry.register(c), f(c), {
|
|
58
|
+
shared: a,
|
|
59
|
+
Treemap: c
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
t(h, "createTreemapServices");
|
|
63
|
+
//#endregion
|
|
64
|
+
export { h as n, m as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { h as e } from "./src-BukXhifV.js";
|
|
2
|
+
import { b as t } from "./chunk-7R4GIKGN-DuTRhdsf.js";
|
|
3
|
+
//#region ../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-PQ6SQG4A.mjs
|
|
4
|
+
var n = /* @__PURE__ */ e((e) => {
|
|
5
|
+
let { handDrawnSeed: n } = t();
|
|
6
|
+
return {
|
|
7
|
+
fill: e,
|
|
8
|
+
hachureAngle: 120,
|
|
9
|
+
hachureGap: 4,
|
|
10
|
+
fillWeight: 2,
|
|
11
|
+
roughness: .7,
|
|
12
|
+
stroke: e,
|
|
13
|
+
seed: n
|
|
14
|
+
};
|
|
15
|
+
}, "solidStateFill"), r = /* @__PURE__ */ e((e) => {
|
|
16
|
+
let t = i([
|
|
17
|
+
...e.cssCompiledStyles || [],
|
|
18
|
+
...e.cssStyles || [],
|
|
19
|
+
...e.labelStyle || []
|
|
20
|
+
]);
|
|
21
|
+
return {
|
|
22
|
+
stylesMap: t,
|
|
23
|
+
stylesArray: [...t]
|
|
24
|
+
};
|
|
25
|
+
}, "compileStyles"), i = /* @__PURE__ */ e((e) => {
|
|
26
|
+
let t = /* @__PURE__ */ new Map();
|
|
27
|
+
return e.forEach((e) => {
|
|
28
|
+
let [n, r] = e.split(":");
|
|
29
|
+
t.set(n.trim(), r?.trim());
|
|
30
|
+
}), t;
|
|
31
|
+
}, "styles2Map"), a = /* @__PURE__ */ e((e) => e === "color" || e === "font-size" || e === "font-family" || e === "font-weight" || e === "font-style" || e === "text-decoration" || e === "text-align" || e === "text-transform" || e === "line-height" || e === "letter-spacing" || e === "word-spacing" || e === "text-shadow" || e === "text-overflow" || e === "white-space" || e === "word-wrap" || e === "word-break" || e === "overflow-wrap" || e === "hyphens", "isLabelStyle"), o = /* @__PURE__ */ e((e) => {
|
|
32
|
+
let { stylesArray: t } = r(e), n = [], i = [], o = [], s = [];
|
|
33
|
+
return t.forEach((e) => {
|
|
34
|
+
let t = e[0];
|
|
35
|
+
a(t) ? n.push(e.join(":") + " !important") : (i.push(e.join(":") + " !important"), t.includes("stroke") && o.push(e.join(":") + " !important"), t === "fill" && s.push(e.join(":") + " !important"));
|
|
36
|
+
}), {
|
|
37
|
+
labelStyles: n.join(";"),
|
|
38
|
+
nodeStyles: i.join(";"),
|
|
39
|
+
stylesArray: t,
|
|
40
|
+
borderStyles: o,
|
|
41
|
+
backgroundStyles: s
|
|
42
|
+
};
|
|
43
|
+
}, "styles2String"), s = /* @__PURE__ */ e((e, n) => {
|
|
44
|
+
let { themeVariables: i, handDrawnSeed: a } = t(), { nodeBorder: o, mainBkg: s } = i, { stylesMap: l } = r(e);
|
|
45
|
+
return Object.assign({
|
|
46
|
+
roughness: .7,
|
|
47
|
+
fill: l.get("fill") || s,
|
|
48
|
+
fillStyle: "hachure",
|
|
49
|
+
fillWeight: 4,
|
|
50
|
+
hachureGap: 5.2,
|
|
51
|
+
stroke: l.get("stroke") || o,
|
|
52
|
+
seed: a,
|
|
53
|
+
strokeWidth: l.get("stroke-width")?.replace("px", "") || 1.3,
|
|
54
|
+
fillLineDash: [0, 0],
|
|
55
|
+
strokeLineDash: c(l.get("stroke-dasharray"))
|
|
56
|
+
}, n);
|
|
57
|
+
}, "userNodeOverrides"), c = /* @__PURE__ */ e((e) => {
|
|
58
|
+
if (!e) return [0, 0];
|
|
59
|
+
let t = e.trim().split(/\s+/).map(Number);
|
|
60
|
+
if (t.length === 1) {
|
|
61
|
+
let e = isNaN(t[0]) ? 0 : t[0];
|
|
62
|
+
return [e, e];
|
|
63
|
+
}
|
|
64
|
+
return [isNaN(t[0]) ? 0 : t[0], isNaN(t[1]) ? 0 : t[1]];
|
|
65
|
+
}, "getStrokeDashArray");
|
|
66
|
+
//#endregion
|
|
67
|
+
export { s as a, o as i, a as n, n as r, r as t };
|