vue-data-ui 2.11.0 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/{Arrow-BSsIs5Aj.js → Arrow-Ch3m7pIz.js} +1 -1
  2. package/dist/{Arrow-BfdnOsct.cjs → Arrow-Djn3xrHB.cjs} +1 -1
  3. package/dist/{BaseIcon-BPehVcsN.js → BaseIcon-D9r5PTQj.js} +1 -1
  4. package/dist/{BaseIcon-dtfVrHa7.cjs → BaseIcon-ljtRuDne.cjs} +1 -1
  5. package/dist/{ColorPicker-C-nhrZ-J.cjs → ColorPicker-CiQtzrYd.cjs} +1 -1
  6. package/dist/{ColorPicker-ByaQGf5i.js → ColorPicker-DuOr2Ic4.js} +3 -3
  7. package/dist/{DataTable-pT39kn0W.cjs → DataTable-CzL8BmEn.cjs} +1 -1
  8. package/dist/{DataTable-BdekL1Hc.js → DataTable-p1tKJjJU.js} +2 -2
  9. package/dist/{Legend-HckkoJBL.js → Legend-COUltTuv.js} +2 -2
  10. package/dist/{Legend-C8PTNFsH.cjs → Legend-m-jOk1o6.cjs} +1 -1
  11. package/dist/{PackageVersion-B6nxekEz.cjs → PackageVersion-BhpRHJg-.cjs} +1 -1
  12. package/dist/{PackageVersion-BPCzY_N5.js → PackageVersion-Db8Jk3Yz.js} +1 -1
  13. package/dist/{PenAndPaper-B3KDT2of.js → PenAndPaper-Bleo21mI.js} +3 -3
  14. package/dist/{PenAndPaper-BC1d2zL5.cjs → PenAndPaper-Cr_VFW1Y.cjs} +1 -1
  15. package/dist/{Shape-Cr-Qt6IO.cjs → Shape-3lpxIkGY.cjs} +1 -1
  16. package/dist/{Shape-B0OqBXWl.js → Shape-DThtou8P.js} +1 -1
  17. package/dist/{Slicer-BXBqgQau.js → Slicer-BSgrBZJB.js} +2 -2
  18. package/dist/{Slicer-BWr1nt8v.cjs → Slicer-D5exzdrG.cjs} +1 -1
  19. package/dist/{Title-Cq5kGGhS.js → Title-C6HOVO5o.js} +1 -1
  20. package/dist/{Title-GpO-QNhg.cjs → Title-DnNgxDaw.cjs} +1 -1
  21. package/dist/{Tooltip-eL97y6Ym.cjs → Tooltip-BcRV15Nk.cjs} +1 -1
  22. package/dist/{Tooltip-CxzDtoXn.js → Tooltip-CkPkykAp.js} +1 -1
  23. package/dist/{dom-to-png-G_nLlvER.js → dom-to-png-C-xt3eHI.js} +1 -1
  24. package/dist/{dom-to-png-BeN7LHfC.cjs → dom-to-png-dbkxxccc.cjs} +1 -1
  25. package/dist/{img-08K-Su3g.cjs → img-B6MWbnlo.cjs} +1 -1
  26. package/dist/{img-BzMFujbd.js → img-CeyprTwt.js} +1 -1
  27. package/dist/{index-CG-euAJp.cjs → index-BKWunRAY.cjs} +1 -1
  28. package/dist/{index-BMcwUsiG.js → index-Ckt5xLw3.js} +1 -1
  29. package/dist/{pdf-achyloML.cjs → pdf-BoIy0kYM.cjs} +1 -1
  30. package/dist/{pdf-BJNBeUWV.js → pdf-C8Uc-ViT.js} +1 -1
  31. package/dist/{useNestedProp-DwQWwt5e.js → useNestedProp-BU5A_H6S.js} +1 -1
  32. package/dist/{useNestedProp-DYDoE86w.cjs → useNestedProp-swJfhg8O.cjs} +1 -1
  33. package/dist/{usePrinter-BBqldIVF.cjs → usePrinter-Dhf-GWO2.cjs} +1 -1
  34. package/dist/{usePrinter-BpCNa5RW.js → usePrinter-Drrm-7ZN.js} +3 -3
  35. package/dist/{vue-data-ui-BTz28Upr.cjs → vue-data-ui-BwmmF0Rx.cjs} +1 -1
  36. package/dist/{vue-data-ui-DXciuF6V.js → vue-data-ui-DEFuCGY2.js} +63 -63
  37. package/dist/vue-data-ui.cjs +1 -1
  38. package/dist/vue-data-ui.js +1 -1
  39. package/dist/{vue-ui-3d-bar-Cv0XQSLU.cjs → vue-ui-3d-bar-B7HO9mUa.cjs} +1 -1
  40. package/dist/{vue-ui-3d-bar-D-x0k_IG.js → vue-ui-3d-bar-Dejz1jbq.js} +9 -9
  41. package/dist/{vue-ui-accordion-dJGHfrMl.cjs → vue-ui-accordion-CACZOsPN.cjs} +1 -1
  42. package/dist/{vue-ui-accordion-DKw3ZQgh.js → vue-ui-accordion-CHWjFAdS.js} +3 -3
  43. package/dist/{vue-ui-age-pyramid-BKOh2L3c.js → vue-ui-age-pyramid-BCbQzcSN.js} +10 -10
  44. package/dist/{vue-ui-age-pyramid-DzQ9EYPB.cjs → vue-ui-age-pyramid-BuI0BAu6.cjs} +1 -1
  45. package/dist/{vue-ui-annotator-BSGf2Uh1.js → vue-ui-annotator-BVkhLQx1.js} +2 -2
  46. package/dist/{vue-ui-annotator-DJDY5xOf.cjs → vue-ui-annotator-D3WW79fZ.cjs} +1 -1
  47. package/dist/{vue-ui-bullet-BHaeMobd.cjs → vue-ui-bullet-Cu4QFP97.cjs} +1 -1
  48. package/dist/{vue-ui-bullet-CJLZA5Lf.js → vue-ui-bullet-Dp-pvoks.js} +8 -8
  49. package/dist/{vue-ui-candlestick-D5aSctEq.cjs → vue-ui-candlestick-CvzvkTZL.cjs} +1 -1
  50. package/dist/{vue-ui-candlestick-BLqrtK2S.js → vue-ui-candlestick-PL89PKKX.js} +11 -11
  51. package/dist/{vue-ui-carousel-table-CvDic9rq.js → vue-ui-carousel-table-CxCDgVti.js} +4 -4
  52. package/dist/{vue-ui-carousel-table-DoQSiBlh.cjs → vue-ui-carousel-table-pGj3lD-7.cjs} +1 -1
  53. package/dist/{vue-ui-chestnut-Co3ZtHYQ.js → vue-ui-chestnut-B59bltYj.js} +8 -8
  54. package/dist/{vue-ui-chestnut-BW9_1uRo.cjs → vue-ui-chestnut-BCLNZl02.cjs} +1 -1
  55. package/dist/{vue-ui-chord-XU2pSfEx.js → vue-ui-chord-311T5EMM.js} +12 -12
  56. package/dist/{vue-ui-chord-CUREQYhU.cjs → vue-ui-chord-I12oZYBZ.cjs} +1 -1
  57. package/dist/{vue-ui-circle-pack-Bdtr6z4Z.cjs → vue-ui-circle-pack-BdEy-F2l.cjs} +1 -1
  58. package/dist/{vue-ui-circle-pack-DpbWAZFC.js → vue-ui-circle-pack-ckubmbMP.js} +9 -9
  59. package/dist/{vue-ui-cursor-BAMt5dcz.cjs → vue-ui-cursor-CB9lfY2N.cjs} +1 -1
  60. package/dist/{vue-ui-cursor-CuvyoiLa.js → vue-ui-cursor-DuaNjqbd.js} +2 -2
  61. package/dist/{vue-ui-dashboard-Bvrpw4EQ.cjs → vue-ui-dashboard-BYVM2ULB.cjs} +1 -1
  62. package/dist/{vue-ui-dashboard-_LJuvqRE.js → vue-ui-dashboard-z6r_7oqD.js} +62 -62
  63. package/dist/{vue-ui-digits-CGzSArOS.cjs → vue-ui-digits-DKjgPEvR.cjs} +1 -1
  64. package/dist/{vue-ui-digits-CeLZoNoA.js → vue-ui-digits-uhUYI1ca.js} +2 -2
  65. package/dist/{vue-ui-donut-BegwljuG.js → vue-ui-donut-C0Wl5tdn.js} +12 -12
  66. package/dist/{vue-ui-donut-BV_QLVp2.cjs → vue-ui-donut-C7VlH0Dm.cjs} +1 -1
  67. package/dist/{vue-ui-donut-evolution-CQ-1_Xak.js → vue-ui-donut-evolution-BSZYlpQ4.js} +11 -11
  68. package/dist/{vue-ui-donut-evolution-euIDGiH3.cjs → vue-ui-donut-evolution-DS2dqteq.cjs} +1 -1
  69. package/dist/{vue-ui-dumbbell-CPylAaR8.js → vue-ui-dumbbell-9sEMuWdj.js} +10 -10
  70. package/dist/{vue-ui-dumbbell-BO0h5wGp.cjs → vue-ui-dumbbell-CTcvX2CT.cjs} +1 -1
  71. package/dist/{vue-ui-flow-B8fyDK8A.js → vue-ui-flow-Bn6eRbfA.js} +11 -11
  72. package/dist/{vue-ui-flow-DWiA9yFS.cjs → vue-ui-flow-wAvTzG20.cjs} +1 -1
  73. package/dist/{vue-ui-funnel-yRS_OJcF.cjs → vue-ui-funnel-DQflekb1.cjs} +1 -1
  74. package/dist/{vue-ui-funnel-BAa1OwMy.js → vue-ui-funnel-ENbP7k7d.js} +9 -9
  75. package/dist/{vue-ui-galaxy-DF41DbY7.cjs → vue-ui-galaxy-B6thZdtp.cjs} +1 -1
  76. package/dist/{vue-ui-galaxy-DEZ-rfXE.js → vue-ui-galaxy-BXBlLF0x.js} +11 -11
  77. package/dist/{vue-ui-gauge-k3ejBVZj.js → vue-ui-gauge-D-BFLHdh.js} +7 -7
  78. package/dist/{vue-ui-gauge-CCGMpnvM.cjs → vue-ui-gauge-TLv35WQu.cjs} +1 -1
  79. package/dist/{vue-ui-gizmo-DGRDcoNW.cjs → vue-ui-gizmo-CIDsbSUq.cjs} +1 -1
  80. package/dist/{vue-ui-gizmo-uSaL0tgk.js → vue-ui-gizmo-CupuHUJa.js} +3 -3
  81. package/dist/{vue-ui-heatmap-WgeuA6rb.js → vue-ui-heatmap-Bxy7ffI3.js} +10 -10
  82. package/dist/{vue-ui-heatmap-dKn60iwF.cjs → vue-ui-heatmap-Df3qLtt5.cjs} +1 -1
  83. package/dist/{vue-ui-history-plot-jBlXPR4I.js → vue-ui-history-plot-CPbp9vdL.js} +11 -11
  84. package/dist/{vue-ui-history-plot-Dnb4txKX.cjs → vue-ui-history-plot-CPmQ5Xri.cjs} +1 -1
  85. package/dist/{vue-ui-kpi-N3ugHMNs.js → vue-ui-kpi-D16IoodO.js} +3 -3
  86. package/dist/{vue-ui-kpi-C13Zgi4k.cjs → vue-ui-kpi-D6wD01aX.cjs} +1 -1
  87. package/dist/{vue-ui-mini-loader-BnblpH8s.cjs → vue-ui-mini-loader-BczPBX3e.cjs} +1 -1
  88. package/dist/{vue-ui-mini-loader-BukHpIuC.js → vue-ui-mini-loader-CceGVViE.js} +2 -2
  89. package/dist/{vue-ui-molecule-DQADG59C.js → vue-ui-molecule-CrQakNH_.js} +11 -11
  90. package/dist/{vue-ui-molecule-zkjb68lX.cjs → vue-ui-molecule-uQWB-9XK.cjs} +1 -1
  91. package/dist/{vue-ui-mood-radar-oO1NjJsj.cjs → vue-ui-mood-radar-BG9otX9u.cjs} +1 -1
  92. package/dist/{vue-ui-mood-radar-BdpZWnM1.js → vue-ui-mood-radar-DahDca5w.js} +11 -11
  93. package/dist/{vue-ui-nested-donuts-8PBCRUKI.cjs → vue-ui-nested-donuts-DTNxPtmB.cjs} +1 -1
  94. package/dist/{vue-ui-nested-donuts-6EYydl-l.js → vue-ui-nested-donuts-XJH9z_wF.js} +11 -11
  95. package/dist/{vue-ui-onion-Dqfii-y3.js → vue-ui-onion-BJvveHv1.js} +11 -11
  96. package/dist/{vue-ui-onion-D0Y-pJox.cjs → vue-ui-onion-rmq2wvkV.cjs} +1 -1
  97. package/dist/{vue-ui-parallel-coordinate-plot-yUVuNHbG.js → vue-ui-parallel-coordinate-plot-C1A6OGCv.js} +12 -12
  98. package/dist/{vue-ui-parallel-coordinate-plot-cETB0SSp.cjs → vue-ui-parallel-coordinate-plot-DUG7AQBu.cjs} +1 -1
  99. package/dist/{vue-ui-quadrant-Bk24QzXW.js → vue-ui-quadrant-CPUtUNLW.js} +12 -12
  100. package/dist/{vue-ui-quadrant-C2Z9igq-.cjs → vue-ui-quadrant-wz9ILTxc.cjs} +1 -1
  101. package/dist/{vue-ui-quick-chart-BNYO7nMz.cjs → vue-ui-quick-chart-BUCAhqff.cjs} +1 -1
  102. package/dist/{vue-ui-quick-chart-BTBzFVVt.js → vue-ui-quick-chart-D5GV86FD.js} +9 -9
  103. package/dist/{vue-ui-radar-DpJ6BjWE.cjs → vue-ui-radar-DEJQlniz.cjs} +1 -1
  104. package/dist/{vue-ui-radar-d5WGxBWb.js → vue-ui-radar-DgxnT6Ia.js} +12 -12
  105. package/dist/{vue-ui-rating-DHP9cn7v.js → vue-ui-rating-YhL9VCJu.js} +2 -2
  106. package/dist/{vue-ui-rating-DlpuX8_4.cjs → vue-ui-rating-oHYSjb-S.cjs} +1 -1
  107. package/dist/{vue-ui-relation-circle-DFFnj0G-.js → vue-ui-relation-circle-CuN880Sz.js} +7 -7
  108. package/dist/{vue-ui-relation-circle-C9r2L_By.cjs → vue-ui-relation-circle-fvzrVyeW.cjs} +1 -1
  109. package/dist/{vue-ui-ridgeline-CWcW0CKH.cjs → vue-ui-ridgeline-0N6HCsbx.cjs} +1 -1
  110. package/dist/{vue-ui-ridgeline-B6SmiN8e.js → vue-ui-ridgeline-DcJqJ4Br.js} +12 -12
  111. package/dist/{vue-ui-rings-BZ6huPcE.cjs → vue-ui-rings-B3NvRyTt.cjs} +1 -1
  112. package/dist/{vue-ui-rings-07YzKS3V.js → vue-ui-rings-CWVbql32.js} +12 -12
  113. package/dist/{vue-ui-scatter-DZZtUBuf.js → vue-ui-scatter-BomRqjIY.js} +12 -12
  114. package/dist/{vue-ui-scatter-DYRw6p9i.cjs → vue-ui-scatter-pm9MRNSF.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-BoZyBfQF.js → vue-ui-skeleton-Buze5CJ9.js} +3 -3
  116. package/dist/{vue-ui-skeleton-LYOlEoA_.cjs → vue-ui-skeleton-D5NShLgw.cjs} +1 -1
  117. package/dist/{vue-ui-smiley-C9Au0iXl.cjs → vue-ui-smiley-2dUYrT8i.cjs} +1 -1
  118. package/dist/{vue-ui-smiley-D3A8OqM8.js → vue-ui-smiley-BwfJxJz1.js} +2 -2
  119. package/dist/{vue-ui-spark-trend-BfR_RtZy.js → vue-ui-spark-trend-C7iY_86w.js} +5 -5
  120. package/dist/{vue-ui-spark-trend-DnoxMeF3.cjs → vue-ui-spark-trend-CEisuf9v.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-CJUkmhnj.js → vue-ui-sparkbar-CRuTBzCm.js} +4 -4
  122. package/dist/{vue-ui-sparkbar-CAHDM61K.cjs → vue-ui-sparkbar-CYBJuXyQ.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-DngkG6ub.cjs → vue-ui-sparkgauge-BXiL-H2G.cjs} +1 -1
  124. package/dist/{vue-ui-sparkgauge-CXt_UXa0.js → vue-ui-sparkgauge-DlQVyQjt.js} +4 -4
  125. package/dist/{vue-ui-sparkhistogram-e1KLP3lx.js → vue-ui-sparkhistogram-B0dDhsh7.js} +5 -5
  126. package/dist/{vue-ui-sparkhistogram-BGSXZdYJ.cjs → vue-ui-sparkhistogram-dRHZS69c.cjs} +1 -1
  127. package/dist/{vue-ui-sparkline-4HHF_g27.cjs → vue-ui-sparkline--7FAyaV6.cjs} +1 -1
  128. package/dist/{vue-ui-sparkline-C1c0gnoE.js → vue-ui-sparkline-BPYP_3F7.js} +4 -4
  129. package/dist/{vue-ui-sparkstackbar-WWHBMDoc.js → vue-ui-sparkstackbar-CW8EOoq6.js} +5 -5
  130. package/dist/{vue-ui-sparkstackbar-CYI8Q-A7.cjs → vue-ui-sparkstackbar-DIIJj1wV.cjs} +1 -1
  131. package/dist/{vue-ui-stackbar-Dswh_YhD.js → vue-ui-stackbar-C7VZ5PHn.js} +13 -13
  132. package/dist/{vue-ui-stackbar-LROMB081.cjs → vue-ui-stackbar-Ck1yeR-g.cjs} +1 -1
  133. package/dist/{vue-ui-strip-plot-BHLCEMtE.cjs → vue-ui-strip-plot-C2YMIwOm.cjs} +1 -1
  134. package/dist/{vue-ui-strip-plot-CkTMHioN.js → vue-ui-strip-plot-DZMIliYA.js} +11 -11
  135. package/dist/{vue-ui-table-ClPvrWk1.cjs → vue-ui-table-BR32W2JW.cjs} +1 -1
  136. package/dist/{vue-ui-table-BQLFbWJu.js → vue-ui-table-DggvYyBd.js} +3 -3
  137. package/dist/{vue-ui-table-heatmap-CzXQ_Jyj.cjs → vue-ui-table-heatmap-Bl8BJlrP.cjs} +1 -1
  138. package/dist/{vue-ui-table-heatmap-Cq0Ayqw9.js → vue-ui-table-heatmap-Co86evBH.js} +4 -4
  139. package/dist/{vue-ui-table-sparkline-CrWRDJhv.cjs → vue-ui-table-sparkline-CR4Xo17N.cjs} +1 -1
  140. package/dist/{vue-ui-table-sparkline-kApN7-VK.js → vue-ui-table-sparkline-bpl24ydD.js} +5 -5
  141. package/dist/{vue-ui-thermometer-BqtB3WF_.js → vue-ui-thermometer-9fpJItF7.js} +7 -7
  142. package/dist/{vue-ui-thermometer-DYo8ZTAM.cjs → vue-ui-thermometer-C03In60a.cjs} +1 -1
  143. package/dist/{vue-ui-timer-DprIzsAY.cjs → vue-ui-timer-B-GRZP1F.cjs} +1 -1
  144. package/dist/{vue-ui-timer-DcHNiJK0.js → vue-ui-timer-Jei5BiD_.js} +5 -5
  145. package/dist/{vue-ui-tiremarks-fEn67LmT.js → vue-ui-tiremarks-B8WG2ok9.js} +7 -7
  146. package/dist/{vue-ui-tiremarks-Dpn0SavO.cjs → vue-ui-tiremarks-CtojdnkW.cjs} +1 -1
  147. package/dist/{vue-ui-treemap-Cq5QKrAX.js → vue-ui-treemap-6KYCNZho.js} +12 -12
  148. package/dist/{vue-ui-treemap-C8uX5Ilw.cjs → vue-ui-treemap-Cb7cgmml.cjs} +1 -1
  149. package/dist/{vue-ui-vertical-bar-BctpxL75.js → vue-ui-vertical-bar-BEFnicAy.js} +12 -12
  150. package/dist/{vue-ui-vertical-bar-Bj-tNmvd.cjs → vue-ui-vertical-bar-U38k297l.cjs} +1 -1
  151. package/dist/{vue-ui-waffle-B3XGM76l.cjs → vue-ui-waffle-BiDUa_mf.cjs} +1 -1
  152. package/dist/{vue-ui-waffle-inmP6xJa.js → vue-ui-waffle-DkmwDnZR.js} +12 -12
  153. package/dist/{vue-ui-wheel-BExyiteC.js → vue-ui-wheel-DP7fvbGp.js} +7 -7
  154. package/dist/{vue-ui-wheel-D4quM69U.cjs → vue-ui-wheel-_n8mecg5.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-D3O3LDR0.cjs → vue-ui-word-cloud-D7AN_XSy.cjs} +1 -1
  156. package/dist/{vue-ui-word-cloud-CO6OX7uL.js → vue-ui-word-cloud-QJS8wmHH.js} +10 -10
  157. package/dist/vue-ui-world-BKjsYsNe.js +931 -0
  158. package/dist/{vue-ui-world-BWv7KvDY.cjs → vue-ui-world-Cwu0_sO2.cjs} +1 -1
  159. package/dist/{vue-ui-xy-BLnXnpd-.js → vue-ui-xy-B31mVrV8.js} +16 -16
  160. package/dist/{vue-ui-xy-CnLejNy1.cjs → vue-ui-xy-DrSTGIwE.cjs} +2 -2
  161. package/dist/{vue-ui-xy-canvas-t3XI0Z_d.cjs → vue-ui-xy-canvas-Cb-SSn4j.cjs} +1 -1
  162. package/dist/{vue-ui-xy-canvas-2hhjtxZN.js → vue-ui-xy-canvas-CcYTS3qd.js} +12 -12
  163. package/package.json +1 -1
  164. package/dist/vue-ui-world-j_aAVyB8.js +0 -1112
