@blueking/ai-blueking 2.0.0-dev.1 → 2.0.0-dev.3

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 (183) hide show
  1. package/dist/vue2/_baseFor-DAbrc8SN.js +309 -0
  2. package/dist/vue2/arc-BqlAOiZb.js +78 -0
  3. package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  4. package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  5. package/dist/vue2/array-TB8zN_HT.js +5 -0
  6. package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  7. package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  8. package/dist/vue2/channel-edTl5mpN.js +3 -0
  9. package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  10. package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
  11. package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  12. package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  13. package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  14. package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  15. package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  16. package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  17. package/dist/vue2/chunk-DNh5sLlG.js +18 -0
  18. package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  19. package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  20. package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  21. package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  22. package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
  23. package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  24. package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  25. package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  26. package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  27. package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  28. package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  29. package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  30. package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  31. package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
  32. package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  33. package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  34. package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  35. package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  36. package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  37. package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  38. package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  39. package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  40. package/dist/vue2/clone-Bbr3WSpg.js +7 -0
  41. package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  42. package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
  43. package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  44. package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
  45. package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
  46. package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  47. package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  48. package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  49. package/dist/vue2/dist-xWJvauxf.js +49 -0
  50. package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  51. package/dist/vue2/flatten-CfPhNHUL.js +34 -0
  52. package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  53. package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  54. package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  55. package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  56. package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
  57. package/dist/vue2/index.es.min.js +26703 -786
  58. package/dist/vue2/index.umd.min.js +2796 -9
  59. package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
  60. package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  61. package/dist/vue2/init-hAkIK9Bd.js +13 -0
  62. package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
  63. package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  64. package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  65. package/dist/vue2/katex-CEAw-xiA.js +22097 -0
  66. package/dist/vue2/katex-D8o5-F7C.js +2 -0
  67. package/dist/vue2/line-wvheYP7S.js +30 -0
  68. package/dist/vue2/linear-STTevhnH.js +250 -0
  69. package/dist/vue2/math-DF_v6dOl.js +8 -0
  70. package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
  71. package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
  72. package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  73. package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
  74. package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
  75. package/dist/vue2/path-CW_-_Ti7.js +79 -0
  76. package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  77. package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  78. package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
  79. package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  80. package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  81. package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
  82. package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  83. package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  84. package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  85. package/dist/vue2/src-VlKYSsxJ.js +1975 -0
  86. package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  87. package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  88. package/dist/vue2/style.css +1 -1
  89. package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  90. package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
  91. package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  92. package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
  93. package/dist/vue3/arc-BqlAOiZb.js +78 -0
  94. package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  95. package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  96. package/dist/vue3/array-TB8zN_HT.js +5 -0
  97. package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  98. package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  99. package/dist/vue3/channel-edTl5mpN.js +3 -0
  100. package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  101. package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
  102. package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  103. package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  104. package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  105. package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  106. package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  107. package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  108. package/dist/vue3/chunk-DNh5sLlG.js +18 -0
  109. package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  110. package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  111. package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  112. package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  113. package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
  114. package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  115. package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  116. package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  117. package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  118. package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  119. package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  120. package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  121. package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  122. package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
  123. package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  124. package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  125. package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  126. package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  127. package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  128. package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  129. package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  130. package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  131. package/dist/vue3/clone-Bbr3WSpg.js +7 -0
  132. package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  133. package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
  134. package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  135. package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
  136. package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
  137. package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  138. package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  139. package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  140. package/dist/vue3/dist-xWJvauxf.js +49 -0
  141. package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  142. package/dist/vue3/flatten-CfPhNHUL.js +34 -0
  143. package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  144. package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  145. package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  146. package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  147. package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
  148. package/dist/vue3/index.es.min.js +26730 -813
  149. package/dist/vue3/index.umd.min.js +2796 -9
  150. package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
  151. package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  152. package/dist/vue3/init-hAkIK9Bd.js +13 -0
  153. package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
  154. package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  155. package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  156. package/dist/vue3/katex-CEAw-xiA.js +22097 -0
  157. package/dist/vue3/katex-D8o5-F7C.js +2 -0
  158. package/dist/vue3/line-wvheYP7S.js +30 -0
  159. package/dist/vue3/linear-STTevhnH.js +250 -0
  160. package/dist/vue3/math-DF_v6dOl.js +8 -0
  161. package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
  162. package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
  163. package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  164. package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
  165. package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
  166. package/dist/vue3/path-CW_-_Ti7.js +79 -0
  167. package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  168. package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  169. package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
  170. package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  171. package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  172. package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
  173. package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  174. package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  175. package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  176. package/dist/vue3/src-VlKYSsxJ.js +1975 -0
  177. package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  178. package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  179. package/dist/vue3/style.css +1 -1
  180. package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  181. package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
  182. package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  183. package/package.json +3 -3
