@belonguniverseai/react-sdk 0.6.2 → 0.6.4

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.
Files changed (81) hide show
  1. package/dist/api/agent-grants.d.ts +23 -8
  2. package/dist/api/client.d.ts +53 -4
  3. package/dist/api/queries.d.ts +2 -0
  4. package/dist/app/call-summary.d.ts +30 -0
  5. package/dist/component/abnfDiagram-N423BO3Z-DR3fMT7g.js +90 -0
  6. package/dist/component/arc-DJkYOSuJ.js +86 -0
  7. package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-BIp4IBPk.js} +1872 -1785
  8. package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-BqryGqC6.js} +895 -894
  9. package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-GktlF-Di.js} +3 -3
  10. package/dist/component/{channel-CYFijF_t.js → channel-3CusDaXb.js} +2 -2
  11. package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-DMTs6j_c.js} +5 -5
  12. package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-CIU34hPH.js} +2 -2
  13. package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-Ds3vF1Mv.js} +399 -378
  14. package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-DGxDkIm6.js} +2 -2
  15. package/dist/component/chunk-6Q2QTUOP-BI8oZt98.js +673 -0
  16. package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-D-36xUd5.js} +244 -239
  17. package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-8N_wQ762.js} +2 -2
  18. package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-ChxxpkWc.js} +2 -2
  19. package/dist/component/chunk-RYQCIY6F-CSY-95OP.js +316 -0
  20. package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-BQd9yyE1.js} +2 -2
  21. package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-BOq63iUL.js} +3 -3
  22. package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-BOq63iUL.js} +3 -3
  23. package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-B9x8cp5w.js} +2 -2
  24. package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
  25. package/dist/component/cynefinDiagram-MW4NZA55-OF6l99SS.js +302 -0
  26. package/dist/component/dagre-VZM6K2ZE-CELO1hFb.js +343 -0
  27. package/dist/component/diagram-7IWD3JNH-COzvm6E2.js +353 -0
  28. package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DR9KMRGw.js} +24 -24
  29. package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-D47Zqm-k.js} +23 -23
  30. package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-Key1bw_Y.js} +197 -197
  31. package/dist/component/diagram-UB23O5K3-Cxf-sZnK.js +222 -0
  32. package/dist/component/ebnfDiagram-BXEA7PRR-C8uURt_x.js +112 -0
  33. package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-CpCxe8Ib.js} +142 -131
  34. package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-urFG2I71.js} +268 -258
  35. package/dist/component/ganttDiagram-PKOTCBZU-8nA9faYf.js +2714 -0
  36. package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-u4cbNW8o.js} +33 -33
  37. package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
  38. package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-Bo-15uvJ.js} +2 -2
  39. package/dist/component/index.js +2 -2
  40. package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-ZAv4gZpA.js} +4 -4
  41. package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-CvB6evSz.js} +27 -27
  42. package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-M5BRYuPr.js} +5 -5
  43. package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-LL6GkmVe.js} +35 -35
  44. package/dist/component/layout-Br2UjHRU.js +1522 -0
  45. package/dist/component/{linear-BT4blD8s.js → linear-DVg61V66.js} +13 -13
  46. package/dist/component/map-CdwokNh2.js +227 -0
  47. package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-C2L7fCIM.js} +29577 -29128
  48. package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-BBZzsLh7.js} +26 -26
  49. package/dist/component/pegDiagram-VL7TDLO6-BEG86cY8.js +98 -0
  50. package/dist/component/pieDiagram-7S7Q4E2Y-BTkrNjAi.js +210 -0
  51. package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-BsjBAd4w.js} +14 -15
  52. package/dist/component/railroadDiagram-AXF67PYL-DuE0ZFxj.js +80 -0
  53. package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-CcshEEMy.js} +15 -15
  54. package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-CFn011ig.js} +2 -2
  55. package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-DmMZNJDw.js} +960 -963
  56. package/dist/component/sizeCapture-X5ZJPWSS-Ce4PhIAO.js +49 -0
  57. package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DDVzQKaO.js} +5 -5
  58. package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DeeW8PDA.js} +3 -3
  59. package/dist/component/swimlanes-SLNWSIFB-CZh2_vzg.js +5335 -0
  60. package/dist/component/swimlanesDiagram-ULZ7WXOC-Wb0Ri7qR.js +16 -0
  61. package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-rfiLwdTR.js} +15 -15
  62. package/dist/component/vennDiagram-T6HMQDX7-D8l7hqNb.js +1581 -0
  63. package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-7YqmpmtC.js} +15 -15
  64. package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-Dx2ECqt8.js} +464 -418
  65. package/dist/embed/voice/line-slots.d.ts +37 -2
  66. package/dist/embed/voice-call.d.ts +12 -0
  67. package/dist/i18n/messages/en.d.ts +1 -2
  68. package/dist/lib/web-storage.d.ts +8 -0
  69. package/dist/stream/belong-chat-transport.d.ts +1 -0
  70. package/dist/stream/belong-data-parts.d.ts +2 -0
  71. package/dist/stream/stream-state-store.d.ts +13 -0
  72. package/dist/types/public.d.ts +3 -0
  73. package/package.json +1 -1
  74. package/dist/component/arc-TLcl3N8_.js +0 -86
  75. package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
  76. package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
  77. package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
  78. package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
  79. package/dist/component/layout-Bu6nRdWm.js +0 -1731
  80. package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
  81. package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
