vue-data-ui 2.3.68 → 2.3.70

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 (143) hide show
  1. package/dist/{Arrow-C8pYyZqD.js → Arrow-Bog1nRXc.js} +1 -1
  2. package/dist/{Arrow-Dswup7Lq.cjs → Arrow-D4M9K4_y.cjs} +1 -1
  3. package/dist/{BaseIcon-Dz58O3w1.js → BaseIcon-D6HKiBWY.js} +1 -1
  4. package/dist/{BaseIcon-wCGYJ8GM.cjs → BaseIcon-DlKBf9ve.cjs} +1 -1
  5. package/dist/{DataTable-Dr67tL_4.cjs → DataTable-BTNru9rE.cjs} +1 -1
  6. package/dist/{DataTable-CzvZIRDs.js → DataTable-C3P8lB6X.js} +2 -2
  7. package/dist/{Legend-C2DZGZN5.js → Legend-Bvm45WSa.js} +1 -1
  8. package/dist/{Legend-CkIdFaKE.cjs → Legend-D_1fNWhT.cjs} +1 -1
  9. package/dist/{Shape-BfT5b6-S.cjs → Shape-BlFLyhaj.cjs} +1 -1
  10. package/dist/{Shape-qXMEmkXY.js → Shape-o5RyMUAR.js} +1 -1
  11. package/dist/{Slicer-CnIWgBPY.js → Slicer-C9gqz7Yw.js} +2 -2
  12. package/dist/{Slicer-3itdmkZf.cjs → Slicer-DfQWN_HX.cjs} +1 -1
  13. package/dist/{Title-BYDRRvqX.cjs → Title-96aF3-Z1.cjs} +1 -1
  14. package/dist/{Title-BxitYokc.js → Title-s23qMfox.js} +1 -1
  15. package/dist/{Tooltip-CtRqM9Sw.cjs → Tooltip-Bkzl1VQe.cjs} +1 -1
  16. package/dist/{Tooltip-DTntJRyb.js → Tooltip-DrhztkFj.js} +1 -1
  17. package/dist/{index-fMHmzYJu.js → index--JGgf0j_.js} +1 -1
  18. package/dist/{index-DnCegWge.cjs → index-CsqP5b4f.cjs} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-lzTC0cjC.js → useNestedProp-BMj7Pe83.js} +1 -1
  21. package/dist/{useNestedProp-18FTwhUW.cjs → useNestedProp-DQ2DOe-8.cjs} +1 -1
  22. package/dist/{usePrinter-C94KiYaY.cjs → usePrinter-CobCVhRp.cjs} +1 -1
  23. package/dist/{usePrinter-BEVwOH5x.js → usePrinter-DLzQ_BtZ.js} +1 -1
  24. package/dist/{vue-data-ui-CqFeVAMl.cjs → vue-data-ui-BGmGXTCr.cjs} +1 -1
  25. package/dist/{vue-data-ui-BG25mzqo.js → vue-data-ui-BKqUj7bC.js} +57 -57
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-DyVzM9lj.cjs → vue-ui-3d-bar-B2viWRX5.cjs} +1 -1
  29. package/dist/{vue-ui-3d-bar-D8WIzocy.js → vue-ui-3d-bar-CmnWR3OF.js} +7 -7
  30. package/dist/{vue-ui-accordion-CG_G9ock.cjs → vue-ui-accordion-C1ybaK7v.cjs} +1 -1
  31. package/dist/{vue-ui-accordion-CVzTuENA.js → vue-ui-accordion-CT0j1v1a.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-BZEiDo6X.js → vue-ui-age-pyramid-TTbeq_lD.js} +8 -8
  33. package/dist/{vue-ui-age-pyramid-DgAJ_4pC.cjs → vue-ui-age-pyramid-zVLLlC3O.cjs} +1 -1
  34. package/dist/{vue-ui-annotator-DYMGXQSF.js → vue-ui-annotator-BEXLuscT.js} +1 -1
  35. package/dist/{vue-ui-annotator-DwwLMn8x.cjs → vue-ui-annotator-DQ7pecaC.cjs} +1 -1
  36. package/dist/{vue-ui-candlestick-DMh_omoZ.cjs → vue-ui-candlestick-DRWZ8tzV.cjs} +1 -1
  37. package/dist/{vue-ui-candlestick-F7a1z8rF.js → vue-ui-candlestick-Dabz9ByY.js} +9 -9
  38. package/dist/{vue-ui-carousel-table-BAbXjbOY.js → vue-ui-carousel-table-IfBqfJXl.js} +4 -4
  39. package/dist/{vue-ui-carousel-table-BQZBWVfB.cjs → vue-ui-carousel-table-lPXwP4FD.cjs} +1 -1
  40. package/dist/{vue-ui-chestnut-bdGmk0m5.js → vue-ui-chestnut-DR8FQ_iP.js} +6 -6
  41. package/dist/{vue-ui-chestnut-DGUOcpUb.cjs → vue-ui-chestnut-UyMSd4I2.cjs} +1 -1
  42. package/dist/{vue-ui-cursor-_Hme39yS.js → vue-ui-cursor-B8BmRnMz.js} +2 -2
  43. package/dist/{vue-ui-cursor-zRPYiTzg.cjs → vue-ui-cursor-CqXcK21c.cjs} +1 -1
  44. package/dist/{vue-ui-dashboard-BxcYVoZr.cjs → vue-ui-dashboard-Ca7yuK9y.cjs} +1 -1
  45. package/dist/{vue-ui-dashboard-sMYoIdL3.js → vue-ui-dashboard-D88IiJ08.js} +2 -2
  46. package/dist/{vue-ui-digits-yn6cZZpI.js → vue-ui-digits-Bqvn_McM.js} +2 -2
  47. package/dist/{vue-ui-digits-Do-yAjSx.cjs → vue-ui-digits-uHan--u4.cjs} +1 -1
  48. package/dist/{vue-ui-donut-CZGAyjMJ.js → vue-ui-donut-CbO7lZOV.js} +9 -9
  49. package/dist/{vue-ui-donut-D8By144q.cjs → vue-ui-donut-CcAOPJ0r.cjs} +1 -1
  50. package/dist/{vue-ui-donut-evolution-euuIoSwG.js → vue-ui-donut-evolution-75NW6llE.js} +9 -9
  51. package/dist/{vue-ui-donut-evolution-wRc663rx.cjs → vue-ui-donut-evolution-BUrGAB3_.cjs} +1 -1
  52. package/dist/{vue-ui-dumbbell-GwPAVNAr.js → vue-ui-dumbbell-CdTSX6zx.js} +8 -8
  53. package/dist/{vue-ui-dumbbell-DzDU6BtH.cjs → vue-ui-dumbbell-Dw9PaP6W.cjs} +1 -1
  54. package/dist/{vue-ui-flow-2tDYyk_d.cjs → vue-ui-flow-BZANIyo0.cjs} +1 -1
  55. package/dist/{vue-ui-flow-D-2Yx4Pd.js → vue-ui-flow-j4-3z4Jh.js} +7 -7
  56. package/dist/{vue-ui-galaxy-k1zIeVWl.cjs → vue-ui-galaxy-BFRY_qH_.cjs} +1 -1
  57. package/dist/{vue-ui-galaxy-Cr1PHA7e.js → vue-ui-galaxy-Pvrqq4z8.js} +9 -9
  58. package/dist/{vue-ui-gauge-DyWEB9zv.cjs → vue-ui-gauge-BP7VlzCy.cjs} +1 -1
  59. package/dist/{vue-ui-gauge-DrG1p_lu.js → vue-ui-gauge-Y2d6m8F7.js} +5 -5
  60. package/dist/{vue-ui-gizmo-BUeQIgPm.js → vue-ui-gizmo-DPS6iKC7.js} +2 -2
  61. package/dist/{vue-ui-gizmo-Cf6DtKdF.cjs → vue-ui-gizmo-DtwUDdpP.cjs} +1 -1
  62. package/dist/{vue-ui-heatmap-1s92iamk.js → vue-ui-heatmap-BdpzP1si.js} +8 -8
  63. package/dist/{vue-ui-heatmap-B9gzhzl-.cjs → vue-ui-heatmap-zu_2wp75.cjs} +1 -1
  64. package/dist/{vue-ui-kpi-DXrL1517.js → vue-ui-kpi-D5EOkAjY.js} +3 -3
  65. package/dist/{vue-ui-kpi-Cocglkc1.cjs → vue-ui-kpi-irPEkSLW.cjs} +1 -1
  66. package/dist/{vue-ui-mini-loader-D1MAsGWr.js → vue-ui-mini-loader-BwdapIVe.js} +2 -2
  67. package/dist/{vue-ui-mini-loader-3ssTbcFo.cjs → vue-ui-mini-loader-Dj2j41sm.cjs} +1 -1
  68. package/dist/{vue-ui-molecule-DFD-6XKb.cjs → vue-ui-molecule-C6X_fMKH.cjs} +1 -1
  69. package/dist/{vue-ui-molecule-QWFA_72V.js → vue-ui-molecule-D2UUPg-q.js} +9 -9
  70. package/dist/{vue-ui-mood-radar-DBq_gQ0i.cjs → vue-ui-mood-radar-B8q5ERr1.cjs} +1 -1
  71. package/dist/{vue-ui-mood-radar-DXLP2L3n.js → vue-ui-mood-radar-Bu-AmoHP.js} +9 -9
  72. package/dist/{vue-ui-nested-donuts-Cx4Ia5Ga.cjs → vue-ui-nested-donuts-Bk7pladW.cjs} +1 -1
  73. package/dist/{vue-ui-nested-donuts-Cx57mbbY.js → vue-ui-nested-donuts-DYsHFFGT.js} +9 -9
  74. package/dist/vue-ui-onion-BtPeuhpF.cjs +5 -0
  75. package/dist/{vue-ui-onion-CE4wSxPC.js → vue-ui-onion-ro--Z0zB.js} +99 -95
  76. package/dist/{vue-ui-parallel-coordinate-plot-DVqDX4Xb.js → vue-ui-parallel-coordinate-plot-C4Vyxlwp.js} +10 -10
  77. package/dist/{vue-ui-parallel-coordinate-plot-D8LWLRdK.cjs → vue-ui-parallel-coordinate-plot-D9S1Kv00.cjs} +1 -1
  78. package/dist/{vue-ui-quadrant-XSVao9uA.js → vue-ui-quadrant-BsoH0jZo.js} +10 -10
  79. package/dist/{vue-ui-quadrant-BNyw9TMO.cjs → vue-ui-quadrant-Dvr2JM0s.cjs} +1 -1
  80. package/dist/{vue-ui-quick-chart-uwdSvb9u.cjs → vue-ui-quick-chart-C55tphTV.cjs} +1 -1
  81. package/dist/{vue-ui-quick-chart-Ik_UH2Wj.js → vue-ui-quick-chart-CzF7ozoK.js} +7 -7
  82. package/dist/{vue-ui-radar-B5aRCCKL.cjs → vue-ui-radar-CYIJyf1C.cjs} +1 -1
  83. package/dist/{vue-ui-radar-CR6ezAzt.js → vue-ui-radar-crl43r9e.js} +10 -10
  84. package/dist/{vue-ui-rating-CguNsO-T.cjs → vue-ui-rating-CJdyLYDT.cjs} +1 -1
  85. package/dist/{vue-ui-rating-CD_nWk1T.js → vue-ui-rating-DKZTsN_i.js} +2 -2
  86. package/dist/{vue-ui-relation-circle-DT2nom_x.js → vue-ui-relation-circle-ClR9UbUG.js} +5 -5
  87. package/dist/{vue-ui-relation-circle-8FZkM92K.cjs → vue-ui-relation-circle-xTvwoYbf.cjs} +1 -1
  88. package/dist/{vue-ui-rings-CNY7UKKQ.cjs → vue-ui-rings-BMsZFOKI.cjs} +1 -1
  89. package/dist/{vue-ui-rings-cpj5NfzL.js → vue-ui-rings-BfbNfcj0.js} +9 -9
  90. package/dist/{vue-ui-scatter-lt_SEmmy.cjs → vue-ui-scatter-CnjbVRdT.cjs} +1 -1
  91. package/dist/{vue-ui-scatter-Bar7v9mt.js → vue-ui-scatter-DrEDT3ts.js} +10 -10
  92. package/dist/{vue-ui-screenshot-DLqFrK48.js → vue-ui-screenshot-CR5PzE7H.js} +1 -1
  93. package/dist/{vue-ui-screenshot-DgPB2-6h.cjs → vue-ui-screenshot-jWM-jrvI.cjs} +1 -1
  94. package/dist/{vue-ui-skeleton-Cey15-vY.cjs → vue-ui-skeleton-BR5OmV8V.cjs} +1 -1
  95. package/dist/{vue-ui-skeleton-DiJmBrEY.js → vue-ui-skeleton-Dgvq-LKZ.js} +2 -2
  96. package/dist/{vue-ui-smiley-NcQqECQm.cjs → vue-ui-smiley-Bd79lUrX.cjs} +1 -1
  97. package/dist/{vue-ui-smiley-9d8vQDje.js → vue-ui-smiley-CDviAtqz.js} +2 -2
  98. package/dist/{vue-ui-spark-trend-RIw8O12_.js → vue-ui-spark-trend-B2F0rkq9.js} +4 -4
  99. package/dist/{vue-ui-spark-trend-gLgFrogO.cjs → vue-ui-spark-trend-DW2lDe5y.cjs} +1 -1
  100. package/dist/{vue-ui-sparkbar-BJZv7_r3.cjs → vue-ui-sparkbar-BkBDO4sR.cjs} +1 -1
  101. package/dist/{vue-ui-sparkbar-DpnX31Vt.js → vue-ui-sparkbar-CKcJgAar.js} +3 -3
  102. package/dist/{vue-ui-sparkgauge-2nfXMS4J.cjs → vue-ui-sparkgauge-Bb5kLYcu.cjs} +1 -1
  103. package/dist/{vue-ui-sparkgauge-Ci1EXG01.js → vue-ui-sparkgauge-DhYVUtMb.js} +3 -3
  104. package/dist/{vue-ui-sparkhistogram-o1cCgVjJ.js → vue-ui-sparkhistogram-CpeUlCj5.js} +4 -4
  105. package/dist/{vue-ui-sparkhistogram-B9Hzrj17.cjs → vue-ui-sparkhistogram-W1a3DiWf.cjs} +1 -1
  106. package/dist/{vue-ui-sparkline-Bpbwgdjl.cjs → vue-ui-sparkline-BtsssjV-.cjs} +1 -1
  107. package/dist/{vue-ui-sparkline-CTFZOTQ4.js → vue-ui-sparkline-CSJuC8Zx.js} +3 -3
  108. package/dist/{vue-ui-sparkstackbar-Dci-TIxt.js → vue-ui-sparkstackbar-CXpx5fpg.js} +3 -3
  109. package/dist/{vue-ui-sparkstackbar-D1a4pKvC.cjs → vue-ui-sparkstackbar-Xnsvvu3O.cjs} +1 -1
  110. package/dist/{vue-ui-stackbar-uyUtl8SO.cjs → vue-ui-stackbar-D-zlJHc0.cjs} +1 -1
  111. package/dist/{vue-ui-stackbar-DX86sbcN.js → vue-ui-stackbar-qlBdgGcF.js} +10 -10
  112. package/dist/{vue-ui-strip-plot-C2NjIy5-.cjs → vue-ui-strip-plot-ClCytS01.cjs} +1 -1
  113. package/dist/{vue-ui-strip-plot-Br3W0ejH.js → vue-ui-strip-plot-XvcigaUj.js} +9 -9
  114. package/dist/{vue-ui-table-BFs9-zs7.js → vue-ui-table-ClarkcMT.js} +1 -1
  115. package/dist/{vue-ui-table-Ctw9daYW.cjs → vue-ui-table-DThijTG7.cjs} +1 -1
  116. package/dist/{vue-ui-table-heatmap-DqoiRtjC.js → vue-ui-table-heatmap-BRJAh82a.js} +4 -4
  117. package/dist/{vue-ui-table-heatmap-zAbifnaM.cjs → vue-ui-table-heatmap-D2a2SQke.cjs} +1 -1
  118. package/dist/{vue-ui-table-sparkline-h4J419FI.js → vue-ui-table-sparkline-C-ib3Gw1.js} +5 -5
  119. package/dist/{vue-ui-table-sparkline-DuUY9yJu.cjs → vue-ui-table-sparkline-CerH_6Uy.cjs} +1 -1
  120. package/dist/{vue-ui-thermometer-D_4mS8Z8.js → vue-ui-thermometer-B4XtAoUv.js} +5 -5
  121. package/dist/{vue-ui-thermometer-Bt-SnP1Y.cjs → vue-ui-thermometer-B55takGw.cjs} +1 -1
  122. package/dist/{vue-ui-timer-CPZm7Dif.js → vue-ui-timer-BsEp04PS.js} +4 -4
  123. package/dist/{vue-ui-timer-CMsje-f2.cjs → vue-ui-timer-C_XNLsof.cjs} +1 -1
  124. package/dist/vue-ui-tiremarks-BJaxtZte.cjs +1 -0
  125. package/dist/{vue-ui-tiremarks-CVBbjezc.js → vue-ui-tiremarks-C9mto5xg.js} +94 -93
  126. package/dist/{vue-ui-treemap-CB1gz8gX.cjs → vue-ui-treemap-Bb8nVHbc.cjs} +1 -1
  127. package/dist/{vue-ui-treemap-1rEDHWrf.js → vue-ui-treemap-Cnub2STE.js} +9 -9
  128. package/dist/{vue-ui-vertical-bar-DHFaoQcu.cjs → vue-ui-vertical-bar-BJRXcwVc.cjs} +1 -1
  129. package/dist/{vue-ui-vertical-bar-CfGS6Snt.js → vue-ui-vertical-bar-uMAW4lYM.js} +9 -9
  130. package/dist/{vue-ui-waffle-COf_Yi5Y.cjs → vue-ui-waffle-CQRsRNOh.cjs} +1 -1
  131. package/dist/{vue-ui-waffle-D-niDah6.js → vue-ui-waffle-FODchV8Z.js} +9 -9
  132. package/dist/{vue-ui-wheel-BPcde5q6.js → vue-ui-wheel-DAHkOyha.js} +85 -84
  133. package/dist/vue-ui-wheel-eKe3KJ5v.cjs +1 -0
  134. package/dist/{vue-ui-word-cloud-C9Ok-uiw.js → vue-ui-word-cloud-CjVRqfF6.js} +7 -7
  135. package/dist/{vue-ui-word-cloud-CPb5G65W.cjs → vue-ui-word-cloud-D-805412.cjs} +1 -1
  136. package/dist/{vue-ui-xy-C9T7Qybt.cjs → vue-ui-xy-BeTe7akA.cjs} +1 -1
  137. package/dist/{vue-ui-xy-BjpH25yC.js → vue-ui-xy-DaGih5B-.js} +12 -12
  138. package/dist/{vue-ui-xy-canvas-DoDgOkMe.cjs → vue-ui-xy-canvas-DGr5c46-.cjs} +1 -1
  139. package/dist/{vue-ui-xy-canvas-JpE-OhiQ.js → vue-ui-xy-canvas-iu96oJOi.js} +10 -10
  140. package/package.json +1 -1
  141. package/dist/vue-ui-onion-CApJ-Npg.cjs +0 -1
  142. package/dist/vue-ui-tiremarks-Bcm8DSj6.cjs +0 -1
  143. package/dist/vue-ui-wheel-CKoly9Ay.cjs +0 -1