@@ -1,10 +1,10 @@
1
1
  import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
2
- import { u as oe } from "./useNestedProp-DwQWwt5e.js";
3
- import { u as re, c as ue, X as ie, F as V } from "./index-BMcwUsiG.js";
2
+ import { u as oe } from "./useNestedProp-BU5A_H6S.js";
3
+ import { u as re, c as ue, X as ie, F as V } from "./index-Ckt5xLw3.js";
4
4
  import { t as ne, u as ce } from "./useResponsive-JZ9xq-JV.js";
5
- import R from "./BaseIcon-BPehVcsN.js";
6
- import { _ as de } from "./Title-Cq5kGGhS.js";
7
- import { _ as he } from "./PackageVersion-BPCzY_N5.js";
5
+ import R from "./BaseIcon-D9r5PTQj.js";
6
+ import { _ as de } from "./Title-C6HOVO5o.js";
7
+ import { _ as he } from "./PackageVersion-Db8Jk3Yz.js";
8
8
  import { u as ve } from "./useChartAccessibility-BWojgys7.js";
9
9
  import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  class fe {
@@ -1,11 +1,11 @@
1
1
  import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as O, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
2
- import { u as ae } from "./useNestedProp-DwQWwt5e.js";
3
- import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-BMcwUsiG.js";
4
- import { _ as $e } from "./Title-Cq5kGGhS.js";
5
- import { u as we, U as xe } from "./usePrinter-BpCNa5RW.js";
6
- import Oe from "./vue-ui-skeleton-BoZyBfQF.js";
7
- import { _ as Pe } from "./PackageVersion-BPCzY_N5.js";
8
- import { _ as Ae } from "./PenAndPaper-B3KDT2of.js";
2
+ import { u as ae } from "./useNestedProp-BU5A_H6S.js";
3
+ import { u as fe, c as ge, a as ye, v as pe, o as me, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-Ckt5xLw3.js";
4
+ import { _ as $e } from "./Title-C6HOVO5o.js";
5
+ import { u as we, U as xe } from "./usePrinter-Drrm-7ZN.js";
6
+ import Oe from "./vue-ui-skeleton-Buze5CJ9.js";
7
+ import { _ as Pe } from "./PackageVersion-Db8Jk3Yz.js";
8
+ import { _ as Ae } from "./PenAndPaper-Bleo21mI.js";
9
9
  import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
10
10
  import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-DYDoE86w.cjs"),c=require("./index-CG-euAJp.cjs"),K=require("./Title-GpO-QNhg.cjs"),j=require("./usePrinter-BBqldIVF.cjs"),Q=require("./vue-ui-skeleton-LYOlEoA_.cjs"),W=require("./PackageVersion-B6nxekEz.cjs"),Z=require("./PenAndPaper-BC1d2zL5.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-swJfhg8O.cjs"),c=require("./index-BKWunRAY.cjs"),K=require("./Title-DnNgxDaw.cjs"),j=require("./usePrinter-Dhf-GWO2.cjs"),Q=require("./vue-ui-skeleton-D5NShLgw.cjs"),W=require("./PackageVersion-BhpRHJg-.cjs"),Z=require("./PenAndPaper-Cr_VFW1Y.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),B=e.ref(c.createUid()),O=e.ref(null),X=e.ref(null),S=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:P,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),P.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:B.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks",options:t.value.userOptions.print}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const m=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return m.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:m.value?312:56,width:m.value?56:312})),i=e.computed(()=>m.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(m.value){const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,f=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${f-b}, ${h} ${f}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,f=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(f-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:f,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${f-b}, ${h} ${f}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return m.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function J(o){_.value=o,S.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:O,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:B.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z._sfc_main,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(P))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:O.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,s.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},fe=oe._export_sfc(pe,[["__scopeId","data-v-fac4c918"]]);exports.default=fe;
