@ucap-llm/ai-ui 1.1.13 → 1.1.15
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/_basePickBy-DMehTBs0-8955b30b.mjs +151 -0
- package/_basePickBy-e7598e72.mjs +153 -0
- package/{_baseUniq-2bcae05e.mjs → _baseUniq-8cd7fbc4.mjs} +150 -150
- package/_baseUniq-DPnX6tpB-5eb6efbd.mjs +615 -0
- package/ai-ui.es.js +9 -8
- package/ai-ui.umd.js +3425 -923
- package/arc-8909f880.mjs +85 -0
- package/arc-qimaJRLH-591a6072.mjs +85 -0
- package/architecture-4AB2E3PP-DFmEpUnA-62fe65dd.mjs +10 -0
- package/architecture-4AB2E3PP-b04ae9dd.mjs +10 -0
- package/{architectureDiagram-IEHRJDOE-e4684ef3.mjs → architectureDiagram-IEHRJDOE-1ccc2c64.mjs} +123 -123
- package/architectureDiagram-IEHRJDOE-BRVAVUEE-c068faae.mjs +4641 -0
- package/{blockDiagram-JOT3LUYC-504ee31e.mjs → blockDiagram-JOT3LUYC-63569de5.mjs} +5 -5
- package/blockDiagram-JOT3LUYC-Cs4tSRey-54d8e29b.mjs +2251 -0
- package/{c4Diagram-VJAJSXHY-c5ba6af4.mjs → c4Diagram-VJAJSXHY-355a4170.mjs} +23 -23
- package/c4Diagram-VJAJSXHY-C3F9fO0L-0df97cd8.mjs +1583 -0
- package/channel-CuHzivgY-bb3d765a.mjs +5 -0
- package/channel-a1f4f18c.mjs +5 -0
- package/{chunk-4BMEZGHF-8d9a2e4f.mjs → chunk-4BMEZGHF-705995af.mjs} +1 -1
- package/chunk-4BMEZGHF-btTOjzEX-c9c5432c.mjs +9 -0
- package/{chunk-A2AXSNBT-41ae29f2.mjs → chunk-A2AXSNBT-3a857566.mjs} +10 -10
- package/chunk-A2AXSNBT-CPBZRsS7-a80df701.mjs +1373 -0
- package/{chunk-AEK57VVT-69e121d6.mjs → chunk-AEK57VVT-6c60e1ee.mjs} +45 -45
- package/chunk-AEK57VVT-D62Iwyam-238a3d85.mjs +1361 -0
- package/{chunk-D6G4REZN-472adc5b.mjs → chunk-D6G4REZN-11c52918.mjs} +5 -5
- package/chunk-D6G4REZN-HlFmQTJy-20704636.mjs +64 -0
- package/chunk-RZ5BOZE2-DIFgOqDt-495bec03.mjs +24 -0
- package/{chunk-RZ5BOZE2-b7d5d4f5.mjs → chunk-RZ5BOZE2-d6db8103.mjs} +9 -9
- package/chunk-XZIHB7SX-CCrbsG0u-f30e4124.mjs +15 -0
- package/{chunk-XZIHB7SX-56c08d07.mjs → chunk-XZIHB7SX-fafd3ca2.mjs} +1 -1
- package/classDiagram-GIVACNV2-Bv5U0XPL-622b22ed.mjs +18 -0
- package/{classDiagram-v2-COTLJTTW-1deea5cc.mjs → classDiagram-GIVACNV2-eca9aeb6.mjs} +5 -5
- package/classDiagram-v2-COTLJTTW-Bv5U0XPL-622b22ed.mjs +18 -0
- package/{classDiagram-GIVACNV2-1deea5cc.mjs → classDiagram-v2-COTLJTTW-eca9aeb6.mjs} +5 -5
- package/{clone-1f18a17f.mjs → clone-327a1426.mjs} +1 -1
- package/clone-Csc9uFbU-6c4f28bd.mjs +8 -0
- package/cytoscape.esm-Swd9B-1A-3101f241.mjs +18730 -0
- package/{dagre-OKDRZEBW-74e73dcf.mjs → dagre-OKDRZEBW-9059bb36.mjs} +81 -81
- package/dagre-OKDRZEBW-CoMQYlxF-96274fb0.mjs +448 -0
- package/{diagram-SSKATNLV-1a562cb0.mjs → diagram-SSKATNLV-70f68e72.mjs} +34 -34
- package/diagram-SSKATNLV-CPuZUaGP-50edcaa0.mjs +225 -0
- package/{diagram-VNBRO52H-b765e46f.mjs → diagram-VNBRO52H-39273710.mjs} +35 -35
- package/diagram-VNBRO52H-DIIZ-Sll-969266e6.mjs +130 -0
- package/{erDiagram-Q7BY3M3F-022c4343.mjs → erDiagram-Q7BY3M3F-96ba3906.mjs} +3 -3
- package/erDiagram-Q7BY3M3F-ZKWAM_uE-41c0350d.mjs +843 -0
- package/{flowDiagram-4HSFHLVR-6036e284.mjs → flowDiagram-4HSFHLVR-795e3830.mjs} +29 -29
- package/flowDiagram-4HSFHLVR-CUJXGEG3-801dde13.mjs +1624 -0
- package/{ganttDiagram-APWFNJXF-be871387.mjs → ganttDiagram-APWFNJXF-736e67b6.mjs} +398 -398
- package/ganttDiagram-APWFNJXF-C1pgubbs-20beffc3.mjs +2527 -0
- package/gitGraph-O2Q2CXLX-00465db9.mjs +10 -0
- package/gitGraph-O2Q2CXLX-BYavwGzs-e5f1990e.mjs +10 -0
- package/{gitGraphDiagram-7IBYFJ6S-da63c888.mjs → gitGraphDiagram-7IBYFJ6S-115329ab.mjs} +88 -88
- package/gitGraphDiagram-7IBYFJ6S-CndxirR4-b39d4089.mjs +716 -0
- package/{graph-e71f0e3e.mjs → graph-9e073c5f.mjs} +8 -8
- package/graph-DOmtxVvg-727f4e14.mjs +247 -0
- package/index-433e2395.mjs +168385 -0
- package/info-4N47QTOZ-688db415.mjs +10 -0
- package/info-4N47QTOZ-DPyDFN1Z-821cf2f7.mjs +10 -0
- package/{infoDiagram-PH2N3AL5-3e1c1c1f.mjs → infoDiagram-PH2N3AL5-29e9585a.mjs} +9 -9
- package/infoDiagram-PH2N3AL5-BkSS3vpU-ef4bf66d.mjs +26 -0
- package/init-DjUOC4st-87c930f1.mjs +16 -0
- package/{journeyDiagram-U35MCT3I-6d29748d.mjs → journeyDiagram-U35MCT3I-7c5644d1.mjs} +41 -41
- package/journeyDiagram-U35MCT3I-BN-kCDeJ-ac350902.mjs +811 -0
- package/{kanban-definition-NDS4AKOZ-c231ae4c.mjs → kanban-definition-NDS4AKOZ-eff441f9.mjs} +47 -47
- package/kanban-definition-NDS4AKOZ-gaDUOiKt-efdba942.mjs +720 -0
- package/{layout-b9b9e407.mjs → layout-501d22f0.mjs} +19 -19
- package/layout-8X5HiOVA-b6e13cf9.mjs +1323 -0
- package/linear-BgV5F0PU-8137edad.mjs +447 -0
- package/{linear-99040ddc.mjs → linear-fd3cd932.mjs} +56 -56
- package/{mermaid-parser.core-55f134dc.mjs → mermaid-parser.core-6eb44241.mjs} +160 -160
- package/mermaid-parser.core-BTS3sfcL-8c80284a.mjs +12810 -0
- package/{mindmap-definition-ALO5MXBD-938e2e65.mjs → mindmap-definition-ALO5MXBD-2fe3c748.mjs} +1 -1
- package/mindmap-definition-ALO5MXBD-B8q_1sIj-c3599d3c.mjs +3225 -0
- package/ordinal-DfAQgscy-1c8e46a9.mjs +65 -0
- package/package.json +2 -2
- package/packet-KVYON367-DcfdOX-U-afac932a.mjs +10 -0
- package/packet-KVYON367-c82af3fe.mjs +10 -0
- package/pie-R6RNRRYF-DKruFncB-d07f60c2.mjs +10 -0
- package/pie-R6RNRRYF-eb27797b.mjs +10 -0
- package/pieDiagram-IB7DONF6-Bijui6_Q-db9fdf3a.mjs +166 -0
- package/{pieDiagram-IB7DONF6-6a11673b.mjs → pieDiagram-IB7DONF6-e6863984.mjs} +36 -36
- package/{quadrantDiagram-7GDLP6J5-a4a4d9ac.mjs → quadrantDiagram-7GDLP6J5-88df12c2.mjs} +15 -15
- package/quadrantDiagram-7GDLP6J5-DzIzViUj-b13add98.mjs +1027 -0
- package/radar-MK3ICKWK-723229d0.mjs +10 -0
- package/radar-MK3ICKWK-D8wbkmr5-3165faf6.mjs +10 -0
- package/{requirementDiagram-KVF5MWMF-a7093c74.mjs → requirementDiagram-KVF5MWMF-7228051c.mjs} +50 -50
- package/requirementDiagram-KVF5MWMF-Hqsbdpfq-23374f24.mjs +853 -0
- package/{sankeyDiagram-QLVOVGJD-f4bcbb2d.mjs → sankeyDiagram-QLVOVGJD-00a31a99.mjs} +87 -87
- package/sankeyDiagram-QLVOVGJD-DGCeusqJ-8ca7e64d.mjs +826 -0
- package/{sequenceDiagram-X6HHIX6F-9071cfff.mjs → sequenceDiagram-X6HHIX6F-de203309.mjs} +3 -3
- package/sequenceDiagram-X6HHIX6F-kuEE9wSd-5f0ec5cd.mjs +2283 -0
- package/{stateDiagram-DGXRK772-fb22a7a5.mjs → stateDiagram-DGXRK772-2341237a.mjs} +48 -48
- package/stateDiagram-DGXRK772-Cq-Ce3WP-266efa7f.mjs +274 -0
- package/{stateDiagram-v2-YXO3MK2T-67326b76.mjs → stateDiagram-v2-YXO3MK2T-8c81deed.mjs} +5 -5
- package/stateDiagram-v2-YXO3MK2T-CplwFWn1-c0024e4e.mjs +18 -0
- package/style.css +10 -1
- package/timeline-definition-BDJGKUSR-USv5sZzx-22548912.mjs +806 -0
- package/{timeline-definition-BDJGKUSR-44f50d45.mjs → timeline-definition-BDJGKUSR-e615901b.mjs} +79 -79
- package/{xychartDiagram-VJFVF3MP-2df503f6.mjs → xychartDiagram-VJFVF3MP-9ad66a6b.mjs} +28 -28
- package/xychartDiagram-VJFVF3MP-CXCfFZBM-e5ca151e.mjs +1306 -0
- package/_basePickBy-12958109.mjs +0 -153
- package/arc-14f9a207.mjs +0 -85
- package/architecture-4AB2E3PP-bb512ddb.mjs +0 -10
- package/channel-7bd711b4.mjs +0 -5
- package/gitGraph-O2Q2CXLX-83cfcbef.mjs +0 -10
- package/index-f83d4b07.mjs +0 -97448
- package/info-4N47QTOZ-20cf90f5.mjs +0 -10
- package/katex-2e45926a.mjs +0 -11700
- package/packet-KVYON367-453a49e8.mjs +0 -10
- package/pie-R6RNRRYF-4d95c8dc.mjs +0 -10
- package/radar-MK3ICKWK-100e8fa4.mjs +0 -10
|
@@ -0,0 +1,826 @@
|
|
|
1
|
+
import { v as p, l as lt, G as xt, j as kt, K as vt, Y as bt, k as wt, i as St, r as Et, T as Lt, y as At, e as X, aD as Mt } from "./index-433e2395.mjs";
|
|
2
|
+
import { h as Tt } from "./ordinal-DfAQgscy-1c8e46a9.mjs";
|
|
3
|
+
import "vue";
|
|
4
|
+
import "./init-DjUOC4st-87c930f1.mjs";
|
|
5
|
+
function Pt(t) {
|
|
6
|
+
for (var n = t.length / 6 | 0, r = new Array(n), a = 0; a < n; )
|
|
7
|
+
r[a] = "#" + t.slice(a * 6, ++a * 6);
|
|
8
|
+
return r;
|
|
9
|
+
}
|
|
10
|
+
const Nt = Pt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
|
|
11
|
+
function ct(t, n) {
|
|
12
|
+
let r;
|
|
13
|
+
if (n === void 0)
|
|
14
|
+
for (const a of t)
|
|
15
|
+
a != null && (r < a || r === void 0 && a >= a) && (r = a);
|
|
16
|
+
else {
|
|
17
|
+
let a = -1;
|
|
18
|
+
for (let c of t)
|
|
19
|
+
(c = n(c, ++a, t)) != null && (r < c || r === void 0 && c >= c) && (r = c);
|
|
20
|
+
}
|
|
21
|
+
return r;
|
|
22
|
+
}
|
|
23
|
+
function pt(t, n) {
|
|
24
|
+
let r;
|
|
25
|
+
if (n === void 0)
|
|
26
|
+
for (const a of t)
|
|
27
|
+
a != null && (r > a || r === void 0 && a >= a) && (r = a);
|
|
28
|
+
else {
|
|
29
|
+
let a = -1;
|
|
30
|
+
for (let c of t)
|
|
31
|
+
(c = n(c, ++a, t)) != null && (r > c || r === void 0 && c >= c) && (r = c);
|
|
32
|
+
}
|
|
33
|
+
return r;
|
|
34
|
+
}
|
|
35
|
+
function tt(t, n) {
|
|
36
|
+
let r = 0;
|
|
37
|
+
if (n === void 0)
|
|
38
|
+
for (let a of t)
|
|
39
|
+
(a = +a) && (r += a);
|
|
40
|
+
else {
|
|
41
|
+
let a = -1;
|
|
42
|
+
for (let c of t)
|
|
43
|
+
(c = +n(c, ++a, t)) && (r += c);
|
|
44
|
+
}
|
|
45
|
+
return r;
|
|
46
|
+
}
|
|
47
|
+
function Ot(t) {
|
|
48
|
+
return t.target.depth;
|
|
49
|
+
}
|
|
50
|
+
function Ct(t) {
|
|
51
|
+
return t.depth;
|
|
52
|
+
}
|
|
53
|
+
function Dt(t, n) {
|
|
54
|
+
return n - 1 - t.height;
|
|
55
|
+
}
|
|
56
|
+
function _t(t, n) {
|
|
57
|
+
return t.sourceLinks.length ? t.depth : n - 1;
|
|
58
|
+
}
|
|
59
|
+
function It(t) {
|
|
60
|
+
return t.targetLinks.length ? t.depth : t.sourceLinks.length ? pt(t.sourceLinks, Ot) - 1 : 0;
|
|
61
|
+
}
|
|
62
|
+
function K(t) {
|
|
63
|
+
return function() {
|
|
64
|
+
return t;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function ht(t, n) {
|
|
68
|
+
return Q(t.source, n.source) || t.index - n.index;
|
|
69
|
+
}
|
|
70
|
+
function ut(t, n) {
|
|
71
|
+
return Q(t.target, n.target) || t.index - n.index;
|
|
72
|
+
}
|
|
73
|
+
function Q(t, n) {
|
|
74
|
+
return t.y0 - n.y0;
|
|
75
|
+
}
|
|
76
|
+
function et(t) {
|
|
77
|
+
return t.value;
|
|
78
|
+
}
|
|
79
|
+
function $t(t) {
|
|
80
|
+
return t.index;
|
|
81
|
+
}
|
|
82
|
+
function jt(t) {
|
|
83
|
+
return t.nodes;
|
|
84
|
+
}
|
|
85
|
+
function zt(t) {
|
|
86
|
+
return t.links;
|
|
87
|
+
}
|
|
88
|
+
function ft(t, n) {
|
|
89
|
+
const r = t.get(n);
|
|
90
|
+
if (!r)
|
|
91
|
+
throw new Error("missing: " + n);
|
|
92
|
+
return r;
|
|
93
|
+
}
|
|
94
|
+
function yt({ nodes: t }) {
|
|
95
|
+
for (const n of t) {
|
|
96
|
+
let r = n.y0, a = r;
|
|
97
|
+
for (const c of n.sourceLinks)
|
|
98
|
+
c.y0 = r + c.width / 2, r += c.width;
|
|
99
|
+
for (const c of n.targetLinks)
|
|
100
|
+
c.y1 = a + c.width / 2, a += c.width;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function Ft() {
|
|
104
|
+
let t = 0, n = 0, r = 1, a = 1, c = 24, k = 8, _, m = $t, i = _t, o, f, d = jt, y = zt, w = 6;
|
|
105
|
+
function v() {
|
|
106
|
+
const e = { nodes: d.apply(null, arguments), links: y.apply(null, arguments) };
|
|
107
|
+
return N(e), M(e), T(e), D(e), O(e), yt(e), e;
|
|
108
|
+
}
|
|
109
|
+
v.update = function(e) {
|
|
110
|
+
return yt(e), e;
|
|
111
|
+
}, v.nodeId = function(e) {
|
|
112
|
+
return arguments.length ? (m = typeof e == "function" ? e : K(e), v) : m;
|
|
113
|
+
}, v.nodeAlign = function(e) {
|
|
114
|
+
return arguments.length ? (i = typeof e == "function" ? e : K(e), v) : i;
|
|
115
|
+
}, v.nodeSort = function(e) {
|
|
116
|
+
return arguments.length ? (o = e, v) : o;
|
|
117
|
+
}, v.nodeWidth = function(e) {
|
|
118
|
+
return arguments.length ? (c = +e, v) : c;
|
|
119
|
+
}, v.nodePadding = function(e) {
|
|
120
|
+
return arguments.length ? (k = _ = +e, v) : k;
|
|
121
|
+
}, v.nodes = function(e) {
|
|
122
|
+
return arguments.length ? (d = typeof e == "function" ? e : K(e), v) : d;
|
|
123
|
+
}, v.links = function(e) {
|
|
124
|
+
return arguments.length ? (y = typeof e == "function" ? e : K(e), v) : y;
|
|
125
|
+
}, v.linkSort = function(e) {
|
|
126
|
+
return arguments.length ? (f = e, v) : f;
|
|
127
|
+
}, v.size = function(e) {
|
|
128
|
+
return arguments.length ? (t = n = 0, r = +e[0], a = +e[1], v) : [r - t, a - n];
|
|
129
|
+
}, v.extent = function(e) {
|
|
130
|
+
return arguments.length ? (t = +e[0][0], r = +e[1][0], n = +e[0][1], a = +e[1][1], v) : [[t, n], [r, a]];
|
|
131
|
+
}, v.iterations = function(e) {
|
|
132
|
+
return arguments.length ? (w = +e, v) : w;
|
|
133
|
+
};
|
|
134
|
+
function N({ nodes: e, links: u }) {
|
|
135
|
+
for (const [h, s] of e.entries())
|
|
136
|
+
s.index = h, s.sourceLinks = [], s.targetLinks = [];
|
|
137
|
+
const l = new Map(e.map((h, s) => [m(h, s, e), h]));
|
|
138
|
+
for (const [h, s] of u.entries()) {
|
|
139
|
+
s.index = h;
|
|
140
|
+
let { source: x, target: b } = s;
|
|
141
|
+
typeof x != "object" && (x = s.source = ft(l, x)), typeof b != "object" && (b = s.target = ft(l, b)), x.sourceLinks.push(s), b.targetLinks.push(s);
|
|
142
|
+
}
|
|
143
|
+
if (f != null)
|
|
144
|
+
for (const { sourceLinks: h, targetLinks: s } of e)
|
|
145
|
+
h.sort(f), s.sort(f);
|
|
146
|
+
}
|
|
147
|
+
function M({ nodes: e }) {
|
|
148
|
+
for (const u of e)
|
|
149
|
+
u.value = u.fixedValue === void 0 ? Math.max(tt(u.sourceLinks, et), tt(u.targetLinks, et)) : u.fixedValue;
|
|
150
|
+
}
|
|
151
|
+
function T({ nodes: e }) {
|
|
152
|
+
const u = e.length;
|
|
153
|
+
let l = new Set(e), h = /* @__PURE__ */ new Set(), s = 0;
|
|
154
|
+
for (; l.size; ) {
|
|
155
|
+
for (const x of l) {
|
|
156
|
+
x.depth = s;
|
|
157
|
+
for (const { target: b } of x.sourceLinks)
|
|
158
|
+
h.add(b);
|
|
159
|
+
}
|
|
160
|
+
if (++s > u)
|
|
161
|
+
throw new Error("circular link");
|
|
162
|
+
l = h, h = /* @__PURE__ */ new Set();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function D({ nodes: e }) {
|
|
166
|
+
const u = e.length;
|
|
167
|
+
let l = new Set(e), h = /* @__PURE__ */ new Set(), s = 0;
|
|
168
|
+
for (; l.size; ) {
|
|
169
|
+
for (const x of l) {
|
|
170
|
+
x.height = s;
|
|
171
|
+
for (const { source: b } of x.targetLinks)
|
|
172
|
+
h.add(b);
|
|
173
|
+
}
|
|
174
|
+
if (++s > u)
|
|
175
|
+
throw new Error("circular link");
|
|
176
|
+
l = h, h = /* @__PURE__ */ new Set();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function P({ nodes: e }) {
|
|
180
|
+
const u = ct(e, (s) => s.depth) + 1, l = (r - t - c) / (u - 1), h = new Array(u);
|
|
181
|
+
for (const s of e) {
|
|
182
|
+
const x = Math.max(0, Math.min(u - 1, Math.floor(i.call(null, s, u))));
|
|
183
|
+
s.layer = x, s.x0 = t + x * l, s.x1 = s.x0 + c, h[x] ? h[x].push(s) : h[x] = [s];
|
|
184
|
+
}
|
|
185
|
+
if (o)
|
|
186
|
+
for (const s of h)
|
|
187
|
+
s.sort(o);
|
|
188
|
+
return h;
|
|
189
|
+
}
|
|
190
|
+
function S(e) {
|
|
191
|
+
const u = pt(e, (l) => (a - n - (l.length - 1) * _) / tt(l, et));
|
|
192
|
+
for (const l of e) {
|
|
193
|
+
let h = n;
|
|
194
|
+
for (const s of l) {
|
|
195
|
+
s.y0 = h, s.y1 = h + s.value * u, h = s.y1 + _;
|
|
196
|
+
for (const x of s.sourceLinks)
|
|
197
|
+
x.width = x.value * u;
|
|
198
|
+
}
|
|
199
|
+
h = (a - h + _) / (l.length + 1);
|
|
200
|
+
for (let s = 0; s < l.length; ++s) {
|
|
201
|
+
const x = l[s];
|
|
202
|
+
x.y0 += h * (s + 1), x.y1 += h * (s + 1);
|
|
203
|
+
}
|
|
204
|
+
$(l);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function O(e) {
|
|
208
|
+
const u = P(e);
|
|
209
|
+
_ = Math.min(k, (a - n) / (ct(u, (l) => l.length) - 1)), S(u);
|
|
210
|
+
for (let l = 0; l < w; ++l) {
|
|
211
|
+
const h = Math.pow(0.99, l), s = Math.max(1 - h, (l + 1) / w);
|
|
212
|
+
C(u, h, s), I(u, h, s);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function I(e, u, l) {
|
|
216
|
+
for (let h = 1, s = e.length; h < s; ++h) {
|
|
217
|
+
const x = e[h];
|
|
218
|
+
for (const b of x) {
|
|
219
|
+
let W = 0, j = 0;
|
|
220
|
+
for (const { source: q, value: J } of b.targetLinks) {
|
|
221
|
+
let V = J * (b.layer - q.layer);
|
|
222
|
+
W += A(q, b) * V, j += V;
|
|
223
|
+
}
|
|
224
|
+
if (!(j > 0))
|
|
225
|
+
continue;
|
|
226
|
+
let Y = (W / j - b.y0) * u;
|
|
227
|
+
b.y0 += Y, b.y1 += Y, E(b);
|
|
228
|
+
}
|
|
229
|
+
o === void 0 && x.sort(Q), g(x, l);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function C(e, u, l) {
|
|
233
|
+
for (let h = e.length, s = h - 2; s >= 0; --s) {
|
|
234
|
+
const x = e[s];
|
|
235
|
+
for (const b of x) {
|
|
236
|
+
let W = 0, j = 0;
|
|
237
|
+
for (const { target: q, value: J } of b.sourceLinks) {
|
|
238
|
+
let V = J * (q.layer - b.layer);
|
|
239
|
+
W += U(b, q) * V, j += V;
|
|
240
|
+
}
|
|
241
|
+
if (!(j > 0))
|
|
242
|
+
continue;
|
|
243
|
+
let Y = (W / j - b.y0) * u;
|
|
244
|
+
b.y0 += Y, b.y1 += Y, E(b);
|
|
245
|
+
}
|
|
246
|
+
o === void 0 && x.sort(Q), g(x, l);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function g(e, u) {
|
|
250
|
+
const l = e.length >> 1, h = e[l];
|
|
251
|
+
G(e, h.y0 - _, l - 1, u), L(e, h.y1 + _, l + 1, u), G(e, a, e.length - 1, u), L(e, n, 0, u);
|
|
252
|
+
}
|
|
253
|
+
function L(e, u, l, h) {
|
|
254
|
+
for (; l < e.length; ++l) {
|
|
255
|
+
const s = e[l], x = (u - s.y0) * h;
|
|
256
|
+
x > 1e-6 && (s.y0 += x, s.y1 += x), u = s.y1 + _;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function G(e, u, l, h) {
|
|
260
|
+
for (; l >= 0; --l) {
|
|
261
|
+
const s = e[l], x = (s.y1 - u) * h;
|
|
262
|
+
x > 1e-6 && (s.y0 -= x, s.y1 -= x), u = s.y0 - _;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function E({ sourceLinks: e, targetLinks: u }) {
|
|
266
|
+
if (f === void 0) {
|
|
267
|
+
for (const { source: { sourceLinks: l } } of u)
|
|
268
|
+
l.sort(ut);
|
|
269
|
+
for (const { target: { targetLinks: l } } of e)
|
|
270
|
+
l.sort(ht);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function $(e) {
|
|
274
|
+
if (f === void 0)
|
|
275
|
+
for (const { sourceLinks: u, targetLinks: l } of e)
|
|
276
|
+
u.sort(ut), l.sort(ht);
|
|
277
|
+
}
|
|
278
|
+
function A(e, u) {
|
|
279
|
+
let l = e.y0 - (e.sourceLinks.length - 1) * _ / 2;
|
|
280
|
+
for (const { target: h, width: s } of e.sourceLinks) {
|
|
281
|
+
if (h === u)
|
|
282
|
+
break;
|
|
283
|
+
l += s + _;
|
|
284
|
+
}
|
|
285
|
+
for (const { source: h, width: s } of u.targetLinks) {
|
|
286
|
+
if (h === e)
|
|
287
|
+
break;
|
|
288
|
+
l -= s;
|
|
289
|
+
}
|
|
290
|
+
return l;
|
|
291
|
+
}
|
|
292
|
+
function U(e, u) {
|
|
293
|
+
let l = u.y0 - (u.targetLinks.length - 1) * _ / 2;
|
|
294
|
+
for (const { source: h, width: s } of u.targetLinks) {
|
|
295
|
+
if (h === e)
|
|
296
|
+
break;
|
|
297
|
+
l += s + _;
|
|
298
|
+
}
|
|
299
|
+
for (const { target: h, width: s } of e.sourceLinks) {
|
|
300
|
+
if (h === u)
|
|
301
|
+
break;
|
|
302
|
+
l -= s;
|
|
303
|
+
}
|
|
304
|
+
return l;
|
|
305
|
+
}
|
|
306
|
+
return v;
|
|
307
|
+
}
|
|
308
|
+
var rt = Math.PI, st = 2 * rt, z = 1e-6, Gt = st - z;
|
|
309
|
+
function ot() {
|
|
310
|
+
this._x0 = this._y0 = // start of current subpath
|
|
311
|
+
this._x1 = this._y1 = null, this._ = "";
|
|
312
|
+
}
|
|
313
|
+
function mt() {
|
|
314
|
+
return new ot();
|
|
315
|
+
}
|
|
316
|
+
ot.prototype = mt.prototype = {
|
|
317
|
+
constructor: ot,
|
|
318
|
+
moveTo: function(t, n) {
|
|
319
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n);
|
|
320
|
+
},
|
|
321
|
+
closePath: function() {
|
|
322
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
|
|
323
|
+
},
|
|
324
|
+
lineTo: function(t, n) {
|
|
325
|
+
this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +n);
|
|
326
|
+
},
|
|
327
|
+
quadraticCurveTo: function(t, n, r, a) {
|
|
328
|
+
this._ += "Q" + +t + "," + +n + "," + (this._x1 = +r) + "," + (this._y1 = +a);
|
|
329
|
+
},
|
|
330
|
+
bezierCurveTo: function(t, n, r, a, c, k) {
|
|
331
|
+
this._ += "C" + +t + "," + +n + "," + +r + "," + +a + "," + (this._x1 = +c) + "," + (this._y1 = +k);
|
|
332
|
+
},
|
|
333
|
+
arcTo: function(t, n, r, a, c) {
|
|
334
|
+
t = +t, n = +n, r = +r, a = +a, c = +c;
|
|
335
|
+
var k = this._x1, _ = this._y1, m = r - t, i = a - n, o = k - t, f = _ - n, d = o * o + f * f;
|
|
336
|
+
if (c < 0)
|
|
337
|
+
throw new Error("negative radius: " + c);
|
|
338
|
+
if (this._x1 === null)
|
|
339
|
+
this._ += "M" + (this._x1 = t) + "," + (this._y1 = n);
|
|
340
|
+
else if (d > z)
|
|
341
|
+
if (!(Math.abs(f * m - i * o) > z) || !c)
|
|
342
|
+
this._ += "L" + (this._x1 = t) + "," + (this._y1 = n);
|
|
343
|
+
else {
|
|
344
|
+
var y = r - k, w = a - _, v = m * m + i * i, N = y * y + w * w, M = Math.sqrt(v), T = Math.sqrt(d), D = c * Math.tan((rt - Math.acos((v + d - N) / (2 * M * T))) / 2), P = D / T, S = D / M;
|
|
345
|
+
Math.abs(P - 1) > z && (this._ += "L" + (t + P * o) + "," + (n + P * f)), this._ += "A" + c + "," + c + ",0,0," + +(f * y > o * w) + "," + (this._x1 = t + S * m) + "," + (this._y1 = n + S * i);
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
arc: function(t, n, r, a, c, k) {
|
|
349
|
+
t = +t, n = +n, r = +r, k = !!k;
|
|
350
|
+
var _ = r * Math.cos(a), m = r * Math.sin(a), i = t + _, o = n + m, f = 1 ^ k, d = k ? a - c : c - a;
|
|
351
|
+
if (r < 0)
|
|
352
|
+
throw new Error("negative radius: " + r);
|
|
353
|
+
this._x1 === null ? this._ += "M" + i + "," + o : (Math.abs(this._x1 - i) > z || Math.abs(this._y1 - o) > z) && (this._ += "L" + i + "," + o), r && (d < 0 && (d = d % st + st), d > Gt ? this._ += "A" + r + "," + r + ",0,1," + f + "," + (t - _) + "," + (n - m) + "A" + r + "," + r + ",0,1," + f + "," + (this._x1 = i) + "," + (this._y1 = o) : d > z && (this._ += "A" + r + "," + r + ",0," + +(d >= rt) + "," + f + "," + (this._x1 = t + r * Math.cos(c)) + "," + (this._y1 = n + r * Math.sin(c))));
|
|
354
|
+
},
|
|
355
|
+
rect: function(t, n, r, a) {
|
|
356
|
+
this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n) + "h" + +r + "v" + +a + "h" + -r + "Z";
|
|
357
|
+
},
|
|
358
|
+
toString: function() {
|
|
359
|
+
return this._;
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
function gt(t) {
|
|
363
|
+
return function() {
|
|
364
|
+
return t;
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
function Ut(t) {
|
|
368
|
+
return t[0];
|
|
369
|
+
}
|
|
370
|
+
function Wt(t) {
|
|
371
|
+
return t[1];
|
|
372
|
+
}
|
|
373
|
+
var Yt = Array.prototype.slice;
|
|
374
|
+
function qt(t) {
|
|
375
|
+
return t.source;
|
|
376
|
+
}
|
|
377
|
+
function Vt(t) {
|
|
378
|
+
return t.target;
|
|
379
|
+
}
|
|
380
|
+
function Xt(t) {
|
|
381
|
+
var n = qt, r = Vt, a = Ut, c = Wt, k = null;
|
|
382
|
+
function _() {
|
|
383
|
+
var m, i = Yt.call(arguments), o = n.apply(this, i), f = r.apply(this, i);
|
|
384
|
+
if (k || (k = m = mt()), t(k, +a.apply(this, (i[0] = o, i)), +c.apply(this, i), +a.apply(this, (i[0] = f, i)), +c.apply(this, i)), m)
|
|
385
|
+
return k = null, m + "" || null;
|
|
386
|
+
}
|
|
387
|
+
return _.source = function(m) {
|
|
388
|
+
return arguments.length ? (n = m, _) : n;
|
|
389
|
+
}, _.target = function(m) {
|
|
390
|
+
return arguments.length ? (r = m, _) : r;
|
|
391
|
+
}, _.x = function(m) {
|
|
392
|
+
return arguments.length ? (a = typeof m == "function" ? m : gt(+m), _) : a;
|
|
393
|
+
}, _.y = function(m) {
|
|
394
|
+
return arguments.length ? (c = typeof m == "function" ? m : gt(+m), _) : c;
|
|
395
|
+
}, _.context = function(m) {
|
|
396
|
+
return arguments.length ? (k = m ?? null, _) : k;
|
|
397
|
+
}, _;
|
|
398
|
+
}
|
|
399
|
+
function Kt(t, n, r, a, c) {
|
|
400
|
+
t.moveTo(n, r), t.bezierCurveTo(n = (n + a) / 2, r, n, c, a, c);
|
|
401
|
+
}
|
|
402
|
+
function Qt() {
|
|
403
|
+
return Xt(Kt);
|
|
404
|
+
}
|
|
405
|
+
function Rt(t) {
|
|
406
|
+
return [t.source.x1, t.y0];
|
|
407
|
+
}
|
|
408
|
+
function Zt(t) {
|
|
409
|
+
return [t.target.x0, t.y1];
|
|
410
|
+
}
|
|
411
|
+
function Bt() {
|
|
412
|
+
return Qt().source(Rt).target(Zt);
|
|
413
|
+
}
|
|
414
|
+
var at = function() {
|
|
415
|
+
var t = /* @__PURE__ */ p(function(m, i, o, f) {
|
|
416
|
+
for (o = o || {}, f = m.length; f--; o[m[f]] = i)
|
|
417
|
+
;
|
|
418
|
+
return o;
|
|
419
|
+
}, "o"), n = [1, 9], r = [1, 10], a = [1, 5, 10, 12], c = {
|
|
420
|
+
trace: /* @__PURE__ */ p(function() {
|
|
421
|
+
}, "trace"),
|
|
422
|
+
yy: {},
|
|
423
|
+
symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
|
|
424
|
+
terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
|
|
425
|
+
productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
|
|
426
|
+
performAction: /* @__PURE__ */ p(function(m, i, o, f, d, y, w) {
|
|
427
|
+
var v = y.length - 1;
|
|
428
|
+
switch (d) {
|
|
429
|
+
case 7:
|
|
430
|
+
const N = f.findOrCreateNode(y[v - 4].trim().replaceAll('""', '"')), M = f.findOrCreateNode(y[v - 2].trim().replaceAll('""', '"')), T = parseFloat(y[v].trim());
|
|
431
|
+
f.addLink(N, M, T);
|
|
432
|
+
break;
|
|
433
|
+
case 8:
|
|
434
|
+
case 9:
|
|
435
|
+
case 11:
|
|
436
|
+
this.$ = y[v];
|
|
437
|
+
break;
|
|
438
|
+
case 10:
|
|
439
|
+
this.$ = y[v - 1];
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
}, "anonymous"),
|
|
443
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: r }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(r, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(r, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: r }, { 15: 18, 16: 7, 17: 8, 18: n, 20: r }, { 18: [1, 19] }, t(r, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: n, 20: r }, t([1, 5, 10], [2, 7])],
|
|
444
|
+
defaultActions: { 11: [2, 1], 12: [2, 5] },
|
|
445
|
+
parseError: /* @__PURE__ */ p(function(m, i) {
|
|
446
|
+
if (i.recoverable)
|
|
447
|
+
this.trace(m);
|
|
448
|
+
else {
|
|
449
|
+
var o = new Error(m);
|
|
450
|
+
throw o.hash = i, o;
|
|
451
|
+
}
|
|
452
|
+
}, "parseError"),
|
|
453
|
+
parse: /* @__PURE__ */ p(function(m) {
|
|
454
|
+
var i = this, o = [0], f = [], d = [null], y = [], w = this.table, v = "", N = 0, M = 0, T = 2, D = 1, P = y.slice.call(arguments, 1), S = Object.create(this.lexer), O = { yy: {} };
|
|
455
|
+
for (var I in this.yy)
|
|
456
|
+
Object.prototype.hasOwnProperty.call(this.yy, I) && (O.yy[I] = this.yy[I]);
|
|
457
|
+
S.setInput(m, O.yy), O.yy.lexer = S, O.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
|
|
458
|
+
var C = S.yylloc;
|
|
459
|
+
y.push(C);
|
|
460
|
+
var g = S.options && S.options.ranges;
|
|
461
|
+
typeof O.yy.parseError == "function" ? this.parseError = O.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
462
|
+
function L(b) {
|
|
463
|
+
o.length = o.length - 2 * b, d.length = d.length - b, y.length = y.length - b;
|
|
464
|
+
}
|
|
465
|
+
p(L, "popStack");
|
|
466
|
+
function G() {
|
|
467
|
+
var b;
|
|
468
|
+
return b = f.pop() || S.lex() || D, typeof b != "number" && (b instanceof Array && (f = b, b = f.pop()), b = i.symbols_[b] || b), b;
|
|
469
|
+
}
|
|
470
|
+
p(G, "lex");
|
|
471
|
+
for (var E, $, A, U, e = {}, u, l, h, s; ; ) {
|
|
472
|
+
if ($ = o[o.length - 1], this.defaultActions[$] ? A = this.defaultActions[$] : ((E === null || typeof E > "u") && (E = G()), A = w[$] && w[$][E]), typeof A > "u" || !A.length || !A[0]) {
|
|
473
|
+
var x = "";
|
|
474
|
+
s = [];
|
|
475
|
+
for (u in w[$])
|
|
476
|
+
this.terminals_[u] && u > T && s.push("'" + this.terminals_[u] + "'");
|
|
477
|
+
S.showPosition ? x = "Parse error on line " + (N + 1) + `:
|
|
478
|
+
` + S.showPosition() + `
|
|
479
|
+
Expecting ` + s.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : x = "Parse error on line " + (N + 1) + ": Unexpected " + (E == D ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError(x, {
|
|
480
|
+
text: S.match,
|
|
481
|
+
token: this.terminals_[E] || E,
|
|
482
|
+
line: S.yylineno,
|
|
483
|
+
loc: C,
|
|
484
|
+
expected: s
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
if (A[0] instanceof Array && A.length > 1)
|
|
488
|
+
throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + E);
|
|
489
|
+
switch (A[0]) {
|
|
490
|
+
case 1:
|
|
491
|
+
o.push(E), d.push(S.yytext), y.push(S.yylloc), o.push(A[1]), E = null, M = S.yyleng, v = S.yytext, N = S.yylineno, C = S.yylloc;
|
|
492
|
+
break;
|
|
493
|
+
case 2:
|
|
494
|
+
if (l = this.productions_[A[1]][1], e.$ = d[d.length - l], e._$ = {
|
|
495
|
+
first_line: y[y.length - (l || 1)].first_line,
|
|
496
|
+
last_line: y[y.length - 1].last_line,
|
|
497
|
+
first_column: y[y.length - (l || 1)].first_column,
|
|
498
|
+
last_column: y[y.length - 1].last_column
|
|
499
|
+
}, g && (e._$.range = [
|
|
500
|
+
y[y.length - (l || 1)].range[0],
|
|
501
|
+
y[y.length - 1].range[1]
|
|
502
|
+
]), U = this.performAction.apply(e, [
|
|
503
|
+
v,
|
|
504
|
+
M,
|
|
505
|
+
N,
|
|
506
|
+
O.yy,
|
|
507
|
+
A[1],
|
|
508
|
+
d,
|
|
509
|
+
y
|
|
510
|
+
].concat(P)), typeof U < "u")
|
|
511
|
+
return U;
|
|
512
|
+
l && (o = o.slice(0, -1 * l * 2), d = d.slice(0, -1 * l), y = y.slice(0, -1 * l)), o.push(this.productions_[A[1]][0]), d.push(e.$), y.push(e._$), h = w[o[o.length - 2]][o[o.length - 1]], o.push(h);
|
|
513
|
+
break;
|
|
514
|
+
case 3:
|
|
515
|
+
return !0;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return !0;
|
|
519
|
+
}, "parse")
|
|
520
|
+
}, k = /* @__PURE__ */ function() {
|
|
521
|
+
var m = {
|
|
522
|
+
EOF: 1,
|
|
523
|
+
parseError: /* @__PURE__ */ p(function(i, o) {
|
|
524
|
+
if (this.yy.parser)
|
|
525
|
+
this.yy.parser.parseError(i, o);
|
|
526
|
+
else
|
|
527
|
+
throw new Error(i);
|
|
528
|
+
}, "parseError"),
|
|
529
|
+
// resets the lexer, sets new input
|
|
530
|
+
setInput: /* @__PURE__ */ p(function(i, o) {
|
|
531
|
+
return this.yy = o || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
532
|
+
first_line: 1,
|
|
533
|
+
first_column: 0,
|
|
534
|
+
last_line: 1,
|
|
535
|
+
last_column: 0
|
|
536
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
537
|
+
}, "setInput"),
|
|
538
|
+
// consumes and returns one char from the input
|
|
539
|
+
input: /* @__PURE__ */ p(function() {
|
|
540
|
+
var i = this._input[0];
|
|
541
|
+
this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
|
|
542
|
+
var o = i.match(/(?:\r\n?|\n).*/g);
|
|
543
|
+
return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
|
|
544
|
+
}, "input"),
|
|
545
|
+
// unshifts one char (or a string) into the input
|
|
546
|
+
unput: /* @__PURE__ */ p(function(i) {
|
|
547
|
+
var o = i.length, f = i.split(/(?:\r\n?|\n)/g);
|
|
548
|
+
this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
|
|
549
|
+
var d = this.match.split(/(?:\r\n?|\n)/g);
|
|
550
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
551
|
+
var y = this.yylloc.range;
|
|
552
|
+
return this.yylloc = {
|
|
553
|
+
first_line: this.yylloc.first_line,
|
|
554
|
+
last_line: this.yylineno + 1,
|
|
555
|
+
first_column: this.yylloc.first_column,
|
|
556
|
+
last_column: f ? (f.length === d.length ? this.yylloc.first_column : 0) + d[d.length - f.length].length - f[0].length : this.yylloc.first_column - o
|
|
557
|
+
}, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
|
|
558
|
+
}, "unput"),
|
|
559
|
+
// When called from action, caches matched text and appends it on next action
|
|
560
|
+
more: /* @__PURE__ */ p(function() {
|
|
561
|
+
return this._more = !0, this;
|
|
562
|
+
}, "more"),
|
|
563
|
+
// 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.
|
|
564
|
+
reject: /* @__PURE__ */ p(function() {
|
|
565
|
+
if (this.options.backtrack_lexer)
|
|
566
|
+
this._backtrack = !0;
|
|
567
|
+
else
|
|
568
|
+
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).
|
|
569
|
+
` + this.showPosition(), {
|
|
570
|
+
text: "",
|
|
571
|
+
token: null,
|
|
572
|
+
line: this.yylineno
|
|
573
|
+
});
|
|
574
|
+
return this;
|
|
575
|
+
}, "reject"),
|
|
576
|
+
// retain first n characters of the match
|
|
577
|
+
less: /* @__PURE__ */ p(function(i) {
|
|
578
|
+
this.unput(this.match.slice(i));
|
|
579
|
+
}, "less"),
|
|
580
|
+
// displays already matched input, i.e. for error messages
|
|
581
|
+
pastInput: /* @__PURE__ */ p(function() {
|
|
582
|
+
var i = this.matched.substr(0, this.matched.length - this.match.length);
|
|
583
|
+
return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
|
|
584
|
+
}, "pastInput"),
|
|
585
|
+
// displays upcoming input, i.e. for error messages
|
|
586
|
+
upcomingInput: /* @__PURE__ */ p(function() {
|
|
587
|
+
var i = this.match;
|
|
588
|
+
return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
589
|
+
}, "upcomingInput"),
|
|
590
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
591
|
+
showPosition: /* @__PURE__ */ p(function() {
|
|
592
|
+
var i = this.pastInput(), o = new Array(i.length + 1).join("-");
|
|
593
|
+
return i + this.upcomingInput() + `
|
|
594
|
+
` + o + "^";
|
|
595
|
+
}, "showPosition"),
|
|
596
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
597
|
+
test_match: /* @__PURE__ */ p(function(i, o) {
|
|
598
|
+
var f, d, y;
|
|
599
|
+
if (this.options.backtrack_lexer && (y = {
|
|
600
|
+
yylineno: this.yylineno,
|
|
601
|
+
yylloc: {
|
|
602
|
+
first_line: this.yylloc.first_line,
|
|
603
|
+
last_line: this.last_line,
|
|
604
|
+
first_column: this.yylloc.first_column,
|
|
605
|
+
last_column: this.yylloc.last_column
|
|
606
|
+
},
|
|
607
|
+
yytext: this.yytext,
|
|
608
|
+
match: this.match,
|
|
609
|
+
matches: this.matches,
|
|
610
|
+
matched: this.matched,
|
|
611
|
+
yyleng: this.yyleng,
|
|
612
|
+
offset: this.offset,
|
|
613
|
+
_more: this._more,
|
|
614
|
+
_input: this._input,
|
|
615
|
+
yy: this.yy,
|
|
616
|
+
conditionStack: this.conditionStack.slice(0),
|
|
617
|
+
done: this.done
|
|
618
|
+
}, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
|
|
619
|
+
first_line: this.yylloc.last_line,
|
|
620
|
+
last_line: this.yylineno + 1,
|
|
621
|
+
first_column: this.yylloc.last_column,
|
|
622
|
+
last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
|
|
623
|
+
}, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], f = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
|
|
624
|
+
return f;
|
|
625
|
+
if (this._backtrack) {
|
|
626
|
+
for (var w in y)
|
|
627
|
+
this[w] = y[w];
|
|
628
|
+
return !1;
|
|
629
|
+
}
|
|
630
|
+
return !1;
|
|
631
|
+
}, "test_match"),
|
|
632
|
+
// return next match in input
|
|
633
|
+
next: /* @__PURE__ */ p(function() {
|
|
634
|
+
if (this.done)
|
|
635
|
+
return this.EOF;
|
|
636
|
+
this._input || (this.done = !0);
|
|
637
|
+
var i, o, f, d;
|
|
638
|
+
this._more || (this.yytext = "", this.match = "");
|
|
639
|
+
for (var y = this._currentRules(), w = 0; w < y.length; w++)
|
|
640
|
+
if (f = this._input.match(this.rules[y[w]]), f && (!o || f[0].length > o[0].length)) {
|
|
641
|
+
if (o = f, d = w, this.options.backtrack_lexer) {
|
|
642
|
+
if (i = this.test_match(f, y[w]), i !== !1)
|
|
643
|
+
return i;
|
|
644
|
+
if (this._backtrack) {
|
|
645
|
+
o = !1;
|
|
646
|
+
continue;
|
|
647
|
+
} else
|
|
648
|
+
return !1;
|
|
649
|
+
} else if (!this.options.flex)
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
return o ? (i = this.test_match(o, y[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
653
|
+
` + this.showPosition(), {
|
|
654
|
+
text: "",
|
|
655
|
+
token: null,
|
|
656
|
+
line: this.yylineno
|
|
657
|
+
});
|
|
658
|
+
}, "next"),
|
|
659
|
+
// return next match that has a token
|
|
660
|
+
lex: /* @__PURE__ */ p(function() {
|
|
661
|
+
var i = this.next();
|
|
662
|
+
return i || this.lex();
|
|
663
|
+
}, "lex"),
|
|
664
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
665
|
+
begin: /* @__PURE__ */ p(function(i) {
|
|
666
|
+
this.conditionStack.push(i);
|
|
667
|
+
}, "begin"),
|
|
668
|
+
// pop the previously active lexer condition state off the condition stack
|
|
669
|
+
popState: /* @__PURE__ */ p(function() {
|
|
670
|
+
var i = this.conditionStack.length - 1;
|
|
671
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
672
|
+
}, "popState"),
|
|
673
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
674
|
+
_currentRules: /* @__PURE__ */ p(function() {
|
|
675
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
676
|
+
}, "_currentRules"),
|
|
677
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
678
|
+
topState: /* @__PURE__ */ p(function(i) {
|
|
679
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
680
|
+
}, "topState"),
|
|
681
|
+
// alias for begin(condition)
|
|
682
|
+
pushState: /* @__PURE__ */ p(function(i) {
|
|
683
|
+
this.begin(i);
|
|
684
|
+
}, "pushState"),
|
|
685
|
+
// return the number of states currently on the stack
|
|
686
|
+
stateStackSize: /* @__PURE__ */ p(function() {
|
|
687
|
+
return this.conditionStack.length;
|
|
688
|
+
}, "stateStackSize"),
|
|
689
|
+
options: { "case-insensitive": !0 },
|
|
690
|
+
performAction: /* @__PURE__ */ p(function(i, o, f, d) {
|
|
691
|
+
switch (f) {
|
|
692
|
+
case 0:
|
|
693
|
+
return this.pushState("csv"), 4;
|
|
694
|
+
case 1:
|
|
695
|
+
return 10;
|
|
696
|
+
case 2:
|
|
697
|
+
return 5;
|
|
698
|
+
case 3:
|
|
699
|
+
return 12;
|
|
700
|
+
case 4:
|
|
701
|
+
return this.pushState("escaped_text"), 18;
|
|
702
|
+
case 5:
|
|
703
|
+
return 20;
|
|
704
|
+
case 6:
|
|
705
|
+
return this.popState("escaped_text"), 18;
|
|
706
|
+
case 7:
|
|
707
|
+
return 19;
|
|
708
|
+
}
|
|
709
|
+
}, "anonymous"),
|
|
710
|
+
rules: [/^(?:sankey-beta\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
|
|
711
|
+
conditions: { csv: { rules: [1, 2, 3, 4, 5, 6, 7], inclusive: !1 }, escaped_text: { rules: [6, 7], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7], inclusive: !0 } }
|
|
712
|
+
};
|
|
713
|
+
return m;
|
|
714
|
+
}();
|
|
715
|
+
c.lexer = k;
|
|
716
|
+
function _() {
|
|
717
|
+
this.yy = {};
|
|
718
|
+
}
|
|
719
|
+
return p(_, "Parser"), _.prototype = c, c.Parser = _, new _();
|
|
720
|
+
}();
|
|
721
|
+
at.parser = at;
|
|
722
|
+
var R = at, B = [], H = [], Z = /* @__PURE__ */ new Map(), Ht = /* @__PURE__ */ p(() => {
|
|
723
|
+
B = [], H = [], Z = /* @__PURE__ */ new Map(), Et();
|
|
724
|
+
}, "clear"), nt, Jt = (nt = class {
|
|
725
|
+
constructor(t, n, r = 0) {
|
|
726
|
+
this.source = t, this.target = n, this.value = r;
|
|
727
|
+
}
|
|
728
|
+
}, p(nt, "SankeyLink"), nt), te = /* @__PURE__ */ p((t, n, r) => {
|
|
729
|
+
B.push(new Jt(t, n, r));
|
|
730
|
+
}, "addLink"), it, ee = (it = class {
|
|
731
|
+
constructor(t) {
|
|
732
|
+
this.ID = t;
|
|
733
|
+
}
|
|
734
|
+
}, p(it, "SankeyNode"), it), ne = /* @__PURE__ */ p((t) => {
|
|
735
|
+
t = Lt.sanitizeText(t, lt());
|
|
736
|
+
let n = Z.get(t);
|
|
737
|
+
return n === void 0 && (n = new ee(t), Z.set(t, n), H.push(n)), n;
|
|
738
|
+
}, "findOrCreateNode"), ie = /* @__PURE__ */ p(() => H, "getNodes"), re = /* @__PURE__ */ p(() => B, "getLinks"), se = /* @__PURE__ */ p(() => ({
|
|
739
|
+
nodes: H.map((t) => ({ id: t.ID })),
|
|
740
|
+
links: B.map((t) => ({
|
|
741
|
+
source: t.source.ID,
|
|
742
|
+
target: t.target.ID,
|
|
743
|
+
value: t.value
|
|
744
|
+
}))
|
|
745
|
+
}), "getGraph"), oe = {
|
|
746
|
+
nodesMap: Z,
|
|
747
|
+
getConfig: /* @__PURE__ */ p(() => lt().sankey, "getConfig"),
|
|
748
|
+
getNodes: ie,
|
|
749
|
+
getLinks: re,
|
|
750
|
+
getGraph: se,
|
|
751
|
+
addLink: te,
|
|
752
|
+
findOrCreateNode: ne,
|
|
753
|
+
getAccTitle: xt,
|
|
754
|
+
setAccTitle: kt,
|
|
755
|
+
getAccDescription: vt,
|
|
756
|
+
setAccDescription: bt,
|
|
757
|
+
getDiagramTitle: wt,
|
|
758
|
+
setDiagramTitle: St,
|
|
759
|
+
clear: Ht
|
|
760
|
+
}, F, dt = (F = class {
|
|
761
|
+
static next(t) {
|
|
762
|
+
return new F(t + ++F.count);
|
|
763
|
+
}
|
|
764
|
+
constructor(t) {
|
|
765
|
+
this.id = t, this.href = `#${t}`;
|
|
766
|
+
}
|
|
767
|
+
toString() {
|
|
768
|
+
return "url(" + this.href + ")";
|
|
769
|
+
}
|
|
770
|
+
}, p(F, "Uid"), F.count = 0, F), ae = {
|
|
771
|
+
left: Ct,
|
|
772
|
+
right: Dt,
|
|
773
|
+
center: It,
|
|
774
|
+
justify: _t
|
|
775
|
+
}, le = /* @__PURE__ */ p(function(t, n, r, a) {
|
|
776
|
+
const { securityLevel: c, sankey: k } = lt(), _ = At.sankey;
|
|
777
|
+
let m;
|
|
778
|
+
c === "sandbox" && (m = X("#i" + n));
|
|
779
|
+
const i = c === "sandbox" ? X(m.nodes()[0].contentDocument.body) : X("body"), o = c === "sandbox" ? i.select(`[id="${n}"]`) : X(`[id="${n}"]`), f = (k == null ? void 0 : k.width) ?? _.width, d = (k == null ? void 0 : k.height) ?? _.width, y = (k == null ? void 0 : k.useMaxWidth) ?? _.useMaxWidth, w = (k == null ? void 0 : k.nodeAlignment) ?? _.nodeAlignment, v = (k == null ? void 0 : k.prefix) ?? _.prefix, N = (k == null ? void 0 : k.suffix) ?? _.suffix, M = (k == null ? void 0 : k.showValues) ?? _.showValues, T = a.db.getGraph(), D = ae[w];
|
|
780
|
+
Ft().nodeId((g) => g.id).nodeWidth(10).nodePadding(10 + (M ? 15 : 0)).nodeAlign(D).extent([
|
|
781
|
+
[0, 0],
|
|
782
|
+
[f, d]
|
|
783
|
+
])(T);
|
|
784
|
+
const P = Tt(Nt);
|
|
785
|
+
o.append("g").attr("class", "nodes").selectAll(".node").data(T.nodes).join("g").attr("class", "node").attr("id", (g) => (g.uid = dt.next("node-")).id).attr("transform", function(g) {
|
|
786
|
+
return "translate(" + g.x0 + "," + g.y0 + ")";
|
|
787
|
+
}).attr("x", (g) => g.x0).attr("y", (g) => g.y0).append("rect").attr("height", (g) => g.y1 - g.y0).attr("width", (g) => g.x1 - g.x0).attr("fill", (g) => P(g.id));
|
|
788
|
+
const S = /* @__PURE__ */ p(({ id: g, value: L }) => M ? `${g}
|
|
789
|
+
${v}${Math.round(L * 100) / 100}${N}` : g, "getText");
|
|
790
|
+
o.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(T.nodes).join("text").attr("x", (g) => g.x0 < f / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", `${M ? "0" : "0.35"}em`).attr("text-anchor", (g) => g.x0 < f / 2 ? "start" : "end").text(S);
|
|
791
|
+
const O = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(T.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), I = (k == null ? void 0 : k.linkColor) ?? "gradient";
|
|
792
|
+
if (I === "gradient") {
|
|
793
|
+
const g = O.append("linearGradient").attr("id", (L) => (L.uid = dt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (L) => L.source.x1).attr("x2", (L) => L.target.x0);
|
|
794
|
+
g.append("stop").attr("offset", "0%").attr("stop-color", (L) => P(L.source.id)), g.append("stop").attr("offset", "100%").attr("stop-color", (L) => P(L.target.id));
|
|
795
|
+
}
|
|
796
|
+
let C;
|
|
797
|
+
switch (I) {
|
|
798
|
+
case "gradient":
|
|
799
|
+
C = /* @__PURE__ */ p((g) => g.uid, "coloring");
|
|
800
|
+
break;
|
|
801
|
+
case "source":
|
|
802
|
+
C = /* @__PURE__ */ p((g) => P(g.source.id), "coloring");
|
|
803
|
+
break;
|
|
804
|
+
case "target":
|
|
805
|
+
C = /* @__PURE__ */ p((g) => P(g.target.id), "coloring");
|
|
806
|
+
break;
|
|
807
|
+
default:
|
|
808
|
+
C = I;
|
|
809
|
+
}
|
|
810
|
+
O.append("path").attr("d", Bt()).attr("stroke", C).attr("stroke-width", (g) => Math.max(1, g.width)), Mt(void 0, o, 0, y);
|
|
811
|
+
}, "draw"), ce = {
|
|
812
|
+
draw: le
|
|
813
|
+
}, he = /* @__PURE__ */ p((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
|
|
814
|
+
`).trim(), "prepareTextForParsing"), ue = /* @__PURE__ */ p((t) => `.label {
|
|
815
|
+
font-family: ${t.fontFamily};
|
|
816
|
+
}`, "getStyles"), fe = ue, ye = R.parse.bind(R);
|
|
817
|
+
R.parse = (t) => ye(he(t));
|
|
818
|
+
var me = {
|
|
819
|
+
styles: fe,
|
|
820
|
+
parser: R,
|
|
821
|
+
db: oe,
|
|
822
|
+
renderer: ce
|
|
823
|
+
};
|
|
824
|
+
export {
|
|
825
|
+
me as diagram
|
|
826
|
+
};
|