@@ -1,11 +1,11 @@
1
- import { computed as h, ref as k, watch as ee, onMounted as te, openBlock as s, createElementBlock as v, normalizeClass as O, normalizeStyle as S, createVNode as ae, createCommentVNode as _, createBlock as X, unref as d, createSlots as le, withCtx as A, renderSlot as w, normalizeProps as D, guardReactiveProps as M, Fragment as H, renderList as R, toDisplayString as re } from "vue";
2
- import { u as Y } from "./useNestedProp-lzTC0cjC.js";
3
- import { u as oe, c as se, t as ne, s as N, o as ue, e as ie, v as q, X as ce, i as ve, f as he } from "./index-fMHmzYJu.js";
4
- import { _ as de } from "./Title-BxitYokc.js";
5
- import { u as ge, U as ye } from "./usePrinter-BEVwOH5x.js";
6
- import me from "./vue-ui-skeleton-DiJmBrEY.js";
1
+ import { computed as v, ref as k, watch as Z, onMounted as ee, openBlock as u, createElementBlock as c, normalizeClass as O, normalizeStyle as S, createVNode as te, createCommentVNode as b, createBlock as T, unref as h, createSlots as ae, withCtx as A, renderSlot as w, normalizeProps as X, guardReactiveProps as D, Fragment as H, renderList as R, toDisplayString as le } from "vue";
2
+ import { u as Y } from "./useNestedProp-BMj7Pe83.js";
3
+ import { u as oe, c as se, t as re, s as ue, o as ne, e as ie, v as q, X as ce, i as ve, f as he } from "./index--JGgf0j_.js";
4
+ import { _ as de } from "./Title-s23qMfox.js";
5
+ import { u as me, U as ye } from "./usePrinter-DLzQ_BtZ.js";
6
+ import ge from "./vue-ui-skeleton-Dgvq-LKZ.js";
7
7
  import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "stroke-width", "stroke"], Ce = { key: 1 }, $e = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], xe = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], we = {
8
+ const pe = ["id"], ke = ["xmlns", "viewBox"], be = { key: 0 }, _e = ["d", "stroke-width", "stroke"], Ce = { key: 1 }, $e = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], xe = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], we = {
9
9
  key: 3,
10
10
  class: "vue-data-ui-watermark"
11
11
  }, Pe = {
@@ -25,37 +25,38 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
25
25
  }