@@ -1,94 +1,94 @@
1
- import { _ as w, a4 as he, G as Q, I as Z, N as de, e as ue, l as J, bg as B, d as Y, b as pe, a as fe, q as ge, t as me, g as ye, s as Se, K as ve, bh as xe, B as be } from "./mermaid-GHXKKRXX-DXPXjnb7.js";
2
- import { s as we } from "./chunk-2J33WTMH-B06Y_xVy.js";
3
- import { p as Ce } from "./chunk-4BX2VUAB-DVpS0I_p.js";
4
- import { p as Te } from "./wardley-L42UT6IY-HA1eSIS_.js";
5
- import { b as H } from "./defaultLocale-BXpxsZAK.js";
6
- import { o as U } from "./ordinal-D0x7izaa.js";
1
+ import { p as ge } from "./chunk-JWPE2WC7-8N_wQ762.js";
2
+ import { _ as w, Z as me, z as te, D as Q, G as ye, e as Se, l as ee, bi as B, d as Y, b as ve, a as xe, o as be, p as we, g as Ce, s as Te, E as Le, bj as $e, q as Ae } from "./mermaid-GHXKKRXX-C2L7fCIM.js";
3
+ import { s as Fe } from "./chunk-KBJHAD2P-ChxxpkWc.js";
4
+ import { p as Ne } from "./cynefin-VYW2F7L2-DAyxamLw.js";
5
+ import { b as I } from "./defaultLocale-BXpxsZAK.js";
6
+ import { o as K } from "./ordinal-D0x7izaa.js";
7
7
  globalThis.process = globalThis.process || { env: {} };
8
8
  globalThis.global = globalThis.global || globalThis;
