@omg-dev/app 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
- package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
- package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
import { p as me } from "./chunk-JWPE2WC7-DFPBClX_.js";
|
|
2
|
-
import { _ as w, W as ye, z as ae, B as ee, F as Se, e as ve, l as te, be as B, d as U, b as xe, a as be, o as we, p as Ce, g as Te, s as Le, D as $e, bf as Ae, q as Fe } from "./index-JkCQXUYs.js";
|
|
3
|
-
import { s as Ne } from "./chunk-VR4S4FIN-hOZG7eF3.js";
|
|
4
|
-
import { p as Me } from "./cynefin-VYW2F7L2-DQXPWaog.js";
|
|
5
|
-
import { b as O } from "./defaultLocale-BgPVtth8.js";
|
|
6
|
-
import { o as Q } from "./ordinal-DfAQgscy.js";
|
|
7
|
-
function _e(t) {
|
|
8
|
-
var a = 0, l = t.children, n = l && l.length;
|
|
9
|
-
if (!n) a = 1;
|
|
10
|
-
else for (; --n >= 0; ) a += l[n].value;
|
|
11
|
-
t.value = a;
|
|
12
|
-
}
|
|
13
|
-
function ke() {
|
|
14
|
-
return this.eachAfter(_e);
|
|
15
|
-
}
|
|
16
|
-
function ze(t, a) {
|
|
17
|
-
let l = -1;
|
|
18
|
-
for (const n of this)
|
|
19
|
-
t.call(a, n, ++l, this);
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
function Ve(t, a) {
|
|
23
|
-
for (var l = this, n = [l], r, s, h = -1; l = n.pop(); )
|
|
24
|
-
if (t.call(a, l, ++h, this), r = l.children)
|
|
25
|
-
for (s = r.length - 1; s >= 0; --s)
|
|
26
|
-
n.push(r[s]);
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
function De(t, a) {
|
|
30
|
-
for (var l = this, n = [l], r = [], s, h, d, m = -1; l = n.pop(); )
|
|
31
|
-
if (r.push(l), s = l.children)
|
|
32
|
-
for (h = 0, d = s.length; h < d; ++h)
|
|
33
|
-
n.push(s[h]);
|
|
34
|
-
for (; l = r.pop(); )
|
|
35
|
-
t.call(a, l, ++m, this);
|
|
36
|
-
return this;
|
|
37
|
-
}
|
|
38
|
-
function Pe(t, a) {
|
|
39
|
-
let l = -1;
|
|
40
|
-
for (const n of this)
|
|
41
|
-
if (t.call(a, n, ++l, this))
|
|
42
|
-
return n;
|
|
43
|
-
}
|
|
44
|
-
function Be(t) {
|
|
45
|
-
return this.eachAfter(function(a) {
|
|
46
|
-
for (var l = +t(a.data) || 0, n = a.children, r = n && n.length; --r >= 0; ) l += n[r].value;
|
|
47
|
-
a.value = l;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function We(t) {
|
|
51
|
-
return this.eachBefore(function(a) {
|
|
52
|
-
a.children && a.children.sort(t);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function Ee(t) {
|
|
56
|
-
for (var a = this, l = Re(a, t), n = [a]; a !== l; )
|
|
57
|
-
a = a.parent, n.push(a);
|
|
58
|
-
for (var r = n.length; t !== l; )
|
|
59
|
-
n.splice(r, 0, t), t = t.parent;
|
|
60
|
-
return n;
|
|
61
|
-
}
|
|
62
|
-
function Re(t, a) {
|
|
63
|
-
if (t === a) return t;
|
|
64
|
-
var l = t.ancestors(), n = a.ancestors(), r = null;
|
|
65
|
-
for (t = l.pop(), a = n.pop(); t === a; )
|
|
66
|
-
r = t, t = l.pop(), a = n.pop();
|
|
67
|
-
return r;
|
|
68
|
-
}
|
|
69
|
-
function He() {
|
|
70
|
-
for (var t = this, a = [t]; t = t.parent; )
|
|
71
|
-
a.push(t);
|
|
72
|
-
return a;
|
|
73
|
-
}
|
|
74
|
-
function Ie() {
|
|
75
|
-
return Array.from(this);
|
|
76
|
-
}
|
|
77
|
-
function Oe() {
|
|
78
|
-
var t = [];
|
|
79
|
-
return this.eachBefore(function(a) {
|
|
80
|
-
a.children || t.push(a);
|
|
81
|
-
}), t;
|
|
82
|
-
}
|
|
83
|
-
function qe() {
|
|
84
|
-
var t = this, a = [];
|
|
85
|
-
return t.each(function(l) {
|
|
86
|
-
l !== t && a.push({ source: l.parent, target: l });
|
|
87
|
-
}), a;
|
|
88
|
-
}
|
|
89
|
-
function* Ge() {
|
|
90
|
-
var t = this, a, l = [t], n, r, s;
|
|
91
|
-
do
|
|
92
|
-
for (a = l.reverse(), l = []; t = a.pop(); )
|
|
93
|
-
if (yield t, n = t.children)
|
|
94
|
-
for (r = 0, s = n.length; r < s; ++r)
|
|
95
|
-
l.push(n[r]);
|
|
96
|
-
while (l.length);
|
|
97
|
-
}
|
|
98
|
-
function ne(t, a) {
|
|
99
|
-
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = je)) : a === void 0 && (a = Ye);
|
|
100
|
-
for (var l = new Z(t), n, r = [l], s, h, d, m; n = r.pop(); )
|
|
101
|
-
if ((h = a(n.data)) && (m = (h = Array.from(h)).length))
|
|
102
|
-
for (n.children = h, d = m - 1; d >= 0; --d)
|
|
103
|
-
r.push(s = h[d] = new Z(h[d])), s.parent = n, s.depth = n.depth + 1;
|
|
104
|
-
return l.eachBefore(Ze);
|
|
105
|
-
}
|
|
106
|
-
function Xe() {
|
|
107
|
-
return ne(this).eachBefore(Ue);
|
|
108
|
-
}
|
|
109
|
-
function Ye(t) {
|
|
110
|
-
return t.children;
|
|
111
|
-
}
|
|
112
|
-
function je(t) {
|
|
113
|
-
return Array.isArray(t) ? t[1] : null;
|
|
114
|
-
}
|
|
115
|
-
function Ue(t) {
|
|
116
|
-
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
|
|
117
|
-
}
|
|
118
|
-
function Ze(t) {
|
|
119
|
-
var a = 0;
|
|
120
|
-
do
|
|
121
|
-
t.height = a;
|
|
122
|
-
while ((t = t.parent) && t.height < ++a);
|
|
123
|
-
}
|
|
124
|
-
function Z(t) {
|
|
125
|
-
this.data = t, this.depth = this.height = 0, this.parent = null;
|
|
126
|
-
}
|
|
127
|
-
Z.prototype = ne.prototype = {
|
|
128
|
-
constructor: Z,
|
|
129
|
-
count: ke,
|
|
130
|
-
each: ze,
|
|
131
|
-
eachAfter: De,
|
|
132
|
-
eachBefore: Ve,
|
|
133
|
-
find: Pe,
|
|
134
|
-
sum: Be,
|
|
135
|
-
sort: We,
|
|
136
|
-
path: Ee,
|
|
137
|
-
ancestors: He,
|
|
138
|
-
descendants: Ie,
|
|
139
|
-
leaves: Oe,
|
|
140
|
-
links: qe,
|
|
141
|
-
copy: Xe,
|
|
142
|
-
[Symbol.iterator]: Ge
|
|
143
|
-
};
|
|
144
|
-
function Je(t) {
|
|
145
|
-
if (typeof t != "function") throw new Error();
|
|
146
|
-
return t;
|
|
147
|
-
}
|
|
148
|
-
function q() {
|
|
149
|
-
return 0;
|
|
150
|
-
}
|
|
151
|
-
function G(t) {
|
|
152
|
-
return function() {
|
|
153
|
-
return t;
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
function Ke(t) {
|
|
157
|
-
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
|
|
158
|
-
}
|
|
159
|
-
function Qe(t, a, l, n, r) {
|
|
160
|
-
for (var s = t.children, h, d = -1, m = s.length, c = t.value && (n - a) / t.value; ++d < m; )
|
|
161
|
-
h = s[d], h.y0 = l, h.y1 = r, h.x0 = a, h.x1 = a += h.value * c;
|
|
162
|
-
}
|
|
163
|
-
function et(t, a, l, n, r) {
|
|
164
|
-
for (var s = t.children, h, d = -1, m = s.length, c = t.value && (r - l) / t.value; ++d < m; )
|
|
165
|
-
h = s[d], h.x0 = a, h.x1 = n, h.y0 = l, h.y1 = l += h.value * c;
|
|
166
|
-
}
|
|
167
|
-
var tt = (1 + Math.sqrt(5)) / 2;
|
|
168
|
-
function at(t, a, l, n, r, s) {
|
|
169
|
-
for (var h = [], d = a.children, m, c, u = 0, b = 0, i = d.length, x, S, v = a.value, p, y, N, $, V, R, M; u < i; ) {
|
|
170
|
-
x = r - l, S = s - n;
|
|
171
|
-
do
|
|
172
|
-
p = d[b++].value;
|
|
173
|
-
while (!p && b < i);
|
|
174
|
-
for (y = N = p, R = Math.max(S / x, x / S) / (v * t), M = p * p * R, V = Math.max(N / M, M / y); b < i; ++b) {
|
|
175
|
-
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * R, $ = Math.max(N / M, M / y), $ > V) {
|
|
176
|
-
p -= c;
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
V = $;
|
|
180
|
-
}
|
|
181
|
-
h.push(m = { value: p, dice: x < S, children: d.slice(u, b) }), m.dice ? Qe(m, l, n, r, v ? n += S * p / v : s) : et(m, l, n, v ? l += x * p / v : r, s), v -= p, u = b;
|
|
182
|
-
}
|
|
183
|
-
return h;
|
|
184
|
-
}
|
|
185
|
-
const nt = (function t(a) {
|
|
186
|
-
function l(n, r, s, h, d) {
|
|
187
|
-
at(a, n, r, s, h, d);
|
|
188
|
-
}
|
|
189
|
-
return l.ratio = function(n) {
|
|
190
|
-
return t((n = +n) > 1 ? n : 1);
|
|
191
|
-
}, l;
|
|
192
|
-
})(tt);
|
|
193
|
-
function lt() {
|
|
194
|
-
var t = nt, a = !1, l = 1, n = 1, r = [0], s = q, h = q, d = q, m = q, c = q;
|
|
195
|
-
function u(i) {
|
|
196
|
-
return i.x0 = i.y0 = 0, i.x1 = l, i.y1 = n, i.eachBefore(b), r = [0], a && i.eachBefore(Ke), i;
|
|
197
|
-
}
|
|
198
|
-
function b(i) {
|
|
199
|
-
var x = r[i.depth], S = i.x0 + x, v = i.y0 + x, p = i.x1 - x, y = i.y1 - x;
|
|
200
|
-
p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), i.x0 = S, i.y0 = v, i.x1 = p, i.y1 = y, i.children && (x = r[i.depth + 1] = s(i) / 2, S += c(i) - x, v += h(i) - x, p -= d(i) - x, y -= m(i) - x, p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), t(i, S, v, p, y));
|
|
201
|
-
}
|
|
202
|
-
return u.round = function(i) {
|
|
203
|
-
return arguments.length ? (a = !!i, u) : a;
|
|
204
|
-
}, u.size = function(i) {
|
|
205
|
-
return arguments.length ? (l = +i[0], n = +i[1], u) : [l, n];
|
|
206
|
-
}, u.tile = function(i) {
|
|
207
|
-
return arguments.length ? (t = Je(i), u) : t;
|
|
208
|
-
}, u.padding = function(i) {
|
|
209
|
-
return arguments.length ? u.paddingInner(i).paddingOuter(i) : u.paddingInner();
|
|
210
|
-
}, u.paddingInner = function(i) {
|
|
211
|
-
return arguments.length ? (s = typeof i == "function" ? i : G(+i), u) : s;
|
|
212
|
-
}, u.paddingOuter = function(i) {
|
|
213
|
-
return arguments.length ? u.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i) : u.paddingTop();
|
|
214
|
-
}, u.paddingTop = function(i) {
|
|
215
|
-
return arguments.length ? (h = typeof i == "function" ? i : G(+i), u) : h;
|
|
216
|
-
}, u.paddingRight = function(i) {
|
|
217
|
-
return arguments.length ? (d = typeof i == "function" ? i : G(+i), u) : d;
|
|
218
|
-
}, u.paddingBottom = function(i) {
|
|
219
|
-
return arguments.length ? (m = typeof i == "function" ? i : G(+i), u) : m;
|
|
220
|
-
}, u.paddingLeft = function(i) {
|
|
221
|
-
return arguments.length ? (c = typeof i == "function" ? i : G(+i), u) : c;
|
|
222
|
-
}, u;
|
|
223
|
-
}
|
|
224
|
-
var E, oe = (E = class {
|
|
225
|
-
constructor() {
|
|
226
|
-
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = xe, this.getAccTitle = be, this.setDiagramTitle = we, this.getDiagramTitle = Ce, this.getAccDescription = Te, this.setAccDescription = Le;
|
|
227
|
-
}
|
|
228
|
-
getNodes() {
|
|
229
|
-
return this.nodes;
|
|
230
|
-
}
|
|
231
|
-
getConfig() {
|
|
232
|
-
const a = $e, l = ae();
|
|
233
|
-
return ee({
|
|
234
|
-
...a.treemap,
|
|
235
|
-
...l.treemap ?? {}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
addNode(a, l) {
|
|
239
|
-
this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ?? (this.root = a));
|
|
240
|
-
}
|
|
241
|
-
getRoot() {
|
|
242
|
-
return { name: "", children: this.outerNodes };
|
|
243
|
-
}
|
|
244
|
-
addClass(a, l) {
|
|
245
|
-
const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, r = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
246
|
-
r && r.forEach((s) => {
|
|
247
|
-
Ae(s) && (n != null && n.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n != null && n.styles ? n.styles.push(s) : n.styles = [s];
|
|
248
|
-
}), this.classes.set(a, n);
|
|
249
|
-
}
|
|
250
|
-
getClasses() {
|
|
251
|
-
return this.classes;
|
|
252
|
-
}
|
|
253
|
-
getStylesForClass(a) {
|
|
254
|
-
var l;
|
|
255
|
-
return ((l = this.classes.get(a)) == null ? void 0 : l.styles) ?? [];
|
|
256
|
-
}
|
|
257
|
-
clear() {
|
|
258
|
-
Fe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
259
|
-
}
|
|
260
|
-
}, w(E, "TreeMapDB"), E);
|
|
261
|
-
function ce(t) {
|
|
262
|
-
if (!t.length)
|
|
263
|
-
return [];
|
|
264
|
-
const a = [], l = [];
|
|
265
|
-
return t.forEach((n) => {
|
|
266
|
-
const r = {
|
|
267
|
-
name: n.name,
|
|
268
|
-
children: n.type === "Leaf" ? void 0 : []
|
|
269
|
-
};
|
|
270
|
-
for (r.classSelector = n == null ? void 0 : n.classSelector, n != null && n.cssCompiledStyles && (r.cssCompiledStyles = n.cssCompiledStyles), n.type === "Leaf" && n.value !== void 0 && (r.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
|
|
271
|
-
l.pop();
|
|
272
|
-
if (l.length === 0)
|
|
273
|
-
a.push(r);
|
|
274
|
-
else {
|
|
275
|
-
const s = l[l.length - 1].node;
|
|
276
|
-
s.children ? s.children.push(r) : s.children = [r];
|
|
277
|
-
}
|
|
278
|
-
n.type !== "Leaf" && l.push({ node: r, level: n.level });
|
|
279
|
-
}), a;
|
|
280
|
-
}
|
|
281
|
-
w(ce, "buildHierarchy");
|
|
282
|
-
var rt = /* @__PURE__ */ w((t, a) => {
|
|
283
|
-
me(t, a);
|
|
284
|
-
const l = [];
|
|
285
|
-
for (const s of t.TreemapRows ?? [])
|
|
286
|
-
s.$type === "ClassDefStatement" && a.addClass(s.className ?? "", s.styleText ?? "");
|
|
287
|
-
for (const s of t.TreemapRows ?? []) {
|
|
288
|
-
const h = s.item;
|
|
289
|
-
if (!h)
|
|
290
|
-
continue;
|
|
291
|
-
const d = s.indent ? parseInt(s.indent) : 0, m = st(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], u = c.length > 0 ? c : void 0, b = {
|
|
292
|
-
level: d,
|
|
293
|
-
name: m,
|
|
294
|
-
type: h.$type,
|
|
295
|
-
value: h.value,
|
|
296
|
-
classSelector: h.classSelector,
|
|
297
|
-
cssCompiledStyles: u
|
|
298
|
-
};
|
|
299
|
-
l.push(b);
|
|
300
|
-
}
|
|
301
|
-
const n = ce(l), r = /* @__PURE__ */ w((s, h) => {
|
|
302
|
-
for (const d of s)
|
|
303
|
-
a.addNode(d, h), d.children && d.children.length > 0 && r(d.children, h + 1);
|
|
304
|
-
}, "addNodesRecursively");
|
|
305
|
-
r(n, 0);
|
|
306
|
-
}, "populate"), st = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), he = {
|
|
307
|
-
// @ts-expect-error - TreeMapDB is not assignable to DiagramDB
|
|
308
|
-
parser: { yy: void 0 },
|
|
309
|
-
parse: /* @__PURE__ */ w(async (t) => {
|
|
310
|
-
var a;
|
|
311
|
-
try {
|
|
312
|
-
const n = await Me("treemap", t);
|
|
313
|
-
te.debug("Treemap AST:", n);
|
|
314
|
-
const r = (a = he.parser) == null ? void 0 : a.yy;
|
|
315
|
-
if (!(r instanceof oe))
|
|
316
|
-
throw new Error(
|
|
317
|
-
"parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
|
|
318
|
-
);
|
|
319
|
-
rt(n, r);
|
|
320
|
-
} catch (l) {
|
|
321
|
-
throw te.error("Error parsing treemap:", l), l;
|
|
322
|
-
}
|
|
323
|
-
}, "parse")
|
|
324
|
-
}, it = 10, W = 10, X = 25, ot = /* @__PURE__ */ w((t, a, l, n) => {
|
|
325
|
-
const r = n.db, s = r.getConfig(), h = s.padding ?? it, d = r.getDiagramTitle(), m = r.getRoot(), { themeVariables: c } = ae();
|
|
326
|
-
if (!m)
|
|
327
|
-
return;
|
|
328
|
-
const u = d ? 30 : 0, b = Se(a), i = s.nodeWidth ? s.nodeWidth * W : 960, x = s.nodeHeight ? s.nodeHeight * W : 500, S = i, v = x + u;
|
|
329
|
-
b.attr("viewBox", `0 0 ${S} ${v}`), ve(b, v, S, s.useMaxWidth);
|
|
330
|
-
let p;
|
|
331
|
-
try {
|
|
332
|
-
const e = s.valueFormat || ",";
|
|
333
|
-
if (e === "$0,0")
|
|
334
|
-
p = /* @__PURE__ */ w((o) => "$" + O(",")(o), "valueFormat");
|
|
335
|
-
else if (e.startsWith("$") && e.includes(",")) {
|
|
336
|
-
const o = /\.\d+/.exec(e), f = o ? o[0] : "";
|
|
337
|
-
p = /* @__PURE__ */ w((C) => "$" + O("," + f)(C), "valueFormat");
|
|
338
|
-
} else if (e.startsWith("$")) {
|
|
339
|
-
const o = e.substring(1);
|
|
340
|
-
p = /* @__PURE__ */ w((f) => "$" + O(o || "")(f), "valueFormat");
|
|
341
|
-
} else
|
|
342
|
-
p = O(e);
|
|
343
|
-
} catch (e) {
|
|
344
|
-
te.error("Error creating format function:", e), p = O(",");
|
|
345
|
-
}
|
|
346
|
-
const y = Q().range([
|
|
347
|
-
"transparent",
|
|
348
|
-
c.cScale0,
|
|
349
|
-
c.cScale1,
|
|
350
|
-
c.cScale2,
|
|
351
|
-
c.cScale3,
|
|
352
|
-
c.cScale4,
|
|
353
|
-
c.cScale5,
|
|
354
|
-
c.cScale6,
|
|
355
|
-
c.cScale7,
|
|
356
|
-
c.cScale8,
|
|
357
|
-
c.cScale9,
|
|
358
|
-
c.cScale10,
|
|
359
|
-
c.cScale11
|
|
360
|
-
]), N = Q().range([
|
|
361
|
-
"transparent",
|
|
362
|
-
c.cScalePeer0,
|
|
363
|
-
c.cScalePeer1,
|
|
364
|
-
c.cScalePeer2,
|
|
365
|
-
c.cScalePeer3,
|
|
366
|
-
c.cScalePeer4,
|
|
367
|
-
c.cScalePeer5,
|
|
368
|
-
c.cScalePeer6,
|
|
369
|
-
c.cScalePeer7,
|
|
370
|
-
c.cScalePeer8,
|
|
371
|
-
c.cScalePeer9,
|
|
372
|
-
c.cScalePeer10,
|
|
373
|
-
c.cScalePeer11
|
|
374
|
-
]), $ = Q().range([
|
|
375
|
-
c.cScaleLabel0,
|
|
376
|
-
c.cScaleLabel1,
|
|
377
|
-
c.cScaleLabel2,
|
|
378
|
-
c.cScaleLabel3,
|
|
379
|
-
c.cScaleLabel4,
|
|
380
|
-
c.cScaleLabel5,
|
|
381
|
-
c.cScaleLabel6,
|
|
382
|
-
c.cScaleLabel7,
|
|
383
|
-
c.cScaleLabel8,
|
|
384
|
-
c.cScaleLabel9,
|
|
385
|
-
c.cScaleLabel10,
|
|
386
|
-
c.cScaleLabel11
|
|
387
|
-
]);
|
|
388
|
-
d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
|
|
389
|
-
const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), R = ne(m).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([i, x]).paddingTop(
|
|
390
|
-
(e) => e.children && e.children.length > 0 ? X + W : 0
|
|
391
|
-
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? W : 0).paddingRight((e) => e.children && e.children.length > 0 ? W : 0).paddingBottom((e) => e.children && e.children.length > 0 ? W : 0).round(!0)(R), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = V.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
392
|
-
H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
393
|
-
if (e.depth === 0)
|
|
394
|
-
return "display: none;";
|
|
395
|
-
const o = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
396
|
-
return o.nodeStyles + ";" + o.borderStyles.join(";");
|
|
397
|
-
}), H.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", X / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("clip-path", (e, o) => `url(#clip-section-${a}-${o})`).attr("style", (e) => {
|
|
398
|
-
if (e.depth === 0)
|
|
399
|
-
return "display: none;";
|
|
400
|
-
const o = "dominant-baseline: middle; font-size: 12px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
401
|
-
return o + f.labelStyles.replace("color:", "fill:");
|
|
402
|
-
}).each(function(e) {
|
|
403
|
-
if (e.depth === 0)
|
|
404
|
-
return;
|
|
405
|
-
const o = U(this), f = e.data.name;
|
|
406
|
-
o.text(f);
|
|
407
|
-
const C = e.x1 - e.x0, L = 6;
|
|
408
|
-
let T;
|
|
409
|
-
s.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
|
|
410
|
-
const g = Math.max(15, T), _ = o.node();
|
|
411
|
-
if (_.getComputedTextLength() > g) {
|
|
412
|
-
let z = f;
|
|
413
|
-
for (; z.length > 0; ) {
|
|
414
|
-
if (z = f.substring(0, z.length - 1), z.length === 0) {
|
|
415
|
-
o.text("..."), _.getComputedTextLength() > g && o.text("");
|
|
416
|
-
break;
|
|
417
|
-
}
|
|
418
|
-
if (o.text(z + "..."), _.getComputedTextLength() <= g)
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}), s.showValues !== !1 && H.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", X / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? p(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
|
|
423
|
-
if (e.depth === 0)
|
|
424
|
-
return "display: none;";
|
|
425
|
-
const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
426
|
-
return o + f.labelStyles.replace("color:", "fill:");
|
|
427
|
-
});
|
|
428
|
-
const re = le.leaves(), A = re.length > 20, ue = A ? 16 : 38, Y = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, J = A ? 2 : 4, se = A ? 8 : 10, K = A ? 1 : 2, j = V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
429
|
-
j.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), j.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), j.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
430
|
-
const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + $(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
431
|
-
return o + f.labelStyles.replace("color:", "fill:");
|
|
432
|
-
}).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
|
|
433
|
-
const o = U(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * J, P = C - 2 * J;
|
|
434
|
-
if (T < se || P < se) {
|
|
435
|
-
o.style("display", "none");
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
let g = parseInt(o.style("font-size"), 10);
|
|
439
|
-
const _ = 0.6;
|
|
440
|
-
for (; L.getComputedTextLength() > T && g > D; )
|
|
441
|
-
g--, o.style("font-size", `${g}px`);
|
|
442
|
-
let F = Math.max(
|
|
443
|
-
I,
|
|
444
|
-
Math.min(Y, Math.round(g * _))
|
|
445
|
-
), k = g + K + F;
|
|
446
|
-
for (; k > P && g > D && (g--, F = Math.max(
|
|
447
|
-
I,
|
|
448
|
-
Math.min(Y, Math.round(g * _))
|
|
449
|
-
), !(F < I && g === D)); )
|
|
450
|
-
o.style("font-size", `${g}px`), k = g + K + F;
|
|
451
|
-
o.style("font-size", `${g}px`), A ? (g < D || P < D) && o.style("display", "none") : (L.getComputedTextLength() > T || g < D || P < g) && o.style("display", "none");
|
|
452
|
-
}), s.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
|
|
453
|
-
return (o.y1 - o.y0) / 2;
|
|
454
|
-
}).attr("style", (o) => {
|
|
455
|
-
const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
|
|
456
|
-
return f + C.labelStyles.replace("color:", "fill:");
|
|
457
|
-
}).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
|
|
458
|
-
const f = U(this), C = this.parentNode;
|
|
459
|
-
if (!C) {
|
|
460
|
-
f.style("display", "none");
|
|
461
|
-
return;
|
|
462
|
-
}
|
|
463
|
-
const L = U(C).select(".treemapLabel");
|
|
464
|
-
if (L.empty() || L.style("display") === "none") {
|
|
465
|
-
f.style("display", "none");
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
const T = parseFloat(L.style("font-size")), g = Math.max(
|
|
469
|
-
I,
|
|
470
|
-
Math.min(Y, Math.round(T * 0.6))
|
|
471
|
-
);
|
|
472
|
-
f.style("font-size", `${g}px`);
|
|
473
|
-
const F = (o.y1 - o.y0) / 2 + T / 2 + K;
|
|
474
|
-
f.attr("y", F);
|
|
475
|
-
const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, ge = k - 2 * J;
|
|
476
|
-
f.node().getComputedTextLength() > ge || F + g > ie || g < I ? f.style("display", "none") : f.style("display", null);
|
|
477
|
-
});
|
|
478
|
-
const pe = s.diagramPadding ?? 8;
|
|
479
|
-
Ne(b, pe, "flowchart", (s == null ? void 0 : s.useMaxWidth) || !1);
|
|
480
|
-
}, "draw"), ct = /* @__PURE__ */ w(function(t, a) {
|
|
481
|
-
return a.db.getClasses();
|
|
482
|
-
}, "getClasses"), ht = { draw: ot, getClasses: ct }, dt = {
|
|
483
|
-
sectionStrokeColor: "black",
|
|
484
|
-
sectionStrokeWidth: "1",
|
|
485
|
-
sectionFillColor: "#efefef",
|
|
486
|
-
leafStrokeColor: "black",
|
|
487
|
-
leafStrokeWidth: "1",
|
|
488
|
-
leafFillColor: "#efefef",
|
|
489
|
-
labelFontSize: "12px",
|
|
490
|
-
valueFontSize: "10px",
|
|
491
|
-
titleFontSize: "14px"
|
|
492
|
-
}, ut = /* @__PURE__ */ w(({
|
|
493
|
-
treemap: t
|
|
494
|
-
} = {}) => {
|
|
495
|
-
const a = ye(), l = ae(), n = ee(a, l.themeVariables), r = ee(dt, t), s = r.titleColor ?? n.titleColor, h = r.labelColor ?? n.textColor, d = r.valueColor ?? n.textColor;
|
|
496
|
-
return `
|
|
497
|
-
.treemapNode.section {
|
|
498
|
-
stroke: ${r.sectionStrokeColor};
|
|
499
|
-
stroke-width: ${r.sectionStrokeWidth};
|
|
500
|
-
fill: ${r.sectionFillColor};
|
|
501
|
-
}
|
|
502
|
-
.treemapNode.leaf {
|
|
503
|
-
stroke: ${r.leafStrokeColor};
|
|
504
|
-
stroke-width: ${r.leafStrokeWidth};
|
|
505
|
-
fill: ${r.leafFillColor};
|
|
506
|
-
}
|
|
507
|
-
.treemapLabel {
|
|
508
|
-
fill: ${h};
|
|
509
|
-
font-size: ${r.labelFontSize};
|
|
510
|
-
}
|
|
511
|
-
.treemapValue {
|
|
512
|
-
fill: ${d};
|
|
513
|
-
font-size: ${r.valueFontSize};
|
|
514
|
-
}
|
|
515
|
-
.treemapTitle {
|
|
516
|
-
fill: ${s};
|
|
517
|
-
font-size: ${r.titleFontSize};
|
|
518
|
-
}
|
|
519
|
-
`;
|
|
520
|
-
}, "getStyles"), pt = ut, bt = {
|
|
521
|
-
parser: he,
|
|
522
|
-
get db() {
|
|
523
|
-
return new oe();
|
|
524
|
-
},
|
|
525
|
-
renderer: ht,
|
|
526
|
-
styles: pt
|
|
527
|
-
};
|
|
528
|
-
export {
|
|
529
|
-
bt as diagram
|
|
530
|
-
};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { p as $ } from "./chunk-JWPE2WC7-DFPBClX_.js";
|
|
2
|
-
import { _ as b, B as m, F as C, e as S, l as w, b as D, a as T, o as z, p as F, g as P, s as E, z as A, D as W, q as _ } from "./index-JkCQXUYs.js";
|
|
3
|
-
import { p as N } from "./cynefin-VYW2F7L2-DQXPWaog.js";
|
|
4
|
-
var L = W.packet, u, v = (u = class {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.packet = [], this.setAccTitle = D, this.getAccTitle = T, this.setDiagramTitle = z, this.getDiagramTitle = F, this.getAccDescription = P, this.setAccDescription = E;
|
|
7
|
-
}
|
|
8
|
-
getConfig() {
|
|
9
|
-
const t = m({
|
|
10
|
-
...L,
|
|
11
|
-
...A().packet
|
|
12
|
-
});
|
|
13
|
-
return t.showBits && (t.paddingY += 10), t;
|
|
14
|
-
}
|
|
15
|
-
getPacket() {
|
|
16
|
-
return this.packet;
|
|
17
|
-
}
|
|
18
|
-
pushWord(t) {
|
|
19
|
-
t.length > 0 && this.packet.push(t);
|
|
20
|
-
}
|
|
21
|
-
clear() {
|
|
22
|
-
_(), this.packet = [];
|
|
23
|
-
}
|
|
24
|
-
}, b(u, "PacketDB"), u), M = 1e4, Y = /* @__PURE__ */ b((e, t) => {
|
|
25
|
-
$(e, t);
|
|
26
|
-
let s = -1, r = [], n = 1;
|
|
27
|
-
const { bitsPerRow: l } = t.getConfig();
|
|
28
|
-
for (let { start: a, end: i, bits: d, label: c } of e.blocks) {
|
|
29
|
-
if (a !== void 0 && i !== void 0 && i < a)
|
|
30
|
-
throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
|
|
31
|
-
if (a ?? (a = s + 1), a !== s + 1)
|
|
32
|
-
throw new Error(
|
|
33
|
-
`Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${s + 1}.`
|
|
34
|
-
);
|
|
35
|
-
if (d === 0)
|
|
36
|
-
throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
|
37
|
-
for (i ?? (i = a + (d ?? 1) - 1), d ?? (d = i - a + 1), s = i, w.debug(`Packet block ${a} - ${s} with label ${c}`); r.length <= l + 1 && t.getPacket().length < M; ) {
|
|
38
|
-
const [p, o] = I({ start: a, end: i, bits: d, label: c }, n, l);
|
|
39
|
-
if (r.push(p), p.end + 1 === n * l && (t.pushWord(r), r = [], n++), !o)
|
|
40
|
-
break;
|
|
41
|
-
({ start: a, end: i, bits: d, label: c } = o);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
t.pushWord(r);
|
|
45
|
-
}, "populate"), I = /* @__PURE__ */ b((e, t, s) => {
|
|
46
|
-
if (e.start === void 0)
|
|
47
|
-
throw new Error("start should have been set during first phase");
|
|
48
|
-
if (e.end === void 0)
|
|
49
|
-
throw new Error("end should have been set during first phase");
|
|
50
|
-
if (e.start > e.end)
|
|
51
|
-
throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
52
|
-
if (e.end + 1 <= t * s)
|
|
53
|
-
return [e, void 0];
|
|
54
|
-
const r = t * s - 1, n = t * s;
|
|
55
|
-
return [
|
|
56
|
-
{
|
|
57
|
-
start: e.start,
|
|
58
|
-
end: r,
|
|
59
|
-
label: e.label,
|
|
60
|
-
bits: r - e.start
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
start: n,
|
|
64
|
-
end: e.end,
|
|
65
|
-
label: e.label,
|
|
66
|
-
bits: e.end - n
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
}, "getNextFittingBlock"), x = {
|
|
70
|
-
// @ts-expect-error - PacketDB is not assignable to DiagramDB
|
|
71
|
-
parser: { yy: void 0 },
|
|
72
|
-
parse: /* @__PURE__ */ b(async (e) => {
|
|
73
|
-
var r;
|
|
74
|
-
const t = await N("packet", e), s = (r = x.parser) == null ? void 0 : r.yy;
|
|
75
|
-
if (!(s instanceof v))
|
|
76
|
-
throw new Error(
|
|
77
|
-
"parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
|
|
78
|
-
);
|
|
79
|
-
w.debug(t), Y(t, s);
|
|
80
|
-
}, "parse")
|
|
81
|
-
}, O = /* @__PURE__ */ b((e, t, s, r) => {
|
|
82
|
-
const n = r.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = C(t);
|
|
83
|
-
f.attr("viewBox", `0 0 ${k} ${g}`), S(f, g, k, l.useMaxWidth);
|
|
84
|
-
for (const [y, B] of p.entries())
|
|
85
|
-
j(f, B, y, l);
|
|
86
|
-
f.append("text").text(o).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
87
|
-
}, "draw"), j = /* @__PURE__ */ b((e, t, s, { rowHeight: r, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
|
|
88
|
-
const c = e.append("g"), p = s * (r + l) + l;
|
|
89
|
-
for (const o of t) {
|
|
90
|
-
const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
|
|
91
|
-
if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", r).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
|
|
92
|
-
continue;
|
|
93
|
-
const k = o.end === o.start, f = p - 2;
|
|
94
|
-
c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
|
|
95
|
-
}
|
|
96
|
-
}, "drawWord"), q = { draw: O }, G = {
|
|
97
|
-
byteFontSize: "10px",
|
|
98
|
-
startByteColor: "black",
|
|
99
|
-
endByteColor: "black",
|
|
100
|
-
labelColor: "black",
|
|
101
|
-
labelFontSize: "12px",
|
|
102
|
-
titleColor: "black",
|
|
103
|
-
titleFontSize: "14px",
|
|
104
|
-
blockStrokeColor: "black",
|
|
105
|
-
blockStrokeWidth: "1",
|
|
106
|
-
blockFillColor: "#efefef"
|
|
107
|
-
}, H = /* @__PURE__ */ b(({ packet: e } = {}) => {
|
|
108
|
-
const t = m(G, e);
|
|
109
|
-
return `
|
|
110
|
-
.packetByte {
|
|
111
|
-
font-size: ${t.byteFontSize};
|
|
112
|
-
}
|
|
113
|
-
.packetByte.start {
|
|
114
|
-
fill: ${t.startByteColor};
|
|
115
|
-
}
|
|
116
|
-
.packetByte.end {
|
|
117
|
-
fill: ${t.endByteColor};
|
|
118
|
-
}
|
|
119
|
-
.packetLabel {
|
|
120
|
-
fill: ${t.labelColor};
|
|
121
|
-
font-size: ${t.labelFontSize};
|
|
122
|
-
}
|
|
123
|
-
.packetTitle {
|
|
124
|
-
fill: ${t.titleColor};
|
|
125
|
-
font-size: ${t.titleFontSize};
|
|
126
|
-
}
|
|
127
|
-
.packetBlock {
|
|
128
|
-
stroke: ${t.blockStrokeColor};
|
|
129
|
-
stroke-width: ${t.blockStrokeWidth};
|
|
130
|
-
fill: ${t.blockFillColor};
|
|
131
|
-
}
|
|
132
|
-
`;
|
|
133
|
-
}, "styles"), X = {
|
|
134
|
-
parser: x,
|
|
135
|
-
get db() {
|
|
136
|
-
return new v();
|
|
137
|
-
},
|
|
138
|
-
renderer: q,
|
|
139
|
-
styles: H
|
|
140
|
-
};
|
|
141
|
-
export {
|
|
142
|
-
X as diagram
|
|
143
|
-
};
|