26
26
  },
27
27
  setup(J, { expose: K }) {
28
- const u = J, { vue_ui_tiremarks: Q } = oe(), F = h(() => !!u.dataset && Object.keys(u.dataset).length), z = k(se()), G = k(null), L = k(0), e = h(() => {
28
+ const d = J, { vue_ui_tiremarks: Q } = oe(), F = v(() => !!d.dataset && Object.keys(d.dataset).length), z = k(se()), N = k(null), G = k(0), e = v(() => {
29
29
  const t = Y({
30
- userConfig: u.config,
30
+ userConfig: d.config,
31
31
  defaultConfig: Q
32
32
  });
33
33
  return t.theme ? {
34
34
  ...Y({
35
- userConfig: ne.vue_ui_tiremarks[t.theme] || u.config,
35
+ userConfig: re.vue_ui_tiremarks[t.theme] || d.config,
36
36
  defaultConfig: t
37
37
  })
38
38
  } : t;
39
- }), { isPrinting: U, isImaging: j, generatePdf: B, generateImage: E } = ge({
39
+ }), { isPrinting: L, isImaging: M, generatePdf: U, generateImage: j } = me({
40
40
  elementId: z.value,
41
41
  fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
42
- }), i = k(e.value.style.chart.animation.use ? 0 : N(u.dataset.percentage));
43
- ee(() => u.dataset.percentage, () => {
44
- i.value = e.value.style.chart.animation.use ? 0 : N(u.dataset.percentage), T();
45
- }), te(() => {
46
- ue(u.dataset) && ie({
42
+ }), s = k(e.value.style.chart.animation.use ? 0 : ue(d.dataset.percentage));
43
+ Z(() => d.dataset, (t) => {
44
+ e.value.style.chart.animation.use ? B(t.percentage) : s.value = t.percentage || 0;
45
+ }, { deep: !0 }), ee(() => {
46
+ ne(d.dataset) && ie({
47
47
  componentName: "VueUiTiremarks",
48
48
  type: "dataset"
49
- }), T();
49
+ }), B(d.dataset.percentage || 0);
50
50
  });
51
- function T() {
52
- let t = 0, n = e.value.style.chart.animation.speed, a = 5e-3 * e.value.style.chart.animation.acceleration;
53
- function r() {
54
- i.value += n + t, t += a, i.value < u.dataset.percentage ? requestAnimationFrame(r) : i.value = N(u.dataset.percentage);
51
+ function B(t) {
52
+ let n = e.value.style.chart.animation.speed;
53
+ const a = Math.abs(t - s.value) / (n * 120);
54
+ function o() {
55
+ s.value < t ? s.value = Math.min(s.value + a, t) : s.value > t && (s.value = Math.max(s.value - a, t)), s.value !== t && requestAnimationFrame(o);
55
56
  }
56
- e.value.style.chart.animation.use && (i.value = 0, r());
57
+ o();
57
58
  }
58
- const p = h(() => e.value.style.chart.layout.display === "vertical"), o = h(() => {
59
+ const p = v(() => e.value.style.chart.layout.display === "vertical"), r = v(() => {
59
60
  const t = {
60
61
  top: 48,
61
62
  left: 64,
@@ -73,48 +74,48 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
73
74
  left: e.value.style.chart.percentage.horizontalPosition === "left" ? t.left : 3,
74
75
  right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
75
76
  };
76
- }), P = h(() => Object.values(o.value).reduce((t, n) => t + n, 0)), l = h(() => ({
77
+ }), P = v(() => Object.values(r.value).reduce((t, n) => t + n, 0)), l = v(() => ({
77
78
  height: p.value ? 312 : 56,
78
79
  width: p.value ? 56 : 312
79
- })), W = k(100);
80
- h(() => u.dataset.percentage / W.value);
81
- const c = h(() => p.value ? {
80
+ })), V = k(100);
81
+ v(() => d.dataset.percentage / V.value);
82
+ const i = v(() => p.value ? {
82
83
  mark: (l.value.height - P.value) / 100 * 0.5,
83
84
  space: (l.value.height - P.value) / 100 * 0.5
84
85
  } : {
85
86
  mark: (l.value.width - P.value) / 100 * 0.5,
86
87
  space: (l.value.width - P.value) / 100 * 0.5
87
- }), V = h(() => {
88
+ }), E = v(() => {
88
89
  const t = [];
89
90
  for (let a = 0; a < 100; a += 1) {
90
- const r = e.value.style.chart.layout.ticks.gradient.show ? q(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
91
+ const o = e.value.style.chart.layout.ticks.gradient.show ? q(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
91
92
  if (p.value) {
92
- const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - o.value.left - o.value.right) / 100 / 3 : 0, g = o.value.left + 4 + C, y = l.value.width - o.value.right - 4 - C, m = l.value.height - o.value.bottom - a * c.value.mark - a * c.value.space - c.value.mark, f = l.value.height - o.value.bottom - a * c.value.mark - a * c.value.space - c.value.mark, $ = (y - g) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
93
+ const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - r.value.left - r.value.right) / 100 / 3 : 0, m = r.value.left + 4 + C, y = l.value.width - r.value.right - 4 - C, g = l.value.height - r.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, f = l.value.height - r.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, $ = (y - m) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
93
94
  t.push({
94
- x1: g,
95
+ x1: m,
95
96
  x2: y,
96
- y1: m,
97
+ y1: g,
97
98
  y2: f,
98
- curve: `M ${g} ${m} C ${g + $} ${m - x}, ${y - $} ${f - x}, ${y} ${f}`,
99
- color: r
99
+ curve: `M ${m} ${g} C ${m + $} ${g - x}, ${y - $} ${f - x}, ${y} ${f}`,
100
+ color: o
100
101
  });
101
102
  } else {
102
- const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - o.value.top - o.value.bottom) / 100 / 3 : 0, g = o.value.left + a * c.value.mark + a * c.value.space - c.value.mark, y = g, m = o.value.top + 4 + C, f = l.value.height - o.value.bottom - 4 - C, $ = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (f - m) / e.value.style.chart.layout.curveAngleX;
103
+ const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - r.value.top - r.value.bottom) / 100 / 3 : 0, m = r.value.left + a * i.value.mark + a * i.value.space - i.value.mark, y = m, g = r.value.top + 4 + C, f = l.value.height - r.value.bottom - 4 - C, $ = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (f - g) / e.value.style.chart.layout.curveAngleX;
103
104
  t.push({
104
- x1: g,
105
+ x1: m,
105
106
  x2: y,
106
- y1: m,
107
+ y1: g,
107
108
  y2: f,
108
- curve: `M ${g} ${m} C ${g + $} ${m + x}, ${y + $} ${f - x}, ${y} ${f}`,
109
- color: r
109
+ curve: `M ${m} ${g} C ${m + $} ${g + x}, ${y + $} ${f - x}, ${y} ${f}`,
110
+ color: o
110
111
  });
111
112
  }
112
113
  }
113
114
  return t;
114
- }), b = h(() => {
115
+ }), _ = v(() => {
115
116
  let t, n, a;
116
- const r = e.value.style.chart.percentage.fontSize / 3;
117
- return p.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, n = o.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, n = l.value.height - o.value.bottom / 2 + r, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, n = l.value.height / 2 + r, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - o.value.right + 8, n = l.value.height / 2 + r, a = "start"), {
117
+ const o = e.value.style.chart.percentage.fontSize / 3;
118
+ return p.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, n = r.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, n = l.value.height - r.value.bottom / 2 + o, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, n = l.value.height / 2 + o, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - r.value.right + 8, n = l.value.height / 2 + o, a = "start"), {
118
119
  x: t,
119
120
  y: n,
120
121
  textAnchor: a,
@@ -123,24 +124,24 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
123
124
  fill: e.value.style.chart.percentage.color
124
125
  };
125
126
  }), I = k(!1);
126
- function Z(t) {
127
- I.value = t, L.value += 1;
127
+ function W(t) {
128
+ I.value = t, G.value += 1;
128
129
  }
129
130
  return K({
130
- generatePdf: B,
131
- generateImage: E
132
- }), (t, n) => (s(), v("div", {
131
+ generatePdf: U,
132
+ generateImage: j
133
+ }), (t, n) => (u(), c("div", {
133
134
  ref_key: "tiremarksChart",
134
- ref: G,
135
+ ref: N,
135
136
  class: O(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
136
137
  style: S(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
137
138
  id: z.value
138
139
  }, [
139
- e.value.style.chart.title.text ? (s(), v("div", {
140
+ e.value.style.chart.title.text ? (u(), c("div", {
140
141
  key: 0,
141
142
  style: S(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
142
143
  }, [
143
- ae(de, {
144
+ te(de, {
144
145
  config: {
145
146
  title: {
146
147
  cy: "wheel-title",
@@ -152,14 +153,14 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
152
153
  }
153
154
  }
154
155
  }, null, 8, ["config"])
155
- ], 4)) : _("", !0),
156
- e.value.userOptions.show && F.value ? (s(), X(ye, {
156
+ ], 4)) : b("", !0),
157
+ e.value.userOptions.show && F.value ? (u(), T(ye, {
157
158
  ref: "details",
158
- key: `user_options_${L.value}`,
159
+ key: `user_options_${G.value}`,
159
160
  backgroundColor: e.value.style.chart.backgroundColor,
160
161
  color: e.value.style.chart.color,
161
- isPrinting: d(U),
162
- isImaging: d(j),
162
+ isPrinting: h(L),
163
+ isImaging: h(M),
163
164
  uid: z.value,
164
165
  hasPdf: e.value.userOptions.buttons.pdf,
165
166
  hasImg: e.value.userOptions.buttons.img,
@@ -167,11 +168,11 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
167
168
  hasXls: !1,
168
169
  isFullscreen: I.value,
169
170
  titles: { ...e.value.userOptions.buttonTitles },
170
- chartElement: G.value,
171
- onToggleFullscreen: Z,
172
- onGeneratePdf: d(B),
173
- onGenerateImage: d(E)
174
- }, le({ _: 2 }, [
171
+ chartElement: N.value,
172
+ onToggleFullscreen: W,
173
+ onGeneratePdf: h(U),
174
+ onGenerateImage: h(j)
175
+ }, ae({ _: 2 }, [
175
176
  t.$slots.optionPdf ? {
176
177
  name: "optionPdf",
177
178
  fn: A(() => [
@@ -188,62 +189,62 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
188
189
  } : void 0,
189
190
  t.$slots.optionFullscreen ? {
190
191
  name: "optionFullscreen",
191
- fn: A(({ toggleFullscreen: a, isFullscreen: r }) => [
192
- w(t.$slots, "optionFullscreen", D(M({ toggleFullscreen: a, isFullscreen: r })), void 0, !0)
192
+ fn: A(({ toggleFullscreen: a, isFullscreen: o }) => [
193
+ w(t.$slots, "optionFullscreen", X(D({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
193
194
  ]),
194
195
  key: "2"
195
196
  } : void 0
196
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : _("", !0),
197
- F.value ? (s(), v("svg", {
197
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : b("", !0),
198
+ F.value ? (u(), c("svg", {
198
199
  key: 2,
199
- xmlns: d(ce),
200
+ xmlns: h(ce),
200
201
  class: O({ "vue-data-ui-fullscreen--on": I.value, "vue-data-ui-fulscreen--off": !I.value }),
201
202
  viewBox: `0 0 ${l.value.width} ${l.value.height}`,
202
203
  style: S(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
203
204
  }, [
204
- e.value.style.chart.layout.curved ? (s(), v("g", _e, [
205
- (s(!0), v(H, null, R(V.value, (a, r) => (s(), v("path", {
205
+ e.value.style.chart.layout.curved ? (u(), c("g", be, [
206
+ (u(!0), c(H, null, R(E.value, (a, o) => (u(), c("path", {
206
207
  d: a.curve,
207
- "stroke-width": c.value.mark,
208
- stroke: i.value >= r ? a.color : e.value.style.chart.layout.inactiveColor,
208
+ "stroke-width": i.value.mark,
209
+ stroke: s.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
209
210
  "stroke-linecap": "round",
210
211
  fill: "none",
211
- class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && r <= i.value })
212
- }, null, 10, be))), 256))
213
- ])) : (s(), v("g", Ce, [
214
- (s(!0), v(H, null, R(V.value, (a, r) => (s(), v("line", {
212
+ class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= s.value })
213
+ }, null, 10, _e))), 256))
214
+ ])) : (u(), c("g", Ce, [
215
+ (u(!0), c(H, null, R(E.value, (a, o) => (u(), c("line", {
215
216
  x1: a.x1,
216
217
  y1: a.y1,
217
218
  x2: a.x2,
218
219
  y2: a.y2,
219
- "stroke-width": c.value.mark,
220
- stroke: i.value >= r ? a.color : e.value.style.chart.layout.inactiveColor,
220
+ "stroke-width": i.value.mark,
221
+ stroke: s.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
221
222
  "stroke-linecap": "round"
222
223
  }, null, 8, $e))), 256))
223
224
  ])),
224
- e.value.style.chart.percentage.show ? (s(), v("text", {
225
+ e.value.style.chart.percentage.show ? (u(), c("text", {
225
226
  key: 2,
226
- x: b.value.x,
227
- y: b.value.y,
228
- "font-size": b.value.fontSize,
229
- fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? d(q)(e.value.style.chart.layout.activeColor, i.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
230
- "font-weight": b.value.bold ? "bold" : "normal",
231
- "text-anchor": b.value.textAnchor
232
- }, re(d(ve)(
227
+ x: _.value.x,
228
+ y: _.value.y,
229
+ "font-size": _.value.fontSize,
230
+ fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? h(q)(e.value.style.chart.layout.activeColor, s.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
231
+ "font-weight": _.value.bold ? "bold" : "normal",
232
+ "text-anchor": _.value.textAnchor
233
+ }, le(h(ve)(
233
234
  e.value.style.chart.percentage.formatter,
234
- i.value,
235
- d(he)({
236
- v: i.value,
235
+ s.value,
236
+ h(he)({
237
+ v: s.value,
237
238
  s: "%",
238
239
  r: e.value.style.chart.percentage.rounding
239
240
  })
240
- )), 9, xe)) : _("", !0),
241
+ )), 9, xe)) : b("", !0),
241
242
  w(t.$slots, "svg", { svg: l.value }, void 0, !0)
242
- ], 14, ke)) : _("", !0),
243
- t.$slots.watermark ? (s(), v("div", we, [
244
- w(t.$slots, "watermark", D(M({ isPrinting: d(U) || d(j) })), void 0, !0)
245
- ])) : _("", !0),
246
- F.value ? _("", !0) : (s(), X(me, {
243
+ ], 14, ke)) : b("", !0),
244
+ t.$slots.watermark ? (u(), c("div", we, [
245
+ w(t.$slots, "watermark", X(D({ isPrinting: h(L) || h(M) })), void 0, !0)
246
+ ])) : b("", !0),
247
+ F.value ? b("", !0) : (u(), T(ge, {
247
248
  key: 4,
248
249
  config: {
249
250
  type: "tiremarks",
@@ -257,7 +258,7 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "strok
257
258
  }, null, 8, ["config"]))
258
259
  ], 14, pe));
259
260
  }
260
- }, Ge = /* @__PURE__ */ fe(Pe, [["__scopeId", "data-v-51f57492"]]);
261
+ }, Ge = /* @__PURE__ */ fe(Pe, [["__scopeId", "data-v-4f20846e"]]);
261
262
  export {
262
263
  Ge as default
263
264
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DnCegWge.cjs"),ke=require("./Title-BYDRRvqX.cjs"),re=require("./usePrinter-C94KiYaY.cjs"),Ce=require("./Tooltip-CtRqM9Sw.cjs"),we=require("./Legend-CkIdFaKE.cjs"),xe=require("./vue-ui-skeleton-Cey15-vY.cjs"),Te=require("./DataTable-Dr67tL_4.cjs"),$e=require("./vue-ui-accordion-CG_G9ock.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),se=require("./useNestedProp-18FTwhUW.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ie(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ce(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=ie(n,s),v=ie(u,s);return i>=v}}function Be(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function _e(n,d){const s={...d,children:n};return ve(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function de(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=U(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,t);w=x,g.push(T)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,t);b=x,g.push(T)}return g}}function Pe(n){const d=U(n),s=d.width,u=d.height;return Math.min(s,u)}function Oe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function U(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=de(v,h);return f.concat(g)}const C=Pe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let T=0;T<g;T+=1)m+=v[T].normalizedValue;const k=Ee(h,m),x=de(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function ve(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Oe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ve(s[h]));return Be(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=U(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ce(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ce(p)}}const Le=n=>(e.pushScopeId("data-v-61b57d4b"),n=n(),e.popScopeId(),n),Re=["id"],Fe=["xmlns","viewBox"],Ie={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Le(()=>e.createElementVNode("br",null,null,-1)),Ge={key:3,class:"vue-data-ui-watermark"},je=["onClick"],Xe={key:0},Ye={key:1},Ze=["innerHTML"],Je={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const l=se.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...se.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:T,isImaging:G,generatePdf:j,generateImage:X}=re.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),P=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function Y(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),Y(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),Y(O.value),t.value.responsive){const l=ue.throttle(()=>{const{width:a,height:o}=ue.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=o});D.value=new ResizeObserver(l),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),E=e.computed(()=>O.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),Z=e.computed({get(){let l=[...R.value];return t.value.style.chart.layout.sorted&&(l=[...R.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function J(l,a){return l.value/a}function he(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-J(a,o);return r.lightenHexColor(l,c<0?0:c)}function K(l,a,o,c){return l.map((y,z)=>{const A=he(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,c),be=J(y,c);return{...y,color:A,proportion:be,parentName:o,children:y.children?K(y.children,A,y.name,c):void 0}})}const F=e.computed(()=>_e(Z.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?K(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:P.value.left*2,y0:P.value.top,x1:P.value.width,y1:P.value.height}));function Q({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function ee({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(l){b.value=l,w.value+=1}const L=e.computed(()=>({startX:0,startY:0,width:P.value.vbWidth,height:P.value.vbHeight})),$=e.ref(!1);function M(l,a=O.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=M(l,o.children);if(c)return c}}return null}function fe(l){if($.value)s("selectDatapoint",void 0),H.value=O.value;else{if(s("selectDatapoint",l),!M(l.parentId))return;H.value=[M(l.parentId)]}$.value=!$.value}const S=e.ref(null),te=e.computed(()=>O.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/O.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function le(l){$.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",Z.value)}const W=e.ref(null);function me({datapoint:l,seriesIndex:a}){S.value=l,W.value={datapoint:l,seriesIndex:a,config:t.value,series:R.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:R.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<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="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=F.value.map(o=>({name:o.name,color:o.color})),a=F.value.map(o=>o.value);return{head:l,body:a}});function oe(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.name],[N.value.body[y]],[isNaN(N.value.body[y]/E.value)?"-":N.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const A=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},A,isNaN(N.value.body[z]/E.value)?"-":r.dataLabel({v:N.value.body[z]/E.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function ye(){return F.value}function ae(){B.value.showTable=!B.value.showTable}function ne(){B.value.showTooltip=!B.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:X,generatePdf:j,toggleTable:ae,toggleTooltip:ne}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(G),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:B.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(j),onGenerateCsv:oe,onGenerateImage:e.unref(X),onToggleTable:ae,onToggleTooltip:ne},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${L.value.startX} ${L.value.startY} ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ie,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:Q(o),width:ee(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(o),onMouseenter:()=>me({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:o.x0,y:o.y0,height:Q(o),width:ee(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:V(o),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:P.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:te.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>le(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>le(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Xe," ("+e.toDisplayString(isNaN(o.value/E.value)?"-":(o.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,je)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:B.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:5,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>B.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Ke=Se._export_sfc(Je,[["__scopeId","data-v-61b57d4b"]]);exports.default=Ke;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CsqP5b4f.cjs"),ke=require("./Title-96aF3-Z1.cjs"),re=require("./usePrinter-CobCVhRp.cjs"),Ce=require("./Tooltip-Bkzl1VQe.cjs"),we=require("./Legend-D_1fNWhT.cjs"),xe=require("./vue-ui-skeleton-BR5OmV8V.cjs"),Te=require("./DataTable-BTNru9rE.cjs"),$e=require("./vue-ui-accordion-C1ybaK7v.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),se=require("./useNestedProp-DQ2DOe-8.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ie(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ce(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=ie(n,s),v=ie(u,s);return i>=v}}function Be(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function _e(n,d){const s={...d,children:n};return ve(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function de(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=U(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,t);w=x,g.push(T)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,t);b=x,g.push(T)}return g}}function Pe(n){const d=U(n),s=d.width,u=d.height;return Math.min(s,u)}function Oe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function U(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=de(v,h);return f.concat(g)}const C=Pe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let T=0;T<g;T+=1)m+=v[T].normalizedValue;const k=Ee(h,m),x=de(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function ve(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Oe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ve(s[h]));return Be(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=U(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ce(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ce(p)}}const Le=n=>(e.pushScopeId("data-v-61b57d4b"),n=n(),e.popScopeId(),n),Re=["id"],Fe=["xmlns","viewBox"],Ie={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Le(()=>e.createElementVNode("br",null,null,-1)),Ge={key:3,class:"vue-data-ui-watermark"},je=["onClick"],Xe={key:0},Ye={key:1},Ze=["innerHTML"],Je={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const l=se.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...se.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:T,isImaging:G,generatePdf:j,generateImage:X}=re.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),P=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function Y(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),Y(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),Y(O.value),t.value.responsive){const l=ue.throttle(()=>{const{width:a,height:o}=ue.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=o});D.value=new ResizeObserver(l),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),E=e.computed(()=>O.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),Z=e.computed({get(){let l=[...R.value];return t.value.style.chart.layout.sorted&&(l=[...R.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function J(l,a){return l.value/a}function he(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-J(a,o);return r.lightenHexColor(l,c<0?0:c)}function K(l,a,o,c){return l.map((y,z)=>{const A=he(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,c),be=J(y,c);return{...y,color:A,proportion:be,parentName:o,children:y.children?K(y.children,A,y.name,c):void 0}})}const F=e.computed(()=>_e(Z.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?K(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:P.value.left*2,y0:P.value.top,x1:P.value.width,y1:P.value.height}));function Q({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function ee({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(l){b.value=l,w.value+=1}const L=e.computed(()=>({startX:0,startY:0,width:P.value.vbWidth,height:P.value.vbHeight})),$=e.ref(!1);function M(l,a=O.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=M(l,o.children);if(c)return c}}return null}function fe(l){if($.value)s("selectDatapoint",void 0),H.value=O.value;else{if(s("selectDatapoint",l),!M(l.parentId))return;H.value=[M(l.parentId)]}$.value=!$.value}const S=e.ref(null),te=e.computed(()=>O.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/O.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function le(l){$.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",Z.value)}const W=e.ref(null);function me({datapoint:l,seriesIndex:a}){S.value=l,W.value={datapoint:l,seriesIndex:a,config:t.value,series:R.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:R.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<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="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=F.value.map(o=>({name:o.name,color:o.color})),a=F.value.map(o=>o.value);return{head:l,body:a}});function oe(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.name],[N.value.body[y]],[isNaN(N.value.body[y]/E.value)?"-":N.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const A=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},A,isNaN(N.value.body[z]/E.value)?"-":r.dataLabel({v:N.value.body[z]/E.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function ye(){return F.value}function ae(){B.value.showTable=!B.value.showTable}function ne(){B.value.showTooltip=!B.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:X,generatePdf:j,toggleTable:ae,toggleTooltip:ne}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(G),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:B.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(j),onGenerateCsv:oe,onGenerateImage:e.unref(X),onToggleTable:ae,onToggleTooltip:ne},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${L.value.startX} ${L.value.startY} ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ie,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:Q(o),width:ee(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(o),onMouseenter:()=>me({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:o.x0,y:o.y0,height:Q(o),width:ee(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:V(o),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:P.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:te.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>le(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>le(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Xe," ("+e.toDisplayString(isNaN(o.value/E.value)?"-":(o.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,je)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:B.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:5,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>B.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Ke=Se._export_sfc(Je,[["__scopeId","data-v-61b57d4b"]]);exports.default=Ke;
@@ -1,14 +1,14 @@
1
1
  import { computed as C, ref as y, onMounted as He, onBeforeUnmount as Ue, openBlock as m, createElementBlock as k, normalizeClass as xe, normalizeStyle as M, createVNode as re, createCommentVNode as V, createBlock as te, unref as b, createSlots as Ge, withCtx as T, renderSlot as _, normalizeProps as G, guardReactiveProps as X, Fragment as $e, renderList as Te, createElementVNode as O, toDisplayString as q, createTextVNode as _e, nextTick as Xe, pushScopeId as qe, popScopeId as je } from "vue";
2
- import { u as Ye, c as Oe, t as Ze, a as Je, p as x, b as Ke, o as Qe, e as et, d as le, i as oe, f as Z, X as tt, l as Se, E as Ne, x as ze, y as lt, q as ot, r as at } from "./index-fMHmzYJu.js";
3
- import { _ as nt } from "./Title-BxitYokc.js";
4
- import { u as st, U as rt } from "./usePrinter-BEVwOH5x.js";
5
- import { _ as ut } from "./Tooltip-DTntJRyb.js";
6
- import { L as it } from "./Legend-C2DZGZN5.js";
7
- import ct from "./vue-ui-skeleton-DiJmBrEY.js";
8
- import { D as dt } from "./DataTable-CzvZIRDs.js";
9
- import vt from "./vue-ui-accordion-CVzTuENA.js";
2
+ import { u as Ye, c as Oe, t as Ze, a as Je, p as x, b as Ke, o as Qe, e as et, d as le, i as oe, f as Z, X as tt, l as Se, E as Ne, x as ze, y as lt, q as ot, r as at } from "./index--JGgf0j_.js";
3
+ import { _ as nt } from "./Title-s23qMfox.js";
4
+ import { u as st, U as rt } from "./usePrinter-DLzQ_BtZ.js";
5
+ import { _ as ut } from "./Tooltip-DrhztkFj.js";
6
+ import { L as it } from "./Legend-Bvm45WSa.js";
7
+ import ct from "./vue-ui-skeleton-Dgvq-LKZ.js";
8
+ import { D as dt } from "./DataTable-C3P8lB6X.js";
9
+ import vt from "./vue-ui-accordion-CT0j1v1a.js";
10
10
  import { t as ht, u as ft } from "./useResponsive-NZB-WLRF.js";
11
- import { u as Ie } from "./useNestedProp-lzTC0cjC.js";
11
+ import { u as Ie } from "./useNestedProp-BMj7Pe83.js";
12
12
  import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  function Pe(a, i) {
14
14
  const s = a.length;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DnCegWge.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),Ce=require("./Title-BYDRRvqX.cjs"),ae=require("./usePrinter-C94KiYaY.cjs"),xe=require("./Tooltip-CtRqM9Sw.cjs"),oe=require("./Legend-CkIdFaKE.cjs"),_e=require("./vue-ui-skeleton-Cey15-vY.cjs"),Ne=require("./BaseIcon-wCGYJ8GM.cjs"),we=require("./vue-ui-accordion-CG_G9ock.cjs"),ne=require("./useNestedProp-18FTwhUW.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ve=["onClick"],Te=["xmlns","viewBox"],Ee=["id"],Be=["stop-color"],Le=["stop-color"],ze=["x","y","width","height","fill","rx"],Pe=["x","y","width","height","fill","rx","stroke","stroke-width"],De=["x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","text-anchor","font-size","fill","font-weight"],Ie=["x","y","font-size","fill","font-weight"],Oe=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["y","width","height","fill","onMouseenter"],He={key:4,class:"vue-data-ui-watermark"},Xe=["onClick"],Ae={style:"width:100%;padding-top: 36px;position:relative"},Ue={class:"vue-ui-data-table"},je={key:0},Ge={style:{width:"100%"}},We=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe=["data-cell"],Ze={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ue,emit:ie}){const f=re;e.useCssVars(a=>({"7bc84c58":a.tdo}));const{vue_ui_vertical_bar:se}=n.useConfig(),V=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(n.createUid()),ce=e.ref(null),B=e.ref(!1),L=e.ref(""),T=e.ref(0),de=e.ref(null),I=e.ref(0),w=e.ref(null),O=e.ref(null),z=e.ref(null),t=e.computed(()=>{const a=ne.useNestedProp({userConfig:f.config,defaultConfig:se});return a.theme?{...ne.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||f.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:R,isImaging:q,generatePdf:H,generateImage:X}=ae.usePrinter({elementId:`vue-ui-vertical-bar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),A=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),U=e.ref(null),j=e.ref(!1),ve=e.computed(()=>t.value.table.responsiveBreakpoint),E=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(f.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),T.value=f.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),he(),t.value.responsive){const a=le.throttle(()=>{const{width:o,height:l}=le.useResponsive({chart:w.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?z.value:null});Y.value=o,c.value=l/T.value-v.value*2});E.value=new ResizeObserver(a),E.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});function he(){new ResizeObserver(o=>{o.forEach(l=>{j.value=l.contentRect.width<ve.value})}).observe(U.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),G=e.computed(()=>h.value.sortDesc),k=e.computed(()=>(f.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),f.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${m.value}`,r=!!a.children&&a.children.length>0;return{...a,id:l,shape:"square",opacity:y.value.includes(l)?.5:1,value:n.checkNaN(r?a.children.map(i=>i.value||0).reduce((i,s)=>i+s,0):Math.abs(a.value)||0),sign:a.value>=0?1:-1,hasChildren:r,isChild:!1,segregate:()=>$(l),isSegregated:y.value.includes(l),color:n.convertColorToHex(a.color)||A.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted((i,s)=>G.value?s.value-i.value:i.value-s.value).map((i,s)=>({...i,value:n.checkNaN(Math.abs(i.value)),sign:i.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:n.checkNaN(a.value||r?a.children.map(M=>M.value||0).reduce((M,ke)=>M+ke,0):0),id:`vertical_child_${o}_${s}_${m.value}`,childIndex:s,color:n.convertColorToHex(i.color)||n.convertColorToHex(a.color)||A.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((i,s)=>({...i,isFirstChild:s===0,isLastChild:s===a.children.length-1}))}}).toSorted((a,o)=>G.value?o.value-a.value:a.value-o.value))),W=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),c=e.ref(t.value.style.chart.layout.bars.height),v=e.ref(t.value.style.chart.layout.bars.gap),pe=e.computed(()=>(c.value+v.value)*T.value),Y=e.ref(512),d=e.computed(()=>({width:Y.value,height:pe.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){T.value=C.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const y=e.ref([]);function $(a){y.value.includes(a)?y.value=y.value.filter(o=>o!==a):y.value.push(a),P(),ie("selectLegend",C.value)}const C=e.computed(()=>k.value.filter(a=>!y.value.includes(a.id))),g=e.computed(()=>C.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function K(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/g.value*100),s:"%",r:l}):Math.abs(a)/g.value}const x=e.computed(()=>C.value.flatMap(a=>a.hasChildren?a.children:a)),_=e.computed(()=>x.value.map(a=>a.sign).includes(-1)),ye=e.computed(()=>Math.max(...C.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function b(a){const o=a/ye.value;return u.value.width/(_.value?2:1)*o}function ge(a){return b(a)+u.value.left}function N(a,o){const l=C.value.find(s=>s.id===a.parentId),r=u.value.top+(v.value+c.value)*o,i=l.children.length*(v.value+c.value);return{y:r+i/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/g.value)?"":K(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function fe(){return C.value}const D=e.ref(null),F=e.ref(null);function be(a,o){F.value={datapoint:a,seriesIndex:o,series:k.value,config:t.value},B.value=!0,D.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,i=a.isChild?a.name:"",s=t.value.style.chart.tooltip.customFormat;n.isFunction(s)&&n.functionReturnsString(()=>s({datapoint:a,series:k.value,config:t.value,seriesIndex:o}))?L.value=s({datapoint:a,series:k.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CsqP5b4f.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),Ce=require("./Title-96aF3-Z1.cjs"),ae=require("./usePrinter-CobCVhRp.cjs"),xe=require("./Tooltip-Bkzl1VQe.cjs"),oe=require("./Legend-D_1fNWhT.cjs"),_e=require("./vue-ui-skeleton-BR5OmV8V.cjs"),Ne=require("./BaseIcon-DlKBf9ve.cjs"),we=require("./vue-ui-accordion-C1ybaK7v.cjs"),ne=require("./useNestedProp-DQ2DOe-8.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ve=["onClick"],Te=["xmlns","viewBox"],Ee=["id"],Be=["stop-color"],Le=["stop-color"],ze=["x","y","width","height","fill","rx"],Pe=["x","y","width","height","fill","rx","stroke","stroke-width"],De=["x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","text-anchor","font-size","fill","font-weight"],Ie=["x","y","font-size","fill","font-weight"],Oe=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["y","width","height","fill","onMouseenter"],He={key:4,class:"vue-data-ui-watermark"},Xe=["onClick"],Ae={style:"width:100%;padding-top: 36px;position:relative"},Ue={class:"vue-ui-data-table"},je={key:0},Ge={style:{width:"100%"}},We=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe=["data-cell"],Ze={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},et=["data-cell"],tt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},it={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ue,emit:ie}){const f=re;e.useCssVars(a=>({"7bc84c58":a.tdo}));const{vue_ui_vertical_bar:se}=n.useConfig(),V=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(n.createUid()),ce=e.ref(null),B=e.ref(!1),L=e.ref(""),T=e.ref(0),de=e.ref(null),I=e.ref(0),w=e.ref(null),O=e.ref(null),z=e.ref(null),t=e.computed(()=>{const a=ne.useNestedProp({userConfig:f.config,defaultConfig:se});return a.theme?{...ne.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||f.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:R,isImaging:q,generatePdf:H,generateImage:X}=ae.usePrinter({elementId:`vue-ui-vertical-bar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),A=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),U=e.ref(null),j=e.ref(!1),ve=e.computed(()=>t.value.table.responsiveBreakpoint),E=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(f.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),T.value=f.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),he(),t.value.responsive){const a=le.throttle(()=>{const{width:o,height:l}=le.useResponsive({chart:w.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?z.value:null});Y.value=o,c.value=l/T.value-v.value*2});E.value=new ResizeObserver(a),E.value.observe(w.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});function he(){new ResizeObserver(o=>{o.forEach(l=>{j.value=l.contentRect.width<ve.value})}).observe(U.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),G=e.computed(()=>h.value.sortDesc),k=e.computed(()=>(f.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),f.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${m.value}`,r=!!a.children&&a.children.length>0;return{...a,id:l,shape:"square",opacity:y.value.includes(l)?.5:1,value:n.checkNaN(r?a.children.map(i=>i.value||0).reduce((i,s)=>i+s,0):Math.abs(a.value)||0),sign:a.value>=0?1:-1,hasChildren:r,isChild:!1,segregate:()=>$(l),isSegregated:y.value.includes(l),color:n.convertColorToHex(a.color)||A.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted((i,s)=>G.value?s.value-i.value:i.value-s.value).map((i,s)=>({...i,value:n.checkNaN(Math.abs(i.value)),sign:i.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:n.checkNaN(a.value||r?a.children.map(M=>M.value||0).reduce((M,ke)=>M+ke,0):0),id:`vertical_child_${o}_${s}_${m.value}`,childIndex:s,color:n.convertColorToHex(i.color)||n.convertColorToHex(a.color)||A.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((i,s)=>({...i,isFirstChild:s===0,isLastChild:s===a.children.length-1}))}}).toSorted((a,o)=>G.value?o.value-a.value:a.value-o.value))),W=e.computed(()=>({cy:"vertical-bar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),c=e.ref(t.value.style.chart.layout.bars.height),v=e.ref(t.value.style.chart.layout.bars.gap),pe=e.computed(()=>(c.value+v.value)*T.value),Y=e.ref(512),d=e.computed(()=>({width:Y.value,height:pe.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){T.value=C.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const y=e.ref([]);function $(a){y.value.includes(a)?y.value=y.value.filter(o=>o!==a):y.value.push(a),P(),ie("selectLegend",C.value)}const C=e.computed(()=>k.value.filter(a=>!y.value.includes(a.id))),g=e.computed(()=>C.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function K(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/g.value*100),s:"%",r:l}):Math.abs(a)/g.value}const x=e.computed(()=>C.value.flatMap(a=>a.hasChildren?a.children:a)),_=e.computed(()=>x.value.map(a=>a.sign).includes(-1)),ye=e.computed(()=>Math.max(...C.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function b(a){const o=a/ye.value;return u.value.width/(_.value?2:1)*o}function ge(a){return b(a)+u.value.left}function N(a,o){const l=C.value.find(s=>s.id===a.parentId),r=u.value.top+(v.value+c.value)*o,i=l.children.length*(v.value+c.value);return{y:r+i/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/g.value)?"":K(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function fe(){return C.value}const D=e.ref(null),F=e.ref(null);function be(a,o){F.value={datapoint:a,seriesIndex:o,series:k.value,config:t.value},B.value=!0,D.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,i=a.isChild?a.name:"",s=t.value.style.chart.tooltip.customFormat;n.isFunction(s)&&n.functionReturnsString(()=>s({datapoint:a,series:k.value,config:t.value,seriesIndex:o}))?L.value=s({datapoint:a,series:k.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
2
2
  <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${a.color}"/></svg> ${r}</div>
3
3
  ${i?`<div>${i}</div>`:""}
4
4
  </div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/g.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),L.value=`<div style="text-align:left">${l}</div>`)}function J(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const i=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),s=`(${K(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${i}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${s}`:""}`}const p=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=x.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/g.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/g.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/g.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/g.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function Q(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=p.value.head,l=p.value.body.map(s=>[s.parentName,s.parentValue,s.percentageToTotal,s.childName,s.childValue,s.childPercentageToParent,s.childPercentageToTotal]),r=a.concat([o]).concat(l),i=n.createCsvContent(r);n.downloadCsv({csvContent:i,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const S=e.ref(!1);function me(a){S.value=a,I.value+=1}function Z(){h.value.showTable=!h.value.showTable}function ee(){h.value.sortDesc=!h.value.sortDesc,P()}function te(){h.value.showTooltip=!h.value.showTooltip}return ue({getData:fe,recalculateHeight:P,generatePdf:H,generateCsv:Q,generateImage:X,toggleTable:Z,toggleSort:ee,toggleTooltip:te}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:w,id:`vue-ui-vertical-bar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:O,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(Ce._sfc_main,{config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(R),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:S.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:me,onGeneratePdf:e.unref(H),onGenerateCsv:Q,onGenerateImage:e.unref(X),onToggleTable:Z,onToggleSort:ee,onToggleTooltip:te},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartLegend",ref:z},[e.createVNode(oe.Legend,{legendSet:k.value,config:W.value,onClickMarker:o[0]||(o[0]=({legend:l})=>$(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:i=>$(l.id),style:e.normalizeStyle(`opacity:${y.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Ve)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Be),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(l.color,.03)}${e.unref(n.opacity)[100-t.value.style.chart.layout.bars.gradientIntensity]}`},null,8,Le)],8,Ee))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)(_.value?u.value.left+u.value.width/2-(l.sign===1?0:b(l.value)<=0?1e-4:b(l.value)):u.value.left),y:u.value.top+(v.value+c.value)*r,width:e.unref(n.checkNaN)(b(l.value)<=0?1e-4:b(l.value)),height:c.value<=0?1e-4:c.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,ze)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)(_.value?u.value.left+u.value.width/2-(l.sign===1?0:b(l.value)<=0?1e-4:b(l.value)):u.value.left),y:u.value.top+(v.value+c.value)*r,width:e.unref(n.checkNaN)(b(l.value)<=0?1e-4:b(l.value)),height:c.value<=0?1e-4:c.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${m.value}_${r})`:`${l.color}${e.unref(n.opacity)[t.value.style.chart.layout.bars.fillOpacity]}`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Pe),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==x.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:u.value.left,y1:c.value+v.value/2+u.value.top+(v.value+c.value)*r,y2:c.value+v.value/2+u.value.top+(v.value+c.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),_.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,Fe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:_.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):ge(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(v.value+c.value)*r+c.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!_.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(J(l.value,l,r,l.sign)),9,Me),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(v.value+c.value)*r+c.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,Ie)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:N(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(N(l,r).name),9,Oe)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:N(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(J(N(l,r).value),N(l,r),r,N(l,r).sign),9,Re)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(v.value+c.value)*r-v.value/2,width:d.value.width<=0?1e-4:d.value.width,height:c.value+v.value<=0?1e-4:c.value+v.value,fill:D.value===l.id?`${t.value.style.chart.layout.highlighter.color}${e.unref(n.opacity)[t.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:i=>be(l,r),onMouseleave:o[1]||(o[1]=i=>{de.value=null,B.value=!1,D.value=null})},null,40,qe)]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(_e.default,{key:5,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartLegend",ref:z},[e.createVNode(oe.Legend,{legendSet:k.value,config:W.value,onClickMarker:o[2]||(o[2]=({legend:l})=>$(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:i=>$(l.id),style:e.normalizeStyle(`opacity:${y.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Xe)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0),e.createVNode(xe._sfc_main,{show:h.value.showTooltip&&B.value&&y.value.length<f.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:w.value,content:L.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(we.default,{key:7,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:U,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Ae,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>h.value.showTable=!1,["enter"]))},[e.createVNode(Ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":j.value})},[e.createElementVNode("table",Ue,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",Ge,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(g.value)?"":g.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":p.value.head[0]??""},[e.createElementVNode("div",Ye,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,We),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[1]??""},[e.createElementVNode("div",Je,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Ke),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[2]??""},[e.createElementVNode("div",Ze,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Qe),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[3]??""},[e.createElementVNode("div",tt,e.toDisplayString(l.childName),1)],12,et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[4]??""},[e.createElementVNode("div",at,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,lt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[5]??""},[e.createElementVNode("div",nt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,ot),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":p.value.head[6]??""},[e.createElementVNode("div",ut,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,rt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},st=$e._export_sfc(it,[["__scopeId","data-v-1dd68cde"]]);exports.default=st;
@@ -1,14 +1,14 @@
1
1
  import { useCssVars as Ge, computed as b, ref as p, onMounted as Ue, onBeforeUnmount as He, openBlock as i, createElementBlock as v, normalizeClass as O, normalizeStyle as d, createVNode as A, createCommentVNode as m, createBlock as oe, unref as y, createSlots as We, withCtx as _, renderSlot as x, normalizeProps as j, guardReactiveProps as Y, createElementVNode as u, toDisplayString as c, Fragment as E, renderList as G, withKeys as je, createTextVNode as Ye } from "vue";
2
- import { u as qe, c as Ke, t as Je, a as Qe, p as z, b as Ze, o as Ce, e as q, s as T, d as ue, i as K, f as F, X as et, v as tt, w as ne, x as at, y as lt, q as ot, r as ut } from "./index-fMHmzYJu.js";
2
+ import { u as qe, c as Ke, t as Je, a as Qe, p as z, b as Ze, o as Ce, e as q, s as T, d as ue, i as K, f as F, X as et, v as tt, w as ne, x as at, y as lt, q as ot, r as ut } from "./index--JGgf0j_.js";
3
3
  import { t as nt, u as st } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as rt } from "./Title-BxitYokc.js";
5
- import { u as it, U as dt } from "./usePrinter-BEVwOH5x.js";
6
- import { _ as ct } from "./Tooltip-DTntJRyb.js";
7
- import { L as Te } from "./Legend-C2DZGZN5.js";
8
- import vt from "./vue-ui-skeleton-DiJmBrEY.js";
9
- import ht from "./BaseIcon-Dz58O3w1.js";
10
- import pt from "./vue-ui-accordion-CVzTuENA.js";
11
- import { u as Le } from "./useNestedProp-lzTC0cjC.js";
4
+ import { _ as rt } from "./Title-s23qMfox.js";
5
+ import { u as it, U as dt } from "./usePrinter-DLzQ_BtZ.js";
6
+ import { _ as ct } from "./Tooltip-DrhztkFj.js";
7
+ import { L as Te } from "./Legend-Bvm45WSa.js";
8
+ import vt from "./vue-ui-skeleton-Dgvq-LKZ.js";
9
+ import ht from "./BaseIcon-D6HKiBWY.js";
10
+ import pt from "./vue-ui-accordion-CT0j1v1a.js";
11
+ import { u as Le } from "./useNestedProp-BMj7Pe83.js";
12
12
  import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const gt = ["id"], ft = ["onClick"], bt = ["xmlns", "viewBox"], mt = ["id"], _t = ["stop-color"], xt = ["stop-color"], kt = ["x", "y", "width", "height", "fill", "rx"], $t = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], wt = ["x2", "y1", "y2", "stroke", "stroke-width"], Ct = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], Lt = ["x", "y", "font-size", "fill", "font-weight"], Nt = ["x", "y", "font-size", "fill", "font-weight"], Pt = ["x", "y", "font-size", "fill", "font-weight"], St = ["y", "width", "height", "fill", "onMouseenter"], Vt = {
14
14
  key: 4,