9
- function Le(e) {
9
+ function Me(e) {
10
10
  var a = 0, n = e.children, l = n && n.length;
11
11
  if (!l) a = 1;
12
12
  else for (; --l >= 0; ) a += n[l].value;
13
13
  e.value = a;
14
14
  }
15
- function $e() {
16
- return this.eachAfter(Le);
15
+ function _e() {
16
+ return this.eachAfter(Me);
17
17
  }
18
- function Ae(e, a) {
18
+ function ke(e, a) {
19
19
  let n = -1;
20
20
  for (const l of this)
21
21
  e.call(a, l, ++n, this);
22
22
  return this;
23
23
  }
24
- function Fe(e, a) {
24
+ function ze(e, a) {
25
25
  for (var n = this, l = [n], s, o, h = -1; n = l.pop(); )
26
26
  if (e.call(a, n, ++h, this), s = n.children)
27
27
  for (o = s.length - 1; o >= 0; --o)
28
28
  l.push(s[o]);
29
29
  return this;
30
30
  }
31
- function Ne(e, a) {
32
- for (var n = this, l = [n], s = [], o, h, d, g = -1; n = l.pop(); )
31
+ function Ve(e, a) {
32
+ for (var n = this, l = [n], s = [], o, h, d, m = -1; n = l.pop(); )
33
33
  if (s.push(n), o = n.children)
34
34
  for (h = 0, d = o.length; h < d; ++h)
35
35
  l.push(o[h]);
36
36
  for (; n = s.pop(); )
37
- e.call(a, n, ++g, this);
37
+ e.call(a, n, ++m, this);
38
38
  return this;
39
39
  }
40
- function Me(e, a) {
40
+ function De(e, a) {
41
41
  let n = -1;
42
42
  for (const l of this)
43
43
  if (e.call(a, l, ++n, this))
44
44
  return l;
45
45
  }
46
- function Ve(e) {
46
+ function Pe(e) {
47
47
  return this.eachAfter(function(a) {
48
48
  for (var n = +e(a.data) || 0, l = a.children, s = l && l.length; --s >= 0; ) n += l[s].value;
49
49
  a.value = n;
50
50
  });
51
51
  }
52
- function _e(e) {
52
+ function Be(e) {
53
53
  return this.eachBefore(function(a) {
54
54
  a.children && a.children.sort(e);
55
55
  });
56
56
  }
57
- function ke(e) {
58
- for (var a = this, n = ze(a, e), l = [a]; a !== n; )
57
+ function Ee(e) {
58
+ for (var a = this, n = Re(a, e), l = [a]; a !== n; )
59
59
  a = a.parent, l.push(a);
60
60
  for (var s = l.length; e !== n; )
61
61
  l.splice(s, 0, e), e = e.parent;
62
62
  return l;
63
63
  }
64
- function ze(e, a) {
64
+ function Re(e, a) {
65
65
  if (e === a) return e;
66
66
  var n = e.ancestors(), l = a.ancestors(), s = null;
67
67
  for (e = n.pop(), a = l.pop(); e === a; )
68
68
  s = e, e = n.pop(), a = l.pop();
69
69
  return s;
70
70
  }
71
- function De() {
71
+ function We() {
72
72
  for (var e = this, a = [e]; e = e.parent; )
73
73
  a.push(e);
74
74
  return a;
75
75
  }
76
- function Be() {
76
+ function He() {
77
77
  return Array.from(this);
78
78
  }
79
- function Pe() {
79
+ function Ie() {
80
80
  var e = [];
81
81
  return this.eachBefore(function(a) {
82
82
  a.children || e.push(a);
83
83
  }), e;
84
84
  }
85
- function Re() {
85
+ function Oe() {
86
86
  var e = this, a = [];
87
87
  return e.each(function(n) {
88
88
  n !== e && a.push({ source: n.parent, target: n });
89
89
  }), a;
90
90
  }
91
- function* Ee() {
91
+ function* Ge() {
92
92
  var e = this, a, n = [e], l, s, o;
93
93
  do
94
94
  for (a = n.reverse(), n = []; e = a.pop(); )
@@ -97,53 +97,53 @@ function* Ee() {
97
97
  n.push(l[s]);
98
98
  while (n.length);
99
99
  }
100
- function ee(e, a) {
101
- e instanceof Map ? (e = [void 0, e], a === void 0 && (a = He)) : a === void 0 && (a = Ie);
102
- for (var n = new j(e), l, s = [n], o, h, d, g; l = s.pop(); )
103
- if ((h = a(l.data)) && (g = (h = Array.from(h)).length))
104
- for (l.children = h, d = g - 1; d >= 0; --d)
105
- s.push(o = h[d] = new j(h[d])), o.parent = l, o.depth = l.depth + 1;
106
- return n.eachBefore(Ge);
100
+ function ae(e, a) {
101
+ e instanceof Map ? (e = [void 0, e], a === void 0 && (a = je)) : a === void 0 && (a = Xe);
102
+ for (var n = new Z(e), l, s = [n], o, h, d, m; l = s.pop(); )
103
+ if ((h = a(l.data)) && (m = (h = Array.from(h)).length))
104
+ for (l.children = h, d = m - 1; d >= 0; --d)
105
+ s.push(o = h[d] = new Z(h[d])), o.parent = l, o.depth = l.depth + 1;
106
+ return n.eachBefore(Ze);
107
107
  }
108
- function We() {
109
- return ee(this).eachBefore(Oe);
108
+ function qe() {
109
+ return ae(this).eachBefore(Ye);
110
110
  }
111
- function Ie(e) {
111
+ function Xe(e) {
112
112
  return e.children;
113
113
  }
114
- function He(e) {
114
+ function je(e) {
115
115
  return Array.isArray(e) ? e[1] : null;
116
116
  }
117
- function Oe(e) {
117
+ function Ye(e) {
118
118
  e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
119
119
  }
120
- function Ge(e) {
120
+ function Ze(e) {
121
121
  var a = 0;
122
122
  do
123
123
  e.height = a;
124
124
  while ((e = e.parent) && e.height < ++a);
125
125
  }
126
- function j(e) {
126
+ function Z(e) {
127
127
  this.data = e, this.depth = this.height = 0, this.parent = null;
128
128
  }
129
- j.prototype = ee.prototype = {
130
- constructor: j,
131
- count: $e,
132
- each: Ae,
133
- eachAfter: Ne,
134
- eachBefore: Fe,
135
- find: Me,
136
- sum: Ve,
137
- sort: _e,
138
- path: ke,
139
- ancestors: De,
140
- descendants: Be,
141
- leaves: Pe,
142
- links: Re,
143
- copy: We,
144
- [Symbol.iterator]: Ee
129
+ Z.prototype = ae.prototype = {
130
+ constructor: Z,
131
+ count: _e,
132
+ each: ke,
133
+ eachAfter: Ve,
134
+ eachBefore: ze,
135
+ find: De,
136
+ sum: Pe,
137
+ sort: Be,
138
+ path: Ee,
139
+ ancestors: We,
140
+ descendants: He,
141
+ leaves: Ie,
142
+ links: Oe,
143
+ copy: qe,
144
+ [Symbol.iterator]: Ge
145
145
  };
146
- function qe(e) {
146
+ function Ue(e) {
147
147
  if (typeof e != "function") throw new Error();
148
148
  return e;
149
149
  }
@@ -155,77 +155,77 @@ function G(e) {
155
155
  return e;
156
156
  };
157
157
  }
158
- function Xe(e) {
158
+ function Je(e) {
159
159
  e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
160
160
  }
161
- function Ye(e, a, n, l, s) {
162
- for (var o = e.children, h, d = -1, g = o.length, c = e.value && (l - a) / e.value; ++d < g; )
161
+ function Ke(e, a, n, l, s) {
162
+ for (var o = e.children, h, d = -1, m = o.length, c = e.value && (l - a) / e.value; ++d < m; )
163
163
  h = o[d], h.y0 = n, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
164
164
  }
165
- function je(e, a, n, l, s) {
166
- for (var o = e.children, h, d = -1, g = o.length, c = e.value && (s - n) / e.value; ++d < g; )
165
+ function Qe(e, a, n, l, s) {
166
+ for (var o = e.children, h, d = -1, m = o.length, c = e.value && (s - n) / e.value; ++d < m; )
167
167
  h = o[d], h.x0 = a, h.x1 = l, h.y0 = n, h.y1 = n += h.value * c;
168
168
  }
169
- var Ke = (1 + Math.sqrt(5)) / 2;
170
- function Ue(e, a, n, l, s, o) {
171
- for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, m, M, N, z, R, V; u < r; ) {
169
+ var et = (1 + Math.sqrt(5)) / 2;
170
+ function tt(e, a, n, l, s, o) {
171
+ for (var h = [], d = a.children, m, c, p = 0, b = 0, r = d.length, x, S, v = a.value, u, y, N, $, V, R, M; p < r; ) {
172
172
  x = s - n, S = o - l;
173
173
  do
174
- p = d[b++].value;
175
- while (!p && b < r);
176
- for (m = M = p, R = Math.max(S / x, x / S) / (v * e), V = p * p * R, z = Math.max(M / V, V / m); b < r; ++b) {
177
- if (p += c = d[b].value, c < m && (m = c), c > M && (M = c), V = p * p * R, N = Math.max(M / V, V / m), N > z) {
178
- p -= c;
174
+ u = d[b++].value;
175
+ while (!u && b < r);
176
+ for (y = N = u, R = Math.max(S / x, x / S) / (v * e), M = u * u * R, V = Math.max(N / M, M / y); b < r; ++b) {
177
+ if (u += c = d[b].value, c < y && (y = c), c > N && (N = c), M = u * u * R, $ = Math.max(N / M, M / y), $ > V) {
178
+ u -= c;
179
179
  break;
180
180
  }
181
- z = N;
181
+ V = $;
182
182
  }
183
- h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ye(g, n, l, s, v ? l += S * p / v : o) : je(g, n, l, v ? n += x * p / v : s, o), v -= p, u = b;
183
+ h.push(m = { value: u, dice: x < S, children: d.slice(p, b) }), m.dice ? Ke(m, n, l, s, v ? l += S * u / v : o) : Qe(m, n, l, v ? n += x * u / v : s, o), v -= u, p = b;
184
184
  }
185
185
  return h;
186
186
  }
187
- const Ze = (function e(a) {
187
+ const at = (function e(a) {
188
188
  function n(l, s, o, h, d) {
189
- Ue(a, l, s, o, h, d);
189
+ tt(a, l, s, o, h, d);
190
190
  }
191
191
  return n.ratio = function(l) {
192
192
  return e((l = +l) > 1 ? l : 1);
193
193
  }, n;
194
- })(Ke);
195
- function Je() {
196
- var e = Ze, a = !1, n = 1, l = 1, s = [0], o = O, h = O, d = O, g = O, c = O;
197
- function u(r) {
198
- return r.x0 = r.y0 = 0, r.x1 = n, r.y1 = l, r.eachBefore(b), s = [0], a && r.eachBefore(Xe), r;
194
+ })(et);
195
+ function nt() {
196
+ var e = at, a = !1, n = 1, l = 1, s = [0], o = O, h = O, d = O, m = O, c = O;
197
+ function p(r) {
198
+ return r.x0 = r.y0 = 0, r.x1 = n, r.y1 = l, r.eachBefore(b), s = [0], a && r.eachBefore(Je), r;
199
199
  }
200
200
  function b(r) {
201
- var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, m = r.y1 - x;
202
- p < S && (S = p = (S + p) / 2), m < v && (v = m = (v + m) / 2), r.x0 = S, r.y0 = v, r.x1 = p, r.y1 = m, r.children && (x = s[r.depth + 1] = o(r) / 2, S += c(r) - x, v += h(r) - x, p -= d(r) - x, m -= g(r) - x, p < S && (S = p = (S + p) / 2), m < v && (v = m = (v + m) / 2), e(r, S, v, p, m));
201
+ var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, u = r.x1 - x, y = r.y1 - x;
202
+ u < S && (S = u = (S + u) / 2), y < v && (v = y = (v + y) / 2), r.x0 = S, r.y0 = v, r.x1 = u, r.y1 = y, r.children && (x = s[r.depth + 1] = o(r) / 2, S += c(r) - x, v += h(r) - x, u -= d(r) - x, y -= m(r) - x, u < S && (S = u = (S + u) / 2), y < v && (v = y = (v + y) / 2), e(r, S, v, u, y));
203
203
  }
204
- return u.round = function(r) {
205
- return arguments.length ? (a = !!r, u) : a;
206
- }, u.size = function(r) {
207
- return arguments.length ? (n = +r[0], l = +r[1], u) : [n, l];
208
- }, u.tile = function(r) {
209
- return arguments.length ? (e = qe(r), u) : e;
210
- }, u.padding = function(r) {
211
- return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
212
- }, u.paddingInner = function(r) {
213
- return arguments.length ? (o = typeof r == "function" ? r : G(+r), u) : o;
214
- }, u.paddingOuter = function(r) {
215
- return arguments.length ? u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : u.paddingTop();
216
- }, u.paddingTop = function(r) {
217
- return arguments.length ? (h = typeof r == "function" ? r : G(+r), u) : h;
218
- }, u.paddingRight = function(r) {
219
- return arguments.length ? (d = typeof r == "function" ? r : G(+r), u) : d;
220
- }, u.paddingBottom = function(r) {
221
- return arguments.length ? (g = typeof r == "function" ? r : G(+r), u) : g;
222
- }, u.paddingLeft = function(r) {
223
- return arguments.length ? (c = typeof r == "function" ? r : G(+r), u) : c;
224
- }, u;
204
+ return p.round = function(r) {
205
+ return arguments.length ? (a = !!r, p) : a;
206
+ }, p.size = function(r) {
207
+ return arguments.length ? (n = +r[0], l = +r[1], p) : [n, l];
208
+ }, p.tile = function(r) {
209
+ return arguments.length ? (e = Ue(r), p) : e;
210
+ }, p.padding = function(r) {
211
+ return arguments.length ? p.paddingInner(r).paddingOuter(r) : p.paddingInner();
212
+ }, p.paddingInner = function(r) {
213
+ return arguments.length ? (o = typeof r == "function" ? r : G(+r), p) : o;
214
+ }, p.paddingOuter = function(r) {
215
+ return arguments.length ? p.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : p.paddingTop();
216
+ }, p.paddingTop = function(r) {
217
+ return arguments.length ? (h = typeof r == "function" ? r : G(+r), p) : h;
218
+ }, p.paddingRight = function(r) {
219
+ return arguments.length ? (d = typeof r == "function" ? r : G(+r), p) : d;
220
+ }, p.paddingBottom = function(r) {
221
+ return arguments.length ? (m = typeof r == "function" ? r : G(+r), p) : m;
222
+ }, p.paddingLeft = function(r) {
223
+ return arguments.length ? (c = typeof r == "function" ? r : G(+r), p) : c;
224
+ }, p;
225
225
  }
226
- var ae = class {
226
+ var ie = class {
227
227
  constructor() {
228
- this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = pe, this.getAccTitle = fe, this.setDiagramTitle = ge, this.getDiagramTitle = me, this.getAccDescription = ye, this.setAccDescription = Se;
228
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = ve, this.getAccTitle = xe, this.setDiagramTitle = be, this.getDiagramTitle = we, this.getAccDescription = Ce, this.setAccDescription = Te;
229
229
  }
230
230
  static {
231
231
  w(this, "TreeMapDB");
@@ -234,8 +234,8 @@ var ae = class {
234
234
  return this.nodes;
235
235
  }
236
236
  getConfig() {
237
- const e = ve, a = Q();
238
- return Z({
237
+ const e = Le, a = te();
238
+ return Q({
239
239
  ...e.treemap,
240
240
  ...a.treemap ?? {}
241
241
  });
@@ -249,7 +249,7 @@ var ae = class {
249
249
  addClass(e, a) {
250
250
  const n = this.classes.get(e) ?? { id: e, styles: [], textStyles: [] }, l = a.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
251
251
  l && l.forEach((s) => {
252
- xe(s) && (n?.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n?.styles ? n.styles.push(s) : n.styles = [s];
252
+ $e(s) && (n?.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n?.styles ? n.styles.push(s) : n.styles = [s];
253
253
  }), this.classes.set(e, n);
254
254
  }
255
255
  getClasses() {
@@ -259,10 +259,10 @@ var ae = class {
259
259
  return this.classes.get(e)?.styles ?? [];
260
260
  }
261
261
  clear() {
262
- be(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
262
+ Ae(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
263
263
  }
264
264
  };
265
- function ne(e) {
265
+ function oe(e) {
266
266
  if (!e.length)
267
267
  return [];
268
268
  const a = [], n = [];
@@ -282,9 +282,9 @@ function ne(e) {
282
282
  l.type !== "Leaf" && n.push({ node: s, level: l.level });
283
283
  }), a;
284
284
  }
285
- w(ne, "buildHierarchy");
286
- var Qe = /* @__PURE__ */ w((e, a) => {
287
- Ce(e, a);
285
+ w(oe, "buildHierarchy");
286
+ var lt = /* @__PURE__ */ w((e, a) => {
287
+ ge(e, a);
288
288
  const n = [];
289
289
  for (const o of e.TreemapRows ?? [])
290
290
  o.$type === "ClassDefStatement" && a.addClass(o.className ?? "", o.styleText ?? "");
@@ -292,61 +292,61 @@ var Qe = /* @__PURE__ */ w((e, a) => {
292
292
  const h = o.item;
293
293
  if (!h)
294
294
  continue;
295
- const d = o.indent ? parseInt(o.indent) : 0, g = et(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], u = c.length > 0 ? c : void 0, b = {
295
+ const d = o.indent ? parseInt(o.indent) : 0, m = st(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], p = c.length > 0 ? c : void 0, b = {
296
296
  level: d,
297
- name: g,
297
+ name: m,
298
298
  type: h.$type,
299
299
  value: h.value,
300
300
  classSelector: h.classSelector,
301
- cssCompiledStyles: u
301
+ cssCompiledStyles: p
302
302
  };
303
303
  n.push(b);
304
304
  }
305
- const l = ne(n), s = /* @__PURE__ */ w((o, h) => {
305
+ const l = oe(n), s = /* @__PURE__ */ w((o, h) => {
306
306
  for (const d of o)
307
307
  a.addNode(d, h), d.children && d.children.length > 0 && s(d.children, h + 1);
308
308
  }, "addNodesRecursively");
309
309
  s(l, 0);
310
- }, "populate"), et = /* @__PURE__ */ w((e) => e.name ? String(e.name) : "", "getItemName"), le = {
310
+ }, "populate"), st = /* @__PURE__ */ w((e) => e.name ? String(e.name) : "", "getItemName"), ce = {
311
311
  // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
312
312
  parser: { yy: void 0 },
313
313
  parse: /* @__PURE__ */ w(async (e) => {
314
314
  try {
315
- const n = await Te("treemap", e);
316
- J.debug("Treemap AST:", n);
317
- const l = le.parser?.yy;
318
- if (!(l instanceof ae))
315
+ const n = await Ne("treemap", e);
316
+ ee.debug("Treemap AST:", n);
317
+ const l = ce.parser?.yy;
318
+ if (!(l instanceof ie))
319
319
  throw new Error(
320
320
  "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."
321
321
  );
322
- Qe(n, l);
322
+ lt(n, l);
323
323
  } catch (a) {
324
- throw J.error("Error parsing treemap:", a), a;
324
+ throw ee.error("Error parsing treemap:", a), a;
325
325
  }
326
326
  }, "parse")
327
- }, tt = 10, P = 10, q = 25, at = /* @__PURE__ */ w((e, a, n, l) => {
328
- const s = l.db, o = s.getConfig(), h = o.padding ?? tt, d = s.getDiagramTitle(), g = s.getRoot(), { themeVariables: c } = Q();
329
- if (!g)
327
+ }, rt = 10, E = 10, q = 25, it = /* @__PURE__ */ w((e, a, n, l) => {
328
+ const s = l.db, o = s.getConfig(), h = o.padding ?? rt, d = s.getDiagramTitle(), m = s.getRoot(), { themeVariables: c } = te();
329
+ if (!m)
330
330
  return;
331
- const u = d ? 30 : 0, b = de(a), r = o.nodeWidth ? o.nodeWidth * P : 960, x = o.nodeHeight ? o.nodeHeight * P : 500, S = r, v = x + u;
332
- b.attr("viewBox", `0 0 ${S} ${v}`), ue(b, v, S, o.useMaxWidth);
333
- let p;
331
+ const p = d ? 30 : 0, b = ye(a), r = o.nodeWidth ? o.nodeWidth * E : 960, x = o.nodeHeight ? o.nodeHeight * E : 500, S = r, v = x + p;
332
+ b.attr("viewBox", `0 0 ${S} ${v}`), Se(b, v, S, o.useMaxWidth);
333
+ let u;
334
334
  try {
335
335
  const t = o.valueFormat || ",";
336
336
  if (t === "$0,0")
337
- p = /* @__PURE__ */ w((i) => "$" + H(",")(i), "valueFormat");
337
+ u = /* @__PURE__ */ w((i) => "$" + I(",")(i), "valueFormat");
338
338
  else if (t.startsWith("$") && t.includes(",")) {
339
339
  const i = /\.\d+/.exec(t), f = i ? i[0] : "";
340
- p = /* @__PURE__ */ w((C) => "$" + H("," + f)(C), "valueFormat");
340
+ u = /* @__PURE__ */ w((C) => "$" + I("," + f)(C), "valueFormat");
341
341
  } else if (t.startsWith("$")) {
342
342
  const i = t.substring(1);
343
- p = /* @__PURE__ */ w((f) => "$" + H(i || "")(f), "valueFormat");
343
+ u = /* @__PURE__ */ w((f) => "$" + I(i || "")(f), "valueFormat");
344
344
  } else
345
- p = H(t);
345
+ u = I(t);
346
346
  } catch (t) {
347
- J.error("Error creating format function:", t), p = H(",");
347
+ ee.error("Error creating format function:", t), u = I(",");
348
348
  }
349
- const m = U().range([
349
+ const y = K().range([
350
350
  "transparent",
351
351
  c.cScale0,
352
352
  c.cScale1,
@@ -360,7 +360,7 @@ var Qe = /* @__PURE__ */ w((e, a) => {
360
360
  c.cScale9,
361
361
  c.cScale10,
362
362
  c.cScale11
363
- ]), M = U().range([
363
+ ]), N = K().range([
364
364
  "transparent",
365
365
  c.cScalePeer0,
366
366
  c.cScalePeer1,
@@ -374,7 +374,7 @@ var Qe = /* @__PURE__ */ w((e, a) => {
374
374
  c.cScalePeer9,
375
375
  c.cScalePeer10,
376
376
  c.cScalePeer11
377
- ]), N = U().range([
377
+ ]), $ = K().range([
378
378
  c.cScaleLabel0,
379
379
  c.cScaleLabel1,
380
380
  c.cScaleLabel2,
@@ -388,19 +388,19 @@ var Qe = /* @__PURE__ */ w((e, a) => {
388
388
  c.cScaleLabel10,
389
389
  c.cScaleLabel11
390
390
  ]);
391
- 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);
392
- const z = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), R = ee(g).sum((t) => t.value ?? 0).sort((t, i) => (i.value ?? 0) - (t.value ?? 0)), te = Je().size([r, x]).paddingTop(
393
- (t) => t.children && t.children.length > 0 ? q + P : 0
394
- ).paddingInner(h).paddingLeft((t) => t.children && t.children.length > 0 ? P : 0).paddingRight((t) => t.children && t.children.length > 0 ? P : 0).paddingBottom((t) => t.children && t.children.length > 0 ? P : 0).round(!0)(R), se = te.descendants().filter((t) => t.children && t.children.length > 0), E = z.selectAll(".treemapSection").data(se).enter().append("g").attr("class", "treemapSection").attr("transform", (t) => `translate(${t.x0},${t.y0})`);
395
- E.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", q).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (t) => t.depth === 0 ? "display: none;" : ""), E.append("clipPath").attr("id", (t, i) => `clip-section-${a}-${i}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 12)).attr("height", q), E.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", (t, i) => `treemapSection section${i}`).attr("fill", (t) => m(t.data.name)).attr("fill-opacity", 0.6).attr("stroke", (t) => M(t.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (t) => {
391
+ d && b.append("text").attr("x", S / 2).attr("y", p / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
392
+ const V = b.append("g").attr("transform", `translate(0, ${p})`).attr("class", "treemapContainer"), R = ae(m).sum((t) => t.value ?? 0).sort((t, i) => (i.value ?? 0) - (t.value ?? 0)), ne = nt().size([r, x]).paddingTop(
393
+ (t) => t.children && t.children.length > 0 ? q + E : 0
394
+ ).paddingInner(h).paddingLeft((t) => t.children && t.children.length > 0 ? E : 0).paddingRight((t) => t.children && t.children.length > 0 ? E : 0).paddingBottom((t) => t.children && t.children.length > 0 ? E : 0).round(!0)(R), he = ne.descendants().filter((t) => t.children && t.children.length > 0), W = V.selectAll(".treemapSection").data(he).enter().append("g").attr("class", "treemapSection").attr("transform", (t) => `translate(${t.x0},${t.y0})`);
395
+ W.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", q).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (t) => t.depth === 0 ? "display: none;" : ""), W.append("clipPath").attr("id", (t, i) => `clip-section-${a}-${i}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 12)).attr("height", q), W.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", (t, i) => `treemapSection section${i}`).attr("fill", (t) => y(t.data.name)).attr("fill-opacity", 0.6).attr("stroke", (t) => N(t.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (t) => {
396
396
  if (t.depth === 0)
397
397
  return "display: none;";
398
398
  const i = B({ cssCompiledStyles: t.data.cssCompiledStyles });
399
399
  return i.nodeStyles + ";" + i.borderStyles.join(";");
400
- }), E.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", q / 2).attr("dominant-baseline", "middle").text((t) => t.depth === 0 ? "" : t.data.name).attr("font-weight", "bold").attr("style", (t) => {
400
+ }), W.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", q / 2).attr("dominant-baseline", "middle").text((t) => t.depth === 0 ? "" : t.data.name).attr("font-weight", "bold").attr("clip-path", (t, i) => `url(#clip-section-${a}-${i})`).attr("style", (t) => {
401
401
  if (t.depth === 0)
402
402
  return "display: none;";
403
- const i = "dominant-baseline: middle; font-size: 12px; fill:" + N(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
403
+ const i = "dominant-baseline: middle; font-size: 12px; fill:" + $(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
404
404
  return i + f.labelStyles.replace("color:", "fill:");
405
405
  }).each(function(t) {
406
406
  if (t.depth === 0)
@@ -408,56 +408,56 @@ var Qe = /* @__PURE__ */ w((e, a) => {
408
408
  const i = Y(this), f = t.data.name;
409
409
  i.text(f);
410
410
  const C = t.x1 - t.x0, L = 6;
411
- let $;
412
- o.showValues !== !1 && t.value ? $ = C - 10 - 30 - 10 - L : $ = C - L - 6;
413
- const A = Math.max(15, $), y = i.node();
414
- if (y.getComputedTextLength() > A) {
415
- let T = f;
416
- for (; T.length > 0; ) {
417
- if (T = f.substring(0, T.length - 1), T.length === 0) {
418
- i.text("..."), y.getComputedTextLength() > A && i.text("");
411
+ let T;
412
+ o.showValues !== !1 && t.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
413
+ const g = Math.max(15, T), _ = i.node();
414
+ if (_.getComputedTextLength() > g) {
415
+ let z = f;
416
+ for (; z.length > 0; ) {
417
+ if (z = f.substring(0, z.length - 1), z.length === 0) {
418
+ i.text("..."), _.getComputedTextLength() > g && i.text("");
419
419
  break;
420
420
  }
421
- if (i.text(T + "..."), y.getComputedTextLength() <= A)
421
+ if (i.text(z + "..."), _.getComputedTextLength() <= g)
422
422
  break;
423
423
  }
424
424
  }
425
- }), o.showValues !== !1 && E.append("text").attr("class", "treemapSectionValue").attr("x", (t) => t.x1 - t.x0 - 10).attr("y", q / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((t) => t.value ? p(t.value) : "").attr("font-style", "italic").attr("style", (t) => {
425
+ }), o.showValues !== !1 && W.append("text").attr("class", "treemapSectionValue").attr("x", (t) => t.x1 - t.x0 - 10).attr("y", q / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((t) => t.value ? u(t.value) : "").attr("font-style", "italic").attr("style", (t) => {
426
426
  if (t.depth === 0)
427
427
  return "display: none;";
428
- const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + N(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
428
+ const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
429
429
  return i + f.labelStyles.replace("color:", "fill:");
430
430
  });
431
- const re = te.leaves(), X = z.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class", (t, i) => `treemapNode treemapLeafGroup leaf${i}${t.data.classSelector ? ` ${t.data.classSelector}` : ""}x`).attr("transform", (t) => `translate(${t.x0},${t.y0})`);
432
- X.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", "treemapLeaf").attr("fill", (t) => t.parent ? m(t.parent.data.name) : m(t.data.name)).attr("style", (t) => B({ cssCompiledStyles: t.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (t) => t.parent ? m(t.parent.data.name) : m(t.data.name)).attr("stroke-width", 3), X.append("clipPath").attr("id", (t, i) => `clip-${a}-${i}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 4)).attr("height", (t) => Math.max(0, t.y1 - t.y0 - 4)), X.append("text").attr("class", "treemapLabel").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", (t) => (t.y1 - t.y0) / 2).attr("style", (t) => {
433
- const i = "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + N(t.data.name) + ";", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
431
+ const le = ne.leaves(), A = le.length > 20, de = A ? 16 : 38, X = A ? 14 : 28, D = A ? 4 : 8, H = A ? 4 : 6, U = A ? 2 : 4, se = A ? 8 : 10, J = A ? 1 : 2, j = V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class", (t, i) => `treemapNode treemapLeafGroup leaf${i}${t.data.classSelector ? ` ${t.data.classSelector}` : ""}x`).attr("transform", (t) => `translate(${t.x0},${t.y0})`);
432
+ j.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", "treemapLeaf").attr("fill", (t) => t.parent ? y(t.parent.data.name) : y(t.data.name)).attr("style", (t) => B({ cssCompiledStyles: t.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (t) => t.parent ? y(t.parent.data.name) : y(t.data.name)).attr("stroke-width", 3), j.append("clipPath").attr("id", (t, i) => `clip-${a}-${i}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 4)).attr("height", (t) => Math.max(0, t.y1 - t.y0 - 4)), j.append("text").attr("class", "treemapLabel").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", (t) => (t.y1 - t.y0) / 2).attr("style", (t) => {
433
+ const i = `text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:` + $(t.data.name) + ";", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
434
434
  return i + f.labelStyles.replace("color:", "fill:");
435
435
  }).attr("clip-path", (t, i) => `url(#clip-${a}-${i})`).text((t) => t.data.name).each(function(t) {
436
- const i = Y(this), f = t.x1 - t.x0, C = t.y1 - t.y0, L = i.node(), $ = 4, D = f - 2 * $, A = C - 2 * $;
437
- if (D < 10 || A < 10) {
436
+ const i = Y(this), f = t.x1 - t.x0, C = t.y1 - t.y0, L = i.node(), T = f - 2 * U, P = C - 2 * U;
437
+ if (T < se || P < se) {
438
438
  i.style("display", "none");
439
439
  return;
440
440
  }
441
- let y = parseInt(i.style("font-size"), 10);
442
- const _ = 8, F = 28, T = 0.6, k = 6, W = 2;
443
- for (; L.getComputedTextLength() > D && y > _; )
444
- y--, i.style("font-size", `${y}px`);
445
- let I = Math.max(
446
- k,
447
- Math.min(F, Math.round(y * T))
448
- ), K = y + W + I;
449
- for (; K > A && y > _ && (y--, I = Math.max(
450
- k,
451
- Math.min(F, Math.round(y * T))
452
- ), !(I < k && y === _)); )
453
- i.style("font-size", `${y}px`), K = y + W + I;
454
- i.style("font-size", `${y}px`), (L.getComputedTextLength() > D || y < _ || A < y) && i.style("display", "none");
455
- }), o.showValues !== !1 && X.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
441
+ let g = parseInt(i.style("font-size"), 10);
442
+ const _ = 0.6;
443
+ for (; L.getComputedTextLength() > T && g > D; )
444
+ g--, i.style("font-size", `${g}px`);
445
+ let F = Math.max(
446
+ H,
447
+ Math.min(X, Math.round(g * _))
448
+ ), k = g + J + F;
449
+ for (; k > P && g > D && (g--, F = Math.max(
450
+ H,
451
+ Math.min(X, Math.round(g * _))
452
+ ), !(F < H && g === D)); )
453
+ i.style("font-size", `${g}px`), k = g + J + F;
454
+ i.style("font-size", `${g}px`), A ? (g < D || P < D) && i.style("display", "none") : (L.getComputedTextLength() > T || g < D || P < g) && i.style("display", "none");
455
+ }), o.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
456
456
  return (i.y1 - i.y0) / 2;
457
457
  }).attr("style", (i) => {
458
- const f = "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + N(i.data.name) + ";", C = B({ cssCompiledStyles: i.data.cssCompiledStyles });
458
+ const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:` + $(i.data.name) + ";", C = B({ cssCompiledStyles: i.data.cssCompiledStyles });
459
459
  return f + C.labelStyles.replace("color:", "fill:");
460
- }).attr("clip-path", (i, f) => `url(#clip-${a}-${f})`).text((i) => i.value ? p(i.value) : "").each(function(i) {
460
+ }).attr("clip-path", (i, f) => `url(#clip-${a}-${f})`).text((i) => i.value ? u(i.value) : "").each(function(i) {
461
461
  const f = Y(this), C = this.parentNode;
462
462
  if (!C) {
463
463
  f.style("display", "none");
@@ -468,21 +468,21 @@ var Qe = /* @__PURE__ */ w((e, a) => {
468
468
  f.style("display", "none");
469
469
  return;
470
470
  }
471
- const $ = parseFloat(L.style("font-size")), D = 28, A = 0.6, y = 6, _ = 2, F = Math.max(
472
- y,
473
- Math.min(D, Math.round($ * A))
471
+ const T = parseFloat(L.style("font-size")), g = Math.max(
472
+ H,
473
+ Math.min(X, Math.round(T * 0.6))
474
474
  );
475
- f.style("font-size", `${F}px`);
476
- const k = (i.y1 - i.y0) / 2 + $ / 2 + _;
477
- f.attr("y", k);
478
- const W = i.x1 - i.x0, oe = i.y1 - i.y0 - 4, ce = W - 8;
479
- f.node().getComputedTextLength() > ce || k + F > oe || F < y ? f.style("display", "none") : f.style("display", null);
475
+ f.style("font-size", `${g}px`);
476
+ const F = (i.y1 - i.y0) / 2 + T / 2 + J;
477
+ f.attr("y", F);
478
+ const k = i.x1 - i.x0, re = i.y1 - i.y0 - 4, fe = k - 2 * U;
479
+ f.node().getComputedTextLength() > fe || F + g > re || g < H ? f.style("display", "none") : f.style("display", null);
480
480
  });
481
- const ie = o.diagramPadding ?? 8;
482
- we(b, ie, "flowchart", o?.useMaxWidth || !1);
483
- }, "draw"), nt = /* @__PURE__ */ w(function(e, a) {
481
+ const pe = o.diagramPadding ?? 8;
482
+ Fe(b, pe, "flowchart", o?.useMaxWidth || !1);
483
+ }, "draw"), ot = /* @__PURE__ */ w(function(e, a) {
484
484
  return a.db.getClasses();
485
- }, "getClasses"), lt = { draw: at, getClasses: nt }, st = {
485
+ }, "getClasses"), ct = { draw: it, getClasses: ot }, ht = {
486
486
  sectionStrokeColor: "black",
487
487
  sectionStrokeWidth: "1",
488
488
  sectionFillColor: "#efefef",
@@ -492,10 +492,10 @@ var Qe = /* @__PURE__ */ w((e, a) => {
492
492
  labelFontSize: "12px",
493
493
  valueFontSize: "10px",
494
494
  titleFontSize: "14px"
495
- }, rt = /* @__PURE__ */ w(({
495
+ }, dt = /* @__PURE__ */ w(({
496
496
  treemap: e
497
497
  } = {}) => {
498
- const a = he(), n = Q(), l = Z(a, n.themeVariables), s = Z(st, e), o = s.titleColor ?? l.titleColor, h = s.labelColor ?? l.textColor, d = s.valueColor ?? l.textColor;
498
+ const a = me(), n = te(), l = Q(a, n.themeVariables), s = Q(ht, e), o = s.titleColor ?? l.titleColor, h = s.labelColor ?? l.textColor, d = s.valueColor ?? l.textColor;
499
499
  return `
500
500
  .treemapNode.section {
501
501
  stroke: ${s.sectionStrokeColor};
@@ -520,15 +520,15 @@ var Qe = /* @__PURE__ */ w((e, a) => {
520
520
  font-size: ${s.titleFontSize};
521
521
  }
522
522
  `;
523
- }, "getStyles"), it = rt, gt = {
524
- parser: le,
523
+ }, "getStyles"), pt = dt, xt = {
524
+ parser: ce,
525
525
  get db() {
526
- return new ae();
526
+ return new ie();
527
527
  },
528
- renderer: lt,
529
- styles: it
528
+ renderer: ct,
529
+ styles: pt
530
530
  };
531
531
  export {
532
- gt as diagram
532
+ xt as diagram
533
533
  };
534
- //# sourceMappingURL=diagram-OG6HWLK6-CcKT8mhn.js.map
534
+ //# sourceMappingURL=diagram-Q27KOJAE-Key1bw_Y.js.map