vue-data-ui 3.7.8 → 3.7.10

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 (165) hide show
  1. package/README.md +3 -3
  2. package/dist/{Arrow-CWYIBV-7.js → Arrow-9T8aUCDR.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CRF94NJQ.js → BaseDraggableDialog-BDY-Jn9S.js} +2 -2
  4. package/dist/{BaseIcon-CofSxalQ.js → BaseIcon-Dl4VBlHV.js} +7 -3
  5. package/dist/{ColorPicker-e1-OSGlQ.js → ColorPicker-BrMbLQds.js} +2 -2
  6. package/dist/{DataTable-CHaOCmsE.js → DataTable-Ho3Bf5oq.js} +2 -2
  7. package/dist/{Legend-Web3GjlR.js → Legend-DSyOOSJ1.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-CjYFLlns.js → NonSvgPenAndPaper-MX5IsudW.js} +3 -3
  9. package/dist/{PackageVersion-CJF7IH9q.js → PackageVersion-BTPIkPFM.js} +1 -1
  10. package/dist/{PenAndPaper-HCZQTkqi.js → PenAndPaper-kymjF6_b.js} +3 -3
  11. package/dist/{RecursiveCircles-BcLb1aRS.js → RecursiveCircles-CM4bn2Vg.js} +33 -30
  12. package/dist/RecursiveLabels-DxmctYbA.js +55 -0
  13. package/dist/{RecursiveLinks-00zGWPf9.js → RecursiveLinks-Da489v6n.js} +31 -19
  14. package/dist/{Shape-DE6X_t31.js → Shape-rPzC8L-O.js} +1 -1
  15. package/dist/{Slicer-BFBBG6xv.js → Slicer-DScoMPmj.js} +2 -2
  16. package/dist/{SlicerPreview-D76aSViW.js → SlicerPreview-B1QUTxTZ.js} +2 -2
  17. package/dist/{SparkTooltip-B2rpVWE1.js → SparkTooltip-reDvtQYF.js} +1 -1
  18. package/dist/{Title-C6xvSWXZ.js → Title-BwhstTFA.js} +1 -1
  19. package/dist/{Tooltip-WD0Ros6G.js → Tooltip-De7i-i20.js} +1 -1
  20. package/dist/{UserOptions-B3I-s3Lw.js → UserOptions-DgscxIaa.js} +195 -152
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-gizmo.js +1 -1
  43. package/dist/components/vue-ui-heatmap.js +1 -1
  44. package/dist/components/vue-ui-history-plot.js +1 -1
  45. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  46. package/dist/components/vue-ui-icon.js +1 -1
  47. package/dist/components/vue-ui-kpi.js +1 -1
  48. package/dist/components/vue-ui-mini-loader.js +1 -1
  49. package/dist/components/vue-ui-molecule.js +1 -1
  50. package/dist/components/vue-ui-mood-radar.js +1 -1
  51. package/dist/components/vue-ui-nested-donuts.js +1 -1
  52. package/dist/components/vue-ui-onion.js +1 -1
  53. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  54. package/dist/components/vue-ui-quadrant.js +1 -1
  55. package/dist/components/vue-ui-quick-chart.js +1 -1
  56. package/dist/components/vue-ui-radar.js +1 -1
  57. package/dist/components/vue-ui-rating.js +1 -1
  58. package/dist/components/vue-ui-relation-circle.js +1 -1
  59. package/dist/components/vue-ui-ridgeline.js +1 -1
  60. package/dist/components/vue-ui-rings.js +1 -1
  61. package/dist/components/vue-ui-scatter.js +1 -1
  62. package/dist/components/vue-ui-skeleton.js +1 -1
  63. package/dist/components/vue-ui-smiley.js +1 -1
  64. package/dist/components/vue-ui-spark-trend.js +1 -1
  65. package/dist/components/vue-ui-sparkbar.js +1 -1
  66. package/dist/components/vue-ui-sparkgauge.js +1 -1
  67. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  68. package/dist/components/vue-ui-sparkline.js +1 -1
  69. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  70. package/dist/components/vue-ui-stackbar.js +1 -1
  71. package/dist/components/vue-ui-stackline.js +1 -1
  72. package/dist/components/vue-ui-strip-plot.js +1 -1
  73. package/dist/components/vue-ui-table-heatmap.js +1 -1
  74. package/dist/components/vue-ui-table-sparkline.js +1 -1
  75. package/dist/components/vue-ui-table.js +1 -1
  76. package/dist/components/vue-ui-thermometer.js +1 -1
  77. package/dist/components/vue-ui-timer.js +1 -1
  78. package/dist/components/vue-ui-tiremarks.js +1 -1
  79. package/dist/components/vue-ui-treemap.js +1 -1
  80. package/dist/components/vue-ui-vertical-bar.js +1 -1
  81. package/dist/components/vue-ui-waffle.js +1 -1
  82. package/dist/components/vue-ui-wheel.js +1 -1
  83. package/dist/components/vue-ui-word-cloud.js +1 -1
  84. package/dist/components/vue-ui-world.js +1 -1
  85. package/dist/components/vue-ui-xy-canvas.js +1 -1
  86. package/dist/components/vue-ui-xy.js +1 -1
  87. package/dist/{dom-to-png-CH2DfsJe.js → dom-to-png-BG68zYm5.js} +1 -1
  88. package/dist/{img-DUzJeMlr.js → img-BYzbY8TZ.js} +1 -1
  89. package/dist/{lib-C5BH09_g.js → lib-DUaaQGCv.js} +2 -2
  90. package/dist/{pdf-BSWQncok.js → pdf--SSvtzbF.js} +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +21 -1
  93. package/dist/{useAutoSizeLabelsInsideViewbox-DOALwU4q.js → useAutoSizeLabelsInsideViewbox-DBJqy2aF.js} +1 -1
  94. package/dist/{useNestedProp-CRoetJdp.js → useNestedProp-BjZ1Lg9E.js} +189 -172
  95. package/dist/usePanZoom-DZtyJi5q.js +127 -0
  96. package/dist/{usePrinter-DCJzEiS8.js → usePrinter-BdVu83IN.js} +2 -2
  97. package/dist/{vue-data-ui-BwZpMZXM.js → vue-data-ui-CP-yTXfr.js} +114 -111
  98. package/dist/vue-data-ui.js +70 -70
  99. package/dist/{vue-ui-3d-bar-CXX2mSqh.js → vue-ui-3d-bar-BgYBmllX.js} +6 -6
  100. package/dist/{vue-ui-accordion-Bq9tXa5B.js → vue-ui-accordion-BXTVRRX7.js} +3 -3
  101. package/dist/{vue-ui-age-pyramid-C-Dl2XUx.js → vue-ui-age-pyramid-FTpPv1-m.js} +6 -6
  102. package/dist/{vue-ui-annotator-BseUMwp_.js → vue-ui-annotator-CmCG1U2b.js} +7 -7
  103. package/dist/{vue-ui-bullet-Ccl0kzzA.js → vue-ui-bullet-CumDaUkg.js} +7 -7
  104. package/dist/{vue-ui-candlestick-hISKdohk.js → vue-ui-candlestick-Dy1nA73c.js} +7 -7
  105. package/dist/{vue-ui-carousel-table-Dyc_G3Kp.js → vue-ui-carousel-table-DPDyjz_Y.js} +4 -4
  106. package/dist/{vue-ui-chestnut-9TxPQCHg.js → vue-ui-chestnut-DjoZUQ_f.js} +5 -5
  107. package/dist/{vue-ui-chord-C4OFq_OR.js → vue-ui-chord-BWi8pIFv.js} +8 -8
  108. package/dist/{vue-ui-circle-pack-DBv9FNgA.js → vue-ui-circle-pack-CwPkez44.js} +6 -6
  109. package/dist/{vue-ui-cursor-DlOBzFbc.js → vue-ui-cursor-4Ldkkd2T.js} +2 -2
  110. package/dist/{vue-ui-dashboard-CwKHLF_b.js → vue-ui-dashboard-qRVGPD_v.js} +68 -68
  111. package/dist/{vue-ui-digits-Ci8TqNta.js → vue-ui-digits-uszbkbEK.js} +2 -2
  112. package/dist/{vue-ui-donut-BXH0Mym3.js → vue-ui-donut-CPXX0FSV.js} +9 -9
  113. package/dist/{vue-ui-donut-evolution-spIbl1c9.js → vue-ui-donut-evolution-G8AGdNA0.js} +8 -8
  114. package/dist/{vue-ui-dumbbell-DQW2t9iM.js → vue-ui-dumbbell-BOJbuZkm.js} +7 -7
  115. package/dist/{vue-ui-flow-Bt-rW9ny.js → vue-ui-flow-CiPerJXK.js} +7 -7
  116. package/dist/{vue-ui-funnel-BWp3H6sk.js → vue-ui-funnel-hrWmFaMt.js} +6 -6
  117. package/dist/{vue-ui-galaxy-CsJSZjb4.js → vue-ui-galaxy-OZkQxG_b.js} +7 -7
  118. package/dist/{vue-ui-gauge-BbrLA9ay.js → vue-ui-gauge-B8QQH9DO.js} +7 -7
  119. package/dist/{vue-ui-gizmo-D-Z8QCwH.js → vue-ui-gizmo-UgzqsNv3.js} +3 -3
  120. package/dist/{vue-ui-heatmap-C4F0oPir.js → vue-ui-heatmap-C98MtcKi.js} +7 -7
  121. package/dist/{vue-ui-history-plot-ChNfFFIF.js → vue-ui-history-plot-I2uOmeXc.js} +7 -7
  122. package/dist/{vue-ui-horizontal-bar-BHhflQVv.js → vue-ui-horizontal-bar-DrauRY8J.js} +13 -13
  123. package/dist/{vue-ui-kpi-Bs6STHvW.js → vue-ui-kpi-Bkxvv0Re.js} +3 -3
  124. package/dist/{vue-ui-mini-loader-C20G2gwA.js → vue-ui-mini-loader-oYhRTSA7.js} +2 -2
  125. package/dist/{vue-ui-molecule-BQasD0Pc.js → vue-ui-molecule-qoA-oi2j.js} +263 -247
  126. package/dist/{vue-ui-mood-radar-UnfXTNY5.js → vue-ui-mood-radar-DQULF8Nx.js} +7 -7
  127. package/dist/{vue-ui-nested-donuts-CxDSJ7UU.js → vue-ui-nested-donuts-BcTOOXwM.js} +7 -7
  128. package/dist/{vue-ui-onion-_J9_80mF.js → vue-ui-onion-BH0dcycx.js} +8 -8
  129. package/dist/{vue-ui-parallel-coordinate-plot-CHiDNY-h.js → vue-ui-parallel-coordinate-plot-B5Wz6izN.js} +10 -10
  130. package/dist/{vue-ui-quadrant-DdwtJUik.js → vue-ui-quadrant-D7Bx8ZhG.js} +8 -8
  131. package/dist/{vue-ui-quick-chart-BVtuoV8L.js → vue-ui-quick-chart-BLD1S_DA.js} +6 -6
  132. package/dist/{vue-ui-radar-BiMDeEtu.js → vue-ui-radar-C6URuNkO.js} +8 -8
  133. package/dist/{vue-ui-rating-DBwGHvLN.js → vue-ui-rating-BALFx0aJ.js} +2 -2
  134. package/dist/{vue-ui-relation-circle-DYAyIRP1.js → vue-ui-relation-circle-CTuxeQGv.js} +7 -7
  135. package/dist/{vue-ui-ridgeline-gN5fKjTd.js → vue-ui-ridgeline-DPwJniHl.js} +8 -8
  136. package/dist/{vue-ui-rings-BMxHBIXK.js → vue-ui-rings-CV8WVGDf.js} +8 -8
  137. package/dist/{vue-ui-scatter-DTe8stzc.js → vue-ui-scatter-AB5CJST5.js} +8 -8
  138. package/dist/{vue-ui-skeleton-Rq_iY34o.js → vue-ui-skeleton-CG-kTHxc.js} +3 -3
  139. package/dist/{vue-ui-smiley-DVVGOxB4.js → vue-ui-smiley-DABDSgAF.js} +2 -2
  140. package/dist/{vue-ui-spark-trend-Bv_c68m9.js → vue-ui-spark-trend-6DEoAhz2.js} +3 -3
  141. package/dist/{vue-ui-sparkbar-Bts-H5kW.js → vue-ui-sparkbar-Bqje9P11.js} +3 -3
  142. package/dist/{vue-ui-sparkgauge-qe1x-WYv.js → vue-ui-sparkgauge-DK2HYPG8.js} +3 -3
  143. package/dist/{vue-ui-sparkhistogram-C4AsZoTv.js → vue-ui-sparkhistogram-Db_xO32F.js} +4 -4
  144. package/dist/{vue-ui-sparkline-4rL3cNOp.js → vue-ui-sparkline-IGFr7ojq.js} +3 -3
  145. package/dist/{vue-ui-sparkstackbar-nAPWa24t.js → vue-ui-sparkstackbar-BYTe-W9l.js} +3 -3
  146. package/dist/{vue-ui-stackbar-DIrK_6U1.js → vue-ui-stackbar-DHARDfHR.js} +9 -9
  147. package/dist/{vue-ui-stackline-DrjtZnvk.js → vue-ui-stackline--ct2hMXb.js} +9 -9
  148. package/dist/{vue-ui-strip-plot-BvlJJ05r.js → vue-ui-strip-plot-BhUAax7p.js} +7 -7
  149. package/dist/{vue-ui-table-BXTdd4rQ.js → vue-ui-table-C01JSJY_.js} +5 -5
  150. package/dist/{vue-ui-table-heatmap-C-dBTmpU.js → vue-ui-table-heatmap-BHqtF71-.js} +5 -5
  151. package/dist/{vue-ui-table-sparkline-D09d-TqT.js → vue-ui-table-sparkline-BComiXTb.js} +4 -4
  152. package/dist/{vue-ui-thermometer-D-3uy1Kn.js → vue-ui-thermometer-DdGx_SCS.js} +7 -7
  153. package/dist/{vue-ui-timer-fLkuH8-S.js → vue-ui-timer-BoVpVQl2.js} +5 -5
  154. package/dist/{vue-ui-tiremarks-CtDyYpos.js → vue-ui-tiremarks-CPBV1tbk.js} +6 -6
  155. package/dist/vue-ui-treemap-C94wp5-s.js +1590 -0
  156. package/dist/{vue-ui-waffle-D-F3_Adz.js → vue-ui-waffle-DUSfyAav.js} +8 -8
  157. package/dist/{vue-ui-wheel-CCCqyGtv.js → vue-ui-wheel-BzPZhMGj.js} +6 -6
  158. package/dist/{vue-ui-word-cloud-IG1Vv_Bs.js → vue-ui-word-cloud-BTPT8St3.js} +352 -335
  159. package/dist/{vue-ui-world-DFb4FB41.js → vue-ui-world-VSCQYYn5.js} +6 -6
  160. package/dist/{vue-ui-xy-canvas-BMAvV283.js → vue-ui-xy-canvas-3x-UDcCu.js} +10 -10
  161. package/dist/{vue-ui-xy-CWpPVQDO.js → vue-ui-xy-kwHl6eC3.js} +9 -9
  162. package/package.json +1 -1
  163. package/dist/RecursiveLabels-Bgcv0pzu.js +0 -50
  164. package/dist/usePanZoom-BVca3eMk.js +0 -122
  165. package/dist/vue-ui-treemap-Dt-wMdMI.js +0 -1359