@@ -0,0 +1,177 @@
1
+ function formatDecimal_default(e) {
2
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
3
+ }
4
+ function formatDecimalParts(e, r) {
5
+ if ((i = (e = r ? e.toExponential(r - 1) : e.toExponential()).indexOf("e")) < 0) return null;
6
+ var i, a = e.slice(0, i);
7
+ return [a.length > 1 ? a[0] + a.slice(2) : a, +e.slice(i + 1)];
8
+ }
9
+ function exponent_default(e) {
10
+ return e = formatDecimalParts(Math.abs(e)), e ? e[1] : NaN;
11
+ }
12
+ function formatGroup_default(e, r) {
13
+ return function(i, a) {
14
+ for (var o = i.length, s = [], c = 0, l = e[0], u = 0; o > 0 && l > 0 && (u + l + 1 > a && (l = Math.max(1, a - u)), s.push(i.substring(o -= l, o + l)), !((u += l + 1) > a));) l = e[c = (c + 1) % e.length];
15
+ return s.reverse().join(r);
16
+ };
17
+ }
18
+ function formatNumerals_default(e) {
19
+ return function(r) {
20
+ return r.replace(/[0-9]/g, function(r) {
21
+ return e[+r];
22
+ });
23
+ };
24
+ }
25
+ var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
26
+ function formatSpecifier(e) {
27
+ if (!(r = re.exec(e))) throw Error("invalid format: " + e);
28
+ var r;
29
+ return new FormatSpecifier({
30
+ fill: r[1],
31
+ align: r[2],
32
+ sign: r[3],
33
+ symbol: r[4],
34
+ zero: r[5],
35
+ width: r[6],
36
+ comma: r[7],
37
+ precision: r[8] && r[8].slice(1),
38
+ trim: r[9],
39
+ type: r[10]
40
+ });
41
+ }
42
+ formatSpecifier.prototype = FormatSpecifier.prototype;
43
+ function FormatSpecifier(e) {
44
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
45
+ }
46
+ FormatSpecifier.prototype.toString = function() {
47
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
48
+ };
49
+ function formatTrim_default(e) {
50
+ out: for (var r = e.length, i = 1, a = -1, o; i < r; ++i) switch (e[i]) {
51
+ case ".":
52
+ a = o = i;
53
+ break;
54
+ case "0":
55
+ a === 0 && (a = i), o = i;
56
+ break;
57
+ default:
58
+ if (!+e[i]) break out;
59
+ a > 0 && (a = 0);
60
+ break;
61
+ }
62
+ return a > 0 ? e.slice(0, a) + e.slice(o + 1) : e;
63
+ }
64
+ var prefixExponent;
65
+ function formatPrefixAuto_default(e, i) {
66
+ var a = formatDecimalParts(e, i);
67
+ if (!a) return e + "";
68
+ var o = a[0], s = a[1], c = s - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(s / 3))) * 3) + 1, l = o.length;
69
+ return c === l ? o : c > l ? o + Array(c - l + 1).join("0") : c > 0 ? o.slice(0, c) + "." + o.slice(c) : "0." + Array(1 - c).join("0") + formatDecimalParts(e, Math.max(0, i + c - 1))[0];
70
+ }
71
+ function formatRounded_default(e, i) {
72
+ var a = formatDecimalParts(e, i);
73
+ if (!a) return e + "";
74
+ var o = a[0], s = a[1];
75
+ return s < 0 ? "0." + Array(-s).join("0") + o : o.length > s + 1 ? o.slice(0, s + 1) + "." + o.slice(s + 1) : o + Array(s - o.length + 2).join("0");
76
+ }
77
+ var formatTypes_default = {
78
+ "%": (e, r) => (e * 100).toFixed(r),
79
+ b: (e) => Math.round(e).toString(2),
80
+ c: (e) => e + "",
81
+ d: formatDecimal_default,
82
+ e: (e, r) => e.toExponential(r),
83
+ f: (e, r) => e.toFixed(r),
84
+ g: (e, r) => e.toPrecision(r),
85
+ o: (e) => Math.round(e).toString(8),
86
+ p: (e, r) => formatRounded_default(e * 100, r),
87
+ r: formatRounded_default,
88
+ s: formatPrefixAuto_default,
89
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
90
+ x: (e) => Math.round(e).toString(16)
91
+ };
92
+ function identity_default(e) {
93
+ return e;
94
+ }
95
+ var map = Array.prototype.map, prefixes = [
96
+ "y",
97
+ "z",
98
+ "a",
99
+ "f",
100
+ "p",
101
+ "n",
102
+ "µ",
103
+ "m",
104
+ "",
105
+ "k",
106
+ "M",
107
+ "G",
108
+ "T",
109
+ "P",
110
+ "E",
111
+ "Z",
112
+ "Y"
113
+ ];
114
+ function locale_default(e) {
115
+ var r = e.grouping === void 0 || e.thousands === void 0 ? identity_default : formatGroup_default(map.call(e.grouping, Number), e.thousands + ""), s = e.currency === void 0 ? "" : e.currency[0] + "", l = e.currency === void 0 ? "" : e.currency[1] + "", d = e.decimal === void 0 ? "." : e.decimal + "", f = e.numerals === void 0 ? identity_default : formatNumerals_default(map.call(e.numerals, String)), g = e.percent === void 0 ? "%" : e.percent + "", _ = e.minus === void 0 ? "−" : e.minus + "", v = e.nan === void 0 ? "NaN" : e.nan + "";
116
+ function y(e) {
117
+ e = formatSpecifier(e);
118
+ var i = e.fill, a = e.align, o = e.sign, m = e.symbol, h = e.zero, y = e.width, b = e.comma, x = e.precision, S = e.trim, C = e.type;
119
+ C === "n" ? (b = !0, C = "g") : formatTypes_default[C] || (x === void 0 && (x = 12), S = !0, C = "g"), (h || i === "0" && a === "=") && (h = !0, i = "0", a = "=");
120
+ var w = m === "$" ? s : m === "#" && /[boxX]/.test(C) ? "0" + C.toLowerCase() : "", T = m === "$" ? l : /[%p]/.test(C) ? g : "", E = formatTypes_default[C], D = /[defgprs%]/.test(C);
121
+ x = x === void 0 ? 6 : /[gprs]/.test(C) ? Math.max(1, Math.min(21, x)) : Math.max(0, Math.min(20, x));
122
+ function O(e) {
123
+ var s = w, c = T, l, p, m;
124
+ if (C === "c") c = E(e) + c, e = "";
125
+ else {
126
+ e = +e;
127
+ var g = e < 0 || 1 / e < 0;
128
+ if (e = isNaN(e) ? v : E(Math.abs(e), x), S && (e = formatTrim_default(e)), g && +e == 0 && o !== "+" && (g = !1), s = (g ? o === "(" ? o : _ : o === "-" || o === "(" ? "" : o) + s, c = (C === "s" ? prefixes[8 + prefixExponent / 3] : "") + c + (g && o === "(" ? ")" : ""), D) {
129
+ for (l = -1, p = e.length; ++l < p;) if (m = e.charCodeAt(l), 48 > m || m > 57) {
130
+ c = (m === 46 ? d + e.slice(l + 1) : e.slice(l)) + c, e = e.slice(0, l);
131
+ break;
132
+ }
133
+ }
134
+ }
135
+ b && !h && (e = r(e, Infinity));
136
+ var O = s.length + e.length + c.length, k = O < y ? Array(y - O + 1).join(i) : "";
137
+ switch (b && h && (e = r(k + e, k.length ? y - c.length : Infinity), k = ""), a) {
138
+ case "<":
139
+ e = s + e + c + k;
140
+ break;
141
+ case "=":
142
+ e = s + k + e + c;
143
+ break;
144
+ case "^":
145
+ e = k.slice(0, O = k.length >> 1) + s + e + c + k.slice(O);
146
+ break;
147
+ default:
148
+ e = k + s + e + c;
149
+ break;
150
+ }
151
+ return f(e);
152
+ }
153
+ return O.toString = function() {
154
+ return e + "";
155
+ }, O;
156
+ }
157
+ function b(e, r) {
158
+ var a = y((e = formatSpecifier(e), e.type = "f", e)), o = Math.max(-8, Math.min(8, Math.floor(exponent_default(r) / 3))) * 3, s = 10 ** -o, l = prefixes[8 + o / 3];
159
+ return function(e) {
160
+ return a(s * e) + l;
161
+ };
162
+ }
163
+ return {
164
+ format: y,
165
+ formatPrefix: b
166
+ };
167
+ }
168
+ var locale, format, formatPrefix;
169
+ defaultLocale({
170
+ thousands: ",",
171
+ grouping: [3],
172
+ currency: ["$", ""]
173
+ });
174
+ function defaultLocale(e) {
175
+ return locale = locale_default(e), format = locale.format, formatPrefix = locale.formatPrefix, locale;
176
+ }
177
+ export { exponent_default as i, formatPrefix as n, formatSpecifier as r, format as t };
@@ -0,0 +1,497 @@
1
+ import "./purify.es-Cm_tUMzZ.js";
2
+ import "./chunk-FPAJGGOC-DPvjUKQ8.js";
3
+ import "./reduce-BFKSG9Rs.js";
4
+ import "./_baseFor-DAbrc8SN.js";
5
+ import "./isEmpty-z27q3o-D.js";
6
+ import "./flatten-CfPhNHUL.js";
7
+ import "./chunk-O7ZBX7Z2-BEP34BEE.js";
8
+ import "./chunk-S6J4BHB3-XXfWHJvh.js";
9
+ import "./chunk-LBM3YZW2-B0-w2HZs.js";
10
+ import "./chunk-76Q3JFCE-BrJX66ha.js";
11
+ import "./chunk-T53DSG4Q-CNvqP6Iy.js";
12
+ import "./chunk-LHMN2FUI-BOH3yE2u.js";
13
+ import "./chunk-FWNWRKHM-BlUTFsPK.js";
14
+ import { g as log, h as __name, p as select_default } from "./src-VlKYSsxJ.js";
15
+ import { B as setAccTitle, C as getDiagramTitle, U as setDiagramTitle, _ as getAccDescription, a as clear, c as configureSvgSize, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-gsx40GnJ.js";
16
+ import { t as ordinal } from "./ordinal-DOM6Fa9P.js";
17
+ import { t as format } from "./defaultLocale-BLATqOV5.js";
18
+ import "./init-hAkIK9Bd.js";
19
+ import "./math-DF_v6dOl.js";
20
+ import { i as cleanAndMerge } from "./chunk-S3R3BYOJ-Bs_r55Kk.js";
21
+ import { t as selectSvgElement } from "./chunk-EXTU4WIE-BPc8ye_N.js";
22
+ import "./dist-xWJvauxf.js";
23
+ import { t as populateCommonDb } from "./chunk-4BX2VUAB-eAYYj1bL.js";
24
+ import { t as parse } from "./mermaid-parser.core-VAa8Vi1g.js";
25
+ import { t as setupViewPortForSVG } from "./chunk-QN33PNHL-DsC-XeM9.js";
26
+ import { i as styles2String, n as isLabelStyle } from "./chunk-ATLVNIR6-CTTwtx-5.js";
27
+ function count(e) {
28
+ var v = 0, y = e.children, b = y && y.length;
29
+ if (!b) v = 1;
30
+ else for (; --b >= 0;) v += y[b].value;
31
+ e.value = v;
32
+ }
33
+ function count_default() {
34
+ return this.eachAfter(count);
35
+ }
36
+ function each_default(e, v) {
37
+ let y = -1;
38
+ for (let b of this) e.call(v, b, ++y, this);
39
+ return this;
40
+ }
41
+ function eachBefore_default(e, v) {
42
+ for (var y = this, b = [y], x, S, C = -1; y = b.pop();) if (e.call(v, y, ++C, this), x = y.children) for (S = x.length - 1; S >= 0; --S) b.push(x[S]);
43
+ return this;
44
+ }
45
+ function eachAfter_default(e, v) {
46
+ for (var y = this, b = [y], x = [], S, C, w, T = -1; y = b.pop();) if (x.push(y), S = y.children) for (C = 0, w = S.length; C < w; ++C) b.push(S[C]);
47
+ for (; y = x.pop();) e.call(v, y, ++T, this);
48
+ return this;
49
+ }
50
+ function find_default(e, v) {
51
+ let y = -1;
52
+ for (let b of this) if (e.call(v, b, ++y, this)) return b;
53
+ }
54
+ function sum_default(e) {
55
+ return this.eachAfter(function(v) {
56
+ for (var y = +e(v.data) || 0, b = v.children, x = b && b.length; --x >= 0;) y += b[x].value;
57
+ v.value = y;
58
+ });
59
+ }
60
+ function sort_default(e) {
61
+ return this.eachBefore(function(v) {
62
+ v.children && v.children.sort(e);
63
+ });
64
+ }
65
+ function path_default(e) {
66
+ for (var v = this, y = leastCommonAncestor(v, e), b = [v]; v !== y;) v = v.parent, b.push(v);
67
+ for (var x = b.length; e !== y;) b.splice(x, 0, e), e = e.parent;
68
+ return b;
69
+ }
70
+ function leastCommonAncestor(e, v) {
71
+ if (e === v) return e;
72
+ var y = e.ancestors(), b = v.ancestors(), x = null;
73
+ for (e = y.pop(), v = b.pop(); e === v;) x = e, e = y.pop(), v = b.pop();
74
+ return x;
75
+ }
76
+ function ancestors_default() {
77
+ for (var e = this, v = [e]; e = e.parent;) v.push(e);
78
+ return v;
79
+ }
80
+ function descendants_default() {
81
+ return Array.from(this);
82
+ }
83
+ function leaves_default() {
84
+ var e = [];
85
+ return this.eachBefore(function(v) {
86
+ v.children || e.push(v);
87
+ }), e;
88
+ }
89
+ function links_default() {
90
+ var e = this, v = [];
91
+ return e.each(function(y) {
92
+ y !== e && v.push({
93
+ source: y.parent,
94
+ target: y
95
+ });
96
+ }), v;
97
+ }
98
+ function* iterator_default() {
99
+ var e = this, v, y = [e], b, x, S;
100
+ do
101
+ for (v = y.reverse(), y = []; e = v.pop();) if (yield e, b = e.children) for (x = 0, S = b.length; x < S; ++x) y.push(b[x]);
102
+ while (y.length);
103
+ }
104
+ function hierarchy(e, v) {
105
+ e instanceof Map ? (e = [void 0, e], v === void 0 && (v = mapChildren)) : v === void 0 && (v = objectChildren);
106
+ for (var y = new Node(e), b, x = [y], S, C, w, T; b = x.pop();) if ((C = v(b.data)) && (T = (C = Array.from(C)).length)) for (b.children = C, w = T - 1; w >= 0; --w) x.push(S = C[w] = new Node(C[w])), S.parent = b, S.depth = b.depth + 1;
107
+ return y.eachBefore(computeHeight);
108
+ }
109
+ function node_copy() {
110
+ return hierarchy(this).eachBefore(copyData);
111
+ }
112
+ function objectChildren(e) {
113
+ return e.children;
114
+ }
115
+ function mapChildren(e) {
116
+ return Array.isArray(e) ? e[1] : null;
117
+ }
118
+ function copyData(e) {
119
+ e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
120
+ }
121
+ function computeHeight(e) {
122
+ var v = 0;
123
+ do
124
+ e.height = v;
125
+ while ((e = e.parent) && e.height < ++v);
126
+ }
127
+ function Node(e) {
128
+ this.data = e, this.depth = this.height = 0, this.parent = null;
129
+ }
130
+ Node.prototype = hierarchy.prototype = {
131
+ constructor: Node,
132
+ count: count_default,
133
+ each: each_default,
134
+ eachAfter: eachAfter_default,
135
+ eachBefore: eachBefore_default,
136
+ find: find_default,
137
+ sum: sum_default,
138
+ sort: sort_default,
139
+ path: path_default,
140
+ ancestors: ancestors_default,
141
+ descendants: descendants_default,
142
+ leaves: leaves_default,
143
+ links: links_default,
144
+ copy: node_copy,
145
+ [Symbol.iterator]: iterator_default
146
+ };
147
+ function required(e) {
148
+ if (typeof e != "function") throw Error();
149
+ return e;
150
+ }
151
+ function constantZero() {
152
+ return 0;
153
+ }
154
+ function constant_default(e) {
155
+ return function() {
156
+ return e;
157
+ };
158
+ }
159
+ function round_default(e) {
160
+ e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
161
+ }
162
+ function dice_default(e, v, y, b, x) {
163
+ for (var S = e.children, C, w = -1, T = S.length, E = e.value && (b - v) / e.value; ++w < T;) C = S[w], C.y0 = y, C.y1 = x, C.x0 = v, C.x1 = v += C.value * E;
164
+ }
165
+ function slice_default(e, v, y, b, x) {
166
+ for (var S = e.children, C, w = -1, T = S.length, E = e.value && (x - y) / e.value; ++w < T;) C = S[w], C.x0 = v, C.x1 = b, C.y0 = y, C.y1 = y += C.value * E;
167
+ }
168
+ var phi = (1 + Math.sqrt(5)) / 2;
169
+ function squarifyRatio(e, v, y, b, x, S) {
170
+ for (var C = [], w = v.children, T, E, D = 0, O = 0, k = w.length, A, j, M = v.value, N, P, F, I, L, R, z; D < k;) {
171
+ A = x - y, j = S - b;
172
+ do
173
+ N = w[O++].value;
174
+ while (!N && O < k);
175
+ for (P = F = N, R = Math.max(j / A, A / j) / (M * e), z = N * N * R, L = Math.max(F / z, z / P); O < k; ++O) {
176
+ if (N += E = w[O].value, E < P && (P = E), E > F && (F = E), z = N * N * R, I = Math.max(F / z, z / P), I > L) {
177
+ N -= E;
178
+ break;
179
+ }
180
+ L = I;
181
+ }
182
+ C.push(T = {
183
+ value: N,
184
+ dice: A < j,
185
+ children: w.slice(D, O)
186
+ }), T.dice ? dice_default(T, y, b, x, M ? b += j * N / M : S) : slice_default(T, y, b, M ? y += A * N / M : x, S), M -= N, D = O;
187
+ }
188
+ return C;
189
+ }
190
+ var squarify_default = (function e(v) {
191
+ function y(e, y, b, x, S) {
192
+ squarifyRatio(v, e, y, b, x, S);
193
+ }
194
+ return y.ratio = function(v) {
195
+ return e((v = +v) > 1 ? v : 1);
196
+ }, y;
197
+ })(phi);
198
+ function treemap_default() {
199
+ var e = squarify_default, v = !1, y = 1, b = 1, x = [0], S = constantZero, C = constantZero, w = constantZero, T = constantZero, E = constantZero;
200
+ function D(e) {
201
+ return e.x0 = e.y0 = 0, e.x1 = y, e.y1 = b, e.eachBefore(O), x = [0], v && e.eachBefore(round_default), e;
202
+ }
203
+ function O(v) {
204
+ var y = x[v.depth], b = v.x0 + y, D = v.y0 + y, O = v.x1 - y, k = v.y1 - y;
205
+ O < b && (b = O = (b + O) / 2), k < D && (D = k = (D + k) / 2), v.x0 = b, v.y0 = D, v.x1 = O, v.y1 = k, v.children && (y = x[v.depth + 1] = S(v) / 2, b += E(v) - y, D += C(v) - y, O -= w(v) - y, k -= T(v) - y, O < b && (b = O = (b + O) / 2), k < D && (D = k = (D + k) / 2), e(v, b, D, O, k));
206
+ }
207
+ return D.round = function(e) {
208
+ return arguments.length ? (v = !!e, D) : v;
209
+ }, D.size = function(e) {
210
+ return arguments.length ? (y = +e[0], b = +e[1], D) : [y, b];
211
+ }, D.tile = function(v) {
212
+ return arguments.length ? (e = required(v), D) : e;
213
+ }, D.padding = function(e) {
214
+ return arguments.length ? D.paddingInner(e).paddingOuter(e) : D.paddingInner();
215
+ }, D.paddingInner = function(e) {
216
+ return arguments.length ? (S = typeof e == "function" ? e : constant_default(+e), D) : S;
217
+ }, D.paddingOuter = function(e) {
218
+ return arguments.length ? D.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : D.paddingTop();
219
+ }, D.paddingTop = function(e) {
220
+ return arguments.length ? (C = typeof e == "function" ? e : constant_default(+e), D) : C;
221
+ }, D.paddingRight = function(e) {
222
+ return arguments.length ? (w = typeof e == "function" ? e : constant_default(+e), D) : w;
223
+ }, D.paddingBottom = function(e) {
224
+ return arguments.length ? (T = typeof e == "function" ? e : constant_default(+e), D) : T;
225
+ }, D.paddingLeft = function(e) {
226
+ return arguments.length ? (E = typeof e == "function" ? e : constant_default(+e), D) : E;
227
+ }, D;
228
+ }
229
+ var TreeMapDB = class {
230
+ constructor() {
231
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = setAccTitle, this.getAccTitle = getAccTitle, this.setDiagramTitle = setDiagramTitle, this.getDiagramTitle = getDiagramTitle, this.getAccDescription = getAccDescription, this.setAccDescription = setAccDescription;
232
+ }
233
+ static #e = __name(this, "TreeMapDB");
234
+ getNodes() {
235
+ return this.nodes;
236
+ }
237
+ getConfig() {
238
+ let e = defaultConfig_default, v = getConfig();
239
+ return cleanAndMerge({
240
+ ...e.treemap,
241
+ ...v.treemap ?? {}
242
+ });
243
+ }
244
+ addNode(e, v) {
245
+ this.nodes.push(e), this.levels.set(e, v), v === 0 && (this.outerNodes.push(e), this.root ??= e);
246
+ }
247
+ getRoot() {
248
+ return {
249
+ name: "",
250
+ children: this.outerNodes
251
+ };
252
+ }
253
+ addClass(e, v) {
254
+ let y = this.classes.get(e) ?? {
255
+ id: e,
256
+ styles: [],
257
+ textStyles: []
258
+ }, b = v.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
259
+ b && b.forEach((e) => {
260
+ isLabelStyle(e) && (y?.textStyles ? y.textStyles.push(e) : y.textStyles = [e]), y?.styles ? y.styles.push(e) : y.styles = [e];
261
+ }), this.classes.set(e, y);
262
+ }
263
+ getClasses() {
264
+ return this.classes;
265
+ }
266
+ getStylesForClass(e) {
267
+ return this.classes.get(e)?.styles ?? [];
268
+ }
269
+ clear() {
270
+ clear(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
271
+ }
272
+ };
273
+ function buildHierarchy(e) {
274
+ if (!e.length) return [];
275
+ let v = [], y = [];
276
+ return e.forEach((e) => {
277
+ let b = {
278
+ name: e.name,
279
+ children: e.type === "Leaf" ? void 0 : []
280
+ };
281
+ for (b.classSelector = e?.classSelector, e?.cssCompiledStyles && (b.cssCompiledStyles = [e.cssCompiledStyles]), e.type === "Leaf" && e.value !== void 0 && (b.value = e.value); y.length > 0 && y[y.length - 1].level >= e.level;) y.pop();
282
+ if (y.length === 0) v.push(b);
283
+ else {
284
+ let e = y[y.length - 1].node;
285
+ e.children ? e.children.push(b) : e.children = [b];
286
+ }
287
+ e.type !== "Leaf" && y.push({
288
+ node: b,
289
+ level: e.level
290
+ });
291
+ }), v;
292
+ }
293
+ __name(buildHierarchy, "buildHierarchy");
294
+ var populate = /* @__PURE__ */ __name((e, y) => {
295
+ populateCommonDb(e, y);
296
+ let b = [];
297
+ for (let v of e.TreemapRows ?? []) v.$type === "ClassDefStatement" && y.addClass(v.className ?? "", v.styleText ?? "");
298
+ for (let v of e.TreemapRows ?? []) {
299
+ let e = v.item;
300
+ if (!e) continue;
301
+ let x = v.indent ? parseInt(v.indent) : 0, S = getItemName(e), C = e.classSelector ? y.getStylesForClass(e.classSelector) : [], w = C.length > 0 ? C.join(";") : void 0, T = {
302
+ level: x,
303
+ name: S,
304
+ type: e.$type,
305
+ value: e.value,
306
+ classSelector: e.classSelector,
307
+ cssCompiledStyles: w
308
+ };
309
+ b.push(T);
310
+ }
311
+ let x = buildHierarchy(b), S = /* @__PURE__ */ __name((e, v) => {
312
+ for (let b of e) y.addNode(b, v), b.children && b.children.length > 0 && S(b.children, v + 1);
313
+ }, "addNodesRecursively");
314
+ S(x, 0);
315
+ }, "populate"), getItemName = /* @__PURE__ */ __name((e) => e.name ? String(e.name) : "", "getItemName"), parser = {
316
+ parser: { yy: void 0 },
317
+ parse: /* @__PURE__ */ __name(async (v) => {
318
+ try {
319
+ let y = await parse("treemap", v);
320
+ log.debug("Treemap AST:", y);
321
+ let b = parser.parser?.yy;
322
+ if (!(b instanceof TreeMapDB)) throw Error("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.");
323
+ populate(y, b);
324
+ } catch (v) {
325
+ throw log.error("Error parsing treemap:", v), v;
326
+ }
327
+ }, "parse")
328
+ }, DEFAULT_INNER_PADDING = 10, SECTION_INNER_PADDING = 10, SECTION_HEADER_HEIGHT = 25, renderer = {
329
+ draw: /* @__PURE__ */ __name((b, x, S, C) => {
330
+ let w = C.db, E = w.getConfig(), D = E.padding ?? DEFAULT_INNER_PADDING, k = w.getDiagramTitle(), M = w.getRoot(), { themeVariables: P } = getConfig();
331
+ if (!M) return;
332
+ let F = k ? 30 : 0, R = selectSvgElement(x), z = E.nodeWidth ? E.nodeWidth * SECTION_INNER_PADDING : 960, B = E.nodeHeight ? E.nodeHeight * SECTION_INNER_PADDING : 500, V = z, H = B + F;
333
+ R.attr("viewBox", `0 0 ${V} ${H}`), configureSvgSize(R, H, V, E.useMaxWidth);
334
+ let U;
335
+ try {
336
+ let e = E.valueFormat || ",";
337
+ if (e === "$0,0") U = /* @__PURE__ */ __name((e) => "$" + format(",")(e), "valueFormat");
338
+ else if (e.startsWith("$") && e.includes(",")) {
339
+ let y = /\.\d+/.exec(e), b = y ? y[0] : "";
340
+ U = /* @__PURE__ */ __name((e) => "$" + format("," + b)(e), "valueFormat");
341
+ } else if (e.startsWith("$")) {
342
+ let y = e.substring(1);
343
+ U = /* @__PURE__ */ __name((e) => "$" + format(y || "")(e), "valueFormat");
344
+ } else U = format(e);
345
+ } catch (v) {
346
+ log.error("Error creating format function:", v), U = format(",");
347
+ }
348
+ let W = ordinal().range([
349
+ "transparent",
350
+ P.cScale0,
351
+ P.cScale1,
352
+ P.cScale2,
353
+ P.cScale3,
354
+ P.cScale4,
355
+ P.cScale5,
356
+ P.cScale6,
357
+ P.cScale7,
358
+ P.cScale8,
359
+ P.cScale9,
360
+ P.cScale10,
361
+ P.cScale11
362
+ ]), G = ordinal().range([
363
+ "transparent",
364
+ P.cScalePeer0,
365
+ P.cScalePeer1,
366
+ P.cScalePeer2,
367
+ P.cScalePeer3,
368
+ P.cScalePeer4,
369
+ P.cScalePeer5,
370
+ P.cScalePeer6,
371
+ P.cScalePeer7,
372
+ P.cScalePeer8,
373
+ P.cScalePeer9,
374
+ P.cScalePeer10,
375
+ P.cScalePeer11
376
+ ]), K = ordinal().range([
377
+ P.cScaleLabel0,
378
+ P.cScaleLabel1,
379
+ P.cScaleLabel2,
380
+ P.cScaleLabel3,
381
+ P.cScaleLabel4,
382
+ P.cScaleLabel5,
383
+ P.cScaleLabel6,
384
+ P.cScaleLabel7,
385
+ P.cScaleLabel8,
386
+ P.cScaleLabel9,
387
+ P.cScaleLabel10,
388
+ P.cScaleLabel11
389
+ ]);
390
+ k && R.append("text").attr("x", V / 2).attr("y", F / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(k);
391
+ let q = R.append("g").attr("transform", `translate(0, ${F})`).attr("class", "treemapContainer"), J = hierarchy(M).sum((e) => e.value ?? 0).sort((e, v) => (v.value ?? 0) - (e.value ?? 0)), Y = treemap_default().size([z, B]).paddingTop((e) => e.children && e.children.length > 0 ? SECTION_HEADER_HEIGHT + SECTION_INNER_PADDING : 0).paddingInner(D).paddingLeft((e) => e.children && e.children.length > 0 ? SECTION_INNER_PADDING : 0).paddingRight((e) => e.children && e.children.length > 0 ? SECTION_INNER_PADDING : 0).paddingBottom((e) => e.children && e.children.length > 0 ? SECTION_INNER_PADDING : 0).round(!0)(J), X = Y.descendants().filter((e) => e.children && e.children.length > 0), Z = q.selectAll(".treemapSection").data(X).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
392
+ Z.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", SECTION_HEADER_HEIGHT).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", .6).attr("stroke-width", .6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), Z.append("clipPath").attr("id", (e, v) => `clip-section-${x}-${v}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", SECTION_HEADER_HEIGHT), Z.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, v) => `treemapSection section${v}`).attr("fill", (e) => W(e.data.name)).attr("fill-opacity", .6).attr("stroke", (e) => G(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", .4).attr("style", (e) => {
393
+ if (e.depth === 0) return "display: none;";
394
+ let v = styles2String({ cssCompiledStyles: e.data.cssCompiledStyles });
395
+ return v.nodeStyles + ";" + v.borderStyles.join(";");
396
+ }), Z.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", SECTION_HEADER_HEIGHT / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("style", (e) => e.depth === 0 ? "display: none;" : "dominant-baseline: middle; font-size: 12px; fill:" + K(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + styles2String({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).each(function(e) {
397
+ if (e.depth === 0) return;
398
+ let v = select_default(this), b = e.data.name;
399
+ v.text(b);
400
+ let x = e.x1 - e.x0, S;
401
+ S = E.showValues !== !1 && e.value ? x - 10 - 30 - 10 - 6 : x - 6 - 6;
402
+ let C = Math.max(15, S), w = v.node();
403
+ if (w.getComputedTextLength() > C) {
404
+ let e = b;
405
+ for (; e.length > 0;) {
406
+ if (e = b.substring(0, e.length - 1), e.length === 0) {
407
+ v.text("..."), w.getComputedTextLength() > C && v.text("");
408
+ break;
409
+ }
410
+ if (v.text(e + "..."), w.getComputedTextLength() <= C) break;
411
+ }
412
+ }
413
+ }), E.showValues !== !1 && Z.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", SECTION_HEADER_HEIGHT / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? U(e.value) : "").attr("font-style", "italic").attr("style", (e) => e.depth === 0 ? "display: none;" : "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + K(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + styles2String({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:"));
414
+ let Q = Y.leaves(), $ = q.selectAll(".treemapLeafGroup").data(Q).enter().append("g").attr("class", (e, v) => `treemapNode treemapLeafGroup leaf${v}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
415
+ $.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? W(e.parent.data.name) : W(e.data.name)).attr("style", (e) => styles2String({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", .3).attr("stroke", (e) => e.parent ? W(e.parent.data.name) : W(e.data.name)).attr("stroke-width", 3), $.append("clipPath").attr("id", (e, v) => `clip-${x}-${v}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), $.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => "text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:" + K(e.data.name) + ";" + styles2String({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, v) => `url(#clip-${x}-${v})`).text((e) => e.data.name).each(function(e) {
416
+ let v = select_default(this), b = e.x1 - e.x0, x = e.y1 - e.y0, S = v.node(), C = b - 8, w = x - 8;
417
+ if (C < 10 || w < 10) {
418
+ v.style("display", "none");
419
+ return;
420
+ }
421
+ let T = parseInt(v.style("font-size"), 10), E = .6;
422
+ for (; S.getComputedTextLength() > C && T > 8;) T--, v.style("font-size", `${T}px`);
423
+ let D = Math.max(6, Math.min(28, Math.round(T * E))), O = T + 2 + D;
424
+ for (; O > w && T > 8 && (T--, D = Math.max(6, Math.min(28, Math.round(T * E))), !(D < 6 && T === 8));) v.style("font-size", `${T}px`), O = T + 2 + D;
425
+ v.style("font-size", `${T}px`), (S.getComputedTextLength() > C || T < 8 || w < T) && v.style("display", "none");
426
+ }), E.showValues !== !1 && $.append("text").attr("class", "treemapValue").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", function(e) {
427
+ return (e.y1 - e.y0) / 2;
428
+ }).attr("style", (e) => "text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:" + K(e.data.name) + ";" + styles2String({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, v) => `url(#clip-${x}-${v})`).text((e) => e.value ? U(e.value) : "").each(function(e) {
429
+ let v = select_default(this), b = this.parentNode;
430
+ if (!b) {
431
+ v.style("display", "none");
432
+ return;
433
+ }
434
+ let x = select_default(b).select(".treemapLabel");
435
+ if (x.empty() || x.style("display") === "none") {
436
+ v.style("display", "none");
437
+ return;
438
+ }
439
+ let S = parseFloat(x.style("font-size")), C = Math.max(6, Math.min(28, Math.round(S * .6)));
440
+ v.style("font-size", `${C}px`);
441
+ let w = (e.y1 - e.y0) / 2 + S / 2 + 2;
442
+ v.attr("y", w);
443
+ let T = e.x1 - e.x0, E = e.y1 - e.y0 - 4, D = T - 8;
444
+ v.node().getComputedTextLength() > D || w + C > E || C < 6 ? v.style("display", "none") : v.style("display", null);
445
+ }), setupViewPortForSVG(R, E.diagramPadding ?? 8, "flowchart", E?.useMaxWidth || !1);
446
+ }, "draw"),
447
+ getClasses: /* @__PURE__ */ __name(function(e, v) {
448
+ return v.db.getClasses();
449
+ }, "getClasses")
450
+ }, defaultTreemapStyleOptions = {
451
+ sectionStrokeColor: "black",
452
+ sectionStrokeWidth: "1",
453
+ sectionFillColor: "#efefef",
454
+ leafStrokeColor: "black",
455
+ leafStrokeWidth: "1",
456
+ leafFillColor: "#efefef",
457
+ labelColor: "black",
458
+ labelFontSize: "12px",
459
+ valueFontSize: "10px",
460
+ valueColor: "black",
461
+ titleColor: "black",
462
+ titleFontSize: "14px"
463
+ }, diagram = {
464
+ parser,
465
+ get db() {
466
+ return new TreeMapDB();
467
+ },
468
+ renderer,
469
+ styles: /* @__PURE__ */ __name(({ treemap: e } = {}) => {
470
+ let v = cleanAndMerge(defaultTreemapStyleOptions, e);
471
+ return `
472
+ .treemapNode.section {
473
+ stroke: ${v.sectionStrokeColor};
474
+ stroke-width: ${v.sectionStrokeWidth};
475
+ fill: ${v.sectionFillColor};
476
+ }
477
+ .treemapNode.leaf {
478
+ stroke: ${v.leafStrokeColor};
479
+ stroke-width: ${v.leafStrokeWidth};
480
+ fill: ${v.leafFillColor};
481
+ }
482
+ .treemapLabel {
483
+ fill: ${v.labelColor};
484
+ font-size: ${v.labelFontSize};
485
+ }
486
+ .treemapValue {
487
+ fill: ${v.valueColor};
488
+ font-size: ${v.valueFontSize};
489
+ }
490
+ .treemapTitle {
491
+ fill: ${v.titleColor};
492
+ font-size: ${v.titleFontSize};
493
+ }
494
+ `;
495
+ }, "getStyles")
496
+ };
497
+ export { diagram };