@zjlab-frontier/markdown 1.2.6 → 1.2.8
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/_basePickBy-BKSBQzQ_.mjs +151 -0
- package/dist/_baseUniq-C5o5iO5w.mjs +614 -0
- package/dist/arc-CBfSUzPA.mjs +83 -0
- package/dist/architecture-U656AL7Q-BnMV_JKl.mjs +5 -0
- package/dist/architectureDiagram-VXUJARFQ-D2XPETMC.mjs +4661 -0
- package/dist/blockDiagram-VD42YOAC-DUECz_lY.mjs +2261 -0
- package/dist/{c4Diagram-c83219d4-DPiPzMng.mjs → c4Diagram-YG6GDRKO-CFmlTOHZ.mjs} +795 -794
- package/dist/{channel-DLtPd-ti.mjs → channel-Cn_QU-_B.mjs} +1 -1
- package/dist/chunk-4BX2VUAB-Ddlc-PTG.mjs +8 -0
- package/dist/chunk-55IACEB6-3bItwaWC.mjs +8 -0
- package/dist/chunk-B4BG7PRW-fzrbCD9m.mjs +1375 -0
- package/dist/chunk-DI55MBZ5-BsM6MitH.mjs +1370 -0
- package/dist/chunk-FMBD7UC4-D0L58RDY.mjs +19 -0
- package/dist/chunk-QN33PNHL-BRwIp2MO.mjs +19 -0
- package/dist/chunk-QZHKN3VN-3WK04u4j.mjs +15 -0
- package/dist/chunk-TZMSLE5B-QppC8KMb.mjs +64 -0
- package/dist/classDiagram-2ON5EDUG-DV1NEn5N.mjs +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-DV1NEn5N.mjs +16 -0
- package/dist/{clone-Bekeo3TW.mjs → clone-BqweF2qi.mjs} +1 -1
- package/dist/cose-bilkent-S5V4N54A-v0swiza8.mjs +2608 -0
- package/dist/cytoscape.esm-MSgpKP8s.mjs +18721 -0
- package/dist/dagre-6UL2VRFP-BAviPdlZ.mjs +444 -0
- package/dist/defaultLocale-D7EN2tov.mjs +171 -0
- package/dist/diagram-PSM6KHXK-CfFtF0lE.mjs +531 -0
- package/dist/diagram-QEK2KX5R-CTU-B7VS.mjs +217 -0
- package/dist/diagram-S2PKOQOG-jCY9Tumq.mjs +142 -0
- package/dist/erDiagram-Q2GNP2WA-BcKQMz3F.mjs +841 -0
- package/dist/flowDiagram-NV44I4VS-udQXA0_8.mjs +1620 -0
- package/dist/ganttDiagram-JELNMOA3-Dk5PKr9Z.mjs +2670 -0
- package/dist/gitGraph-F6HP7TQM-DkwcvDhk.mjs +5 -0
- package/dist/gitGraphDiagram-NY62KEGX-DjJof2Hb.mjs +699 -0
- package/dist/graph-D-Tmz5vo.mjs +247 -0
- package/dist/{index-C3zgkbpi.mjs → index-CWsdn0Oh.mjs} +35928 -28717
- package/dist/index.es.js +4 -4
- package/dist/index.umd.js +1884 -1442
- package/dist/info-NVLQJR56-TpH_gM4H.mjs +5 -0
- package/dist/infoDiagram-WHAUD3N6-DrsD1lMt.mjs +24 -0
- package/dist/journeyDiagram-XKPGCS4Q-Cq5Y94aQ.mjs +834 -0
- package/dist/kanban-definition-3W4ZIXB7-BEiPA-13.mjs +719 -0
- package/dist/layout-QOTssOZa.mjs +1335 -0
- package/dist/linear-CCFzTlKw.mjs +259 -0
- package/dist/mermaid-parser.core-CSzOHvro.mjs +12966 -0
- package/dist/mindmap-definition-VGOIOE7T-ChH1RCzL.mjs +784 -0
- package/dist/packet-BFZMPI3H-RY9z3tXt.mjs +5 -0
- package/dist/pie-7BOR55EZ-DWSbWhsM.mjs +5 -0
- package/dist/pieDiagram-ADFJNKIX-CjvCGMnv.mjs +161 -0
- package/dist/quadrantDiagram-AYHSOK5B-yLMChKK1.mjs +1022 -0
- package/dist/radar-NHE76QYJ-DxZgeX1m.mjs +5 -0
- package/dist/requirementDiagram-UZGBJVZJ-D_Kv5PcV.mjs +850 -0
- package/dist/sankeyDiagram-TZEHDZUN-BT4gTtRH.mjs +810 -0
- package/dist/sequenceDiagram-WL72ISMW-CcZ0NGLk.mjs +2511 -0
- package/dist/stateDiagram-FKZM4ZOC-BpQhvfG2.mjs +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-X4ju2xD3.mjs +16 -0
- package/dist/timeline-definition-IT6M3QCI-mIpcHDXS.mjs +795 -0
- package/dist/treemap-KMMF4GRG-CTNebVlI.mjs +5 -0
- package/dist/{xychartDiagram-f5964ef8-fDv4mp1P.mjs → xychartDiagram-PRI3JC2R-DooouUUZ.mjs} +503 -445
- package/package.json +3 -3
- package/dist/Tableau10-D7jGxypv.mjs +0 -8
- package/dist/arc-DqrMsJeG.mjs +0 -84
- package/dist/array-CqVTtuYm.mjs +0 -6
- package/dist/blockDiagram-c4efeb88-B7Mcu3H_.mjs +0 -1221
- package/dist/classDiagram-beda092f-CRNvkLYf.mjs +0 -218
- package/dist/classDiagram-v2-2358418a-CUFy5DGQ.mjs +0 -200
- package/dist/createText-1719965b-BEXd6yNU.mjs +0 -2955
- package/dist/edges-96097737-CTds2HS2.mjs +0 -1088
- package/dist/erDiagram-0228fc6a-DdOqXYmJ.mjs +0 -929
- package/dist/flowDb-c6c81e3f-LkwBoeG_.mjs +0 -1126
- package/dist/flowDiagram-50d868cf-BlsvSXSO.mjs +0 -788
- package/dist/flowDiagram-v2-4f6560a1-KScjGHBx.mjs +0 -17
- package/dist/flowchart-elk-definition-6af322e1-mTna7kqR.mjs +0 -48146
- package/dist/ganttDiagram-a2739b55-B2o_UW9_.mjs +0 -2477
- package/dist/gitGraphDiagram-82fe8481-B6-VRPS0.mjs +0 -1264
- package/dist/graph-CSVeLFCJ.mjs +0 -847
- package/dist/index-5325376f-DsGv8AO4.mjs +0 -373
- package/dist/infoDiagram-8eee0895-Cx7V52QV.mjs +0 -319
- package/dist/journeyDiagram-c64418c1-C03IeVHa.mjs +0 -801
- package/dist/layout-DfnPfvJm.mjs +0 -1472
- package/dist/line-BwAWhs05.mjs +0 -33
- package/dist/linear-Ck_Qt8nI.mjs +0 -423
- package/dist/mindmap-definition-8da855dc-DdMLbjBy.mjs +0 -21922
- package/dist/path-DLwuMfdd.mjs +0 -84
- package/dist/pieDiagram-a8764435-BymSofHf.mjs +0 -500
- package/dist/quadrantDiagram-1e28029f-BXtW3eHp.mjs +0 -903
- package/dist/requirementDiagram-08caed73-DGBKyhE-.mjs +0 -767
- package/dist/sankeyDiagram-a04cb91d-BfUYRgG3.mjs +0 -802
- package/dist/sequenceDiagram-c5b8d532-Jj_1ttvV.mjs +0 -2234
- package/dist/stateDiagram-1ecb1508-CbSM9l6I.mjs +0 -266
- package/dist/stateDiagram-v2-c2b004d7-dS2KbqNc.mjs +0 -184
- package/dist/styles-b4e223ce-D01XEgS6.mjs +0 -1089
- package/dist/styles-ca3715f6-amZyw1GB.mjs +0 -960
- package/dist/styles-d45a18b0-GN33fYGn.mjs +0 -436
- package/dist/svgDrawCommon-b86b1483-BQvqkIEE.mjs +0 -64
- package/dist/timeline-definition-faaaa080-BjbyYT4p.mjs +0 -792
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import { i as N, G as A } from "./graph-CSVeLFCJ.mjs";
|
|
2
|
-
import { m as $, l as H } from "./layout-DfnPfvJm.mjs";
|
|
3
|
-
import { c as V } from "./clone-Bekeo3TW.mjs";
|
|
4
|
-
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-96097737-CTds2HS2.mjs";
|
|
5
|
-
import { l as s, g as T, r as S, d as L } from "./index-C3zgkbpi.mjs";
|
|
6
|
-
import { a as I } from "./createText-1719965b-BEXd6yNU.mjs";
|
|
7
|
-
function m(e) {
|
|
8
|
-
var t = {
|
|
9
|
-
options: {
|
|
10
|
-
directed: e.isDirected(),
|
|
11
|
-
multigraph: e.isMultigraph(),
|
|
12
|
-
compound: e.isCompound()
|
|
13
|
-
},
|
|
14
|
-
nodes: tt(e),
|
|
15
|
-
edges: et(e)
|
|
16
|
-
};
|
|
17
|
-
return N(e.graph()) || (t.value = V(e.graph())), t;
|
|
18
|
-
}
|
|
19
|
-
function tt(e) {
|
|
20
|
-
return $(e.nodes(), function(t) {
|
|
21
|
-
var n = e.node(t), r = e.parent(t), i = { v: t };
|
|
22
|
-
return N(n) || (i.value = n), N(r) || (i.parent = r), i;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function et(e) {
|
|
26
|
-
return $(e.edges(), function(t) {
|
|
27
|
-
var n = e.edge(t), r = { v: t.v, w: t.w };
|
|
28
|
-
return N(t.name) || (r.name = t.name), N(n) || (r.value = n), r;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
let l = {}, g = {}, R = {};
|
|
32
|
-
const nt = () => {
|
|
33
|
-
g = {}, R = {}, l = {};
|
|
34
|
-
}, B = (e, t) => (s.trace("In isDescendant", t, " ", e, " = ", g[t].includes(e)), !!g[t].includes(e)), it = (e, t) => (s.info("Descendants of ", t, " is ", g[t]), s.info("Edge is ", e), e.v === t || e.w === t ? !1 : g[t] ? g[t].includes(e.v) || B(e.v, t) || B(e.w, t) || g[t].includes(e.w) : (s.debug("Tilt, ", t, ",not in descendants"), !1)), P = (e, t, n, r) => {
|
|
35
|
-
s.warn(
|
|
36
|
-
"Copying children of ",
|
|
37
|
-
e,
|
|
38
|
-
"root",
|
|
39
|
-
r,
|
|
40
|
-
"data",
|
|
41
|
-
t.node(e),
|
|
42
|
-
r
|
|
43
|
-
);
|
|
44
|
-
const i = t.children(e) || [];
|
|
45
|
-
e !== r && i.push(e), s.warn("Copying (nodes) clusterId", e, "nodes", i), i.forEach((a) => {
|
|
46
|
-
if (t.children(a).length > 0)
|
|
47
|
-
P(a, t, n, r);
|
|
48
|
-
else {
|
|
49
|
-
const d = t.node(a);
|
|
50
|
-
s.info("cp ", a, " to ", r, " with parent ", e), n.setNode(a, d), r !== t.parent(a) && (s.warn("Setting parent", a, t.parent(a)), n.setParent(a, t.parent(a))), e !== r && a !== e ? (s.debug("Setting parent", a, e), n.setParent(a, e)) : (s.info("In copy ", e, "root", r, "data", t.node(e), r), s.debug(
|
|
51
|
-
"Not Setting parent for node=",
|
|
52
|
-
a,
|
|
53
|
-
"cluster!==rootId",
|
|
54
|
-
e !== r,
|
|
55
|
-
"node!==clusterId",
|
|
56
|
-
a !== e
|
|
57
|
-
));
|
|
58
|
-
const u = t.edges(a);
|
|
59
|
-
s.debug("Copying Edges", u), u.forEach((f) => {
|
|
60
|
-
s.info("Edge", f);
|
|
61
|
-
const h = t.edge(f.v, f.w, f.name);
|
|
62
|
-
s.info("Edge data", h, r);
|
|
63
|
-
try {
|
|
64
|
-
it(f, r) ? (s.info("Copying as ", f.v, f.w, h, f.name), n.setEdge(f.v, f.w, h, f.name), s.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : s.info(
|
|
65
|
-
"Skipping copy of edge ",
|
|
66
|
-
f.v,
|
|
67
|
-
"-->",
|
|
68
|
-
f.w,
|
|
69
|
-
" rootId: ",
|
|
70
|
-
r,
|
|
71
|
-
" clusterId:",
|
|
72
|
-
e
|
|
73
|
-
);
|
|
74
|
-
} catch (w) {
|
|
75
|
-
s.error(w);
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
s.debug("Removing node", a), t.removeNode(a);
|
|
80
|
-
});
|
|
81
|
-
}, k = (e, t) => {
|
|
82
|
-
const n = t.children(e);
|
|
83
|
-
let r = [...n];
|
|
84
|
-
for (const i of n)
|
|
85
|
-
R[i] = e, r = [...r, ...k(i, t)];
|
|
86
|
-
return r;
|
|
87
|
-
}, C = (e, t) => {
|
|
88
|
-
s.trace("Searching", e);
|
|
89
|
-
const n = t.children(e);
|
|
90
|
-
if (s.trace("Searching children of id ", e, n), n.length < 1)
|
|
91
|
-
return s.trace("This is a valid node", e), e;
|
|
92
|
-
for (const r of n) {
|
|
93
|
-
const i = C(r, t);
|
|
94
|
-
if (i)
|
|
95
|
-
return s.trace("Found replacement for", e, " => ", i), i;
|
|
96
|
-
}
|
|
97
|
-
}, X = (e) => !l[e] || !l[e].externalConnections ? e : l[e] ? l[e].id : e, st = (e, t) => {
|
|
98
|
-
if (!e || t > 10) {
|
|
99
|
-
s.debug("Opting out, no graph ");
|
|
100
|
-
return;
|
|
101
|
-
} else
|
|
102
|
-
s.debug("Opting in, graph ");
|
|
103
|
-
e.nodes().forEach(function(n) {
|
|
104
|
-
e.children(n).length > 0 && (s.warn(
|
|
105
|
-
"Cluster identified",
|
|
106
|
-
n,
|
|
107
|
-
" Replacement id in edges: ",
|
|
108
|
-
C(n, e)
|
|
109
|
-
), g[n] = k(n, e), l[n] = { id: C(n, e), clusterData: e.node(n) });
|
|
110
|
-
}), e.nodes().forEach(function(n) {
|
|
111
|
-
const r = e.children(n), i = e.edges();
|
|
112
|
-
r.length > 0 ? (s.debug("Cluster identified", n, g), i.forEach((a) => {
|
|
113
|
-
if (a.v !== n && a.w !== n) {
|
|
114
|
-
const d = B(a.v, n), u = B(a.w, n);
|
|
115
|
-
d ^ u && (s.warn("Edge: ", a, " leaves cluster ", n), s.warn("Descendants of XXX ", n, ": ", g[n]), l[n].externalConnections = !0);
|
|
116
|
-
}
|
|
117
|
-
})) : s.debug("Not a cluster ", n, g);
|
|
118
|
-
});
|
|
119
|
-
for (let n of Object.keys(l)) {
|
|
120
|
-
const r = l[n].id, i = e.parent(r);
|
|
121
|
-
i !== n && l[i] && !l[i].externalConnections && (l[n].id = i);
|
|
122
|
-
}
|
|
123
|
-
e.edges().forEach(function(n) {
|
|
124
|
-
const r = e.edge(n);
|
|
125
|
-
s.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), s.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
|
|
126
|
-
let i = n.v, a = n.w;
|
|
127
|
-
if (s.warn(
|
|
128
|
-
"Fix XXX",
|
|
129
|
-
l,
|
|
130
|
-
"ids:",
|
|
131
|
-
n.v,
|
|
132
|
-
n.w,
|
|
133
|
-
"Translating: ",
|
|
134
|
-
l[n.v],
|
|
135
|
-
" --- ",
|
|
136
|
-
l[n.w]
|
|
137
|
-
), l[n.v] && l[n.w] && l[n.v] === l[n.w]) {
|
|
138
|
-
s.warn("Fixing and trixing link to self - removing XXX", n.v, n.w, n.name), s.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), i = X(n.v), a = X(n.w), e.removeEdge(n.v, n.w, n.name);
|
|
139
|
-
const d = n.w + "---" + n.v;
|
|
140
|
-
e.setNode(d, {
|
|
141
|
-
domId: d,
|
|
142
|
-
id: d,
|
|
143
|
-
labelStyle: "",
|
|
144
|
-
labelText: r.label,
|
|
145
|
-
padding: 0,
|
|
146
|
-
shape: "labelRect",
|
|
147
|
-
style: ""
|
|
148
|
-
});
|
|
149
|
-
const u = structuredClone(r), f = structuredClone(r);
|
|
150
|
-
u.label = "", u.arrowTypeEnd = "none", f.label = "", u.fromCluster = n.v, f.toCluster = n.v, e.setEdge(i, d, u, n.name + "-cyclic-special"), e.setEdge(d, a, f, n.name + "-cyclic-special");
|
|
151
|
-
} else if (l[n.v] || l[n.w]) {
|
|
152
|
-
if (s.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), i = X(n.v), a = X(n.w), e.removeEdge(n.v, n.w, n.name), i !== n.v) {
|
|
153
|
-
const d = e.parent(i);
|
|
154
|
-
l[d].externalConnections = !0, r.fromCluster = n.v;
|
|
155
|
-
}
|
|
156
|
-
if (a !== n.w) {
|
|
157
|
-
const d = e.parent(a);
|
|
158
|
-
l[d].externalConnections = !0, r.toCluster = n.w;
|
|
159
|
-
}
|
|
160
|
-
s.warn("Fix Replacing with XXX", i, a, n.name), e.setEdge(i, a, r, n.name);
|
|
161
|
-
}
|
|
162
|
-
}), s.warn("Adjusted Graph", m(e)), F(e, 0), s.trace(l);
|
|
163
|
-
}, F = (e, t) => {
|
|
164
|
-
if (s.warn("extractor - ", t, m(e), e.children("D")), t > 10) {
|
|
165
|
-
s.error("Bailing out");
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
let n = e.nodes(), r = !1;
|
|
169
|
-
for (const i of n) {
|
|
170
|
-
const a = e.children(i);
|
|
171
|
-
r = r || a.length > 0;
|
|
172
|
-
}
|
|
173
|
-
if (!r) {
|
|
174
|
-
s.debug("Done, no node has children", e.nodes());
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
s.debug("Nodes = ", n, t);
|
|
178
|
-
for (const i of n)
|
|
179
|
-
if (s.debug(
|
|
180
|
-
"Extracting node",
|
|
181
|
-
i,
|
|
182
|
-
l,
|
|
183
|
-
l[i] && !l[i].externalConnections,
|
|
184
|
-
!e.parent(i),
|
|
185
|
-
e.node(i),
|
|
186
|
-
e.children("D"),
|
|
187
|
-
" Depth ",
|
|
188
|
-
t
|
|
189
|
-
), !l[i])
|
|
190
|
-
s.debug("Not a cluster", i, t);
|
|
191
|
-
else if (!l[i].externalConnections && // !graph.parent(node) &&
|
|
192
|
-
e.children(i) && e.children(i).length > 0) {
|
|
193
|
-
s.warn(
|
|
194
|
-
"Cluster without external connections, without a parent and with children",
|
|
195
|
-
i,
|
|
196
|
-
t
|
|
197
|
-
);
|
|
198
|
-
let d = e.graph().rankdir === "TB" ? "LR" : "TB";
|
|
199
|
-
l[i] && l[i].clusterData && l[i].clusterData.dir && (d = l[i].clusterData.dir, s.warn("Fixing dir", l[i].clusterData.dir, d));
|
|
200
|
-
const u = new A({
|
|
201
|
-
multigraph: !0,
|
|
202
|
-
compound: !0
|
|
203
|
-
}).setGraph({
|
|
204
|
-
rankdir: d,
|
|
205
|
-
// Todo: set proper spacing
|
|
206
|
-
nodesep: 50,
|
|
207
|
-
ranksep: 50,
|
|
208
|
-
marginx: 8,
|
|
209
|
-
marginy: 8
|
|
210
|
-
}).setDefaultEdgeLabel(function() {
|
|
211
|
-
return {};
|
|
212
|
-
});
|
|
213
|
-
s.warn("Old graph before copy", m(e)), P(i, e, u, i), e.setNode(i, {
|
|
214
|
-
clusterNode: !0,
|
|
215
|
-
id: i,
|
|
216
|
-
clusterData: l[i].clusterData,
|
|
217
|
-
labelText: l[i].labelText,
|
|
218
|
-
graph: u
|
|
219
|
-
}), s.warn("New graph after copy node: (", i, ")", m(u)), s.debug("Old graph after copy", m(e));
|
|
220
|
-
} else
|
|
221
|
-
s.warn(
|
|
222
|
-
"Cluster ** ",
|
|
223
|
-
i,
|
|
224
|
-
" **not meeting the criteria !externalConnections:",
|
|
225
|
-
!l[i].externalConnections,
|
|
226
|
-
" no parent: ",
|
|
227
|
-
!e.parent(i),
|
|
228
|
-
" children ",
|
|
229
|
-
e.children(i) && e.children(i).length > 0,
|
|
230
|
-
e.children("D"),
|
|
231
|
-
t
|
|
232
|
-
), s.debug(l);
|
|
233
|
-
n = e.nodes(), s.warn("New list of nodes", n);
|
|
234
|
-
for (const i of n) {
|
|
235
|
-
const a = e.node(i);
|
|
236
|
-
s.warn(" Now next level", i, a), a.clusterNode && F(a.graph, t + 1);
|
|
237
|
-
}
|
|
238
|
-
}, G = (e, t) => {
|
|
239
|
-
if (t.length === 0)
|
|
240
|
-
return [];
|
|
241
|
-
let n = Object.assign(t);
|
|
242
|
-
return t.forEach((r) => {
|
|
243
|
-
const i = e.children(r), a = G(e, i);
|
|
244
|
-
n = [...n, ...a];
|
|
245
|
-
}), n;
|
|
246
|
-
}, rt = (e) => G(e, e.children()), at = (e, t) => {
|
|
247
|
-
s.info("Creating subgraph rect for ", t.id, t);
|
|
248
|
-
const n = T(), r = e.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), i = r.insert("rect", ":first-child"), a = S(n.flowchart.htmlLabels), d = r.insert("g").attr("class", "cluster-label"), u = t.labelType === "markdown" ? I(d, t.labelText, { style: t.labelStyle, useHtmlLabels: a }) : d.node().appendChild(J(t.labelText, t.labelStyle, void 0, !0));
|
|
249
|
-
let f = u.getBBox();
|
|
250
|
-
if (S(n.flowchart.htmlLabels)) {
|
|
251
|
-
const c = u.children[0], o = L(u);
|
|
252
|
-
f = c.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
|
|
253
|
-
}
|
|
254
|
-
const h = 0 * t.padding, w = h / 2, x = t.width <= f.width + h ? f.width + h : t.width;
|
|
255
|
-
t.width <= f.width + h ? t.diff = (f.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, s.trace("Data ", t, JSON.stringify(t)), i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - x / 2).attr("y", t.y - t.height / 2 - w).attr("width", x).attr("height", t.height + h);
|
|
256
|
-
const { subGraphTitleTopMargin: v } = D(n);
|
|
257
|
-
a ? d.attr(
|
|
258
|
-
"transform",
|
|
259
|
-
// This puts the label on top of the box instead of inside it
|
|
260
|
-
`translate(${t.x - f.width / 2}, ${t.y - t.height / 2 + v})`
|
|
261
|
-
) : d.attr(
|
|
262
|
-
"transform",
|
|
263
|
-
// This puts the label on top of the box instead of inside it
|
|
264
|
-
`translate(${t.x}, ${t.y - t.height / 2 + v})`
|
|
265
|
-
);
|
|
266
|
-
const y = i.node().getBBox();
|
|
267
|
-
return t.width = y.width, t.height = y.height, t.intersect = function(c) {
|
|
268
|
-
return p(t, c);
|
|
269
|
-
}, r;
|
|
270
|
-
}, ct = (e, t) => {
|
|
271
|
-
const n = e.insert("g").attr("class", "note-cluster").attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
272
|
-
r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
|
|
273
|
-
const d = r.node().getBBox();
|
|
274
|
-
return t.width = d.width, t.height = d.height, t.intersect = function(u) {
|
|
275
|
-
return p(t, u);
|
|
276
|
-
}, n;
|
|
277
|
-
}, ot = (e, t) => {
|
|
278
|
-
const n = T(), r = e.insert("g").attr("class", t.classes).attr("id", t.id), i = r.insert("rect", ":first-child"), a = r.insert("g").attr("class", "cluster-label"), d = r.append("rect"), u = a.node().appendChild(J(t.labelText, t.labelStyle, void 0, !0));
|
|
279
|
-
let f = u.getBBox();
|
|
280
|
-
if (S(n.flowchart.htmlLabels)) {
|
|
281
|
-
const c = u.children[0], o = L(u);
|
|
282
|
-
f = c.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
|
|
283
|
-
}
|
|
284
|
-
f = u.getBBox();
|
|
285
|
-
const h = 0 * t.padding, w = h / 2, x = t.width <= f.width + t.padding ? f.width + t.padding : t.width;
|
|
286
|
-
t.width <= f.width + t.padding ? t.diff = (f.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, i.attr("class", "outer").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w).attr("width", x + h).attr("height", t.height + h), d.attr("class", "inner").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w + f.height - 1).attr("width", x + h).attr("height", t.height + h - f.height - 3);
|
|
287
|
-
const { subGraphTitleTopMargin: v } = D(n);
|
|
288
|
-
a.attr(
|
|
289
|
-
"transform",
|
|
290
|
-
`translate(${t.x - f.width / 2}, ${t.y - t.height / 2 - t.padding / 3 + (S(n.flowchart.htmlLabels) ? 5 : 3) + v})`
|
|
291
|
-
);
|
|
292
|
-
const y = i.node().getBBox();
|
|
293
|
-
return t.height = y.height, t.intersect = function(c) {
|
|
294
|
-
return p(t, c);
|
|
295
|
-
}, r;
|
|
296
|
-
}, lt = (e, t) => {
|
|
297
|
-
const n = e.insert("g").attr("class", t.classes).attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
298
|
-
r.attr("class", "divider").attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2).attr("width", t.width + i).attr("height", t.height + i);
|
|
299
|
-
const d = r.node().getBBox();
|
|
300
|
-
return t.width = d.width, t.height = d.height, t.diff = -t.padding / 2, t.intersect = function(u) {
|
|
301
|
-
return p(t, u);
|
|
302
|
-
}, n;
|
|
303
|
-
}, ft = { rect: at, roundedWithTitle: ot, noteGroup: ct, divider: lt };
|
|
304
|
-
let j = {};
|
|
305
|
-
const dt = (e, t) => {
|
|
306
|
-
s.trace("Inserting cluster");
|
|
307
|
-
const n = t.shape || "rect";
|
|
308
|
-
j[t.id] = ft[n](e, t);
|
|
309
|
-
}, ut = () => {
|
|
310
|
-
j = {};
|
|
311
|
-
}, M = async (e, t, n, r, i, a) => {
|
|
312
|
-
s.info("Graph in recursive render: XXX", m(t), i);
|
|
313
|
-
const d = t.graph().rankdir;
|
|
314
|
-
s.trace("Dir in recursive render - dir:", d);
|
|
315
|
-
const u = e.insert("g").attr("class", "root");
|
|
316
|
-
t.nodes() ? s.info("Recursive render XXX", t.nodes()) : s.info("No nodes found for", t), t.edges().length > 0 && s.trace("Recursive edges", t.edge(t.edges()[0]));
|
|
317
|
-
const f = u.insert("g").attr("class", "clusters"), h = u.insert("g").attr("class", "edgePaths"), w = u.insert("g").attr("class", "edgeLabels"), x = u.insert("g").attr("class", "nodes");
|
|
318
|
-
await Promise.all(
|
|
319
|
-
t.nodes().map(async function(c) {
|
|
320
|
-
const o = t.node(c);
|
|
321
|
-
if (i !== void 0) {
|
|
322
|
-
const b = JSON.parse(JSON.stringify(i.clusterData));
|
|
323
|
-
s.info("Setting data for cluster XXX (", c, ") ", b, i), t.setNode(i.id, b), t.parent(c) || (s.trace("Setting parent", c, i.id), t.setParent(c, i.id, b));
|
|
324
|
-
}
|
|
325
|
-
if (s.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
|
|
326
|
-
s.info("Cluster identified", c, o.width, t.node(c));
|
|
327
|
-
const b = await M(
|
|
328
|
-
x,
|
|
329
|
-
o.graph,
|
|
330
|
-
n,
|
|
331
|
-
r,
|
|
332
|
-
t.node(c),
|
|
333
|
-
a
|
|
334
|
-
), E = b.elem;
|
|
335
|
-
W(o, E), o.diff = b.diff || 0, s.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), _(E, o), s.warn("Recursive render complete ", E, o);
|
|
336
|
-
} else
|
|
337
|
-
t.children(c).length > 0 ? (s.info("Cluster - the non recursive path XXX", c, o.id, o, t), s.info(C(o.id, t)), l[o.id] = { id: C(o.id, t), node: o }) : (s.info("Node - the non recursive path", c, o.id, o), await q(x, t.node(c), d));
|
|
338
|
-
})
|
|
339
|
-
), t.edges().forEach(function(c) {
|
|
340
|
-
const o = t.edge(c.v, c.w, c.name);
|
|
341
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c)), s.info("Edge " + c.v + " -> " + c.w + ": ", c, " ", JSON.stringify(t.edge(c))), s.info("Fix", l, "ids:", c.v, c.w, "Translating: ", l[c.v], l[c.w]), z(w, o);
|
|
342
|
-
}), t.edges().forEach(function(c) {
|
|
343
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
|
|
344
|
-
}), s.info("#############################################"), s.info("### Layout ###"), s.info("#############################################"), s.info(t), H(t), s.info("Graph after layout:", m(t));
|
|
345
|
-
let v = 0;
|
|
346
|
-
const { subGraphTitleTotalMargin: y } = D(a);
|
|
347
|
-
return rt(t).forEach(function(c) {
|
|
348
|
-
const o = t.node(c);
|
|
349
|
-
s.info("Position " + c + ": " + JSON.stringify(t.node(c))), s.info(
|
|
350
|
-
"Position " + c + ": (" + o.x,
|
|
351
|
-
"," + o.y,
|
|
352
|
-
") width: ",
|
|
353
|
-
o.width,
|
|
354
|
-
" height: ",
|
|
355
|
-
o.height
|
|
356
|
-
), o && o.clusterNode ? (o.y += y, O(o)) : t.children(c).length > 0 ? (o.height += y, dt(f, o), l[o.id].node = o) : (o.y += y / 2, O(o));
|
|
357
|
-
}), t.edges().forEach(function(c) {
|
|
358
|
-
const o = t.edge(c);
|
|
359
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o), o.points.forEach((E) => E.y += y / 2);
|
|
360
|
-
const b = K(h, c, o, l, n, t, r);
|
|
361
|
-
Q(o, b);
|
|
362
|
-
}), t.nodes().forEach(function(c) {
|
|
363
|
-
const o = t.node(c);
|
|
364
|
-
s.info(c, o.type, o.diff), o.type === "group" && (v = o.diff);
|
|
365
|
-
}), { elem: u, diff: v };
|
|
366
|
-
}, bt = async (e, t, n, r, i) => {
|
|
367
|
-
U(e, n, r, i), Y(), Z(), ut(), nt(), s.warn("Graph at first:", JSON.stringify(m(t))), st(t), s.warn("Graph after:", JSON.stringify(m(t)));
|
|
368
|
-
const a = T();
|
|
369
|
-
await M(e, t, r, i, void 0, a);
|
|
370
|
-
};
|
|
371
|
-
export {
|
|
372
|
-
bt as r
|
|
373
|
-
};
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import { l as Y, T as D, e as M } from "./index-C3zgkbpi.mjs";
|
|
2
|
-
var O = (function() {
|
|
3
|
-
var a = function(u, t, e, n) {
|
|
4
|
-
for (e = e || {}, n = u.length; n--; e[u[n]] = t)
|
|
5
|
-
;
|
|
6
|
-
return e;
|
|
7
|
-
}, f = [6, 9, 10], m = {
|
|
8
|
-
trace: function() {
|
|
9
|
-
},
|
|
10
|
-
yy: {},
|
|
11
|
-
symbols_: { error: 2, start: 3, info: 4, document: 5, EOF: 6, line: 7, statement: 8, NL: 9, showInfo: 10, $accept: 0, $end: 1 },
|
|
12
|
-
terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" },
|
|
13
|
-
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],
|
|
14
|
-
performAction: function(t, e, n, s, r, i, d) {
|
|
15
|
-
switch (i.length - 1, r) {
|
|
16
|
-
case 1:
|
|
17
|
-
return s;
|
|
18
|
-
case 4:
|
|
19
|
-
break;
|
|
20
|
-
case 6:
|
|
21
|
-
s.setInfo(!0);
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, a(f, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, a(f, [2, 3]), a(f, [2, 4]), a(f, [2, 5]), a(f, [2, 6])],
|
|
26
|
-
defaultActions: { 4: [2, 1] },
|
|
27
|
-
parseError: function(t, e) {
|
|
28
|
-
if (e.recoverable)
|
|
29
|
-
this.trace(t);
|
|
30
|
-
else {
|
|
31
|
-
var n = new Error(t);
|
|
32
|
-
throw n.hash = e, n;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
parse: function(t) {
|
|
36
|
-
var e = this, n = [0], s = [], r = [null], i = [], d = this.table, P = "", v = 0, T = 0, N = 2, L = 1, R = i.slice.call(arguments, 1), o = Object.create(this.lexer), p = { yy: {} };
|
|
37
|
-
for (var E in this.yy)
|
|
38
|
-
Object.prototype.hasOwnProperty.call(this.yy, E) && (p.yy[E] = this.yy[E]);
|
|
39
|
-
o.setInput(t, p.yy), p.yy.lexer = o, p.yy.parser = this, typeof o.yylloc > "u" && (o.yylloc = {});
|
|
40
|
-
var I = o.yylloc;
|
|
41
|
-
i.push(I);
|
|
42
|
-
var z = o.options && o.options.ranges;
|
|
43
|
-
typeof p.yy.parseError == "function" ? this.parseError = p.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
44
|
-
function U() {
|
|
45
|
-
var y;
|
|
46
|
-
return y = s.pop() || o.lex() || L, typeof y != "number" && (y instanceof Array && (s = y, y = s.pop()), y = e.symbols_[y] || y), y;
|
|
47
|
-
}
|
|
48
|
-
for (var l, g, h, w, _ = {}, b, c, F, S; ; ) {
|
|
49
|
-
if (g = n[n.length - 1], this.defaultActions[g] ? h = this.defaultActions[g] : ((l === null || typeof l > "u") && (l = U()), h = d[g] && d[g][l]), typeof h > "u" || !h.length || !h[0]) {
|
|
50
|
-
var A = "";
|
|
51
|
-
S = [];
|
|
52
|
-
for (b in d[g])
|
|
53
|
-
this.terminals_[b] && b > N && S.push("'" + this.terminals_[b] + "'");
|
|
54
|
-
o.showPosition ? A = "Parse error on line " + (v + 1) + `:
|
|
55
|
-
` + o.showPosition() + `
|
|
56
|
-
Expecting ` + S.join(", ") + ", got '" + (this.terminals_[l] || l) + "'" : A = "Parse error on line " + (v + 1) + ": Unexpected " + (l == L ? "end of input" : "'" + (this.terminals_[l] || l) + "'"), this.parseError(A, {
|
|
57
|
-
text: o.match,
|
|
58
|
-
token: this.terminals_[l] || l,
|
|
59
|
-
line: o.yylineno,
|
|
60
|
-
loc: I,
|
|
61
|
-
expected: S
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
if (h[0] instanceof Array && h.length > 1)
|
|
65
|
-
throw new Error("Parse Error: multiple actions possible at state: " + g + ", token: " + l);
|
|
66
|
-
switch (h[0]) {
|
|
67
|
-
case 1:
|
|
68
|
-
n.push(l), r.push(o.yytext), i.push(o.yylloc), n.push(h[1]), l = null, T = o.yyleng, P = o.yytext, v = o.yylineno, I = o.yylloc;
|
|
69
|
-
break;
|
|
70
|
-
case 2:
|
|
71
|
-
if (c = this.productions_[h[1]][1], _.$ = r[r.length - c], _._$ = {
|
|
72
|
-
first_line: i[i.length - (c || 1)].first_line,
|
|
73
|
-
last_line: i[i.length - 1].last_line,
|
|
74
|
-
first_column: i[i.length - (c || 1)].first_column,
|
|
75
|
-
last_column: i[i.length - 1].last_column
|
|
76
|
-
}, z && (_._$.range = [
|
|
77
|
-
i[i.length - (c || 1)].range[0],
|
|
78
|
-
i[i.length - 1].range[1]
|
|
79
|
-
]), w = this.performAction.apply(_, [
|
|
80
|
-
P,
|
|
81
|
-
T,
|
|
82
|
-
v,
|
|
83
|
-
p.yy,
|
|
84
|
-
h[1],
|
|
85
|
-
r,
|
|
86
|
-
i
|
|
87
|
-
].concat(R)), typeof w < "u")
|
|
88
|
-
return w;
|
|
89
|
-
c && (n = n.slice(0, -1 * c * 2), r = r.slice(0, -1 * c), i = i.slice(0, -1 * c)), n.push(this.productions_[h[1]][0]), r.push(_.$), i.push(_._$), F = d[n[n.length - 2]][n[n.length - 1]], n.push(F);
|
|
90
|
-
break;
|
|
91
|
-
case 3:
|
|
92
|
-
return !0;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return !0;
|
|
96
|
-
}
|
|
97
|
-
}, k = /* @__PURE__ */ (function() {
|
|
98
|
-
var u = {
|
|
99
|
-
EOF: 1,
|
|
100
|
-
parseError: function(e, n) {
|
|
101
|
-
if (this.yy.parser)
|
|
102
|
-
this.yy.parser.parseError(e, n);
|
|
103
|
-
else
|
|
104
|
-
throw new Error(e);
|
|
105
|
-
},
|
|
106
|
-
// resets the lexer, sets new input
|
|
107
|
-
setInput: function(t, e) {
|
|
108
|
-
return this.yy = e || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
109
|
-
first_line: 1,
|
|
110
|
-
first_column: 0,
|
|
111
|
-
last_line: 1,
|
|
112
|
-
last_column: 0
|
|
113
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
114
|
-
},
|
|
115
|
-
// consumes and returns one char from the input
|
|
116
|
-
input: function() {
|
|
117
|
-
var t = this._input[0];
|
|
118
|
-
this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
|
|
119
|
-
var e = t.match(/(?:\r\n?|\n).*/g);
|
|
120
|
-
return e ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
|
|
121
|
-
},
|
|
122
|
-
// unshifts one char (or a string) into the input
|
|
123
|
-
unput: function(t) {
|
|
124
|
-
var e = t.length, n = t.split(/(?:\r\n?|\n)/g);
|
|
125
|
-
this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e), this.offset -= e;
|
|
126
|
-
var s = this.match.split(/(?:\r\n?|\n)/g);
|
|
127
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
128
|
-
var r = this.yylloc.range;
|
|
129
|
-
return this.yylloc = {
|
|
130
|
-
first_line: this.yylloc.first_line,
|
|
131
|
-
last_line: this.yylineno + 1,
|
|
132
|
-
first_column: this.yylloc.first_column,
|
|
133
|
-
last_column: n ? (n.length === s.length ? this.yylloc.first_column : 0) + s[s.length - n.length].length - n[0].length : this.yylloc.first_column - e
|
|
134
|
-
}, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - e]), this.yyleng = this.yytext.length, this;
|
|
135
|
-
},
|
|
136
|
-
// When called from action, caches matched text and appends it on next action
|
|
137
|
-
more: function() {
|
|
138
|
-
return this._more = !0, this;
|
|
139
|
-
},
|
|
140
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
141
|
-
reject: function() {
|
|
142
|
-
if (this.options.backtrack_lexer)
|
|
143
|
-
this._backtrack = !0;
|
|
144
|
-
else
|
|
145
|
-
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).
|
|
146
|
-
` + this.showPosition(), {
|
|
147
|
-
text: "",
|
|
148
|
-
token: null,
|
|
149
|
-
line: this.yylineno
|
|
150
|
-
});
|
|
151
|
-
return this;
|
|
152
|
-
},
|
|
153
|
-
// retain first n characters of the match
|
|
154
|
-
less: function(t) {
|
|
155
|
-
this.unput(this.match.slice(t));
|
|
156
|
-
},
|
|
157
|
-
// displays already matched input, i.e. for error messages
|
|
158
|
-
pastInput: function() {
|
|
159
|
-
var t = this.matched.substr(0, this.matched.length - this.match.length);
|
|
160
|
-
return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
|
|
161
|
-
},
|
|
162
|
-
// displays upcoming input, i.e. for error messages
|
|
163
|
-
upcomingInput: function() {
|
|
164
|
-
var t = this.match;
|
|
165
|
-
return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
166
|
-
},
|
|
167
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
168
|
-
showPosition: function() {
|
|
169
|
-
var t = this.pastInput(), e = new Array(t.length + 1).join("-");
|
|
170
|
-
return t + this.upcomingInput() + `
|
|
171
|
-
` + e + "^";
|
|
172
|
-
},
|
|
173
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
174
|
-
test_match: function(t, e) {
|
|
175
|
-
var n, s, r;
|
|
176
|
-
if (this.options.backtrack_lexer && (r = {
|
|
177
|
-
yylineno: this.yylineno,
|
|
178
|
-
yylloc: {
|
|
179
|
-
first_line: this.yylloc.first_line,
|
|
180
|
-
last_line: this.last_line,
|
|
181
|
-
first_column: this.yylloc.first_column,
|
|
182
|
-
last_column: this.yylloc.last_column
|
|
183
|
-
},
|
|
184
|
-
yytext: this.yytext,
|
|
185
|
-
match: this.match,
|
|
186
|
-
matches: this.matches,
|
|
187
|
-
matched: this.matched,
|
|
188
|
-
yyleng: this.yyleng,
|
|
189
|
-
offset: this.offset,
|
|
190
|
-
_more: this._more,
|
|
191
|
-
_input: this._input,
|
|
192
|
-
yy: this.yy,
|
|
193
|
-
conditionStack: this.conditionStack.slice(0),
|
|
194
|
-
done: this.done
|
|
195
|
-
}, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), s = t[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
|
|
196
|
-
first_line: this.yylloc.last_line,
|
|
197
|
-
last_line: this.yylineno + 1,
|
|
198
|
-
first_column: this.yylloc.last_column,
|
|
199
|
-
last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
|
|
200
|
-
}, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, e, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
201
|
-
return n;
|
|
202
|
-
if (this._backtrack) {
|
|
203
|
-
for (var i in r)
|
|
204
|
-
this[i] = r[i];
|
|
205
|
-
return !1;
|
|
206
|
-
}
|
|
207
|
-
return !1;
|
|
208
|
-
},
|
|
209
|
-
// return next match in input
|
|
210
|
-
next: function() {
|
|
211
|
-
if (this.done)
|
|
212
|
-
return this.EOF;
|
|
213
|
-
this._input || (this.done = !0);
|
|
214
|
-
var t, e, n, s;
|
|
215
|
-
this._more || (this.yytext = "", this.match = "");
|
|
216
|
-
for (var r = this._currentRules(), i = 0; i < r.length; i++)
|
|
217
|
-
if (n = this._input.match(this.rules[r[i]]), n && (!e || n[0].length > e[0].length)) {
|
|
218
|
-
if (e = n, s = i, this.options.backtrack_lexer) {
|
|
219
|
-
if (t = this.test_match(n, r[i]), t !== !1)
|
|
220
|
-
return t;
|
|
221
|
-
if (this._backtrack) {
|
|
222
|
-
e = !1;
|
|
223
|
-
continue;
|
|
224
|
-
} else
|
|
225
|
-
return !1;
|
|
226
|
-
} else if (!this.options.flex)
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
return e ? (t = this.test_match(e, r[s]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
230
|
-
` + this.showPosition(), {
|
|
231
|
-
text: "",
|
|
232
|
-
token: null,
|
|
233
|
-
line: this.yylineno
|
|
234
|
-
});
|
|
235
|
-
},
|
|
236
|
-
// return next match that has a token
|
|
237
|
-
lex: function() {
|
|
238
|
-
var e = this.next();
|
|
239
|
-
return e || this.lex();
|
|
240
|
-
},
|
|
241
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
242
|
-
begin: function(e) {
|
|
243
|
-
this.conditionStack.push(e);
|
|
244
|
-
},
|
|
245
|
-
// pop the previously active lexer condition state off the condition stack
|
|
246
|
-
popState: function() {
|
|
247
|
-
var e = this.conditionStack.length - 1;
|
|
248
|
-
return e > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
249
|
-
},
|
|
250
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
251
|
-
_currentRules: function() {
|
|
252
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
253
|
-
},
|
|
254
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
255
|
-
topState: function(e) {
|
|
256
|
-
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
257
|
-
},
|
|
258
|
-
// alias for begin(condition)
|
|
259
|
-
pushState: function(e) {
|
|
260
|
-
this.begin(e);
|
|
261
|
-
},
|
|
262
|
-
// return the number of states currently on the stack
|
|
263
|
-
stateStackSize: function() {
|
|
264
|
-
return this.conditionStack.length;
|
|
265
|
-
},
|
|
266
|
-
options: { "case-insensitive": !0 },
|
|
267
|
-
performAction: function(e, n, s, r) {
|
|
268
|
-
switch (s) {
|
|
269
|
-
case 0:
|
|
270
|
-
return 4;
|
|
271
|
-
case 1:
|
|
272
|
-
return 9;
|
|
273
|
-
case 2:
|
|
274
|
-
return "space";
|
|
275
|
-
case 3:
|
|
276
|
-
return 10;
|
|
277
|
-
case 4:
|
|
278
|
-
return 6;
|
|
279
|
-
case 5:
|
|
280
|
-
return "TXT";
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i],
|
|
284
|
-
conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5], inclusive: !0 } }
|
|
285
|
-
};
|
|
286
|
-
return u;
|
|
287
|
-
})();
|
|
288
|
-
m.lexer = k;
|
|
289
|
-
function x() {
|
|
290
|
-
this.yy = {};
|
|
291
|
-
}
|
|
292
|
-
return x.prototype = m, m.Parser = x, new x();
|
|
293
|
-
})();
|
|
294
|
-
O.parser = O;
|
|
295
|
-
const B = O, j = {
|
|
296
|
-
info: !1
|
|
297
|
-
};
|
|
298
|
-
let $ = j.info;
|
|
299
|
-
const V = (a) => {
|
|
300
|
-
$ = a;
|
|
301
|
-
}, X = () => $, q = () => {
|
|
302
|
-
$ = j.info;
|
|
303
|
-
}, C = {
|
|
304
|
-
clear: q,
|
|
305
|
-
setInfo: V,
|
|
306
|
-
getInfo: X
|
|
307
|
-
}, G = (a, f, m) => {
|
|
308
|
-
Y.debug(`rendering info diagram
|
|
309
|
-
` + a);
|
|
310
|
-
const k = D(f);
|
|
311
|
-
M(k, 100, 400, !0), k.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${m}`);
|
|
312
|
-
}, H = { draw: G }, K = {
|
|
313
|
-
parser: B,
|
|
314
|
-
db: C,
|
|
315
|
-
renderer: H
|
|
316
|
-
};
|
|
317
|
-
export {
|
|
318
|
-
K as diagram
|
|
319
|
-
};
|