@@ -0,0 +1,1590 @@
1
+ import { defineAsyncComponent as Oe, useSlots as kl, onMounted as xo, computed as A, ref as $, shallowRef as me, toRefs as wl, watch as _e, onBeforeUnmount as Al, createElementBlock as T, openBlock as f, unref as m, normalizeStyle as be, normalizeClass as Ht, createBlock as Te, createCommentVNode as I, createElementVNode as U, createVNode as lt, withCtx as F, renderSlot as x, normalizeProps as Z, guardReactiveProps as J, createSlots as $o, Fragment as je, renderList as at, withKeys as To, withModifiers as Vt, mergeProps as nt, createTextVNode as st, toDisplayString as rt, Teleport as xl, resolveDynamicComponent as $l, nextTick as Tl } from "vue";
2
+ import { c as ut, t as Sl, i as Fl, p as j, j as Ml, o as So, g as Ol, l as Ye, a as it, d as Xe, X as Wt, n as ct, w as dt, x as Fo, u as _l, q as Bl, au as vt, av as Ut, R as Dl } from "./lib-DUaaQGCv.js";
3
+ import { t as El, u as Ll } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Il, a as jt } from "./useNestedProp-BjZ1Lg9E.js";
5
+ import { u as Pl, B as Rl } from "./BaseScanner-BgWxam9d.js";
6
+ import { u as Nl } from "./usePrinter-BdVu83IN.js";
7
+ import { u as zl } from "./useThemeCheck-DGJ31Vi5.js";
8
+ import { u as Hl } from "./useUserOptionState-BIvW1Kz7.js";
9
+ import { u as Vl } from "./useChartAccessibility-9icAAmYg.js";
10
+ import Wl from "./img-BYzbY8TZ.js";
11
+ import Ul from "./Title-BwhstTFA.js";
12
+ import jl from "./Legend-DSyOOSJ1.js";
13
+ import Mo from "./BaseIcon-Dl4VBlHV.js";
14
+ import { u as Yl } from "./useSvgExport-DrjCWun4.js";
15
+ import { _ as Xl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
+ function Oo(r, p) {
17
+ const d = r.length;
18
+ if (d === 0)
19
+ throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);
20
+ {
21
+ let g = 1 / 0, v = -1 / 0, b = 0;
22
+ for (let M = 0; M < d; M += 1) {
23
+ const k = r[M].normalizedValue;
24
+ k < g && (g = k), k > v && (v = k), b += k;
25
+ }
26
+ return Math.max(
27
+ p ** 2 * v / b ** 2,
28
+ b ** 2 / (p ** 2 * g)
29
+ );
30
+ }
31
+ }
32
+ function _o(r) {
33
+ const { xOffset: p, yOffset: d, width: g, height: v } = r;
34
+ return {
35
+ x0: p,
36
+ y0: d,
37
+ x1: p + g,
38
+ y1: d + v
39
+ };
40
+ }
41
+ function ql(r, p, d) {
42
+ if (r.length === 0)
43
+ return !0;
44
+ {
45
+ const g = r.concat(p), v = Oo(
46
+ r,
47
+ d
48
+ ), b = Oo(g, d);
49
+ return v >= b;
50
+ }
51
+ }
52
+ function Gl(r) {
53
+ const p = [], d = r.length;
54
+ for (let g = 0; g < d; g += 1) {
55
+ const v = r[g], b = v.length;
56
+ for (let y = 0; y < b; y += 1)
57
+ p.push(v[y]);
58
+ }
59
+ return p;
60
+ }
61
+ function Bo(r, p) {
62
+ const d = {
63
+ ...p,
64
+ children: r
65
+ };
66
+ return Eo(d);
67
+ }
68
+ function Kl(r) {
69
+ return (r.x1 - r.x0) * (r.y1 - r.y0);
70
+ }
71
+ function Do(r, p) {
72
+ const { width: d, height: g, xOffset: v, yOffset: b } = Yt(p), y = r.length, M = r.map((C) => C.normalizedValue || 0).reduce((C, P) => C + P, 0), k = M / g, Ce = M / d;
73
+ let le = v, ce = b;
74
+ const Y = [];
75
+ if (d >= g) {
76
+ for (let C = 0; C < y; C += 1) {
77
+ const P = r[C], de = ce + P.normalizedValue / k, ke = {
78
+ x0: le,
79
+ y0: ce,
80
+ x1: le + k,
81
+ y1: de
82
+ }, ve = Object.assign({}, P, ke);
83
+ ce = de, Y.push(ve);
84
+ }
85
+ return Y;
86
+ } else {
87
+ for (let C = 0; C < y; C += 1) {
88
+ const P = r[C], de = le + P.normalizedValue / Ce, ke = {
89
+ x0: le,
90
+ y0: ce,
91
+ x1: de,
92
+ y1: ce + Ce
93
+ }, ve = Object.assign({}, P, ke);
94
+ le = de, Y.push(ve);
95
+ }
96
+ return Y;
97
+ }
98
+ }
99
+ function Zl(r) {
100
+ const p = Yt(r), d = p.width, g = p.height;
101
+ return Math.min(d, g);
102
+ }
103
+ function Jl(r, p) {
104
+ const d = r.length, g = r.map((k) => k.value ?? 0).reduce((k, Ce) => k + Ce, 0), v = p / g, b = [];
105
+ let y, M;
106
+ for (let k = 0; k < d; k += 1)
107
+ M = r[k], y = Object.assign({}, M, {
108
+ normalizedValue: M.value * (v || 0)
109
+ }), b.push(y);
110
+ return b;
111
+ }
112
+ function Yt(r) {
113
+ const { x0: p, y0: d, x1: g, y1: v } = r;
114
+ return {
115
+ xOffset: p,
116
+ yOffset: d,
117
+ width: g - p,
118
+ height: v - d
119
+ };
120
+ }
121
+ function Ql(r, p, d, g) {
122
+ let v = r, b = p, y = d, M = g;
123
+ for (; ; ) {
124
+ const k = v.length;
125
+ if (k === 0) {
126
+ const Y = Do(b, y);
127
+ return M.concat(Y);
128
+ }
129
+ const Ce = Zl(y), le = v[0], ce = v.slice(1, k);
130
+ if (ql(b, le, Ce)) {
131
+ const Y = b.concat(le);
132
+ v = ce, b = Y, y = y, M = M;
133
+ } else {
134
+ const Y = b.length;
135
+ let C = 0;
136
+ for (let ve = 0; ve < Y; ve += 1)
137
+ C += b[ve].normalizedValue;
138
+ const P = ea(y, C), de = Do(b, y), ke = M.concat(de);
139
+ v = v, b = [], y = P, M = ke;
140
+ }
141
+ }
142
+ }
143
+ function Eo(r) {
144
+ if (typeof r.children > "u" || !r.children.length)
145
+ return [r];
146
+ {
147
+ const p = Jl(
148
+ r.children,
149
+ Kl(r)
150
+ ), d = Ql(p, [], r, []), g = d.length, v = [];
151
+ for (let y = 0; y < g; y += 1)
152
+ v.push(Eo(d[y]));
153
+ return Gl(v);
154
+ }
155
+ }
156
+ function ea(r, p) {
157
+ const { width: d, height: g, xOffset: v, yOffset: b } = Yt(r);
158
+ if (d >= g) {
159
+ const y = p / g, M = d - y, k = {
160
+ xOffset: v + y,
161
+ yOffset: b,
162
+ width: M,
163
+ height: g
164
+ };
165
+ return _o(k);
166
+ } else {
167
+ const y = p / d, M = g - y, k = {
168
+ xOffset: v,
169
+ yOffset: b + y,
170
+ width: d,
171
+ height: M
172
+ };
173
+ return _o(k);
174
+ }
175
+ }
176
+ const Lo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", layout: { rects: { stroke: "#1A1A1A", selected: { stroke: "#5A5A5A" }, group: { stroke: "#8A8A8A", label: { adaptColorToBackground: !1, color: "#CCCCCC" } } } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, Io = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", layout: { rects: { stroke: "#FFF8E1", selected: { stroke: "#FFF8E1" }, group: { stroke: "#424242", label: { adaptColorToBackground: !1, color: "#424242" } } } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, Po = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", layout: { rects: { stroke: "#1E1E1E", selected: { stroke: "#1E1E1E" }, group: { stroke: "#8A8A8A", label: { adaptColorToBackground: !1, color: "#BDBDBD" } } } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, Ro = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", layout: { rects: { stroke: "#1A1A1A", selected: { stroke: "#1A1A1A" }, group: { stroke: "#99AA99", label: { adaptColorToBackground: !1, color: "#99AA99" } } } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, No = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", layout: { rects: { stroke: "#fbfafa", strokeWidth: 2, borderRadius: 12, selected: { stroke: "#fbfafa" } } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, zo = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { rects: { stroke: "#1A1A1A", selected: { stroke: "#1A1A1A" }, group: { stroke: "#50606C", label: { adaptColorToBackground: !1, color: "#50606C" } } } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, Ho = {
177
+ default: {},
178
+ dark: Lo,
179
+ celebration: Io,
180
+ celebrationNight: Po,
181
+ hack: Ro,
182
+ zen: No,
183
+ concrete: zo
184
+ }, za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
185
+ __proto__: null,
186
+ celebration: Io,
187
+ celebrationNight: Po,
188
+ concrete: zo,
189
+ dark: Lo,
190
+ default: Ho,
191
+ hack: Ro,
192
+ zen: No
193
+ }, Symbol.toStringTag, { value: "Module" })), ta = ["id"], oa = ["id"], la = ["tabindex", "onClick", "onKeydown", "data-last-crumb", "onMouseenter", "onFocus"], aa = { class: "vue-ui-treemap-crumb-unit" }, na = { class: "vue-ui-treemap-crumb-unit-label" }, sa = {
194
+ key: 0,
195
+ style: { width: "24px", display: "flex", "align-items": "center" }
196
+ }, ra = {
197
+ key: 0,
198
+ class: "vue-ui-treemap-crumb-unit-arrow"
199
+ }, ua = ["xmlns", "viewBox"], ia = { key: 0 }, ca = ["id"], da = ["stop-color"], va = ["stop-color"], ha = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], fa = ["width", "height", "x", "y"], pa = ["innerHTML"], ga = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick", "onMouseenter", "onMouseleave"], ya = ["innerHTML"], ma = ["x", "y", "height", "width"], ba = {
200
+ key: 5,
201
+ class: "vue-data-ui-watermark"
202
+ }, Ca = ["id"], ka = ["onClick"], wa = ["innerHTML"], Aa = {
203
+ __name: "vue-ui-treemap",
204
+ props: {
205
+ config: {
206
+ type: Object,
207
+ default() {
208
+ return {};
209
+ }
210
+ },
211
+ dataset: {
212
+ type: Array,
213
+ default() {
214
+ return [];
215
+ }
216
+ }
217
+ },
218
+ emits: ["selectLegend", "selectDatapoint"],
219
+ setup(r, { expose: p, emit: d }) {
220
+ const g = Oe(() => import("./DataTable-Ho3Bf5oq.js")), v = Oe(() => import("./PenAndPaper-kymjF6_b.js")), b = Oe(() => import("./vue-ui-accordion-BXTVRRX7.js")), y = Oe(() => import("./Tooltip-De7i-i20.js")), M = Oe(() => import("./UserOptions-DgscxIaa.js")), k = Oe(() => import("./PackageVersion-BTPIkPFM.js")), Ce = Oe(() => import("./BaseDraggableDialog-BDY-Jn9S.js")), { vue_ui_treemap: le } = Il(), { isThemeValid: ce, warnInvalidTheme: Y } = zl(), C = r, P = d, de = kl();
221
+ xo(() => {
222
+ de["chart-background"] && console.warn("VueUiTreemap does not support the #chart-background slot.");
223
+ });
224
+ const ke = A(() => !!C.dataset && C.dataset.length), ve = A(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), we = $(ut()), ht = $(!1), ft = $(""), Se = $(!1), Xt = $(0), V = $([]), ae = me(null), qt = me(null), Gt = me(null), Kt = me(null), Zt = me(null), Jt = $(0), pt = $(0), gt = $(0), B = $([]), yt = $(null), Qt = $(!1), Pe = $(null), mt = $(null), Re = $(null), W = $(/* @__PURE__ */ new Map()), t = $(wt()), { loading: Fe, FINAL_DATASET: bt, manualLoading: Vo } = Pl({
225
+ ...wl(C),
226
+ FINAL_CONFIG: t,
227
+ prepareConfig: wt,
228
+ skeletonDataset: [
229
+ {
230
+ name: "_",
231
+ value: 53,
232
+ color: "#CACACA90",
233
+ children: [
234
+ { name: "_", value: 21 },
235
+ { name: "_", value: 13 },
236
+ { name: "_", value: 8 },
237
+ { name: "_", value: 5 },
238
+ { name: "_", value: 3 },
239
+ { name: "_", value: 2 },
240
+ { name: "_", value: 1 }
241
+ ]
242
+ }
243
+ ],
244
+ skeletonConfig: Sl({
245
+ defaultConfig: t.value,
246
+ userConfig: {
247
+ userOptions: { show: !1 },
248
+ style: {
249
+ chart: {
250
+ backgroundColor: "#999999",
251
+ layout: {
252
+ labels: {
253
+ showDefaultLabels: !1
254
+ },
255
+ rects: {
256
+ stroke: "#6A6A6A"
257
+ }
258
+ },
259
+ legend: {
260
+ backgroundColor: "transparent"
261
+ }
262
+ }
263
+ }
264
+ }
265
+ })
266
+ }), { userOptionsVisible: Ct, setUserOptionsVisibility: eo, keepUserOptionState: to } = Hl({ config: t.value }), { svgRef: kt } = Vl({ config: t.value.style.chart.title });
267
+ function wt() {
268
+ const e = jt({
269
+ userConfig: C.config,
270
+ defaultConfig: le
271
+ }), l = e.theme;
272
+ if (!l) return e;
273
+ if (!ce.value(e))
274
+ return Y(e), e;
275
+ const o = jt({
276
+ userConfig: Ho[l] || C.config,
277
+ defaultConfig: e
278
+ }), a = jt({
279
+ userConfig: C.config,
280
+ defaultConfig: o
281
+ });
282
+ return {
283
+ ...a,
284
+ customPalette: a.customPalette.length ? a.customPalette : Fl[l] || j
285
+ };
286
+ }
287
+ _e(() => C.config, (e) => {
288
+ Fe.value || (t.value = wt()), Ct.value = !t.value.userOptions.showOnChartHover, Jt.value += 1, pt.value += 1, gt.value += 1, X.value.showTable = t.value.table.show, X.value.showTooltip = t.value.style.chart.tooltip.show;
289
+ }, { deep: !0 });
290
+ const { isPrinting: oo, isImaging: lo, generatePdf: ao, generateImage: no } = Nl({
291
+ elementId: `treemap_${we.value}`,
292
+ fileName: t.value.style.chart.title.text || "vue-ui-treemap",
293
+ options: t.value.userOptions.print
294
+ }), Wo = A(() => t.value.userOptions.show && !t.value.style.chart.title.text), qe = A(() => Ml(t.value.customPalette)), X = $({
295
+ showTable: t.value.table.show,
296
+ showTooltip: t.value.style.chart.tooltip.show
297
+ });
298
+ _e(t, () => {
299
+ X.value = {
300
+ showTable: t.value.table.show,
301
+ showTooltip: t.value.style.chart.tooltip.show
302
+ };
303
+ }, { immediate: !0 });
304
+ const Me = $({
305
+ height: t.value.style.chart.height,
306
+ width: t.value.style.chart.width
307
+ });
308
+ function Uo(e) {
309
+ const l = ae.value, o = Me.value.height;
310
+ if (!l || !o) return e;
311
+ const a = l.getBoundingClientRect();
312
+ return e * (o / a.height);
313
+ }
314
+ function jo() {
315
+ if (!yt.value || fe.value.length <= 1) return 0;
316
+ const e = yt.value, l = getComputedStyle(e), o = e.offsetHeight + parseFloat(l.marginTop || "0") + parseFloat(l.marginBottom || "0") + parseFloat(l.paddingTop || "0") + parseFloat(l.paddingBottom || "0");
317
+ return Uo(o);
318
+ }
319
+ const E = A(() => {
320
+ const e = t.value.style.chart.padding, l = Me.value.width, o = Me.value.height, a = jo(), n = e.left, u = l - e.right, s = e.top, i = o - e.bottom - a;
321
+ return {
322
+ left: n,
323
+ top: s,
324
+ right: u,
325
+ bottom: i,
326
+ width: u - n,
327
+ height: Math.max(0, i - s),
328
+ vbWidth: l,
329
+ vbHeight: o - a,
330
+ offsetY: a
331
+ };
332
+ }), z = $(bt.value), Ae = $(z.value), so = me(/* @__PURE__ */ new Map());
333
+ _e(
334
+ [z, () => t.value],
335
+ () => {
336
+ Re.value = null, W.value = /* @__PURE__ */ new Map();
337
+ },
338
+ { deep: !0 }
339
+ ), _e(
340
+ () => V.value,
341
+ () => {
342
+ Re.value = null, W.value = /* @__PURE__ */ new Map();
343
+ },
344
+ { deep: !0 }
345
+ ), _e(
346
+ [() => Me.value.width, () => Me.value.height],
347
+ () => {
348
+ W.value = /* @__PURE__ */ new Map();
349
+ }
350
+ );
351
+ function ro(e) {
352
+ Array.isArray(e) && e.forEach((l, o) => {
353
+ l.id || (l.id = ut());
354
+ let a = Ye(l.color) || so.value.get(l.id) || qe.value[o] || j[o] || j[o % j.length];
355
+ a = Ye(a), so.value.set(l.id, a), l.color = a, uo(l, a);
356
+ });
357
+ }
358
+ function uo(e, l) {
359
+ Array.isArray(e.children) && e.children.forEach((o) => {
360
+ o.id || (o.id = ut()), o.parentId = e.id, o.color = l, uo(o, l);
361
+ });
362
+ }
363
+ function Yo() {
364
+ if (!B.value.length)
365
+ Ae.value = z.value.slice();
366
+ else {
367
+ const e = B.value[B.value.length - 1], l = q(e);
368
+ Ae.value = l?.children?.slice() || [];
369
+ }
370
+ }
371
+ _e(
372
+ () => bt.value,
373
+ () => {
374
+ z.value = bt.value, ro(z.value), Yo(), gt.value += 1, pt.value += 1;
375
+ },
376
+ { deep: !0, immediate: !0, flush: "post" }
377
+ );
378
+ const xe = me(null), Be = me(null);
379
+ xo(() => {
380
+ Qt.value = !0, qo();
381
+ });
382
+ const Xo = A(() => t.value.debug);
383
+ function qo() {
384
+ if (So(C.dataset) && Ol({
385
+ componentName: "VueUiTreemap",
386
+ type: "dataset",
387
+ debug: Xo.value
388
+ }), ro(z.value), So(C.dataset) || (Vo.value = t.value.loading), t.value.responsive) {
389
+ const e = El(() => {
390
+ const { width: l, height: o } = Ll({
391
+ chart: ae.value,
392
+ title: t.value.style.chart.title.text ? qt.value : null,
393
+ legend: t.value.style.chart.legend.show ? Gt.value : null,
394
+ source: Kt.value,
395
+ noTitle: Zt.value
396
+ });
397
+ requestAnimationFrame(() => {
398
+ Me.value.width = l, Me.value.height = o - 12;
399
+ });
400
+ });
401
+ xe.value && (Be.value && xe.value.unobserve(Be.value), xe.value.disconnect()), xe.value = new ResizeObserver(e), Be.value = ae.value.parentNode, xe.value.observe(Be.value);
402
+ }
403
+ }
404
+ Al(() => {
405
+ xe.value && (Be.value && xe.value.unobserve(Be.value), xe.value.disconnect());
406
+ });
407
+ const Ne = A(() => Ae.value.map((e, l) => ({
408
+ ...e,
409
+ color: Ye(e.color) || qe.value[l] || j[l] || j[l % j.length]
410
+ })).filter((e) => !V.value.includes(e.id))), De = A(() => z.value.filter((e) => !V.value.includes(e.id)).map((e) => e.value || 0).reduce((e, l) => e + l, 0)), At = A({
411
+ get() {
412
+ let e = [...Ne.value];
413
+ return t.value.style.chart.layout.sorted && (e = [...Ne.value].sort((l, o) => o.value - l.value)), e.map((l) => ({
414
+ ...l
415
+ }));
416
+ },
417
+ set(e) {
418
+ return e;
419
+ }
420
+ });
421
+ function io(e, l) {
422
+ return e.value / l;
423
+ }
424
+ function Go(e, l, o) {
425
+ const a = t.value.style.chart.layout.rects.colorRatio - io(l, o);
426
+ return ct(e, a < 0 ? 0 : a);
427
+ }
428
+ function co(e) {
429
+ return Array.isArray(e.children) && e.children.length > 0;
430
+ }
431
+ function Ko(e) {
432
+ return [...e].sort((l, o) => {
433
+ const a = co(l), n = co(o);
434
+ if (a !== n)
435
+ return a - n;
436
+ const u = Number(l.value) || 0;
437
+ return (Number(o.value) || 0) - u;
438
+ });
439
+ }
440
+ function vo(e, l, o, a, n) {
441
+ return Ko(e).map((s, i) => {
442
+ const c = Go(
443
+ Ye(l) || qe.value[i] || j[i] || j[i % j.length],
444
+ s,
445
+ a
446
+ ), h = io(s, a), S = n ?? s.parentId ?? s.id;
447
+ return {
448
+ ...s,
449
+ color: c,
450
+ proportion: h,
451
+ parentName: o,
452
+ rootId: S,
453
+ children: Array.isArray(s.children) && s.children.length ? vo(
454
+ s.children,
455
+ c,
456
+ s.name,
457
+ a,
458
+ S
459
+ ) : void 0
460
+ };
461
+ });
462
+ }
463
+ const ho = A(() => {
464
+ const e = At.value.map((n) => Number(n.value) || 0).reduce((n, u) => n + u, 0) || 1, l = At.value.map((n) => {
465
+ const u = n.children ? n.children.reduce((s, i) => s + (Number(i.value) || 0), 0) : n.value;
466
+ return {
467
+ value: n.value,
468
+ id: n.id || ut(),
469
+ proportion: (Number(n.value) || 0) / e,
470
+ children: n.children ? vo(
471
+ n.children,
472
+ n.color,
473
+ n.name,
474
+ u || 1
475
+ ) : void 0,
476
+ color: n.color,
477
+ name: n.name
478
+ };
479
+ });
480
+ if (B.value.length === 0) {
481
+ if (!Re.value) {
482
+ const i = { x0: 0, y0: 0, x1: 1, y1: 1 };
483
+ Re.value = Bo(l, i);
484
+ }
485
+ const n = {
486
+ x0: E.value.left,
487
+ y0: E.value.top,
488
+ x1: E.value.left + E.value.width,
489
+ y1: E.value.top + E.value.height
490
+ }, u = n.x1 - n.x0, s = n.y1 - n.y0;
491
+ return Re.value.map((i) => ({
492
+ ...i,
493
+ x0: n.x0 + i.x0 * u,
494
+ x1: n.x0 + i.x1 * u,
495
+ y0: n.y0 + i.y0 * s,
496
+ y1: n.y0 + i.y1 * s
497
+ }));
498
+ }
499
+ const a = {
500
+ x0: E.value.left,
501
+ y0: E.value.top,
502
+ x1: E.value.left + E.value.width,
503
+ y1: E.value.top + E.value.height
504
+ };
505
+ return Bo(l, a);
506
+ });
507
+ function Zo(e) {
508
+ const l = B.value.length ? B.value[B.value.length - 1] : null, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
509
+ for (const i of e) {
510
+ let c = tl(i.id);
511
+ if (l) {
512
+ const h = c.indexOf(l);
513
+ if (h >= 0)
514
+ c = c.slice(h);
515
+ else
516
+ continue;
517
+ }
518
+ c = c.filter((h) => {
519
+ const S = q(h);
520
+ return S && Array.isArray(S.children) && S.children.length;
521
+ }), c.length && (c.forEach((h, S) => {
522
+ const L = q(h);
523
+ if (!L) return;
524
+ let w = o.get(h);
525
+ w ? (w.x0 = Math.min(w.x0, i.x0), w.y0 = Math.min(w.y0, i.y0), w.x1 = Math.max(w.x1, i.x1), w.y1 = Math.max(w.y1, i.y1), w.depth = Math.min(w.depth, S)) : (w = {
526
+ id: h,
527
+ name: L.name,
528
+ value: L.value,
529
+ color: L.color,
530
+ x0: i.x0,
531
+ y0: i.y0,
532
+ x1: i.x1,
533
+ y1: i.y1,
534
+ depth: S
535
+ // depth from visible root
536
+ }, o.set(h, w));
537
+ let H = n.get(h);
538
+ H || (H = /* @__PURE__ */ new Set(), n.set(h, H)), H.add(i.id);
539
+ const Q = u.get(h);
540
+ (Q == null || S < Q) && u.set(h, S);
541
+ }), a.set(i.id, c));
542
+ }
543
+ return {
544
+ wrappers: Array.from(o.values()).map((i) => ({
545
+ ...i,
546
+ depth: u.get(i.id) ?? i.depth ?? 0,
547
+ childrenIds: Array.from(n.get(i.id) || [])
548
+ })),
549
+ ancestorsByLeaf: a
550
+ };
551
+ }
552
+ const xt = A(() => Zo(ho.value)), Jo = A(() => {
553
+ const e = xt.value.wrappers;
554
+ return e.length ? e.filter((l) => Qo(l)) : [];
555
+ });
556
+ function $t(e) {
557
+ return he(e) * 1.2;
558
+ }
559
+ function Qo(e) {
560
+ const l = $t(e);
561
+ return ne(e) < l * 1.1 ? !1 : (e.labelY0 = e.y0, !0);
562
+ }
563
+ const ze = A(() => el({
564
+ rects: ho.value,
565
+ wrappers: xt.value.wrappers,
566
+ ancestorsByLeaf: xt.value.ancestorsByLeaf
567
+ }));
568
+ function el({ rects: e, wrappers: l, ancestorsByLeaf: o }) {
569
+ if (!l.length || !o) return e;
570
+ const a = new Map(l.map((n) => [n.id, n]));
571
+ return e.map((n) => {
572
+ const u = o.get(n.id);
573
+ if (!u || !u.length) return n;
574
+ let s = { ...n };
575
+ for (const i of u) {
576
+ const c = a.get(i);
577
+ if (!c) continue;
578
+ const h = ne(c), S = $t(c);
579
+ if (h < S * 1.1) continue;
580
+ const L = he(c), w = L * 1.2, H = L * 0.5, Q = L * 0.5, Ie = w * 0.5, Ve = se(c) / 3, We = Math.min(H, Ve), $e = h * 0.25, _t = Math.min(Q, $e), Dt = (typeof c.labelY0 == "number" ? c.labelY0 : c.y0) + S, re = Math.max(s.x0, c.x0 + We), ge = Math.min(s.x1, c.x1 - We), ye = Math.max(s.y0, Dt + Ie), Et = Math.min(s.y1, c.y1 - _t);
581
+ if (ge <= re || Et <= ye)
582
+ break;
583
+ s = {
584
+ ...s,
585
+ x0: re,
586
+ y0: ye,
587
+ x1: ge,
588
+ y1: Et
589
+ };
590
+ }
591
+ return s;
592
+ });
593
+ }
594
+ function ne({ y0: e, y1: l }) {
595
+ return l - e <= 0 ? 1e-4 : l - e;
596
+ }
597
+ function se({ x0: e, x1: l }) {
598
+ return l - e <= 0 ? 1e-4 : l - e;
599
+ }
600
+ function he(e) {
601
+ const l = t.value.style.chart.layout.labels, o = l.fontSize, a = l.minFontSize, n = l.fontSize * 2, u = 0.5, s = 0.6, i = 1, c = 0.9;
602
+ let h = e.proportion;
603
+ if (!(typeof h == "number" && isFinite(h))) {
604
+ const Q = Math.max(1e-6, se(e) * ne(e)), Ie = Math.max(1e-6, E.value.width * E.value.height);
605
+ h = Q / Ie;
606
+ }
607
+ const S = Math.pow(Math.min(1, Math.max(0, h)), u), L = s + (i - s) * S;
608
+ let w = o * L;
609
+ const H = Math.max(1e-4, Math.min(se(e), ne(e)));
610
+ return w = Math.min(w, H * c), w = Math.max(a, Math.min(n, w)), w;
611
+ }
612
+ function fo(e) {
613
+ Se.value = e, Xt.value += 1;
614
+ }
615
+ const Ee = A(() => ({
616
+ startX: 0,
617
+ startY: 0,
618
+ width: E.value.vbWidth,
619
+ height: E.value.vbHeight
620
+ }));
621
+ function q(e, l = z.value) {
622
+ for (const o of l) {
623
+ if (o.id === e)
624
+ return o;
625
+ if (o.children) {
626
+ const a = q(e, o.children);
627
+ if (a)
628
+ return a;
629
+ }
630
+ }
631
+ return null;
632
+ }
633
+ function tl(e) {
634
+ const l = [];
635
+ let o = q(e);
636
+ for (; o && o.parentId; ) {
637
+ const a = q(o.parentId);
638
+ if (!a) break;
639
+ l.unshift(a.id), o = a;
640
+ }
641
+ return l;
642
+ }
643
+ const Le = A(() => B.value.length > 0);
644
+ function Ge(e, l) {
645
+ if (!e) {
646
+ Ae.value = z.value.slice(), P("selectDatapoint", void 0), B.value = [];
647
+ return;
648
+ }
649
+ t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: e, seriesIndex: l });
650
+ const o = q(e.id);
651
+ if (o && o.children?.length)
652
+ B.value.push(o.id), Ae.value = o.children.slice(), P("selectDatapoint", e);
653
+ else if (e.parentId) {
654
+ B.value.push(e.parentId);
655
+ const a = q(e.parentId);
656
+ Ae.value = a.children.slice(), P("selectDatapoint", e);
657
+ } else if (B.value.length > 0) {
658
+ B.value.pop();
659
+ const a = B.value[B.value.length - 1];
660
+ if (a) {
661
+ const n = q(a);
662
+ Ae.value = n.children.slice();
663
+ } else
664
+ Ae.value = z.value.slice(), B.value = [], P("selectDatapoint", void 0);
665
+ }
666
+ }
667
+ function ol(e) {
668
+ return !!(q(e.id)?.children?.length || e.parentId);
669
+ }
670
+ const fe = A(() => {
671
+ const e = [
672
+ { id: null, label: "All" }
673
+ ];
674
+ if (B.value.length > 0) {
675
+ let l = q(B.value[B.value.length - 1]);
676
+ const o = [];
677
+ for (; l; )
678
+ o.unshift(l), l = l.parentId ? q(l.parentId) : null;
679
+ for (const a of o)
680
+ e.push({
681
+ id: a.id,
682
+ label: a.name,
683
+ node: a
684
+ });
685
+ }
686
+ return e;
687
+ }), G = me(null), Tt = A(() => z.value.map((e, l) => ({
688
+ ...e,
689
+ color: Ye(e.color) || qe.value[l] || j[l] || j[l % j.length],
690
+ shape: "square"
691
+ })).sort((e, l) => l.value - e.value).map((e, l) => {
692
+ const o = e.value / z.value.map((a) => a.value).reduce((a, n) => a + n, 0);
693
+ return {
694
+ ...e,
695
+ proportion: o,
696
+ opacity: V.value.includes(e.id) ? 0.5 : 1,
697
+ display: `${e.name}${t.value.style.chart.legend.showPercentage || t.value.style.chart.legend.showValue ? ": " : ""}${t.value.style.chart.legend.showValue ? it(
698
+ t.value.style.chart.layout.labels.formatter,
699
+ e.value,
700
+ Xe({
701
+ p: t.value.style.chart.layout.labels.prefix,
702
+ v: e.value,
703
+ s: t.value.style.chart.layout.labels.suffix,
704
+ r: t.value.style.chart.legend.roundingValue
705
+ }),
706
+ { datapoint: e }
707
+ ) : ""}${t.value.style.chart.legend.showPercentage ? V.value.includes(e.id) ? `${t.value.style.chart.legend.showValue ? " (" : ""}- %${t.value.style.chart.legend.showValue ? ")" : ""}` : `${t.value.style.chart.legend.showValue ? " (" : ""}${isNaN(e.value / De.value) ? "-" : (e.value / De.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)}%${t.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
708
+ };
709
+ })), ll = A(() => ({
710
+ cy: "treemap-div-legend",
711
+ backgroundColor: t.value.style.chart.legend.backgroundColor,
712
+ color: t.value.style.chart.legend.color,
713
+ fontSize: t.value.style.chart.legend.fontSize,
714
+ paddingBottom: 12,
715
+ fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
716
+ }));
717
+ function Ke(e) {
718
+ G.value = null, V.value.includes(e.id) ? V.value = V.value.filter((l) => l !== e.id) : V.value.length < C.dataset.length - 1 && V.value.push(e.id), P("selectLegend", At.value);
719
+ }
720
+ function po(e) {
721
+ if (!z.value.length)
722
+ return t.value.debug && console.warn("VueUiTreemap - There are no series to show."), null;
723
+ const l = z.value.find((o) => o.name === e);
724
+ return l || (t.value.debug && console.warn(`VueUiTreemap - Series name not found "${e}"`), null);
725
+ }
726
+ function al(e) {
727
+ const l = po(e);
728
+ l !== null && V.value.includes(l.id) && Ke({ id: l.id });
729
+ }
730
+ function nl(e) {
731
+ const l = po(e);
732
+ l !== null && (V.value.includes(l.id) || Ke({ id: l.id }));
733
+ }
734
+ function sl({ datapoint: e, seriesIndex: l }) {
735
+ G.value = null, ht.value = !1, t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: l });
736
+ }
737
+ const St = $(null);
738
+ function rl({ datapoint: e, seriesIndex: l }) {
739
+ t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: l }), G.value = e, St.value = { datapoint: e, seriesIndex: l, config: t.value, series: Ne.value };
740
+ const o = t.value.style.chart.tooltip.customFormat;
741
+ if (Fo(o) && Dl(() => o({
742
+ seriesIndex: l,
743
+ datapoint: e,
744
+ series: Ne.value,
745
+ config: t.value
746
+ })))
747
+ ft.value = o({
748
+ seriesIndex: l,
749
+ datapoint: e,
750
+ series: Ne.value,
751
+ config: t.value
752
+ });
753
+ else {
754
+ let a = "";
755
+ a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${e.color}"/></svg>`, a += `<b>${it(
756
+ t.value.style.chart.layout.labels.formatter,
757
+ e.value,
758
+ Xe({
759
+ p: t.value.style.chart.layout.labels.prefix,
760
+ v: e.value,
761
+ s: t.value.style.chart.layout.labels.suffix,
762
+ r: t.value.style.chart.tooltip.roundingValue
763
+ }),
764
+ { datapoint: e, seriesIndex: l }
765
+ )}</b>`, ft.value = `<div>${a}</div>`;
766
+ }
767
+ ht.value = !0;
768
+ }
769
+ const pe = A(() => {
770
+ const e = ze.value.map((o) => ({
771
+ name: o.name,
772
+ color: o.color
773
+ })), l = ze.value.map((o) => o.value);
774
+ return { head: e, body: l };
775
+ });
776
+ function Ft(e = null) {
777
+ Tl(() => {
778
+ const l = pe.value.head.map((n, u) => [[
779
+ n.name
780
+ ], [pe.value.body[u]], [isNaN(pe.value.body[u] / De.value) ? "-" : pe.value.body[u] / De.value * 100]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), a = _l(o);
781
+ e ? e(a) : Bl({ csvContent: a, title: t.value.style.chart.title.text || "vue-ui-treemap" });
782
+ });
783
+ }
784
+ const Ze = A(() => {
785
+ const e = [
786
+ t.value.table.columnNames.series,
787
+ t.value.table.columnNames.value,
788
+ t.value.table.columnNames.percentage
789
+ ], l = pe.value.head.map((n, u) => {
790
+ const s = it(
791
+ t.value.style.chart.layout.labels.formatter,
792
+ pe.value.body[u],
793
+ Xe({
794
+ p: t.value.style.chart.layout.labels.prefix,
795
+ v: pe.value.body[u],
796
+ s: t.value.style.chart.layout.labels.suffix,
797
+ r: t.value.table.td.roundingValue
798
+ })
799
+ );
800
+ return [
801
+ {
802
+ color: n.color,
803
+ name: n.name,
804
+ shape: "square"
805
+ },
806
+ s,
807
+ isNaN(pe.value.body[u] / De.value) ? "-" : Xe({
808
+ v: pe.value.body[u] / De.value * 100,
809
+ s: "%",
810
+ r: t.value.table.td.roundingPercentage
811
+ })
812
+ ];
813
+ }), o = {
814
+ th: {
815
+ backgroundColor: t.value.table.th.backgroundColor,
816
+ color: t.value.table.th.color,
817
+ outline: t.value.table.th.outline
818
+ },
819
+ td: {
820
+ backgroundColor: t.value.table.td.backgroundColor,
821
+ color: t.value.table.td.color,
822
+ outline: t.value.table.td.outline
823
+ },
824
+ breakpoint: t.value.table.responsiveBreakpoint
825
+ };
826
+ return {
827
+ colNames: [
828
+ t.value.table.columnNames.series,
829
+ t.value.table.columnNames.value
830
+ ],
831
+ head: e,
832
+ body: l,
833
+ config: o
834
+ };
835
+ });
836
+ function ul() {
837
+ return ze.value;
838
+ }
839
+ function go() {
840
+ X.value.showTable = !X.value.showTable;
841
+ }
842
+ function yo() {
843
+ X.value.showTooltip = !X.value.showTooltip;
844
+ }
845
+ const Je = $(!1);
846
+ function Mt() {
847
+ Je.value = !Je.value;
848
+ }
849
+ const Qe = $(null);
850
+ function mo(e) {
851
+ Qe.value = e;
852
+ }
853
+ function bo() {
854
+ Qe.value = null;
855
+ }
856
+ async function il({ scale: e = 2 } = {}) {
857
+ if (!ae.value) return;
858
+ const { width: l, height: o } = ae.value.getBoundingClientRect(), a = l / o, { imageUri: n, base64: u } = await Wl({ domElement: ae.value, base64: !0, img: !0, scale: e });
859
+ return {
860
+ imageUri: n,
861
+ base64: u,
862
+ title: t.value.style.chart.title.text,
863
+ width: l,
864
+ height: o,
865
+ aspectRatio: a
866
+ };
867
+ }
868
+ const He = A(() => {
869
+ const e = t.value.table.useDialog && !t.value.table.show, l = X.value.showTable;
870
+ return {
871
+ component: e ? Ce : b,
872
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
873
+ props: e ? {
874
+ backgroundColor: t.value.table.th.backgroundColor,
875
+ color: t.value.table.th.color,
876
+ headerColor: t.value.table.th.color,
877
+ headerBg: t.value.table.th.backgroundColor,
878
+ isFullscreen: Se.value,
879
+ fullscreenParent: ae.value,
880
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
881
+ } : {
882
+ hideDetails: !0,
883
+ config: {
884
+ open: l,
885
+ maxHeight: 1e4,
886
+ body: {
887
+ backgroundColor: t.value.style.chart.backgroundColor,
888
+ color: t.value.style.chart.color
889
+ },
890
+ head: {
891
+ backgroundColor: t.value.style.chart.backgroundColor,
892
+ color: t.value.style.chart.color
893
+ }
894
+ }
895
+ }
896
+ };
897
+ });
898
+ _e(() => X.value.showTable, (e) => {
899
+ t.value.table.show || (e && t.value.table.useDialog && Pe.value ? Pe.value.open() : "close" in Pe.value && Pe.value.close());
900
+ });
901
+ function Co() {
902
+ X.value.showTable = !1, mt.value && mt.value.setTableIconState(!1);
903
+ }
904
+ const cl = A(() => Tt.value.map((e) => ({
905
+ ...e,
906
+ name: e.display
907
+ }))), dl = A(() => t.value.style.chart.backgroundColor), vl = A(() => t.value.style.chart.legend), hl = A(() => t.value.style.chart.title), { exportSvg: fl, getSvg: pl } = Yl({
908
+ svg: kt,
909
+ title: hl,
910
+ legend: vl,
911
+ legendItems: cl,
912
+ backgroundColor: dl
913
+ });
914
+ async function ko({ isCb: e }) {
915
+ if (e) {
916
+ const { blob: l, url: o, text: a, dataUrl: n } = await pl();
917
+ t.value.userOptions.callbacks.svg({ blob: l, url: o, text: a, dataUrl: n });
918
+ } else
919
+ fl();
920
+ }
921
+ function gl(e) {
922
+ const o = he(e) * 0.6;
923
+ return Math.max(0, se(e) - 2 * o);
924
+ }
925
+ function wo({ rect: e, seriesIndex: l, isTitle: o = !1 }) {
926
+ const a = t.value.style.chart.layout.labels.name.show, n = t.value.style.chart.layout.labels.value.show;
927
+ if (!a && !n) return "";
928
+ const u = B.value.length === 0, s = u ? `${e.id}:${o ? "title" : "rect"}` : null;
929
+ if (u && W.value.has(s))
930
+ return W.value.get(s);
931
+ const i = Math.max(2, he(e) / 3), c = Math.max(8, he(e)), h = c * 1.2, S = Math.max(0, se(e) - i * 2), L = Math.max(0, ne(e) - i * 2);
932
+ if (S <= 2 || L <= c * 0.8)
933
+ return u && s && W.value.set(s, ""), "";
934
+ const w = t.value.style.fontFamily, H = t.value.style.chart.layout.labels.name.bold ? "600" : "400", Q = t.value.style.chart.layout.labels.value.bold ? "600" : "400", Ie = o ? t.value.style.chart.layout.rects.group.label.adaptColorToBackground ? t.value.style.chart.layout.rects.group.useSeriesBackgroundColor ? dt(ct(e.color, 0.4)) : dt(t.value.style.chart.backgroundColor) : t.value.style.chart.layout.rects.group.label.color : dt(e.color), Ot = a ? String(e.name ?? "") : "", Ve = n ? it(
935
+ t.value.style.chart.layout.labels.formatter,
936
+ e.value,
937
+ Xe({
938
+ p: t.value.style.chart.layout.labels.prefix,
939
+ v: e.value,
940
+ s: t.value.style.chart.layout.labels.suffix,
941
+ r: t.value.style.chart.layout.labels.rounding
942
+ }),
943
+ { datapoint: e, seriesIndex: l }
944
+ ) : "", We = o ? gl(e) : S;
945
+ function $e(D, ee = c, Ue = "400") {
946
+ const K = document.createElementNS(Wt, "svg");
947
+ K.setAttribute("width", "0"), K.setAttribute("height", "0"), K.style.position = "absolute", K.style.visibility = "hidden", K.style.pointerEvents = "none";
948
+ const te = document.createElementNS(Wt, "text");
949
+ te.setAttribute("font-size", String(ee)), te.setAttribute("font-family", w), te.setAttribute("font-weight", String(Ue)), te.textContent = D || "", K.appendChild(te), document.body.appendChild(K);
950
+ const et = te.getComputedTextLength();
951
+ return document.body.removeChild(K), et;
952
+ }
953
+ if (o) {
954
+ let D = "";
955
+ if (a && (D = Ot), n && (D = D ? `${D} (${Ve})` : Ve), !D)
956
+ return u && s && W.value.set(s, ""), "";
957
+ let ee = D;
958
+ if ($e(ee, c, H) > We) {
959
+ let N = ee;
960
+ for (; N.length && $e(N + "…", c, H) > We; )
961
+ N = N.slice(0, -1);
962
+ ee = N ? N + "…" : "";
963
+ }
964
+ if (!ee)
965
+ return u && s && W.value.set(s, ""), "";
966
+ const Ue = $t(e), K = typeof e.depth == "number" ? e.depth : 0, te = Ue * 1.4, et = typeof e.labelY0 == "number" ? e.labelY0 : e.y0 + K * te, Pt = e.x0 + i + c / 2, R = et + i + c, oe = `<text
967
+ x="${Pt}"
968
+ y="${R}"
969
+ font-size="${c}"
970
+ font-family="${vt(w)}"
971
+ font-weight="${H}"
972
+ fill="${vt(Ie)}"
973
+ paint-order="stroke"
974
+ stroke="transparent"
975
+ stroke-width="0"
976
+ style="transition: all 0.2s ease-in-out;"
977
+ >
978
+ ${Ut(ee)}
979
+ </text>`;
980
+ return u && s && W.value.set(s, oe), oe;
981
+ }
982
+ const _t = n ? 1 : 0, Bt = Math.max(0, Math.floor(L / h) - _t);
983
+ if (Bt <= 0 && !n)
984
+ return u && s && W.value.set(s, ""), "";
985
+ function Dt(D, ee, Ue, K, te, et) {
986
+ const Pt = String(D).split(/\s+/).filter(Boolean), R = [];
987
+ let oe = "";
988
+ function N(_) {
989
+ return $e(_, Ue, K) <= ee;
990
+ }
991
+ function bl(_) {
992
+ if (N(_)) return [_];
993
+ const ue = [];
994
+ let O = 0;
995
+ for (; O < _.length; ) {
996
+ let ie = 1, Nt = _.length - O, zt = 1;
997
+ for (; ie <= Nt; ) {
998
+ const ot = ie + Nt >> 1, Cl = _.slice(O, O + ot);
999
+ N(Cl) ? (zt = ot, ie = ot + 1) : Nt = ot - 1;
1000
+ }
1001
+ ue.push(_.slice(O, O + zt)), O += zt;
1002
+ }
1003
+ return ue;
1004
+ }
1005
+ const tt = Pt.flatMap((_) => bl(_));
1006
+ let Rt = !1;
1007
+ for (let _ = 0; _ < tt.length; _ += 1) {
1008
+ const ue = tt[_], O = oe ? oe + " " + ue : ue;
1009
+ if (N(O))
1010
+ oe = O;
1011
+ else {
1012
+ if (oe)
1013
+ R.push(oe);
1014
+ else {
1015
+ let ie = ue;
1016
+ for (; ie.length && !N(ie); ) ie = ie.slice(0, -1);
1017
+ ie && R.push(ie);
1018
+ }
1019
+ if (oe = "", R.length === te) {
1020
+ Rt = !0;
1021
+ break;
1022
+ }
1023
+ }
1024
+ _ === tt.length - 1 && oe && R.length < te && R.push(oe);
1025
+ }
1026
+ if (R.length && R.join(" ") !== tt.join(" ") && (Rt = !0), Rt && R.length > 0) {
1027
+ let _ = R[R.length - 1];
1028
+ if (!N(_)) {
1029
+ let O = _;
1030
+ for (; O.length && !N(O); ) O = O.slice(0, -1);
1031
+ _ = O;
1032
+ }
1033
+ let ue = _ + "…";
1034
+ if (!N(ue)) {
1035
+ let O = _;
1036
+ for (; O.length && !N(O + "…"); )
1037
+ O = O.slice(0, -1);
1038
+ ue = O + "…";
1039
+ }
1040
+ R[R.length - 1] = ue;
1041
+ }
1042
+ return R;
1043
+ }
1044
+ const re = a ? Dt(
1045
+ Ot,
1046
+ S,
1047
+ c,
1048
+ H,
1049
+ Bt
1050
+ ) : [];
1051
+ let ge = c, ye = String(Ve);
1052
+ if (n) {
1053
+ for (; $e(ye, ge, Q) > S && ge > Math.max(8, c * 0.75); )
1054
+ ge -= 1;
1055
+ if ($e(ye, ge, Q) > S) {
1056
+ let D = ye;
1057
+ for (; D.length && $e(D + "…", ge, Q) > S; )
1058
+ D = D.slice(0, -1);
1059
+ if (ye = D ? D + "…" : "", !ye.length)
1060
+ return u && s && W.value.set(s, ""), "";
1061
+ }
1062
+ }
1063
+ if (re.length * h + (n ? h : 0) > L) {
1064
+ for (; re.length && re.length * h + (n ? h : 0) > L; )
1065
+ re.pop();
1066
+ if (!re.length && (!n || h > L))
1067
+ return u && s && W.value.set(s, ""), "";
1068
+ }
1069
+ const Lt = e.x0 + i, ml = e.y0 + i + c, It = [];
1070
+ a && re.forEach((D, ee) => {
1071
+ It.push(`
1072
+ <tspan
1073
+ x="${Lt}"
1074
+ dy="${ee === 0 ? 0 : h}"
1075
+ font-weight="${H}"
1076
+ >
1077
+ ${Ut(D)}
1078
+ </tspan>`);
1079
+ }), n && It.push(`
1080
+ <tspan
1081
+ x="${Lt}"
1082
+ dy="${re.length ? h : 0}"
1083
+ font-weight="${Q}"
1084
+ font-size="${ge}"
1085
+ >
1086
+ ${Ut(ye)}
1087
+ </tspan>`);
1088
+ const Ao = `<text
1089
+ x="${Lt}"
1090
+ y="${ml}"
1091
+ font-size="${c}"
1092
+ font-family="${vt(w)}"
1093
+ fill="${vt(Ie)}"
1094
+ paint-order="stroke"
1095
+ stroke="transparent"
1096
+ stroke-width="0"
1097
+ style="transition: all 0.2s ease-in-out;"
1098
+ >
1099
+ ${It.join("")}
1100
+ </text>`;
1101
+ return u && s && W.value.set(s, Ao), Ao;
1102
+ }
1103
+ function yl(e) {
1104
+ const l = t.value.style.chart.layout.rects.borderRadius, o = se(e), a = ne(e);
1105
+ return Math.min(l, Math.min(o, a) / 6);
1106
+ }
1107
+ return p({
1108
+ getData: ul,
1109
+ getImage: il,
1110
+ generateCsv: Ft,
1111
+ generateImage: no,
1112
+ generateSvg: ko,
1113
+ generatePdf: ao,
1114
+ hideSeries: nl,
1115
+ showSeries: al,
1116
+ toggleTable: go,
1117
+ toggleTooltip: yo,
1118
+ toggleAnnotator: Mt,
1119
+ toggleFullscreen: fo
1120
+ }), (e, l) => (f(), T("div", {
1121
+ ref_key: "treemapChart",
1122
+ ref: ae,
1123
+ class: Ht(`vue-data-ui-component vue-ui-treemap ${Se.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1124
+ style: be(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive ? "height: 100%;" : ""} text-align:center;background:${t.value.style.chart.backgroundColor}`),
1125
+ id: `treemap_${we.value}`,
1126
+ onMouseenter: l[2] || (l[2] = () => m(eo)(!0)),
1127
+ onMouseleave: l[3] || (l[3] = () => m(eo)(!1))
1128
+ }, [
1129
+ t.value.userOptions.buttons.annotator ? (f(), Te(m(v), {
1130
+ key: 0,
1131
+ svgRef: m(kt),
1132
+ backgroundColor: t.value.style.chart.backgroundColor,
1133
+ color: t.value.style.chart.color,
1134
+ active: Je.value,
1135
+ onClose: Mt
1136
+ }, {
1137
+ "annotator-action-close": F(() => [
1138
+ x(e.$slots, "annotator-action-close", {}, void 0, !0)
1139
+ ]),
1140
+ "annotator-action-color": F(({ color: o }) => [
1141
+ x(e.$slots, "annotator-action-color", Z(J({ color: o })), void 0, !0)
1142
+ ]),
1143
+ "annotator-action-draw": F(({ mode: o }) => [
1144
+ x(e.$slots, "annotator-action-draw", Z(J({ mode: o })), void 0, !0)
1145
+ ]),
1146
+ "annotator-action-undo": F(({ disabled: o }) => [
1147
+ x(e.$slots, "annotator-action-undo", Z(J({ disabled: o })), void 0, !0)
1148
+ ]),
1149
+ "annotator-action-redo": F(({ disabled: o }) => [
1150
+ x(e.$slots, "annotator-action-redo", Z(J({ disabled: o })), void 0, !0)
1151
+ ]),
1152
+ "annotator-action-delete": F(({ disabled: o }) => [
1153
+ x(e.$slots, "annotator-action-delete", Z(J({ disabled: o })), void 0, !0)
1154
+ ]),
1155
+ _: 3
1156
+ }, 8, ["svgRef", "backgroundColor", "color", "active"])) : I("", !0),
1157
+ Wo.value ? (f(), T("div", {
1158
+ key: 1,
1159
+ ref_key: "noTitle",
1160
+ ref: Zt,
1161
+ class: "vue-data-ui-no-title-space",
1162
+ style: "height:36px; width: 100%;background:transparent"
1163
+ }, null, 512)) : I("", !0),
1164
+ t.value.style.chart.title.text ? (f(), T("div", {
1165
+ key: 2,
1166
+ ref_key: "chartTitle",
1167
+ ref: qt,
1168
+ style: be(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)
1169
+ }, [
1170
+ (f(), Te(Ul, {
1171
+ key: `title_${Jt.value}`,
1172
+ config: {
1173
+ title: {
1174
+ cy: "treemap-div-title",
1175
+ ...t.value.style.chart.title
1176
+ },
1177
+ subtitle: {
1178
+ cy: "treemap-div-subtitle",
1179
+ ...t.value.style.chart.title.subtitle
1180
+ }
1181
+ }
1182
+ }, null, 8, ["config"]))
1183
+ ], 4)) : I("", !0),
1184
+ U("div", {
1185
+ id: `legend-top-${we.value}`
1186
+ }, null, 8, oa),
1187
+ t.value.userOptions.show && ke.value && (m(to) || m(Ct)) ? (f(), Te(m(M), {
1188
+ ref_key: "userOptionsRef",
1189
+ ref: mt,
1190
+ key: `user_option_${Xt.value}`,
1191
+ backgroundColor: t.value.style.chart.backgroundColor,
1192
+ color: t.value.style.chart.color,
1193
+ isPrinting: m(oo),
1194
+ isImaging: m(lo),
1195
+ uid: we.value,
1196
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
1197
+ hasPdf: t.value.userOptions.buttons.pdf,
1198
+ hasXls: t.value.userOptions.buttons.csv,
1199
+ hasImg: t.value.userOptions.buttons.img,
1200
+ hasSvg: t.value.userOptions.buttons.svg,
1201
+ hasTable: t.value.userOptions.buttons.table,
1202
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
1203
+ isFullscreen: Se.value,
1204
+ isTooltip: X.value.showTooltip,
1205
+ titles: { ...t.value.userOptions.buttonTitles },
1206
+ chartElement: ae.value,
1207
+ position: t.value.userOptions.position,
1208
+ hasAnnotator: t.value.userOptions.buttons.annotator,
1209
+ isAnnotation: Je.value,
1210
+ callbacks: t.value.userOptions.callbacks,
1211
+ printScale: t.value.userOptions.print.scale,
1212
+ tableDialog: t.value.table.useDialog,
1213
+ onToggleFullscreen: fo,
1214
+ onGeneratePdf: m(ao),
1215
+ onGenerateCsv: Ft,
1216
+ onGenerateImage: m(no),
1217
+ onGenerateSvg: ko,
1218
+ onToggleTable: go,
1219
+ onToggleTooltip: yo,
1220
+ onToggleAnnotator: Mt,
1221
+ style: be({
1222
+ visibility: m(to) ? m(Ct) ? "visible" : "hidden" : "visible"
1223
+ })
1224
+ }, $o({ _: 2 }, [
1225
+ e.$slots.menuIcon ? {
1226
+ name: "menuIcon",
1227
+ fn: F(({ isOpen: o, color: a }) => [
1228
+ x(e.$slots, "menuIcon", Z(J({ isOpen: o, color: a })), void 0, !0)
1229
+ ]),
1230
+ key: "0"
1231
+ } : void 0,
1232
+ e.$slots.optionTooltip ? {
1233
+ name: "optionTooltip",
1234
+ fn: F(() => [
1235
+ x(e.$slots, "optionTooltip", {}, void 0, !0)
1236
+ ]),
1237
+ key: "1"
1238
+ } : void 0,
1239
+ e.$slots.optionPdf ? {
1240
+ name: "optionPdf",
1241
+ fn: F(() => [
1242
+ x(e.$slots, "optionPdf", {}, void 0, !0)
1243
+ ]),
1244
+ key: "2"
1245
+ } : void 0,
1246
+ e.$slots.optionCsv ? {
1247
+ name: "optionCsv",
1248
+ fn: F(() => [
1249
+ x(e.$slots, "optionCsv", {}, void 0, !0)
1250
+ ]),
1251
+ key: "3"
1252
+ } : void 0,
1253
+ e.$slots.optionImg ? {
1254
+ name: "optionImg",
1255
+ fn: F(() => [
1256
+ x(e.$slots, "optionImg", {}, void 0, !0)
1257
+ ]),
1258
+ key: "4"
1259
+ } : void 0,
1260
+ e.$slots.optionSvg ? {
1261
+ name: "optionSvg",
1262
+ fn: F(() => [
1263
+ x(e.$slots, "optionSvg", {}, void 0, !0)
1264
+ ]),
1265
+ key: "5"
1266
+ } : void 0,
1267
+ e.$slots.optionTable ? {
1268
+ name: "optionTable",
1269
+ fn: F(() => [
1270
+ x(e.$slots, "optionTable", {}, void 0, !0)
1271
+ ]),
1272
+ key: "6"
1273
+ } : void 0,
1274
+ e.$slots.optionFullscreen ? {
1275
+ name: "optionFullscreen",
1276
+ fn: F(({ toggleFullscreen: o, isFullscreen: a }) => [
1277
+ x(e.$slots, "optionFullscreen", Z(J({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
1278
+ ]),
1279
+ key: "7"
1280
+ } : void 0,
1281
+ e.$slots.optionAnnotator ? {
1282
+ name: "optionAnnotator",
1283
+ fn: F(({ toggleAnnotator: o, isAnnotator: a }) => [
1284
+ x(e.$slots, "optionAnnotator", Z(J({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
1285
+ ]),
1286
+ key: "8"
1287
+ } : void 0
1288
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : I("", !0),
1289
+ fe.value.length > 1 ? (f(), T("nav", {
1290
+ key: 4,
1291
+ class: "vue-ui-treemap-breadcrumbs",
1292
+ "data-dom-to-png-ignore": "",
1293
+ ref_key: "breadcrumbsNav",
1294
+ ref: yt
1295
+ }, [
1296
+ (f(!0), T(je, null, at(fe.value, (o, a) => (f(), T("span", {
1297
+ role: "button",
1298
+ tabindex: a < fe.value.length - 1 ? 0 : void 0,
1299
+ key: o.id || "root",
1300
+ onClick: (n) => a === fe.value.length - 1 ? () => {
1301
+ } : Ge(o.node),
1302
+ onKeydown: [
1303
+ To(Vt((n) => a === fe.value.length - 1 ? void 0 : Ge(o.node), ["prevent"]), ["enter"]),
1304
+ To(Vt((n) => a === fe.value.length - 1 ? void 0 : Ge(o.node), ["prevent"]), ["space"])
1305
+ ],
1306
+ class: "vue-ui-treemap-crumb",
1307
+ "data-last-crumb": a === fe.value.length - 1,
1308
+ style: be({
1309
+ color: t.value.style.chart.color
1310
+ }),
1311
+ onMouseenter: (n) => mo(a),
1312
+ onMouseleave: bo,
1313
+ onFocus: (n) => mo(a),
1314
+ onBlur: bo
1315
+ }, [
1316
+ U("span", aa, [
1317
+ U("span", na, [
1318
+ x(e.$slots, "breadcrumb-label", nt({ ref_for: !0 }, { crumb: o, isRoot: a === 0, isFocus: Qe.value === a }), () => [
1319
+ a === 0 ? (f(), T("div", sa, [
1320
+ lt(Mo, {
1321
+ name: Qe.value === 0 ? "homeFilled" : "home",
1322
+ stroke: t.value.style.chart.color
1323
+ }, null, 8, ["name", "stroke"])
1324
+ ])) : (f(), T(je, { key: 1 }, [
1325
+ st(rt(o.label), 1)
1326
+ ], 64))
1327
+ ], !0)
1328
+ ]),
1329
+ a < fe.value.length - 1 ? (f(), T("span", ra, [
1330
+ x(e.$slots, "breadcrumb-arrow", {}, () => [
1331
+ l[4] || (l[4] = st(" › ", -1))
1332
+ ], !0)
1333
+ ])) : I("", !0)
1334
+ ])
1335
+ ], 44, la))), 128))
1336
+ ], 512)) : I("", !0),
1337
+ (f(), T("svg", {
1338
+ ref_key: "svgRef",
1339
+ ref: kt,
1340
+ xmlns: m(Wt),
1341
+ class: Ht({ "vue-data-ui-fullscreen--on": Se.value, "vue-data-ui-fulscreen--off": !Se.value, "vue-data-ui-zoom-plus": !Le.value, "vue-data-ui-zoom-minus": Le.value, loading: m(Fe) }),
1342
+ viewBox: `${Ee.value.startX} ${Ee.value.startY} ${Ee.value.width <= 0 ? 10 : Ee.value.width} ${Ee.value.height <= 0 ? 10 : Ee.value.height}`,
1343
+ style: be(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)
1344
+ }, [
1345
+ lt(m(k)),
1346
+ (f(!0), T(je, null, at(ze.value, (o, a) => (f(), T("g", {
1347
+ key: `tgrad_${o.id}`
1348
+ }, [
1349
+ t.value.style.chart.layout.rects.gradient.show ? (f(), T("defs", ia, [
1350
+ U("radialGradient", {
1351
+ id: `tgrad_${o.id}`,
1352
+ gradientTransform: "translate(-1, -1.000001) scale(2, 2)"
1353
+ }, [
1354
+ U("stop", {
1355
+ offset: "18%",
1356
+ "stop-color": o.color
1357
+ }, null, 8, da),
1358
+ U("stop", {
1359
+ offset: "100%",
1360
+ "stop-color": m(ct)(o.color, t.value.style.chart.layout.rects.gradient.intensity / 100)
1361
+ }, null, 8, va)
1362
+ ], 8, ca)
1363
+ ])) : I("", !0)
1364
+ ]))), 128)),
1365
+ (f(!0), T(je, null, at(Jo.value, (o, a) => (f(), T("g", {
1366
+ key: `parent_${o.id}`,
1367
+ class: "vue-ui-treemap-parent-wrapper"
1368
+ }, [
1369
+ U("rect", {
1370
+ x: o.x0,
1371
+ y: o.y0,
1372
+ height: ne(o),
1373
+ width: se(o),
1374
+ fill: t.value.style.chart.layout.rects.group.useSeriesBackgroundColor ? m(ct)(o.color, t.value.style.chart.layout.rects.group.backgroundLighterRatio) : t.value.style.chart.backgroundColor,
1375
+ rx: 0,
1376
+ stroke: t.value.style.chart.layout.rects.group.stroke,
1377
+ "stroke-width": t.value.style.chart.layout.rects.group.strokeWidth,
1378
+ class: "vue-data-ui-cursor-default vue-ui-treemap-rect"
1379
+ }, null, 8, ha),
1380
+ e.$slots["group-label"] ? (f(), T("foreignObject", {
1381
+ key: 0,
1382
+ width: se(o),
1383
+ height: ne(o),
1384
+ x: o.x0,
1385
+ y: o.y0
1386
+ }, [
1387
+ x(e.$slots, "group-label", nt({ ref_for: !0 }, { group: o }), void 0, !0)
1388
+ ], 8, fa)) : !m(Fe) && t.value.style.chart.layout.labels.showDefaultLabels ? (f(), T("g", {
1389
+ key: 1,
1390
+ style: { "pointer-events": "none" },
1391
+ innerHTML: wo({ rect: o, seriesIndex: 0, isTitle: !0 }),
1392
+ class: "vue-data-ui-cursor-default"
1393
+ }, null, 8, pa)) : I("", !0)
1394
+ ]))), 128)),
1395
+ (f(!0), T(je, null, at(ze.value, (o, a) => (f(), T("g", {
1396
+ key: `k_${o.id}`
1397
+ }, [
1398
+ U("rect", {
1399
+ x: o.x0,
1400
+ y: o.y0,
1401
+ height: ne(o),
1402
+ width: se(o),
1403
+ fill: ve.value ? o.color : t.value.style.chart.layout.rects.gradient.show ? `url(#tgrad_${o.id})` : o.color,
1404
+ rx: yl(o),
1405
+ stroke: G.value && G.value.id === o.id ? t.value.style.chart.layout.rects.selected.stroke : t.value.style.chart.layout.rects.stroke,
1406
+ "stroke-width": G.value && G.value.id === o.id ? t.value.style.chart.layout.rects.selected.strokeWidth : t.value.style.chart.layout.rects.strokeWidth,
1407
+ onClick: Vt((n) => Ge(o, a), ["stop"]),
1408
+ onMouseenter: () => rl({
1409
+ datapoint: o,
1410
+ seriesIndex: a
1411
+ }),
1412
+ onMouseleave: (n) => sl({ datapoint: o, seriesIndex: a }),
1413
+ style: be(`opacity:${G.value ? G.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
1414
+ class: Ht([
1415
+ "vue-ui-treemap-rect",
1416
+ ol(o) ? "vue-data-ui-zoom-plus" : Le.value ? "vue-data-ui-zoom-minus" : ""
1417
+ ])
1418
+ }, null, 46, ga),
1419
+ !e.$slots.rect && !m(Fe) && t.value.style.chart.layout.labels.showDefaultLabels ? (f(), T("g", {
1420
+ key: 0,
1421
+ style: be(`pointer-events:none; opacity:${G.value ? G.value.id === o.id ? 1 : t.value.style.chart.layout.rects.selected.unselectedOpacity : 1}`),
1422
+ innerHTML: wo({ rect: o, seriesIndex: a })
1423
+ }, null, 12, ya)) : I("", !0),
1424
+ (f(), T("foreignObject", {
1425
+ x: o.x0,
1426
+ y: o.y0,
1427
+ height: ne(o),
1428
+ width: se(o),
1429
+ class: "vue-ui-treemap-cell-foreignObject"
1430
+ }, [
1431
+ U("div", {
1432
+ style: be({
1433
+ width: `calc(100% - ${he(o) / 1.5}px)`,
1434
+ height: `calc(100% - ${he(o) / 1.5}px)`,
1435
+ padding: `${he(o) / 3}px`
1436
+ }),
1437
+ class: "vue-ui-treemap-cell"
1438
+ }, [
1439
+ m(Fe) ? I("", !0) : x(e.$slots, "rect", nt({
1440
+ key: 0,
1441
+ ref_for: !0
1442
+ }, {
1443
+ rect: o,
1444
+ shouldShow: o.proportion > t.value.style.chart.layout.labels.hideUnderProportion || Le.value,
1445
+ fontSize: he(o),
1446
+ isZoom: Le.value,
1447
+ textColor: m(dt)(o.color)
1448
+ }), void 0, !0)
1449
+ ], 4)
1450
+ ], 8, ma))
1451
+ ]))), 128)),
1452
+ x(e.$slots, "svg", Z(J({ svg: E.value, isZoom: Le.value, rect: G.value, config: t.value })), void 0, !0)
1453
+ ], 14, ua)),
1454
+ e.$slots.watermark ? (f(), T("div", ba, [
1455
+ x(e.$slots, "watermark", Z(J({ isPrinting: m(oo) || m(lo) })), void 0, !0)
1456
+ ])) : I("", !0),
1457
+ U("div", {
1458
+ id: `legend-bottom-${we.value}`
1459
+ }, null, 8, Ca),
1460
+ Qt.value ? (f(), Te(xl, {
1461
+ key: 6,
1462
+ to: t.value.style.chart.legend.position === "top" ? `#legend-top-${we.value}` : `#legend-bottom-${we.value}`
1463
+ }, [
1464
+ U("div", {
1465
+ ref_key: "chartLegend",
1466
+ ref: Gt
1467
+ }, [
1468
+ t.value.style.chart.legend.show ? (f(), Te(jl, {
1469
+ key: `legend_${gt.value}`,
1470
+ legendSet: Tt.value,
1471
+ config: ll.value,
1472
+ id: `treemap_legend_${we.value}`,
1473
+ onClickMarker: l[0] || (l[0] = ({ legend: o }) => Ke(o))
1474
+ }, {
1475
+ item: F(({ legend: o, index: a }) => [
1476
+ m(Fe) ? I("", !0) : (f(), T("div", {
1477
+ key: 0,
1478
+ onClick: (n) => Ke(o),
1479
+ style: be(`opacity:${V.value.includes(o.id) ? 0.5 : 1}`)
1480
+ }, rt(o.display), 13, ka))
1481
+ ]),
1482
+ _: 1
1483
+ }, 8, ["legendSet", "config", "id"])) : x(e.$slots, "legend", {
1484
+ key: 1,
1485
+ legend: Tt.value
1486
+ }, void 0, !0)
1487
+ ], 512)
1488
+ ], 8, ["to"])) : I("", !0),
1489
+ e.$slots.source ? (f(), T("div", {
1490
+ key: 7,
1491
+ ref_key: "source",
1492
+ ref: Kt,
1493
+ dir: "auto"
1494
+ }, [
1495
+ x(e.$slots, "source", {}, void 0, !0)
1496
+ ], 512)) : I("", !0),
1497
+ lt(m(y), {
1498
+ show: X.value.showTooltip && ht.value,
1499
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
1500
+ color: t.value.style.chart.tooltip.color,
1501
+ fontSize: t.value.style.chart.tooltip.fontSize,
1502
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
1503
+ borderColor: t.value.style.chart.tooltip.borderColor,
1504
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
1505
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
1506
+ position: t.value.style.chart.tooltip.position,
1507
+ offsetY: t.value.style.chart.tooltip.offsetY,
1508
+ parent: ae.value,
1509
+ content: ft.value,
1510
+ isFullscreen: Se.value,
1511
+ isCustom: m(Fo)(t.value.style.chart.tooltip.customFormat),
1512
+ smooth: t.value.style.chart.tooltip.smooth,
1513
+ backdropFilter: t.value.style.chart.tooltip.backdropFilter,
1514
+ smoothForce: t.value.style.chart.tooltip.smoothForce,
1515
+ smoothSnapThreshold: t.value.style.chart.tooltip.smoothSnapThreshold
1516
+ }, {
1517
+ "tooltip-before": F(() => [
1518
+ x(e.$slots, "tooltip-before", Z(J({ ...St.value })), void 0, !0)
1519
+ ]),
1520
+ "tooltip-after": F(() => [
1521
+ x(e.$slots, "tooltip-after", Z(J({ ...St.value })), void 0, !0)
1522
+ ]),
1523
+ _: 3
1524
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1525
+ ke.value && t.value.userOptions.buttons.table ? (f(), Te($l(He.value.component), nt({ key: 8 }, He.value.props, {
1526
+ ref_key: "tableUnit",
1527
+ ref: Pe,
1528
+ onClose: Co
1529
+ }), $o({
1530
+ content: F(() => [
1531
+ (f(), Te(m(g), {
1532
+ key: `table_${pt.value}`,
1533
+ colNames: Ze.value.colNames,
1534
+ head: Ze.value.head,
1535
+ body: Ze.value.body,
1536
+ config: Ze.value.config,
1537
+ title: t.value.table.useDialog ? "" : He.value.title,
1538
+ withCloseButton: !t.value.table.useDialog,
1539
+ onClose: Co
1540
+ }, {
1541
+ th: F(({ th: o }) => [
1542
+ U("div", {
1543
+ innerHTML: o,
1544
+ style: { display: "flex", "align-items": "center" }
1545
+ }, null, 8, wa)
1546
+ ]),
1547
+ td: F(({ td: o }) => [
1548
+ st(rt(o.name || o), 1)
1549
+ ]),
1550
+ _: 1
1551
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1552
+ ]),
1553
+ _: 2
1554
+ }, [
1555
+ t.value.table.useDialog ? {
1556
+ name: "title",
1557
+ fn: F(() => [
1558
+ st(rt(He.value.title), 1)
1559
+ ]),
1560
+ key: "0"
1561
+ } : void 0,
1562
+ t.value.table.useDialog ? {
1563
+ name: "actions",
1564
+ fn: F(() => [
1565
+ U("button", {
1566
+ tabindex: "0",
1567
+ class: "vue-ui-user-options-button",
1568
+ onClick: l[1] || (l[1] = (o) => Ft(t.value.userOptions.callbacks.csv))
1569
+ }, [
1570
+ lt(Mo, {
1571
+ name: "excel",
1572
+ stroke: He.value.props.color
1573
+ }, null, 8, ["stroke"])
1574
+ ])
1575
+ ]),
1576
+ key: "1"
1577
+ } : void 0
1578
+ ]), 1040)) : I("", !0),
1579
+ m(Fe) ? (f(), Te(Rl, { key: 9 })) : I("", !0)
1580
+ ], 46, ta));
1581
+ }
1582
+ }, xa = /* @__PURE__ */ Xl(Aa, [["__scopeId", "data-v-176708ac"]]), Ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1583
+ __proto__: null,
1584
+ default: xa
1585
+ }, Symbol.toStringTag, { value: "Module" }));
1586
+ export {
1587
+ za as a,
1588
+ Ha as b,
1589
+ xa as v
1590
+ };