@@ -1,19 +1,19 @@
1
1
  import { useSlots as pt, onMounted as je, computed as C, ref as g, watch as gt, onBeforeUnmount as mt, createElementBlock as y, openBlock as v, unref as m, normalizeStyle as L, normalizeClass as me, createBlock as X, createCommentVNode as _, createElementVNode as O, createVNode as ye, createSlots as yt, withCtx as x, renderSlot as $, normalizeProps as j, guardReactiveProps as Y, Fragment as ce, renderList as be, withKeys as Ye, withModifiers as ke, mergeProps as Ke, createTextVNode as de, toDisplayString as K, nextTick as bt } from "vue";
2
- import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-BMcwUsiG.js";
3
- import { _ as Nt } from "./Title-Cq5kGGhS.js";
4
- import { u as zt, U as Ft } from "./usePrinter-BpCNa5RW.js";
5
- import { _ as At } from "./Tooltip-CxzDtoXn.js";
6
- import { L as Pt } from "./Legend-HckkoJBL.js";
7
- import Rt from "./vue-ui-skeleton-BoZyBfQF.js";
8
- import { D as Lt } from "./DataTable-BdekL1Hc.js";
9
- import Dt from "./vue-ui-accordion-DKw3ZQgh.js";
2
+ import { u as kt, c as Ze, t as wt, p as S, a as Ct, b as $t, o as xt, e as Tt, d as ve, i as he, f as oe, X as _t, l as Je, G as Qe, x as et, q as Ot, r as St, y as It } from "./index-Ckt5xLw3.js";
3
+ import { _ as Nt } from "./Title-C6HOVO5o.js";
4
+ import { u as zt, U as Ft } from "./usePrinter-Drrm-7ZN.js";
5
+ import { _ as At } from "./Tooltip-CkPkykAp.js";
6
+ import { L as Pt } from "./Legend-COUltTuv.js";
7
+ import Rt from "./vue-ui-skeleton-Buze5CJ9.js";
8
+ import { D as Lt } from "./DataTable-p1tKJjJU.js";
9
+ import Dt from "./vue-ui-accordion-CHWjFAdS.js";
10
10
  import { t as Mt, u as Vt } from "./useResponsive-JZ9xq-JV.js";
