@layers-app/editor 0.5.6-optimization → 0.5.6
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/README.md +0 -19
- package/dist/index.cjs +2 -2
- package/dist/index.js +10 -12
- package/dist/layers.52famHy6.js +1 -0
- package/dist/layers.59MV1gHs.js +41 -0
- package/dist/layers.6IaGqrl-.js +39 -0
- package/dist/layers.6lqPO-3Z.js +32 -0
- package/dist/layers.7JqFgE4-.js +15 -0
- package/dist/layers.8CsJHG7m.js +139 -0
- package/dist/layers.9pNaFvaX.js +1 -0
- package/dist/layers.AK6shBV6.js +42 -0
- package/dist/layers.AamAEMA7.js +160 -0
- package/dist/layers.B-WGMHL6.js +11 -0
- package/dist/layers.B19hGmey.js +1 -0
- package/dist/layers.B2wUdnez.js +437 -0
- package/dist/layers.B3D4g2HH.js +1 -0
- package/dist/layers.B6FBUZ1Z.js +9 -0
- package/dist/layers.B7-Kk2kp.js +11 -0
- package/dist/layers.B7K7JjK6.js +1510 -0
- package/dist/layers.B7USkgSi.js +6 -0
- package/dist/layers.B7hegMVr.js +1034 -0
- package/dist/layers.BAtv1CM7.js +1 -0
- package/dist/layers.BBSE_YmF.js +37 -0
- package/dist/layers.BCG8kdU-.js +32 -0
- package/dist/layers.BCUz59rh.js +39 -0
- package/dist/layers.BF8ID4w9.js +39 -0
- package/dist/layers.BIZaN3QR.js +7 -0
- package/dist/layers.BIeVwYKL.js +1 -0
- package/dist/layers.BJDrjORS.js +244 -0
- package/dist/layers.BK35bp4_.js +931 -0
- package/dist/layers.BKrHVgKG.js +11 -0
- package/dist/layers.BLd2spTm.js +1 -0
- package/dist/layers.BQj7sYv9.js +4 -0
- package/dist/layers.BSTBZrFn.js +1 -0
- package/dist/layers.BTnY40Hl.js +230 -0
- package/dist/layers.BW6eTqTQ.js +9 -0
- package/dist/layers.BX50pyFe.js +42 -0
- package/dist/layers.BXiMBNCf.js +7 -0
- package/dist/layers.BY0saexf.js +44 -0
- package/dist/layers.BYyHDhdF.js +40 -0
- package/dist/layers.B_SkKQaN.js +7 -0
- package/dist/layers.Bb45BkB7.js +35 -0
- package/dist/layers.BbCfEXyj.js +55 -0
- package/dist/layers.Bbx2DS9P.js +10 -0
- package/dist/layers.BeRqUeUL.js +1 -0
- package/dist/layers.BfBHY8YH.js +8 -0
- package/dist/layers.BfPqzMs9.js +1 -0
- package/dist/layers.Bfqazne8.js +70 -0
- package/dist/layers.BgzFjX4U.js +35 -0
- package/dist/layers.BhL3qtd0.js +1126 -0
- package/dist/layers.BitUjngp.js +11 -0
- package/dist/layers.BmR6H-fP.js +2966 -0
- package/dist/layers.Bn7g95cI.js +39 -0
- package/dist/layers.Bn7hw-zZ.js +13 -0
- package/dist/layers.BnYpz8RW.js +1359 -0
- package/dist/layers.BoIdFEtV.js +186 -0
- package/dist/layers.BorvTy9p.js +33 -0
- package/dist/layers.BpilXLfW.js +6 -0
- package/dist/layers.Bt8HOTA6.js +10 -0
- package/dist/layers.BvVfdnbz.js +41 -0
- package/dist/layers.BzUNMS1L.js +2 -0
- package/dist/layers.C-FZw43o.js +41 -0
- package/dist/layers.C0Lgw_Sx.js +11688 -0
- package/dist/layers.C4ToPutV.js +40 -0
- package/dist/layers.C4wkiWhv.js +8 -0
- package/dist/layers.C5ZDJAAD.js +220 -0
- package/dist/layers.C6P4YEcq.js +257 -0
- package/dist/layers.C7x1USYv.js +139 -0
- package/dist/layers.C8_lu5UH.js +23 -0
- package/dist/layers.C99jO8bw.js +1 -0
- package/dist/layers.C9KoadvU.js +122 -0
- package/dist/layers.C9PwfpMh.js +39 -0
- package/dist/layers.CA8KMZRI.js +1 -0
- package/dist/layers.CAGTppwS.js +4 -0
- package/dist/layers.CAgoPdOX.js +1088 -0
- package/dist/layers.CBb84SJY.js +10 -0
- package/dist/layers.CCaOiFeL.js +9 -0
- package/dist/layers.CChtus6s.js +9 -0
- package/dist/layers.CDpYDf4E.js +41 -0
- package/dist/layers.CElZbgj1.js +61 -0
- package/dist/layers.CFXi5TGg.js +5 -0
- package/dist/layers.CGvSf-pD.js +10 -0
- package/dist/layers.CH7Yhxyl.js +1 -0
- package/dist/layers.CHZsXQcr.js +1 -0
- package/dist/layers.CHbqHHw4.js +10 -0
- package/dist/layers.CIK15Iw8.js +1 -0
- package/dist/layers.CIpcY9uj.js +38 -0
- package/dist/layers.CK2ePV5l.js +1 -0
- package/dist/layers.CKOfAypO.js +1 -0
- package/dist/layers.CKuoZO2o.js +5 -0
- package/dist/layers.CLELtUjk.js +40 -0
- package/dist/layers.CNmEkwvP.js +84 -0
- package/dist/layers.CPJv1Tc9.js +46859 -0
- package/dist/layers.CPlQgHvJ.js +37 -0
- package/dist/layers.CR9KcJml.js +9 -0
- package/dist/layers.CRFf4NzO.js +10 -0
- package/dist/layers.CSI1-wyP.js +1 -0
- package/dist/layers.CTmWmJtN.js +32 -0
- package/dist/layers.CXqT56ec.js +304 -0
- package/dist/layers.CZ5YSh6D.js +8 -0
- package/dist/layers.C_2s_qym.js +3 -0
- package/dist/layers.C_IvrzZ3.js +7 -0
- package/dist/layers.C_fjSuvx.js +1 -0
- package/dist/layers.CaMAncU5.js +423 -0
- package/dist/layers.CcaiUz4r.js +1 -0
- package/dist/layers.Cd1zz9ej.js +39 -0
- package/dist/layers.CeafY0UM.js +37 -0
- package/dist/layers.CfcMk6Ta.js +1 -0
- package/dist/layers.Cfl_HoMI.js +769 -0
- package/dist/layers.CfpNlmP9.js +1 -0
- package/dist/layers.CiTTUiMF.js +8 -0
- package/dist/layers.Cj4cFFtZ.js +189 -0
- package/dist/layers.CmdoC_9-.js +7 -0
- package/dist/layers.CoGB8bed.js +8 -0
- package/dist/layers.Cpy28Z7d.js +35 -0
- package/dist/layers.CqVTtuYm.js +6 -0
- package/dist/layers.Cu93NN5Z.js +41 -0
- package/dist/layers.Cu9NodvY.js +1089 -0
- package/dist/layers.CvBE5BLz.js +118 -0
- package/dist/layers.Cx9zn9dM.js +41 -0
- package/dist/layers.CxJcDiDE.js +65 -0
- package/dist/layers.Cyzu9PKQ.js +1 -0
- package/dist/layers.CzAsjHtw.js +34 -0
- package/dist/layers.D0kgeXsw.js +1619 -0
- package/dist/layers.D0zn4_Mx.js +1 -0
- package/dist/layers.D1Vfjokq.js +32 -0
- package/dist/layers.D1rIvRN6.js +9 -0
- package/dist/layers.D22i1Ls7.js +6 -0
- package/dist/layers.D25D_N3C.js +7 -0
- package/dist/layers.D4T8fTcj.js +1223 -0
- package/dist/layers.D4fXRymr.js +40 -0
- package/dist/layers.D4gUAtLW.js +41 -0
- package/dist/layers.D59PMsKH.js +51 -0
- package/dist/layers.D5_C65FS.js +2479 -0
- package/dist/layers.D5j-6Vz3.js +36 -0
- package/dist/layers.D7ikYTua.js +2235 -0
- package/dist/layers.D7jGxypv.js +8 -0
- package/dist/layers.D7n2QyFM.js +48146 -0
- package/dist/layers.D8fdxG58.js +295 -0
- package/dist/layers.D9h1AMfz.js +8 -0
- package/dist/layers.DAsAtqWK.js +4 -0
- package/dist/layers.DBVrBhF0.js +1 -0
- package/dist/layers.DCWjWRvL.js +9 -0
- package/dist/layers.DD9dfhit.js +40 -0
- package/dist/layers.DHD10kvJ.js +1 -0
- package/dist/layers.DHZBzVaT.js +1283 -0
- package/dist/layers.DHfSJOOW.js +1 -0
- package/dist/layers.DKJQWPVn.js +32 -0
- package/dist/layers.DKUfWSX1.js +904 -0
- package/dist/layers.DLK-HpMV.js +1 -0
- package/dist/layers.DLjZPfF1.js +802 -0
- package/dist/layers.DLwuMfdd.js +84 -0
- package/dist/layers.DMIDFKxo.js +36 -0
- package/dist/layers.DMkBISW1.js +1 -0
- package/dist/layers.DN9HoVxI.js +18 -0
- package/dist/layers.DOrgOHBr.js +1 -0
- package/dist/layers.DRvKjryx.js +1265 -0
- package/dist/layers.DTMLuJKN.js +33 -0
- package/dist/layers.DUJa2ZOS.js +8 -0
- package/dist/layers.DVUWZ8Wt.js +37 -0
- package/dist/layers.DVrOJIL5.js +7 -0
- package/dist/layers.DY6GA9ww.js +9166 -0
- package/dist/layers.D_Imug13.js +8 -0
- package/dist/layers.D_KJI4uf.js +1 -0
- package/dist/layers.D_vzZUhY.js +1 -0
- package/dist/layers.DaCB9yHC.js +4 -0
- package/dist/layers.DbaKVP5e.js +1 -0
- package/dist/layers.DcjluSHw.js +84 -0
- package/dist/layers.De0fDaHO.js +40 -0
- package/dist/layers.DeEGG6FS.js +42 -0
- package/dist/layers.DfFJCPRD.js +373 -0
- package/dist/layers.DfLz3NUP.js +320 -0
- package/dist/layers.DhW2E_US.js +1580 -0
- package/dist/layers.DjUOC4st.js +16 -0
- package/dist/layers.DjbsplkN.js +32 -0
- package/dist/layers.DkaJchxc.js +6 -0
- package/dist/layers.DlGVcszu.js +1 -0
- package/dist/layers.DlfnKTKF.js +42 -0
- package/dist/layers.DnxO-9oO.js +1 -0
- package/dist/layers.DqSkTf9R.js +21763 -0
- package/dist/layers.Dr1JK1_Z.js +202 -0
- package/dist/layers.Dr8zNYOs.js +5 -0
- package/dist/layers.DsiNLArY.js +40 -0
- package/dist/layers.DtP3hMV0.js +10 -0
- package/dist/layers.Du1ZlY6H.js +40 -0
- package/dist/layers.Du8uQ4JH.js +1 -0
- package/dist/layers.DuQ8oZjN.js +1 -0
- package/dist/layers.DuwNlZRl.js +11 -0
- package/dist/layers.Dw7Dmv6Y.js +19 -0
- package/dist/layers.DxA6ocdw.js +70 -0
- package/dist/layers.Dy1naDTQ.js +14 -0
- package/dist/layers.E1TwhuY2.js +791 -0
- package/dist/layers.Eelq_G9Y.js +803 -0
- package/dist/layers.Eodu_OXz.js +2 -0
- package/dist/layers.H36OYk_h.js +5 -0
- package/dist/layers.HVpHwo9E.js +5 -0
- package/dist/layers.I-tmhwFG.js +39 -0
- package/dist/layers.Is4NOcYC.js +9 -0
- package/dist/layers.J20L8tWx.js +501 -0
- package/dist/layers.JWCLFILJ.js +1 -0
- package/dist/layers.Jm82B3Oj.js +116 -0
- package/dist/layers.L60GQ2sb.js +8 -0
- package/dist/layers.LJC22eKQ.js +7 -0
- package/dist/layers.MW6tobI-.js +6 -0
- package/dist/layers.MZ6d0DZp.js +10 -0
- package/dist/layers.M_62Sbj7.js +268 -0
- package/dist/layers.O8Nxijec.js +793 -0
- package/dist/layers.OLlYwVPc.js +14 -0
- package/dist/layers.Pw46DBip.js +59 -0
- package/dist/layers.U98UFPWm.js +207 -0
- package/dist/layers.VXlo2W40.js +36 -0
- package/dist/layers.VlKfhmpq.js +10 -0
- package/dist/layers.YOQy_t6q.js +40 -0
- package/dist/layers.ZoMyFX9M.js +2 -0
- package/dist/layers._1XiIhPh.js +7 -0
- package/dist/layers.ay_dYKjj.js +960 -0
- package/dist/layers.b0h5ZBmD.js +61 -0
- package/dist/layers.dDe6FHmh.js +36 -0
- package/dist/layers.dVkHa3a_.js +39 -0
- package/dist/layers.et7zjoY9.js +52 -0
- package/dist/layers.gryxZo3n.js +10 -0
- package/dist/layers.hPuFhhxl.js +41 -0
- package/dist/layers.hweLqW3I.js +261 -0
- package/dist/layers.kaOt41rd.js +9 -0
- package/dist/layers.lCpg7dOn.js +21 -0
- package/dist/layers.lLFiut9N.js +8 -0
- package/dist/layers.lNSz2AQQ.js +6 -0
- package/dist/layers.mV8zYAS9.js +39 -0
- package/dist/layers.oyyMMK1Q.js +21938 -0
- package/dist/layers.qFWUlMDP.js +282 -0
- package/dist/layers.t46sYkQh.js +96 -0
- package/dist/layers.tdFdnJVX.js +38 -0
- package/dist/layers.u4sk_7sk.js +6 -0
- package/dist/layers.uEa7jWOw.js +42 -0
- package/dist/layers.uKwUcHfW.js +9 -0
- package/dist/layers.v6694Ulr.js +425 -0
- package/dist/layers.xkw2pWfm.js +40 -0
- package/dist/layers.ytXaFkr-.js +1 -0
- package/dist/layers.z5ZNUv1T.js +38 -0
- package/package.json +18 -76
- package/dist/layers.7jmq6tBR.js +0 -2227
- package/dist/layers.B90YwJga.js +0 -4
- package/dist/layers.C03OvlLb.js +0 -6
- package/dist/layers.CJiIq6YQ.js +0 -1
- package/dist/layers.CXffIp2y.js +0 -864
- package/dist/layers.CZPeYQ9g.js +0 -3
- package/dist/layers.CZ_Lt7IL.js +0 -7
- package/dist/layers.Ci1-qkbn.js +0 -341
- package/dist/layers.Cnm-pECN.js +0 -2
- package/dist/layers.D6d62qQ_.js +0 -6774
- package/dist/layers.DNCgFYS7.js +0 -27
- package/dist/layers.Dev6Yrwi.js +0 -530
- package/dist/layers.Dgok89qX.js +0 -1
- package/dist/layers.Dq3o7sh3.js +0 -7723
- package/dist/layers.Duy8YzsH.js +0 -2511
- package/dist/layers.QjAkD17S.js +0 -3677
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { H as J, a as rt, s as at, b as lt, c as ot, n as ct, o as ht, l as et, g as it, a6 as ut, A as yt, T as ft, e as pt, i as gt, q as dt, P as mt } from "./layers.DY6GA9ww.js";
|
|
2
|
+
import "./layers.DqSkTf9R.js";
|
|
3
|
+
import { a as tt } from "./layers.DcjluSHw.js";
|
|
4
|
+
import { o as _t } from "./layers.b0h5ZBmD.js";
|
|
5
|
+
import { a as xt } from "./layers.CqVTtuYm.js";
|
|
6
|
+
import { c as F } from "./layers.DLwuMfdd.js";
|
|
7
|
+
function kt(e, u) {
|
|
8
|
+
return u < e ? -1 : u > e ? 1 : u >= e ? 0 : NaN;
|
|
9
|
+
}
|
|
10
|
+
function vt(e) {
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function bt() {
|
|
14
|
+
var e = vt, u = kt, $ = null, p = F(0), g = F(J), A = F(0);
|
|
15
|
+
function y(a) {
|
|
16
|
+
var l, d = (a = xt(a)).length, k, I, T = 0, m = new Array(d), v = new Array(d), c = +p.apply(this, arguments), E = Math.min(J, Math.max(-J, g.apply(this, arguments) - c)), O, w = Math.min(Math.abs(E) / d, A.apply(this, arguments)), b = w * (E < 0 ? -1 : 1), t;
|
|
17
|
+
for (l = 0; l < d; ++l)
|
|
18
|
+
(t = v[m[l] = l] = +e(a[l], l, a)) > 0 && (T += t);
|
|
19
|
+
for (u != null ? m.sort(function(i, n) {
|
|
20
|
+
return u(v[i], v[n]);
|
|
21
|
+
}) : $ != null && m.sort(function(i, n) {
|
|
22
|
+
return $(a[i], a[n]);
|
|
23
|
+
}), l = 0, I = T ? (E - d * b) / T : 0; l < d; ++l, c = O)
|
|
24
|
+
k = m[l], t = v[k], O = c + (t > 0 ? t * I : 0) + b, v[k] = {
|
|
25
|
+
data: a[k],
|
|
26
|
+
index: l,
|
|
27
|
+
value: t,
|
|
28
|
+
startAngle: c,
|
|
29
|
+
endAngle: O,
|
|
30
|
+
padAngle: w
|
|
31
|
+
};
|
|
32
|
+
return v;
|
|
33
|
+
}
|
|
34
|
+
return y.value = function(a) {
|
|
35
|
+
return arguments.length ? (e = typeof a == "function" ? a : F(+a), y) : e;
|
|
36
|
+
}, y.sortValues = function(a) {
|
|
37
|
+
return arguments.length ? (u = a, $ = null, y) : u;
|
|
38
|
+
}, y.sort = function(a) {
|
|
39
|
+
return arguments.length ? ($ = a, u = null, y) : $;
|
|
40
|
+
}, y.startAngle = function(a) {
|
|
41
|
+
return arguments.length ? (p = typeof a == "function" ? a : F(+a), y) : p;
|
|
42
|
+
}, y.endAngle = function(a) {
|
|
43
|
+
return arguments.length ? (g = typeof a == "function" ? a : F(+a), y) : g;
|
|
44
|
+
}, y.padAngle = function(a) {
|
|
45
|
+
return arguments.length ? (A = typeof a == "function" ? a : F(+a), y) : A;
|
|
46
|
+
}, y;
|
|
47
|
+
}
|
|
48
|
+
var K = (function() {
|
|
49
|
+
var e = function(b, t, i, n) {
|
|
50
|
+
for (i = i || {}, n = b.length; n--; i[b[n]] = t)
|
|
51
|
+
;
|
|
52
|
+
return i;
|
|
53
|
+
}, u = [1, 3], $ = [1, 4], p = [1, 5], g = [1, 6], A = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], y = [2, 4], a = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], l = [20, 21, 22], d = [2, 7], k = [1, 12], I = [1, 13], T = [1, 14], m = [1, 15], v = [1, 16], c = [1, 17], E = {
|
|
54
|
+
trace: function() {
|
|
55
|
+
},
|
|
56
|
+
yy: {},
|
|
57
|
+
symbols_: { error: 2, start: 3, eol: 4, PIE: 5, document: 6, showData: 7, line: 8, statement: 9, txt: 10, value: 11, title: 12, title_value: 13, acc_title: 14, acc_title_value: 15, acc_descr: 16, acc_descr_value: 17, acc_descr_multiline_value: 18, section: 19, NEWLINE: 20, ";": 21, EOF: 22, $accept: 0, $end: 1 },
|
|
58
|
+
terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" },
|
|
59
|
+
productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]],
|
|
60
|
+
performAction: function(t, i, n, r, o, s, P) {
|
|
61
|
+
var _ = s.length - 1;
|
|
62
|
+
switch (o) {
|
|
63
|
+
case 3:
|
|
64
|
+
r.setShowData(!0);
|
|
65
|
+
break;
|
|
66
|
+
case 6:
|
|
67
|
+
this.$ = s[_ - 1];
|
|
68
|
+
break;
|
|
69
|
+
case 8:
|
|
70
|
+
r.addSection(s[_ - 1], r.cleanupValue(s[_]));
|
|
71
|
+
break;
|
|
72
|
+
case 9:
|
|
73
|
+
this.$ = s[_].trim(), r.setDiagramTitle(this.$);
|
|
74
|
+
break;
|
|
75
|
+
case 10:
|
|
76
|
+
this.$ = s[_].trim(), r.setAccTitle(this.$);
|
|
77
|
+
break;
|
|
78
|
+
case 11:
|
|
79
|
+
case 12:
|
|
80
|
+
this.$ = s[_].trim(), r.setAccDescription(this.$);
|
|
81
|
+
break;
|
|
82
|
+
case 13:
|
|
83
|
+
r.addSection(s[_].substr(8)), this.$ = s[_].substr(8);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
table: [{ 3: 1, 4: 2, 5: u, 20: $, 21: p, 22: g }, { 1: [3] }, { 3: 7, 4: 2, 5: u, 20: $, 21: p, 22: g }, e(A, y, { 6: 8, 7: [1, 9] }), e(a, [2, 14]), e(a, [2, 15]), e(a, [2, 16]), { 1: [2, 1] }, e(l, d, { 8: 10, 9: 11, 1: [2, 2], 10: k, 12: I, 14: T, 16: m, 18: v, 19: c }), e(A, y, { 6: 18 }), e(A, [2, 5]), { 4: 19, 20: $, 21: p, 22: g }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, e(l, [2, 12]), e(l, [2, 13]), e(l, d, { 8: 10, 9: 11, 1: [2, 3], 10: k, 12: I, 14: T, 16: m, 18: v, 19: c }), e(A, [2, 6]), e(l, [2, 8]), e(l, [2, 9]), e(l, [2, 10]), e(l, [2, 11])],
|
|
88
|
+
defaultActions: { 7: [2, 1] },
|
|
89
|
+
parseError: function(t, i) {
|
|
90
|
+
if (i.recoverable)
|
|
91
|
+
this.trace(t);
|
|
92
|
+
else {
|
|
93
|
+
var n = new Error(t);
|
|
94
|
+
throw n.hash = i, n;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
parse: function(t) {
|
|
98
|
+
var i = this, n = [0], r = [], o = [null], s = [], P = this.table, _ = "", f = 0, V = 0, R = 2, M = 1, B = s.slice.call(arguments, 1), h = Object.create(this.lexer), N = { yy: {} };
|
|
99
|
+
for (var Y in this.yy)
|
|
100
|
+
Object.prototype.hasOwnProperty.call(this.yy, Y) && (N.yy[Y] = this.yy[Y]);
|
|
101
|
+
h.setInput(t, N.yy), N.yy.lexer = h, N.yy.parser = this, typeof h.yylloc > "u" && (h.yylloc = {});
|
|
102
|
+
var q = h.yylloc;
|
|
103
|
+
s.push(q);
|
|
104
|
+
var nt = h.options && h.options.ranges;
|
|
105
|
+
typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
106
|
+
function st() {
|
|
107
|
+
var C;
|
|
108
|
+
return C = r.pop() || h.lex() || M, typeof C != "number" && (C instanceof Array && (r = C, C = r.pop()), C = i.symbols_[C] || C), C;
|
|
109
|
+
}
|
|
110
|
+
for (var x, L, S, H, z = {}, j, D, X, W; ; ) {
|
|
111
|
+
if (L = n[n.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((x === null || typeof x > "u") && (x = st()), S = P[L] && P[L][x]), typeof S > "u" || !S.length || !S[0]) {
|
|
112
|
+
var Z = "";
|
|
113
|
+
W = [];
|
|
114
|
+
for (j in P[L])
|
|
115
|
+
this.terminals_[j] && j > R && W.push("'" + this.terminals_[j] + "'");
|
|
116
|
+
h.showPosition ? Z = "Parse error on line " + (f + 1) + `:
|
|
117
|
+
` + h.showPosition() + `
|
|
118
|
+
Expecting ` + W.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : Z = "Parse error on line " + (f + 1) + ": Unexpected " + (x == M ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(Z, {
|
|
119
|
+
text: h.match,
|
|
120
|
+
token: this.terminals_[x] || x,
|
|
121
|
+
line: h.yylineno,
|
|
122
|
+
loc: q,
|
|
123
|
+
expected: W
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (S[0] instanceof Array && S.length > 1)
|
|
127
|
+
throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + x);
|
|
128
|
+
switch (S[0]) {
|
|
129
|
+
case 1:
|
|
130
|
+
n.push(x), o.push(h.yytext), s.push(h.yylloc), n.push(S[1]), x = null, V = h.yyleng, _ = h.yytext, f = h.yylineno, q = h.yylloc;
|
|
131
|
+
break;
|
|
132
|
+
case 2:
|
|
133
|
+
if (D = this.productions_[S[1]][1], z.$ = o[o.length - D], z._$ = {
|
|
134
|
+
first_line: s[s.length - (D || 1)].first_line,
|
|
135
|
+
last_line: s[s.length - 1].last_line,
|
|
136
|
+
first_column: s[s.length - (D || 1)].first_column,
|
|
137
|
+
last_column: s[s.length - 1].last_column
|
|
138
|
+
}, nt && (z._$.range = [
|
|
139
|
+
s[s.length - (D || 1)].range[0],
|
|
140
|
+
s[s.length - 1].range[1]
|
|
141
|
+
]), H = this.performAction.apply(z, [
|
|
142
|
+
_,
|
|
143
|
+
V,
|
|
144
|
+
f,
|
|
145
|
+
N.yy,
|
|
146
|
+
S[1],
|
|
147
|
+
o,
|
|
148
|
+
s
|
|
149
|
+
].concat(B)), typeof H < "u")
|
|
150
|
+
return H;
|
|
151
|
+
D && (n = n.slice(0, -1 * D * 2), o = o.slice(0, -1 * D), s = s.slice(0, -1 * D)), n.push(this.productions_[S[1]][0]), o.push(z.$), s.push(z._$), X = P[n[n.length - 2]][n[n.length - 1]], n.push(X);
|
|
152
|
+
break;
|
|
153
|
+
case 3:
|
|
154
|
+
return !0;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return !0;
|
|
158
|
+
}
|
|
159
|
+
}, O = /* @__PURE__ */ (function() {
|
|
160
|
+
var b = {
|
|
161
|
+
EOF: 1,
|
|
162
|
+
parseError: function(i, n) {
|
|
163
|
+
if (this.yy.parser)
|
|
164
|
+
this.yy.parser.parseError(i, n);
|
|
165
|
+
else
|
|
166
|
+
throw new Error(i);
|
|
167
|
+
},
|
|
168
|
+
// resets the lexer, sets new input
|
|
169
|
+
setInput: function(t, i) {
|
|
170
|
+
return this.yy = i || 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 = {
|
|
171
|
+
first_line: 1,
|
|
172
|
+
first_column: 0,
|
|
173
|
+
last_line: 1,
|
|
174
|
+
last_column: 0
|
|
175
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
176
|
+
},
|
|
177
|
+
// consumes and returns one char from the input
|
|
178
|
+
input: function() {
|
|
179
|
+
var t = this._input[0];
|
|
180
|
+
this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
|
|
181
|
+
var i = t.match(/(?:\r\n?|\n).*/g);
|
|
182
|
+
return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
|
|
183
|
+
},
|
|
184
|
+
// unshifts one char (or a string) into the input
|
|
185
|
+
unput: function(t) {
|
|
186
|
+
var i = t.length, n = t.split(/(?:\r\n?|\n)/g);
|
|
187
|
+
this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
|
|
188
|
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
189
|
+
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);
|
|
190
|
+
var o = this.yylloc.range;
|
|
191
|
+
return this.yylloc = {
|
|
192
|
+
first_line: this.yylloc.first_line,
|
|
193
|
+
last_line: this.yylineno + 1,
|
|
194
|
+
first_column: this.yylloc.first_column,
|
|
195
|
+
last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - i
|
|
196
|
+
}, this.options.ranges && (this.yylloc.range = [o[0], o[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
|
|
197
|
+
},
|
|
198
|
+
// When called from action, caches matched text and appends it on next action
|
|
199
|
+
more: function() {
|
|
200
|
+
return this._more = !0, this;
|
|
201
|
+
},
|
|
202
|
+
// 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.
|
|
203
|
+
reject: function() {
|
|
204
|
+
if (this.options.backtrack_lexer)
|
|
205
|
+
this._backtrack = !0;
|
|
206
|
+
else
|
|
207
|
+
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).
|
|
208
|
+
` + this.showPosition(), {
|
|
209
|
+
text: "",
|
|
210
|
+
token: null,
|
|
211
|
+
line: this.yylineno
|
|
212
|
+
});
|
|
213
|
+
return this;
|
|
214
|
+
},
|
|
215
|
+
// retain first n characters of the match
|
|
216
|
+
less: function(t) {
|
|
217
|
+
this.unput(this.match.slice(t));
|
|
218
|
+
},
|
|
219
|
+
// displays already matched input, i.e. for error messages
|
|
220
|
+
pastInput: function() {
|
|
221
|
+
var t = this.matched.substr(0, this.matched.length - this.match.length);
|
|
222
|
+
return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
|
|
223
|
+
},
|
|
224
|
+
// displays upcoming input, i.e. for error messages
|
|
225
|
+
upcomingInput: function() {
|
|
226
|
+
var t = this.match;
|
|
227
|
+
return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
228
|
+
},
|
|
229
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
230
|
+
showPosition: function() {
|
|
231
|
+
var t = this.pastInput(), i = new Array(t.length + 1).join("-");
|
|
232
|
+
return t + this.upcomingInput() + `
|
|
233
|
+
` + i + "^";
|
|
234
|
+
},
|
|
235
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
236
|
+
test_match: function(t, i) {
|
|
237
|
+
var n, r, o;
|
|
238
|
+
if (this.options.backtrack_lexer && (o = {
|
|
239
|
+
yylineno: this.yylineno,
|
|
240
|
+
yylloc: {
|
|
241
|
+
first_line: this.yylloc.first_line,
|
|
242
|
+
last_line: this.last_line,
|
|
243
|
+
first_column: this.yylloc.first_column,
|
|
244
|
+
last_column: this.yylloc.last_column
|
|
245
|
+
},
|
|
246
|
+
yytext: this.yytext,
|
|
247
|
+
match: this.match,
|
|
248
|
+
matches: this.matches,
|
|
249
|
+
matched: this.matched,
|
|
250
|
+
yyleng: this.yyleng,
|
|
251
|
+
offset: this.offset,
|
|
252
|
+
_more: this._more,
|
|
253
|
+
_input: this._input,
|
|
254
|
+
yy: this.yy,
|
|
255
|
+
conditionStack: this.conditionStack.slice(0),
|
|
256
|
+
done: this.done
|
|
257
|
+
}, this.options.ranges && (o.yylloc.range = this.yylloc.range.slice(0))), r = t[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
|
258
|
+
first_line: this.yylloc.last_line,
|
|
259
|
+
last_line: this.yylineno + 1,
|
|
260
|
+
first_column: this.yylloc.last_column,
|
|
261
|
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
|
|
262
|
+
}, 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, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
|
263
|
+
return n;
|
|
264
|
+
if (this._backtrack) {
|
|
265
|
+
for (var s in o)
|
|
266
|
+
this[s] = o[s];
|
|
267
|
+
return !1;
|
|
268
|
+
}
|
|
269
|
+
return !1;
|
|
270
|
+
},
|
|
271
|
+
// return next match in input
|
|
272
|
+
next: function() {
|
|
273
|
+
if (this.done)
|
|
274
|
+
return this.EOF;
|
|
275
|
+
this._input || (this.done = !0);
|
|
276
|
+
var t, i, n, r;
|
|
277
|
+
this._more || (this.yytext = "", this.match = "");
|
|
278
|
+
for (var o = this._currentRules(), s = 0; s < o.length; s++)
|
|
279
|
+
if (n = this._input.match(this.rules[o[s]]), n && (!i || n[0].length > i[0].length)) {
|
|
280
|
+
if (i = n, r = s, this.options.backtrack_lexer) {
|
|
281
|
+
if (t = this.test_match(n, o[s]), t !== !1)
|
|
282
|
+
return t;
|
|
283
|
+
if (this._backtrack) {
|
|
284
|
+
i = !1;
|
|
285
|
+
continue;
|
|
286
|
+
} else
|
|
287
|
+
return !1;
|
|
288
|
+
} else if (!this.options.flex)
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
return i ? (t = this.test_match(i, o[r]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
292
|
+
` + this.showPosition(), {
|
|
293
|
+
text: "",
|
|
294
|
+
token: null,
|
|
295
|
+
line: this.yylineno
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
// return next match that has a token
|
|
299
|
+
lex: function() {
|
|
300
|
+
var i = this.next();
|
|
301
|
+
return i || this.lex();
|
|
302
|
+
},
|
|
303
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
304
|
+
begin: function(i) {
|
|
305
|
+
this.conditionStack.push(i);
|
|
306
|
+
},
|
|
307
|
+
// pop the previously active lexer condition state off the condition stack
|
|
308
|
+
popState: function() {
|
|
309
|
+
var i = this.conditionStack.length - 1;
|
|
310
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
311
|
+
},
|
|
312
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
313
|
+
_currentRules: function() {
|
|
314
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
315
|
+
},
|
|
316
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
317
|
+
topState: function(i) {
|
|
318
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
319
|
+
},
|
|
320
|
+
// alias for begin(condition)
|
|
321
|
+
pushState: function(i) {
|
|
322
|
+
this.begin(i);
|
|
323
|
+
},
|
|
324
|
+
// return the number of states currently on the stack
|
|
325
|
+
stateStackSize: function() {
|
|
326
|
+
return this.conditionStack.length;
|
|
327
|
+
},
|
|
328
|
+
options: { "case-insensitive": !0 },
|
|
329
|
+
performAction: function(i, n, r, o) {
|
|
330
|
+
switch (r) {
|
|
331
|
+
case 0:
|
|
332
|
+
break;
|
|
333
|
+
case 1:
|
|
334
|
+
break;
|
|
335
|
+
case 2:
|
|
336
|
+
return 20;
|
|
337
|
+
case 3:
|
|
338
|
+
break;
|
|
339
|
+
case 4:
|
|
340
|
+
break;
|
|
341
|
+
case 5:
|
|
342
|
+
return this.begin("title"), 12;
|
|
343
|
+
case 6:
|
|
344
|
+
return this.popState(), "title_value";
|
|
345
|
+
case 7:
|
|
346
|
+
return this.begin("acc_title"), 14;
|
|
347
|
+
case 8:
|
|
348
|
+
return this.popState(), "acc_title_value";
|
|
349
|
+
case 9:
|
|
350
|
+
return this.begin("acc_descr"), 16;
|
|
351
|
+
case 10:
|
|
352
|
+
return this.popState(), "acc_descr_value";
|
|
353
|
+
case 11:
|
|
354
|
+
this.begin("acc_descr_multiline");
|
|
355
|
+
break;
|
|
356
|
+
case 12:
|
|
357
|
+
this.popState();
|
|
358
|
+
break;
|
|
359
|
+
case 13:
|
|
360
|
+
return "acc_descr_multiline_value";
|
|
361
|
+
case 14:
|
|
362
|
+
this.begin("string");
|
|
363
|
+
break;
|
|
364
|
+
case 15:
|
|
365
|
+
this.popState();
|
|
366
|
+
break;
|
|
367
|
+
case 16:
|
|
368
|
+
return "txt";
|
|
369
|
+
case 17:
|
|
370
|
+
return 5;
|
|
371
|
+
case 18:
|
|
372
|
+
return 7;
|
|
373
|
+
case 19:
|
|
374
|
+
return "value";
|
|
375
|
+
case 20:
|
|
376
|
+
return 22;
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i],
|
|
380
|
+
conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, title: { rules: [6], inclusive: !1 }, string: { rules: [15, 16], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], inclusive: !0 } }
|
|
381
|
+
};
|
|
382
|
+
return b;
|
|
383
|
+
})();
|
|
384
|
+
E.lexer = O;
|
|
385
|
+
function w() {
|
|
386
|
+
this.yy = {};
|
|
387
|
+
}
|
|
388
|
+
return w.prototype = E, E.Parser = w, new w();
|
|
389
|
+
})();
|
|
390
|
+
K.parser = K;
|
|
391
|
+
const St = K, $t = mt.pie, G = {
|
|
392
|
+
sections: {},
|
|
393
|
+
showData: !1
|
|
394
|
+
};
|
|
395
|
+
let U = G.sections, Q = G.showData;
|
|
396
|
+
const At = structuredClone($t), Et = () => structuredClone(At), wt = () => {
|
|
397
|
+
U = structuredClone(G.sections), Q = G.showData, dt();
|
|
398
|
+
}, Tt = (e, u) => {
|
|
399
|
+
e = gt(e, it()), U[e] === void 0 && (U[e] = u, et.debug(`added new section: ${e}, with value: ${u}`));
|
|
400
|
+
}, It = () => U, Dt = (e) => (e.substring(0, 1) === ":" && (e = e.substring(1).trim()), Number(e.trim())), Ct = (e) => {
|
|
401
|
+
Q = e;
|
|
402
|
+
}, Ot = () => Q, Pt = {
|
|
403
|
+
getConfig: Et,
|
|
404
|
+
clear: wt,
|
|
405
|
+
setDiagramTitle: ht,
|
|
406
|
+
getDiagramTitle: ct,
|
|
407
|
+
setAccTitle: ot,
|
|
408
|
+
getAccTitle: lt,
|
|
409
|
+
setAccDescription: at,
|
|
410
|
+
getAccDescription: rt,
|
|
411
|
+
addSection: Tt,
|
|
412
|
+
getSections: It,
|
|
413
|
+
cleanupValue: Dt,
|
|
414
|
+
setShowData: Ct,
|
|
415
|
+
getShowData: Ot
|
|
416
|
+
}, Vt = (e) => `
|
|
417
|
+
.pieCircle{
|
|
418
|
+
stroke: ${e.pieStrokeColor};
|
|
419
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
420
|
+
opacity : ${e.pieOpacity};
|
|
421
|
+
}
|
|
422
|
+
.pieOuterCircle{
|
|
423
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
424
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
425
|
+
fill: none;
|
|
426
|
+
}
|
|
427
|
+
.pieTitleText {
|
|
428
|
+
text-anchor: middle;
|
|
429
|
+
font-size: ${e.pieTitleTextSize};
|
|
430
|
+
fill: ${e.pieTitleTextColor};
|
|
431
|
+
font-family: ${e.fontFamily};
|
|
432
|
+
}
|
|
433
|
+
.slice {
|
|
434
|
+
font-family: ${e.fontFamily};
|
|
435
|
+
fill: ${e.pieSectionTextColor};
|
|
436
|
+
font-size:${e.pieSectionTextSize};
|
|
437
|
+
// fill: white;
|
|
438
|
+
}
|
|
439
|
+
.legend text {
|
|
440
|
+
fill: ${e.pieLegendTextColor};
|
|
441
|
+
font-family: ${e.fontFamily};
|
|
442
|
+
font-size: ${e.pieLegendTextSize};
|
|
443
|
+
}
|
|
444
|
+
`, Nt = Vt, Lt = (e) => {
|
|
445
|
+
const u = Object.entries(e).map((p) => ({
|
|
446
|
+
label: p[0],
|
|
447
|
+
value: p[1]
|
|
448
|
+
})).sort((p, g) => g.value - p.value);
|
|
449
|
+
return bt().value(
|
|
450
|
+
(p) => p.value
|
|
451
|
+
)(u);
|
|
452
|
+
}, Ft = (e, u, $, p) => {
|
|
453
|
+
et.debug(`rendering pie chart
|
|
454
|
+
` + e);
|
|
455
|
+
const g = p.db, A = it(), y = ut(g.getConfig(), A.pie), a = 40, l = 18, d = 4, k = 450, I = k, T = yt(u), m = T.append("g"), v = g.getSections();
|
|
456
|
+
m.attr("transform", "translate(" + I / 2 + "," + k / 2 + ")");
|
|
457
|
+
const { themeVariables: c } = A;
|
|
458
|
+
let [E] = ft(c.pieOuterStrokeWidth);
|
|
459
|
+
E ?? (E = 2);
|
|
460
|
+
const O = y.textPosition, w = Math.min(I, k) / 2 - a, b = tt().innerRadius(0).outerRadius(w), t = tt().innerRadius(w * O).outerRadius(w * O);
|
|
461
|
+
m.append("circle").attr("cx", 0).attr("cy", 0).attr("r", w + E / 2).attr("class", "pieOuterCircle");
|
|
462
|
+
const i = Lt(v), n = [
|
|
463
|
+
c.pie1,
|
|
464
|
+
c.pie2,
|
|
465
|
+
c.pie3,
|
|
466
|
+
c.pie4,
|
|
467
|
+
c.pie5,
|
|
468
|
+
c.pie6,
|
|
469
|
+
c.pie7,
|
|
470
|
+
c.pie8,
|
|
471
|
+
c.pie9,
|
|
472
|
+
c.pie10,
|
|
473
|
+
c.pie11,
|
|
474
|
+
c.pie12
|
|
475
|
+
], r = _t(n);
|
|
476
|
+
m.selectAll("mySlices").data(i).enter().append("path").attr("d", b).attr("fill", (f) => r(f.data.label)).attr("class", "pieCircle");
|
|
477
|
+
let o = 0;
|
|
478
|
+
Object.keys(v).forEach((f) => {
|
|
479
|
+
o += v[f];
|
|
480
|
+
}), m.selectAll("mySlices").data(i).enter().append("text").text((f) => (f.data.value / o * 100).toFixed(0) + "%").attr("transform", (f) => "translate(" + t.centroid(f) + ")").style("text-anchor", "middle").attr("class", "slice"), m.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
481
|
+
const s = m.selectAll(".legend").data(r.domain()).enter().append("g").attr("class", "legend").attr("transform", (f, V) => {
|
|
482
|
+
const R = l + d, M = R * r.domain().length / 2, B = 12 * l, h = V * R - M;
|
|
483
|
+
return "translate(" + B + "," + h + ")";
|
|
484
|
+
});
|
|
485
|
+
s.append("rect").attr("width", l).attr("height", l).style("fill", r).style("stroke", r), s.data(i).append("text").attr("x", l + d).attr("y", l - d).text((f) => {
|
|
486
|
+
const { label: V, value: R } = f.data;
|
|
487
|
+
return g.getShowData() ? `${V} [${R}]` : V;
|
|
488
|
+
});
|
|
489
|
+
const P = Math.max(
|
|
490
|
+
...s.selectAll("text").nodes().map((f) => (f == null ? void 0 : f.getBoundingClientRect().width) ?? 0)
|
|
491
|
+
), _ = I + a + l + d + P;
|
|
492
|
+
T.attr("viewBox", `0 0 ${_} ${k}`), pt(T, k, _, y.useMaxWidth);
|
|
493
|
+
}, Rt = { draw: Ft }, Bt = {
|
|
494
|
+
parser: St,
|
|
495
|
+
db: Pt,
|
|
496
|
+
renderer: Rt,
|
|
497
|
+
styles: Nt
|
|
498
|
+
};
|
|
499
|
+
export {
|
|
500
|
+
Bt as diagram
|
|
501
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var R,m,C;(R=Path2D.prototype).roundRect??(R.roundRect=P),globalThis.CanvasRenderingContext2D&&((m=globalThis.CanvasRenderingContext2D.prototype).roundRect??(m.roundRect=P)),globalThis.OffscreenCanvasRenderingContext2D&&((C=globalThis.OffscreenCanvasRenderingContext2D.prototype).roundRect??(C.roundRect=P));function P(t,o,u,a,s){if(![t,o,u,a].every(n=>Number.isFinite(n)))return;s=O(s);let e,r,i,h;if(s.length===4)e=l(s[0]),r=l(s[1]),i=l(s[2]),h=l(s[3]);else if(s.length===3)e=l(s[0]),r=l(s[1]),h=l(s[1]),i=l(s[2]);else if(s.length===2)e=l(s[0]),i=l(s[0]),r=l(s[1]),h=l(s[1]);else if(s.length===1)e=l(s[0]),r=l(s[0]),i=l(s[0]),h=l(s[0]);else throw new RangeError(`${b(this)} ${s.length} is not a valid size for radii sequence.`);const g=[e,r,i,h],p=g.find(({x:n,y:f})=>n<0||f<0);if((p==null?void 0:p.x)<0?p.x:p==null||p.y,g.some(({x:n,y:f})=>!Number.isFinite(n)||!Number.isFinite(f)))return;if(p)throw new RangeError(`${b(this)} Radius value ${p} is negative.`);v(g),u<0&&a<0?(this.moveTo(t-e.x,o),this.ellipse(t+u+r.x,o-r.y,r.x,r.y,0,-Math.PI*1.5,-Math.PI),this.ellipse(t+u+i.x,o+a+i.y,i.x,i.y,0,-Math.PI,-Math.PI/2),this.ellipse(t-h.x,o+a+h.y,h.x,h.y,0,-Math.PI/2,0),this.ellipse(t-e.x,o-e.y,e.x,e.y,0,0,-Math.PI/2)):u<0?(this.moveTo(t-e.x,o),this.ellipse(t+u+r.x,o+r.y,r.x,r.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(t+u+i.x,o+a-i.y,i.x,i.y,0,-Math.PI,-Math.PI*1.5,1),this.ellipse(t-h.x,o+a-h.y,h.x,h.y,0,Math.PI/2,0,1),this.ellipse(t-e.x,o+e.y,e.x,e.y,0,0,-Math.PI/2,1)):a<0?(this.moveTo(t+e.x,o),this.ellipse(t+u-r.x,o-r.y,r.x,r.y,0,Math.PI/2,0,1),this.ellipse(t+u-i.x,o+a+i.y,i.x,i.y,0,0,-Math.PI/2,1),this.ellipse(t+h.x,o+a+h.y,h.x,h.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(t+e.x,o-e.y,e.x,e.y,0,-Math.PI,-Math.PI*1.5,1)):(this.moveTo(t+e.x,o),this.ellipse(t+u-r.x,o+r.y,r.x,r.y,0,-Math.PI/2,0),this.ellipse(t+u-i.x,o+a-i.y,i.x,i.y,0,0,Math.PI/2),this.ellipse(t+h.x,o+a-h.y,h.x,h.y,0,Math.PI/2,Math.PI),this.ellipse(t+e.x,o+e.y,e.x,e.y,0,Math.PI,Math.PI*1.5)),this.closePath(),this.moveTo(t,o);function N(n){const{x:f,y:c,z:x,w:M}=n;return{x:f,y:c,z:x,w:M}}function O(n){const f=typeof n;return f==="undefined"||n===null?[0]:f==="function"?[NaN]:f==="object"?typeof n[Symbol.iterator]=="function"?[...n].map(c=>{const x=typeof c;return x==="undefined"||c===null?0:x==="function"?NaN:x==="object"?N(c):y(c)}):[N(n)]:[y(n)]}function y(n){return+n}function l(n){const f=y(n);return Number.isFinite(f)?{x:f,y:f}:Object(n)===n?{x:y(n.x??0),y:y(n.y??0)}:{x:NaN,y:NaN}}function v(n){const[f,c,x,M]=n,F=[Math.abs(u)/(f.x+c.x),Math.abs(a)/(c.y+x.y),Math.abs(u)/(x.x+M.x),Math.abs(a)/(f.y+M.y)],I=Math.min(...F);if(I<=1)for(const D of n)D.x*=I,D.y*=I}}function b(t){return`Failed to execute 'roundRect' on '${T(t)}':`}function T(t){return Object(t)===t&&t instanceof Path2D?"Path2D":t instanceof(globalThis==null?void 0:globalThis.CanvasRenderingContext2D)?"CanvasRenderingContext2D":t instanceof(globalThis==null?void 0:globalThis.OffscreenCanvasRenderingContext2D)?"OffscreenCanvasRenderingContext2D":(t==null?void 0:t.constructor.name)||t}})();
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";const r=require("./layers.t46sYkQh.js"),G=require("lodash-es"),P=require("./layers.BLd2spTm.js"),V=require("./layers.DHfSJOOW.js"),j=require("./layers.Du8uQ4JH.js");function F(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(o,i,a.get?a:{enumerable:!0,get:()=>e[i]})}}return o.default=e,Object.freeze(o)}const E=F(G);function N(e){return typeof e=="string"?new r.Selection([document.querySelectorAll(e)],[document.documentElement]):new r.Selection([r.array(e)],r.root)}function M(e,o){return!!e.children(o).length}function R(e){return _(e.v)+":"+_(e.w)+":"+_(e.name)}var H=/:/g;function _(e){return e?String(e).replace(H,"\\:"):""}function B(e,o){o&&e.attr("style",o)}function K(e,o,i){o&&e.attr("class",o).attr("class",i+" "+e.attr("class"))}function O(e,o){var i=o.graph();if(E.isPlainObject(i)){var a=i.transition;if(E.isFunction(a))return a(e)}return e}function D(e,o){var i=e.append("foreignObject").attr("width","100000"),a=i.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var d=o.label;switch(typeof d){case"function":a.insert(d);break;case"object":a.insert(function(){return d});break;default:a.html(d)}B(a,o.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var p=a.node().getBoundingClientRect();return i.attr("width",p.width).attr("height",p.height),i}const I={},U=function(e){const o=Object.keys(e);for(const i of o)I[i]=e[i]},z=async function(e,o,i,a,d,p){const g=a.select(`[id="${i}"]`),s=Object.keys(e);for(const b of s){const l=e[b];let h="default";l.classes.length>0&&(h=l.classes.join(" ")),h=h+" flowchart-label";const w=r.getStylesFromArray(l.styles);let t=l.text!==void 0?l.text:l.id,c;if(r.log$1.info("vertex",l,l.labelType),l.labelType==="markdown")r.log$1.info("vertex",l,l.labelType);else if(r.evaluate(r.getConfig().flowchart.htmlLabels))c=D(g,{label:t}).node(),c.parentNode.removeChild(c);else{const k=d.createElementNS("http://www.w3.org/2000/svg","text");k.setAttribute("style",w.labelStyle.replace("color:","fill:"));const T=t.split(r.common$1.lineBreakRegex);for(const $ of T){const v=d.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=$,k.appendChild(v)}c=k}let f=0,n="";switch(l.type){case"round":f=5,n="rect";break;case"square":n="rect";break;case"diamond":n="question";break;case"hexagon":n="hexagon";break;case"odd":n="rect_left_inv_arrow";break;case"lean_right":n="lean_right";break;case"lean_left":n="lean_left";break;case"trapezoid":n="trapezoid";break;case"inv_trapezoid":n="inv_trapezoid";break;case"odd_right":n="rect_left_inv_arrow";break;case"circle":n="circle";break;case"ellipse":n="ellipse";break;case"stadium":n="stadium";break;case"subroutine":n="subroutine";break;case"cylinder":n="cylinder";break;case"group":n="rect";break;case"doublecircle":n="doublecircle";break;default:n="rect"}const S=await r.renderKatexSanitized(t,r.getConfig());o.setNode(l.id,{labelStyle:w.labelStyle,shape:n,labelText:S,labelType:l.labelType,rx:f,ry:f,class:h,style:w.style,id:l.id,link:l.link,linkTarget:l.linkTarget,tooltip:p.db.getTooltip(l.id)||"",domId:p.db.lookUpDomId(l.id),haveCallback:l.haveCallback,width:l.type==="group"?500:void 0,dir:l.dir,type:l.type,props:l.props,padding:r.getConfig().flowchart.padding}),r.log$1.info("setNode",{labelStyle:w.labelStyle,labelType:l.labelType,shape:n,labelText:S,rx:f,ry:f,class:h,style:w.style,id:l.id,domId:p.db.lookUpDomId(l.id),width:l.type==="group"?500:void 0,type:l.type,dir:l.dir,props:l.props,padding:r.getConfig().flowchart.padding})}},q=async function(e,o,i){r.log$1.info("abc78 edges = ",e);let a=0,d={},p,g;if(e.defaultStyle!==void 0){const s=r.getStylesFromArray(e.defaultStyle);p=s.style,g=s.labelStyle}for(const s of e){a++;const b="L-"+s.start+"-"+s.end;d[b]===void 0?(d[b]=0,r.log$1.info("abc78 new entry",b,d[b])):(d[b]++,r.log$1.info("abc78 new entry",b,d[b]));let l=b+"-"+d[b];r.log$1.info("abc78 new link id to be used is",b,l,d[b]);const h="LS-"+s.start,w="LE-"+s.end,t={style:"",labelStyle:""};switch(t.minlen=s.length||1,s.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let c="",f="";switch(s.stroke){case"normal":c="fill:none;",p!==void 0&&(c=p),g!==void 0&&(f=g),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(s.style!==void 0){const n=r.getStylesFromArray(s.style);c=n.style,f=n.labelStyle}t.style=t.style+=c,t.labelStyle=t.labelStyle+=f,s.interpolate!==void 0?t.curve=r.interpolateToCurve(s.interpolate,r.curveLinear):e.defaultInterpolate!==void 0?t.curve=r.interpolateToCurve(e.defaultInterpolate,r.curveLinear):t.curve=r.interpolateToCurve(I.curve,r.curveLinear),s.text===void 0?s.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=s.labelType,t.label=await r.renderKatexSanitized(s.text.replace(r.common$1.lineBreakRegex,`
|
|
2
|
+
`),r.getConfig()),s.style===void 0&&(t.style=t.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),t.labelStyle=t.labelStyle.replace("color:","fill:"),t.id=l,t.classes="flowchart-link "+h+" "+w,o.setEdge(s.start,s.end,t,a)}},W=function(e,o){return o.db.getClasses()},X=async function(e,o,i,a){r.log$1.info("Drawing flowchart");let d=a.db.getDirection();d===void 0&&(d="TD");const{securityLevel:p,flowchart:g}=r.getConfig(),s=g.nodeSpacing||50,b=g.rankSpacing||50;let l;p==="sandbox"&&(l=r.select("#i"+o));const h=p==="sandbox"?r.select(l.nodes()[0].contentDocument.body):r.select("body"),w=p==="sandbox"?l.nodes()[0].contentDocument:document,t=new P.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:s,ranksep:b,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let c;const f=a.db.getSubGraphs();r.log$1.info("Subgraphs - ",f);for(let u=f.length-1;u>=0;u--)c=f[u],r.log$1.info("Subgraph - ",c),a.db.addVertex(c.id,{text:c.title,type:c.labelType},"group",void 0,c.classes,c.dir);const n=a.db.getVertices(),S=a.db.getEdges();r.log$1.info("Edges",S);let k=0;for(k=f.length-1;k>=0;k--){c=f[k],N("cluster").append("text");for(let u=0;u<c.nodes.length;u++)r.log$1.info("Setting up subgraphs",c.nodes[u],c.id),t.setParent(c.nodes[u],c.id)}await z(n,t,o,h,w,a),await q(S,t);const T=h.select(`[id="${o}"]`),$=h.select("#"+o+" g");if(await V.render($,t,["point","circle","cross"],"flowchart",o),r.utils.insertTitle(T,"flowchartTitleText",g.titleTopMargin,a.db.getDiagramTitle()),r.setupGraphViewbox$1(t,T,g.diagramPadding,g.useMaxWidth),a.db.indexNodes("subGraph"+k),!g.htmlLabels){const u=w.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const x of u){const m=x.getBBox(),y=w.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("rx",0),y.setAttribute("ry",0),y.setAttribute("width",m.width),y.setAttribute("height",m.height),x.insertBefore(y,x.firstChild)}}Object.keys(n).forEach(function(u){const x=n[u];if(x.link){const m=r.select("#"+o+' [id="'+u+'"]');if(m){const y=w.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",x.classes.join(" ")),y.setAttributeNS("http://www.w3.org/2000/svg","href",x.link),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),p==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):x.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",x.linkTarget);const C=m.insert(function(){return y},":first-child"),L=m.select(".label-container");L&&C.append(function(){return L.node()});const A=m.select(".label");A&&C.append(function(){return A.node()})}}})},J={setConf:U,addVertices:z,addEdges:q,getClasses:W,draw:X},Q=(e,o)=>{const i=j.channel,a=i(e,"r"),d=i(e,"g"),p=i(e,"b");return r.rgba(a,d,p,o)},Y=e=>`.label {
|
|
3
|
+
font-family: ${e.fontFamily};
|
|
4
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
5
|
+
}
|
|
6
|
+
.cluster-label text {
|
|
7
|
+
fill: ${e.titleColor};
|
|
8
|
+
}
|
|
9
|
+
.cluster-label span,p {
|
|
10
|
+
color: ${e.titleColor};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.label text,span,p {
|
|
14
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
15
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.node rect,
|
|
19
|
+
.node circle,
|
|
20
|
+
.node ellipse,
|
|
21
|
+
.node polygon,
|
|
22
|
+
.node path {
|
|
23
|
+
fill: ${e.mainBkg};
|
|
24
|
+
stroke: ${e.nodeBorder};
|
|
25
|
+
stroke-width: 1px;
|
|
26
|
+
}
|
|
27
|
+
.flowchart-label text {
|
|
28
|
+
text-anchor: middle;
|
|
29
|
+
}
|
|
30
|
+
// .flowchart-label .text-outer-tspan {
|
|
31
|
+
// text-anchor: middle;
|
|
32
|
+
// }
|
|
33
|
+
// .flowchart-label .text-inner-tspan {
|
|
34
|
+
// text-anchor: start;
|
|
35
|
+
// }
|
|
36
|
+
|
|
37
|
+
.node .katex path {
|
|
38
|
+
fill: #000;
|
|
39
|
+
stroke: #000;
|
|
40
|
+
stroke-width: 1px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.node .label {
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.node.clickable {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.arrowheadPath {
|
|
51
|
+
fill: ${e.arrowheadColor};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.edgePath .path {
|
|
55
|
+
stroke: ${e.lineColor};
|
|
56
|
+
stroke-width: 2.0px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.flowchart-link {
|
|
60
|
+
stroke: ${e.lineColor};
|
|
61
|
+
fill: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.edgeLabel {
|
|
65
|
+
background-color: ${e.edgeLabelBackground};
|
|
66
|
+
rect {
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
background-color: ${e.edgeLabelBackground};
|
|
69
|
+
fill: ${e.edgeLabelBackground};
|
|
70
|
+
}
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* For html labels only */
|
|
75
|
+
.labelBkg {
|
|
76
|
+
background-color: ${Q(e.edgeLabelBackground,.5)};
|
|
77
|
+
// background-color:
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.cluster rect {
|
|
81
|
+
fill: ${e.clusterBkg};
|
|
82
|
+
stroke: ${e.clusterBorder};
|
|
83
|
+
stroke-width: 1px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster text {
|
|
87
|
+
fill: ${e.titleColor};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cluster span,p {
|
|
91
|
+
color: ${e.titleColor};
|
|
92
|
+
}
|
|
93
|
+
/* .cluster div {
|
|
94
|
+
color: ${e.titleColor};
|
|
95
|
+
} */
|
|
96
|
+
|
|
97
|
+
div.mermaidTooltip {
|
|
98
|
+
position: absolute;
|
|
99
|
+
text-align: center;
|
|
100
|
+
max-width: 200px;
|
|
101
|
+
padding: 2px;
|
|
102
|
+
font-family: ${e.fontFamily};
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
background: ${e.tertiaryColor};
|
|
105
|
+
border: 1px solid ${e.border2};
|
|
106
|
+
border-radius: 2px;
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
z-index: 100;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.flowchartTitleText {
|
|
112
|
+
text-anchor: middle;
|
|
113
|
+
font-size: 18px;
|
|
114
|
+
fill: ${e.textColor};
|
|
115
|
+
}
|
|
116
|
+
`,Z=Y;exports.addHtmlLabel=D;exports.applyClass=K;exports.applyStyle=B;exports.applyTransition=O;exports.edgeToId=R;exports.flowRendererV2=J;exports.flowStyles=Z;exports.isSubgraph=M;exports.selectAll=N;
|