11
- import { u as tt } from "./useNestedProp-DwQWwt5e.js";
12
- import { _ as Bt } from "./PackageVersion-BPCzY_N5.js";
13
- import { _ as Ht } from "./PenAndPaper-B3KDT2of.js";
11
+ import { u as tt } from "./useNestedProp-BU5A_H6S.js";
12
+ import { _ as Bt } from "./PackageVersion-Db8Jk3Yz.js";
13
+ import { _ as Ht } from "./PenAndPaper-Bleo21mI.js";
14
14
  import { u as Ut } from "./useUserOptionState-BIvW1Kz7.js";
15
15
  import { u as Wt } from "./useChartAccessibility-BWojgys7.js";
16
- import Et from "./BaseIcon-BPehVcsN.js";
16
+ import Et from "./BaseIcon-D9r5PTQj.js";
17
17
  import { _ as Gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
18
  function ot(n, r) {
19
19
  const u = n.length;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CG-euAJp.cjs"),Me=require("./Title-GpO-QNhg.cjs"),Se=require("./usePrinter-BBqldIVF.cjs"),He=require("./Tooltip-eL97y6Ym.cjs"),Ue=require("./Legend-C8PTNFsH.cjs"),We=require("./vue-ui-skeleton-LYOlEoA_.cjs"),Ge=require("./DataTable-pT39kn0W.cjs"),je=require("./vue-ui-accordion-dJGHfrMl.cjs"),Be=require("./useResponsive-BBkmXXaa.cjs"),Ne=require("./useNestedProp-DYDoE86w.cjs"),Xe=require("./PackageVersion-B6nxekEz.cjs"),Ye=require("./PenAndPaper-BC1d2zL5.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-dtfVrHa7.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<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="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BKWunRAY.cjs"),Me=require("./Title-DnNgxDaw.cjs"),Se=require("./usePrinter-Dhf-GWO2.cjs"),He=require("./Tooltip-BcRV15Nk.cjs"),Ue=require("./Legend-m-jOk1o6.cjs"),We=require("./vue-ui-skeleton-D5NShLgw.cjs"),Ge=require("./DataTable-CzL8BmEn.cjs"),je=require("./vue-ui-accordion-CACZOsPN.cjs"),Be=require("./useResponsive-BBkmXXaa.cjs"),Ne=require("./useNestedProp-swJfhg8O.cjs"),Xe=require("./PackageVersion-BhpRHJg-.cjs"),Ye=require("./PenAndPaper-Cr_VFW1Y.cjs"),Ke=require("./useUserOptionState-BgepsfED.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./BaseIcon-ljtRuDne.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function _e(r,c){const i=r.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${r} is an empty array`);{let d=1/0,u=-1/0,v=0;for(let f=0;f<i;f+=1){const m=r[f].normalizedValue;m<d&&(d=m),m>u&&(u=m),v+=m}return Math.max(c**2*u/v**2,v**2/(c**2*d))}}function Oe(r){const{xOffset:c,yOffset:i,width:d,height:u}=r;return{x0:c,y0:i,x1:c+d,y1:i+u}}function et(r,c,i){if(r.length===0)return!0;{const d=r.concat(c),u=_e(r,i),v=_e(d,i);return u>=v}}function tt(r){const c=[],i=r.length;for(let d=0;d<i;d+=1){const u=r[d],v=u.length;for(let h=0;h<v;h+=1)c.push(u[h])}return c}function ot(r,c){const i={...c,children:r};return Pe(i)}function lt(r){return(r.x1-r.x0)*(r.y1-r.y0)}function ze(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(c),h=r.length,f=r.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),m=f/d,x=f/i;let C=u,$=v;const b=[];if(i>=d){for(let y=0;y<h;y+=1){const g=r[y],k=$+g.normalizedValue/m,_={x0:C,y0:$,x1:C+m,y1:k},T=Object.assign({},g,_);$=k,b.push(T)}return b}else{for(let y=0;y<h;y+=1){const g=r[y],k=C+g.normalizedValue/x,_={x0:C,y0:$,x1:k,y1:$+x},T=Object.assign({},g,_);C=k,b.push(T)}return b}}function at(r){const c=Q(r),i=c.width,d=c.height;return Math.min(i,d)}function nt(r,c){const i=r.length,d=r.map(m=>m.value??0).reduce((m,x)=>m+x,0),u=c/d,v=[];let h,f;for(let m=0;m<i;m+=1)f=r[m],h=Object.assign({},f,{normalizedValue:f.value*(u||0)}),v.push(h);return v}function Q(r){const{x0:c,y0:i,x1:d,y1:u}=r;return{xOffset:c,yOffset:i,width:d-c,height:u-i}}function rt(r,c,i,d){let u=r,v=c,h=i,f=d;for(;;){const m=u.length;if(m===0){const b=ze(v,h);return f.concat(b)}const x=at(h),C=u[0],$=u.slice(1,m);if(et(v,C,x)){const b=v.concat(C);u=$,v=b,h=h,f=f}else{const b=v.length;let y=0;for(let T=0;T<b;T+=1)y+=v[T].normalizedValue;const g=st(h,y),k=ze(v,h),_=f.concat(k);u=u,v=[],h=g,f=_}}}function Pe(r){if(typeof r.children>"u"||!r.children.length)return[r];{const c=nt(r.children,lt(r)),i=rt(c,[],r,[]),d=i.length,u=[];for(let h=0;h<d;h+=1)u.push(Pe(i[h]));return tt(u)}}function st(r,c){const{width:i,height:d,xOffset:u,yOffset:v}=Q(r);if(i>=d){const h=c/d,f=i-h,m={xOffset:u+h,yOffset:v,width:f,height:d};return Oe(m)}else{const h=c/i,f=d-h,m={xOffset:u,yOffset:v+h,width:i,height:f};return Oe(m)}}const ut=["id"],it={key:4,class:"vue-ui-treemap-breadcrumbs","data-dom-to-png-ignore":""},ct=["tabindex","onClick","onKeydown","data-last-crumb","onMouseenter","onFocus"],dt={class:"vue-ui-treemap-crumb-unit"},vt={class:"vue-ui-treemap-crumb-unit-label"},ht={key:0,style:{width:"24px",display:"flex","align-items":"center"}},pt={key:0,class:"vue-ui-treemap-crumb-unit-arrow"},ft=["xmlns","viewBox"],mt={key:0},gt=["id"],yt=["stop-color"],bt=["stop-color"],kt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ct=["x","y","height","width"],wt={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},xt={key:6,class:"vue-data-ui-watermark"},$t=["onClick"],Tt={key:0},St={key:1},Bt=["innerHTML"],Nt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(r,{expose:c,emit:i}){const{vue_ui_treemap:d}=s.useConfig(),u=r,v=i,h=e.useSlots();e.onMounted(()=>{h["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const f=e.computed(()=>!!u.dataset&&u.dataset.length),m=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),x=e.ref(s.createUid()),C=e.ref(!1),$=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),_=e.ref(null),T=e.ref(null),ee=e.ref(null),te=e.ref(null),oe=e.ref(0),le=e.ref(0),ae=e.ref(0),o=e.computed({get:()=>ue(),set:t=>t}),{userOptionsVisible:K,setUserOptionsVisibility:ne,keepUserOptionState:re}=Ke.useUserOptionState({config:o.value}),{svgRef:se}=Ze.useChartAccessibility({config:o.value.style.chart.title});function ue(){const t=Ne.useNestedProp({userConfig:u.config,defaultConfig:d});return t.theme?{...Ne.useNestedProp({userConfig:s.themes.vue_ui_treemap[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{o.value=ue(),K.value=!o.value.userOptions.showOnChartHover,oe.value+=1,le.value+=1,ae.value+=1,S.value.showTable=o.value.table.show,S.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ie,isImaging:ce,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`treemap_${x.value}`,fileName:o.value.style.chart.title.text||"vue-ui-treemap",options:o.value.userOptions.print}),Ve=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),H=e.computed(()=>s.convertCustomPalette(o.value.customPalette)),S=e.ref({showTable:o.value.table.show,showTooltip:o.value.style.chart.tooltip.show}),O=e.ref({height:o.value.style.chart.height,width:o.value.style.chart.width}),F=e.computed(()=>({bottom:O.value.height-o.value.style.chart.padding.bottom,height:O.value.height-o.value.style.chart.padding.top-o.value.style.chart.padding.bottom,left:o.value.style.chart.padding.left,right:O.value.width-o.value.style.chart.padding.right,top:o.value.style.chart.padding.top,vbHeight:O.value.height,vbWidth:O.value.width,width:O.value.width-o.value.style.chart.padding.left-o.value.style.chart.padding.right}));function he(t){t.forEach((a,l)=>{a.id=s.createUid(),a.color=s.convertColorToHex(a.color)||H.value[l]||s.palette[l]||s.palette[l%s.palette.length],a.children&&(a.children.forEach(n=>{n.parentId=a.id,n.color=a.color}),he(a.children))})}const z=e.ref(u.dataset),U=e.ref(null);e.onMounted(()=>{Ee()});function Ee(){if(s.objectIsEmpty(u.dataset)&&s.error({componentName:"VueUiTreemap",type:"dataset"}),he(z.value),o.value.responsive){const t=Be.throttle(()=>{const{width:a,height:l}=Be.useResponsive({chart:k.value,title:o.value.style.chart.title.text?_.value:null,legend:o.value.style.chart.legend.show?T.value:null,source:ee.value,noTitle:te.value});requestAnimationFrame(()=>{O.value.width=a,O.value.height=l})});U.value=new ResizeObserver(t),U.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{U.value&&U.value.disconnect()});const L=e.ref(z.value),q=e.computed(()=>L.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length]})).filter(t=>!g.value.includes(t.id))),A=e.computed(()=>z.value.filter(t=>!g.value.includes(t.id)).map(t=>t.value||0).reduce((t,a)=>t+a,0)),pe=e.computed({get(){let t=[...q.value];return o.value.style.chart.layout.sorted&&(t=[...q.value].sort((a,l)=>l.value-a.value)),t.map(a=>({...a}))},set(t){return t}});function fe(t,a){return t.value/a}function Fe(t,a,l){const n=o.value.style.chart.layout.rects.colorRatio-fe(a,l);return s.lightenHexColor(t,n<0?0:n)}function me(t,a,l,n){return t.map((p,E)=>{const Y=Fe(s.convertColorToHex(a)||H.value[E]||s.palette[E]||s.palette[E%s.palette.length],p,n),qe=fe(p,n);return{...p,color:Y,proportion:qe,parentName:l,children:p.children?me(p.children,Y,p.name,n):void 0}})}const M=e.computed(()=>ot(pe.value.map((t,a)=>{const l=t.children?t.children.reduce((n,p)=>n+p.value,0):t.value;return{value:t.value,id:t.id,children:t.children?me(t.children.sort((n,p)=>p.value-n.value),t.color,t.name,l):void 0,color:t.color,name:t.name}}),{x0:F.value.left*2,y0:F.value.top,x1:F.value.width,y1:F.value.height}));function ge({y0:t,y1:a}){return a-t<=0?1e-4:a-t}function ye({x0:t,x1:a}){return a-t<=0?1e-4:a-t}function I(t){const a=o.value.style.chart.layout.labels.fontSize*(t.proportion*2>1?1:t.proportion*2);return a<o.value.style.chart.layout.labels.minFontSize?o.value.style.chart.layout.labels.minFontSize:a}function Ie(t){b.value=t,y.value+=1}const D=e.computed(()=>({startX:0,startY:0,width:F.value.vbWidth,height:F.value.vbHeight}));function R(t,a=z.value){for(const l of a){if(l.id===t)return l;if(l.children){const n=R(t,l.children);if(n)return n}}return null}const w=e.ref([]),P=e.computed(()=>w.value.length>0);function W(t){var l;if(!t){L.value=z.value.slice(),v("selectDatapoint",void 0),w.value=[];return}const a=R(t.id);if(a&&((l=a.children)!=null&&l.length))w.value.push(a.id),L.value=a.children.slice(),v("selectDatapoint",t);else if(t.parentId){w.value.push(t.parentId);const n=R(t.parentId);L.value=n.children.slice(),v("selectDatapoint",t)}else if(w.value.length>0){w.value.pop();const n=w.value[w.value.length-1];if(n){const p=R(n);L.value=p.children.slice()}else L.value=z.value.slice(),w.value=[],v("selectDatapoint",void 0)}}function Re(t){var l;const a=R(t.id);return!!((l=a==null?void 0:a.children)!=null&&l.length||t.parentId)}const V=e.computed(()=>{const t=[{id:null,label:"All"}];if(w.value.length>0){let a=R(w.value[w.value.length-1]);const l=[];for(;a;)l.unshift(a),a=a.parentId?R(a.parentId):null;for(const n of l)t.push({id:n.id,label:n.name,node:n})}return t}),B=e.ref(null),be=e.computed(()=>z.value.map((t,a)=>({...t,color:s.convertColorToHex(t.color)||H.value[a]||s.palette[a]||s.palette[a%s.palette.length],shape:"square"})).sort((t,a)=>a.value-t.value).map((t,a)=>({...t,proportion:t.value/z.value.map(l=>l.value).reduce((l,n)=>l+n,0),opacity:g.value.includes(t.id)?.5:1}))),Le=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:o.value.style.chart.legend.backgroundColor,color:o.value.style.chart.legend.color,fontSize:o.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:o.value.style.chart.legend.bold?"bold":""}));function ke(t){P.value=!1,B.value=null,g.value.includes(t.id)?g.value=g.value.filter(a=>a!==t.id):g.value.length<u.dataset.length-1&&g.value.push(t.id),v("selectLegend",pe.value)}const Z=e.ref(null);function Ae({datapoint:t,seriesIndex:a}){B.value=t,Z.value={datapoint:t,seriesIndex:a,config:o.value,series:q.value};const l=o.value.style.chart.tooltip.customFormat;if(s.isFunction(l)&&s.functionReturnsString(()=>l({seriesIndex:a,datapoint:t,series:q.value,config:o.value})))$.value=l({seriesIndex:a,datapoint:t,series:q.value,config:o.value});else{let n="";n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${o.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,n+=`<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="${t.color}"/></svg>`,n+=`<b>${s.applyDataLabel(o.value.style.chart.layout.labels.formatter,t.value,s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:t.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.tooltip.roundingValue}),{datapoint:t,seriesIndex:a})}</b>`,$.value=`<div>${n}</div>`}C.value=!0}const N=e.computed(()=>{const t=M.value.map(l=>({name:l.name,color:l.color})),a=M.value.map(l=>l.value);return{head:t,body:a}});function Ce(){e.nextTick(()=>{const t=N.value.head.map((n,p)=>[[n.name],[N.value.body[p]],[isNaN(N.value.body[p]/A.value)?"-":N.value.body[p]/A.value*100]]),a=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(t),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:o.value.style.chart.title.text||"vue-ui-treemap"})})}const G=e.computed(()=>{const t=[o.value.table.columnNames.series,o.value.table.columnNames.value,o.value.table.columnNames.percentage],a=N.value.head.map((p,E)=>{const Y=s.applyDataLabel(o.value.style.chart.layout.labels.formatter,N.value.body[E],s.dataLabel({p:o.value.style.chart.layout.labels.prefix,v:N.value.body[E],s:o.value.style.chart.layout.labels.suffix,r:o.value.table.td.roundingValue}));return[{color:p.color,name:p.name,shape:"square"},Y,isNaN(N.value.body[E]/A.value)?"-":s.dataLabel({v:N.value.body[E]/A.value*100,s:"%",r:o.value.table.td.roundingPercentage})]}),l={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint};return{colNames:[o.value.table.columnNames.series,o.value.table.columnNames.value],head:t,body:a,config:l}});function De(){return M.value}function we(){S.value.showTable=!S.value.showTable}function xe(){S.value.showTooltip=!S.value.showTooltip}const j=e.ref(!1);function J(){j.value=!j.value}const X=e.ref(null);function $e(t){X.value=t}function Te(){X.value=null}return c({getData:De,generateCsv:Ce,generateImage:ve,generatePdf:de,toggleTable:we,toggleTooltip:xe,toggleAnnotator:J}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${o.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; ${o.value.responsive?"height: 100%;":""} text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`treemap_${x.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ne)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ne)(!1))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ye._sfc_main,{key:0,svgRef:e.unref(se),backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:j.value,onClose:J},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:te,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:_,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${oe.value}`,config:{title:{cy:"treemap-div-title",...o.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&f.value&&(e.unref(re)||e.unref(K))?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(ie),isImaging:e.unref(ce),uid:x.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:S.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:k.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:j.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(de),onGenerateCsv:Ce,onGenerateImage:e.unref(ve),onToggleTable:we,onToggleTooltip:xe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(re)?e.unref(K)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),V.value.length>1?(e.openBlock(),e.createElementBlock("nav",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(l,n)=>(e.openBlock(),e.createElementBlock("span",{role:"button",tabindex:n<V.value.length-1?0:void 0,key:l.id||"root",onClick:p=>n===V.value.length-1?()=>{}:W(l.node),onKeydown:[e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["enter"]),e.withKeys(e.withModifiers(p=>n===V.value.length-1?void 0:W(l.node),["prevent"]),["space"])],class:"vue-ui-treemap-crumb","data-last-crumb":n===V.value.length-1,style:e.normalizeStyle({color:o.value.style.chart.color}),onMouseenter:p=>$e(n),onMouseleave:Te,onFocus:p=>$e(n),onBlur:Te},[e.createElementVNode("span",dt,[e.createElementVNode("span",vt,[e.renderSlot(t.$slots,"breadcrumb-label",e.mergeProps({ref_for:!0},{crumb:l,isRoot:n===0,isFocus:X.value===n}),()=>[n===0?(e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(Je.default,{name:X.value===0?"homeFilled":"home",stroke:o.value.style.chart.color},null,8,["name","stroke"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.label),1)],64))],!0)]),n<V.value.length-1?(e.openBlock(),e.createElementBlock("span",pt,[e.renderSlot(t.$slots,"breadcrumb-arrow",{},()=>[a[5]||(a[5]=e.createTextVNode(" › "))],!0)])):e.createCommentVNode("",!0)])],44,ct))),128))])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:se,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!P.value,"vue-data-ui-zoom-minus":P.value}),viewBox:`${D.value.startX} ${D.value.startY} ${D.value.width<=0?10:D.value.width} ${D.value.height<=0?10:D.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${o.value.style.chart.color}`)},[e.createVNode(Xe._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",mt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,yt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.lightenHexColor)(l.color,o.value.style.chart.layout.rects.gradient.intensity/100)},null,8,bt)],8,gt)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),fill:m.value?l.color:o.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:o.value.style.chart.layout.rects.borderRadius,stroke:B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.stroke:o.value.style.chart.layout.rects.stroke,"stroke-width":B.value&&B.value.id===l.id?o.value.style.chart.layout.rects.selected.strokeWidth:o.value.style.chart.layout.rects.strokeWidth,onClick:e.withModifiers(p=>W(l),["stop"]),onMouseenter:()=>Ae({datapoint:l,seriesIndex:n}),onMouseleave:a[0]||(a[0]=p=>{B.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${B.value?B.value.id===l.id?1:o.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:e.normalizeClass(["vue-ui-treemap-rect",Re(l)?"vue-data-ui-zoom-plus":P.value?"vue-data-ui-zoom-minus":""])},null,46,kt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ge(l),width:ye(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",wt,[o.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${I(l)/1.5}px);text-align:left;line-height:${I(l)<14?14:I(l)}px;padding:${I(l)/3}px; color:${e.unref(s.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(l.name),5),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${I(l)}px;`)},e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rect",e.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>o.value.style.chart.layout.labels.hideUnderProportion||P.value,fontSize:I(l),isZoom:P.value,textColor:e.unref(s.adaptColorToBackground)(l.color)}),void 0,!0)])],8,Ct))]))),256)),e.renderSlot(t.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:F.value,isZoom:P.value,rect:B.value,config:o.value})),void 0,!0)],14,ft)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ie)||e.unref(ce)})),void 0,!0)])):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We.default,{key:7,config:{type:"treemap",style:{backgroundColor:o.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[o.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ue.Legend,{key:`legend_${ae.value}`,legendSet:be.value,config:Le.value,id:`treemap_legend_${x.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ke(l))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{onClick:p=>ke(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(o.value.style.chart.layout.labels.formatter,l.value,e.unref(s.dataLabel)({p:o.value.style.chart.layout.labels.prefix,v:l.value,s:o.value.style.chart.layout.labels.suffix,r:o.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",St," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Tt," ("+e.toDisplayString(isNaN(l.value/A.value)?"-":(l.value/A.value*100).toFixed(o.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,$t)]),_:1},8,["legendSet","config","id"])):e.renderSlot(t.$slots,"legend",{key:1,legend:be.value},void 0,!0)],512),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:ee,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(He._sfc_main,{show:S.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,fontSize:o.value.style.chart.tooltip.fontSize,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:k.value,content:$.value,isFullscreen:b.value,isCustom:e.unref(s.isFunction)(o.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),f.value?(e.openBlock(),e.createBlock(je.default,{key:9,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ge.DataTable,{key:`table_${le.value}`,colNames:G.value.colNames,head:G.value.head,body:G.value.body,config:G.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>S.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Bt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ut))}},_t=Qe._export_sfc(Nt,[["__scopeId","data-v-c7aece99"]]);exports.default=_t;
@@ -1,18 +1,18 @@
1
1
  import { useCssVars as ct, useSlots as ht, computed as m, ref as i, watch as Ue, onMounted as Xe, onBeforeUnmount as pt, createElementBlock as r, openBlock as u, unref as d, normalizeStyle as c, normalizeClass as A, createBlock as B, createCommentVNode as p, renderSlot as b, createVNode as Y, createSlots as ce, withCtx as _, normalizeProps as X, guardReactiveProps as E, createElementVNode as n, toDisplayString as h, Fragment as H, renderList as W, mergeProps as yt, withKeys as gt, createTextVNode as ft } from "vue";
2
- import { u as bt, c as mt, t as _t, p as R, a as kt, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-BMcwUsiG.js";
2
+ import { u as bt, c as mt, t as _t, p as R, a as kt, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-Ckt5xLw3.js";
3
3
  import { t as St, u as Pt } from "./useResponsive-JZ9xq-JV.js";
4
- import { _ as Vt } from "./Title-Cq5kGGhS.js";
5
- import { u as It, U as Ot } from "./usePrinter-BpCNa5RW.js";
6
- import { _ as Ft } from "./Tooltip-CxzDtoXn.js";
7
- import { L as He } from "./Legend-HckkoJBL.js";
8
- import Mt from "./vue-ui-skeleton-BoZyBfQF.js";
9
- import zt from "./BaseIcon-BPehVcsN.js";
10
- import At from "./vue-ui-accordion-DKw3ZQgh.js";
11
- import { u as We } from "./useNestedProp-DwQWwt5e.js";
12
- import { _ as Bt } from "./PackageVersion-BPCzY_N5.js";
13
- import { _ as Rt } from "./PenAndPaper-B3KDT2of.js";
4
+ import { _ as Vt } from "./Title-C6HOVO5o.js";
5
+ import { u as It, U as Ot } from "./usePrinter-Drrm-7ZN.js";
6
+ import { _ as Ft } from "./Tooltip-CkPkykAp.js";
7
+ import { L as He } from "./Legend-COUltTuv.js";
8
+ import Mt from "./vue-ui-skeleton-Buze5CJ9.js";
9
+ import zt from "./BaseIcon-D9r5PTQj.js";
10
+ import At from "./vue-ui-accordion-CHWjFAdS.js";
11
+ import { u as We } from "./useNestedProp-BU5A_H6S.js";
12
+ import { _ as Bt } from "./PackageVersion-Db8Jk3Yz.js";
13
+ import { _ as Rt } from "./PenAndPaper-Bleo21mI.js";
14
14
  import { u as Dt } from "./useUserOptionState-BIvW1Kz7.js";
15
- import { _ as Ge } from "./Shape-B0OqBXWl.js";
15
+ import { _ as Ge } from "./Shape-DThtou8P.js";
16
16
  import { u as Ut } from "./useChartAccessibility-BWojgys7.js";
17
17
  import { _ as Xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
18
  const Et = ["id"], Ht = ["onClick"], Wt = ["xmlns", "viewBox"], Gt = ["width", "height"], jt = ["id"], qt = ["stop-color"], Yt = ["stop-color"], Kt = { key: 1 }, Jt = ["x", "y", "width", "height", "fill", "rx"], Qt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Zt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ea = ["x2", "y1", "y2", "stroke", "stroke-width"], ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], aa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], la = ["x", "y", "font-size", "fill", "font-weight"], oa = ["x", "y", "font-size", "fill", "font-weight"], na = ["x", "y", "font-size", "fill", "font-weight"], ua = ["y", "width", "height", "fill", "onMouseenter"], sa = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CG-euAJp.cjs"),ge=require("./useResponsive-BBkmXXaa.cjs"),Re=require("./Title-GpO-QNhg.cjs"),me=require("./usePrinter-BBqldIVF.cjs"),qe=require("./Tooltip-eL97y6Ym.cjs"),be=require("./Legend-C8PTNFsH.cjs"),Ue=require("./vue-ui-skeleton-LYOlEoA_.cjs"),He=require("./BaseIcon-dtfVrHa7.cjs"),Xe=require("./vue-ui-accordion-dJGHfrMl.cjs"),ke=require("./useNestedProp-DYDoE86w.cjs"),je=require("./PackageVersion-B6nxekEz.cjs"),We=require("./PenAndPaper-BC1d2zL5.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./Shape-Cr-Qt6IO.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},ft=["onClick"],gt={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(_e,{expose:xe,emit:we}){e.useCssVars(a=>({a6ba6a4e:a.tdo}));const{vue_ui_vertical_bar:Ne}=n.useConfig(),$e=e.useSlots(),g=_e,E=e.computed(()=>!!g.dataset&&g.dataset.length),f=e.ref(n.createUid()),Se=e.ref(null),F=e.ref(!1),I=e.ref(""),L=e.ref(0),Ve=e.ref(null),X=e.ref(0),V=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Te=we,t=e.computed({get:()=>Z(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Q}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Z(){const a=ke.useNestedProp({userConfig:g.config,defaultConfig:Ne});return a.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||g.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>g.config,a=>{t.value=Z(),R.value=!t.value.userOptions.showOnChartHover,ue(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>g.dataset,z,{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-vertical-bar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar",options:t.value.userOptions.print}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),re=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(n.objectIsEmpty(g.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=g.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:V.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ce.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{re.value=l.contentRect.width<Ee.value})}).observe(ne.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}),se=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(g.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})}))}),g.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${f.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>se.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${f.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>se.value?o.value-a.value:a.value-o.value))),ie=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":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Pe=e.computed(()=>(s.value+c.value)*L.value),ce=e.ref(512),i=e.computed(()=>({width:ce.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:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Te("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function de(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/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/k.value)?"":de(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Oe(){return w.value}const q=e.ref(null),U=e.ref(null);function Fe(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},F.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.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-BKWunRAY.cjs"),ge=require("./useResponsive-BBkmXXaa.cjs"),Re=require("./Title-DnNgxDaw.cjs"),me=require("./usePrinter-Dhf-GWO2.cjs"),qe=require("./Tooltip-BcRV15Nk.cjs"),be=require("./Legend-m-jOk1o6.cjs"),Ue=require("./vue-ui-skeleton-D5NShLgw.cjs"),He=require("./BaseIcon-ljtRuDne.cjs"),Xe=require("./vue-ui-accordion-CACZOsPN.cjs"),ke=require("./useNestedProp-swJfhg8O.cjs"),je=require("./PackageVersion-BhpRHJg-.cjs"),We=require("./PenAndPaper-Cr_VFW1Y.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./Shape-3lpxIkGY.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},ft=["onClick"],gt={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(_e,{expose:xe,emit:we}){e.useCssVars(a=>({a6ba6a4e:a.tdo}));const{vue_ui_vertical_bar:Ne}=n.useConfig(),$e=e.useSlots(),g=_e,E=e.computed(()=>!!g.dataset&&g.dataset.length),f=e.ref(n.createUid()),Se=e.ref(null),F=e.ref(!1),I=e.ref(""),L=e.ref(0),Ve=e.ref(null),X=e.ref(0),V=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Te=we,t=e.computed({get:()=>Z(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Q}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Z(){const a=ke.useNestedProp({userConfig:g.config,defaultConfig:Ne});return a.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||g.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>g.config,a=>{t.value=Z(),R.value=!t.value.userOptions.showOnChartHover,ue(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>g.dataset,z,{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-vertical-bar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar",options:t.value.userOptions.print}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),re=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(n.objectIsEmpty(g.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=g.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:V.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ce.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{re.value=l.contentRect.width<Ee.value})}).observe(ne.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}),se=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(g.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})}))}),g.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${f.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>se.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${f.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>se.value?o.value-a.value:a.value-o.value))),ie=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":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Pe=e.computed(()=>(s.value+c.value)*L.value),ce=e.ref(512),i=e.computed(()=>({width:ce.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:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Te("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function de(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/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/k.value)?"":de(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Oe(){return w.value}const q=e.ref(null),U=e.ref(null);function Fe(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},F.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?I.value=d({datapoint:a,series:x.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 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${$e.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
3
3
  ${v?`<div>${v}</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)/k.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>`)),I.value=`<div style="text-align:left">${l}</div>`)}function ve(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=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}),d=`(${de(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=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=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.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)/k.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)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function he(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const S=e.ref(!1);function Ie(a){S.value=a,X.value+=1}function pe(){h.value.showTable=!h.value.showTable}const Me=e.ref({none:0,asc:1,desc:2}),_=e.ref(0),D=e.ref(!1);e.onMounted(()=>{["none","asc","desc"].includes(t.value.style.chart.layout.bars.sort)||n.error({componentName:"VueUiVerticalBar",type:"attributeWrongValue",property:"style.chart.layout.bars.sort",key:t.value.style.chart.layout.bars.sort}),_.value=Me.value[t.value.style.chart.layout.bars.sort],h.value.sortDesc=_.value===2,D.value=_.value===0});function Ae(){_.value+=1,_.value>2&&(_.value=0)}function ye(){Ae(),h.value.sortDesc=_.value===2,D.value=_.value===0,z()}function fe(){h.value.showTooltip=!h.value.showTooltip}const O=e.ref(!1);function H(){O.value=!O.value}return xe({getData:Oe,recalculateHeight:z,generatePdf:le,generateCsv:he,generateImage:ae,toggleTable:pe,toggleSort:ye,toggleTooltip:fe,toggleAnnotator:H}),(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:V,id:`vue-ui-vertical-bar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(K)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(K)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(We._sfc_main,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:O.value,onClose:H},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Re._sfc_main,{key:`title_${Y.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&E.value&&(e.unref(J)||e.unref(R))?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Se,key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:f.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:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:O.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(le),onGenerateCsv:he,onGenerateImage:e.unref(ae),onToggleTable:pe,onToggleSort:ye,onToggleTooltip:fe,onToggleAnnotator:H,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"7"}: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:"8"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"9"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_top_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[0]||(o[0]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.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,Qe)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:Q,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 ${i.value.width<=0?10:i.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(je._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,et)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,at)],8,tt))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l.absoluteIndex,patternId:`pattern_${f.value}_${l.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.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:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.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,nt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.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:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,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,rt),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${f.value}_${l.absoluteIndex})`,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,ut)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,st)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,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,it)):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):De(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.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(ve(l.value,l,r,l.sign)),9,ct),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.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,dt)):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:B(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(B(l,r).name),9,vt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(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(ve(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,ht)):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:q.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Fe(l,r),onMouseleave:o[1]||(o[1]=v=>{Ve.value=null,F.value=!1,q.value=null})},null,40,pt)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,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:8,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_bottom_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[2]||(o[2]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.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,ft)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:x.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(qe._sfc_main,{show:h.value.showTooltip&&F.value&&b.value.length<g.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:V.value,content:I.value,isFullscreen:S.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({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),E.value?(e.openBlock(),e.createBlock(Xe.default,{key:10,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:ne,class:"vue-ui-vertical-bar-table atom-data-table"},[e.createElementVNode("div",gt,[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(He.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":re.value})},[e.createElementVNode("table",mt,[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",bt,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(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",kt,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(k.value)?"":k.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(m.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":m.value.head[0]??""},[e.createElementVNode("div",_t,[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,Ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",wt,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,xt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",$t,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Vt,e.toDisplayString(l.childName),1)],12,St),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[4]??""},[e.createElementVNode("div",Bt,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,Tt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",Lt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",zt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Je))}},Ot=Ke._export_sfc(Dt,[["__scopeId","data-v-3535bb6b"]]);exports.default=Ot;