vue-data-ui 2.3.78 → 2.3.80

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 (142) hide show
  1. package/dist/{Arrow-BCYtOwX7.js → Arrow-BI2HWbkl.js} +1 -1
  2. package/dist/{Arrow-DWkvIpW8.cjs → Arrow-BwOfAkTh.cjs} +1 -1
  3. package/dist/{BaseIcon-BIQXWVMS.js → BaseIcon-BhdIp3HQ.js} +1 -1
  4. package/dist/{BaseIcon-Bcpzfk34.cjs → BaseIcon-DU-oJKBy.cjs} +1 -1
  5. package/dist/{DataTable-y1lX5jVj.js → DataTable-CThhaAYT.js} +2 -2
  6. package/dist/{DataTable-C5TOiC61.cjs → DataTable-ysqfWT9v.cjs} +1 -1
  7. package/dist/{Legend-CGGD8NhP.cjs → Legend-DtnPX_Dc.cjs} +1 -1
  8. package/dist/{Legend-BLXcdrri.js → Legend-DxRA5XXC.js} +1 -1
  9. package/dist/{Shape-qJYTY2BC.cjs → Shape-DJdHakOl.cjs} +1 -1
  10. package/dist/{Shape-CsoTtJx6.js → Shape-EntBaNbX.js} +1 -1
  11. package/dist/{Slicer-DzJZ4axa.js → Slicer-BLFTdmNs.js} +2 -2
  12. package/dist/{Slicer-CZJXKSeE.cjs → Slicer-xJl1pkRn.cjs} +1 -1
  13. package/dist/{Title-Bx-VO3md.js → Title-Bgh58KWs.js} +1 -1
  14. package/dist/{Title-BSpa3uge.cjs → Title-DOzi72Pu.cjs} +1 -1
  15. package/dist/{Tooltip-rmhZhv96.cjs → Tooltip-DWx3KcqE.cjs} +1 -1
  16. package/dist/{Tooltip-Dk-cimhQ.js → Tooltip-HqwVgkYT.js} +1 -1
  17. package/dist/{index-CzjC8LfY.cjs → index-BofUHMEw.cjs} +1 -1
  18. package/dist/{index-DP8dqFNd.js → index-C_xZ1jJj.js} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-B-oZxD4x.js → useNestedProp-9QKvGow8.js} +1 -1
  21. package/dist/{useNestedProp-CY7DebVH.cjs → useNestedProp-DGK0LGfN.cjs} +1 -1
  22. package/dist/{usePrinter-DiuHo4LO.js → usePrinter-BJ7GxAOO.js} +1 -1
  23. package/dist/{usePrinter-DiLM6jav.cjs → usePrinter-_JYb_33H.cjs} +1 -1
  24. package/dist/{vue-data-ui-Ce5IFSYA.cjs → vue-data-ui-BDRU4x1z.cjs} +1 -1
  25. package/dist/{vue-data-ui-Ct7n5wkM.js → vue-data-ui-MIo8xmC1.js} +57 -57
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-B_i2EoFu.cjs → vue-ui-3d-bar-Clct1WMZ.cjs} +1 -1
  29. package/dist/{vue-ui-3d-bar-O3fB5J7V.js → vue-ui-3d-bar-Dul4M5zs.js} +7 -7
  30. package/dist/{vue-ui-accordion-DpI7fTKZ.cjs → vue-ui-accordion-XtygMpX7.cjs} +1 -1
  31. package/dist/{vue-ui-accordion-Dl8zkZPk.js → vue-ui-accordion-issoIPFd.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-BeiREI6d.js → vue-ui-age-pyramid-DnfnIupT.js} +8 -8
  33. package/dist/{vue-ui-age-pyramid-BsAfxkN4.cjs → vue-ui-age-pyramid-EsCLRd6s.cjs} +1 -1
  34. package/dist/{vue-ui-annotator-0yje27Qq.js → vue-ui-annotator-CmrenuBi.js} +1 -1
  35. package/dist/{vue-ui-annotator-DpN-6IwB.cjs → vue-ui-annotator-zFbcfeEs.cjs} +1 -1
  36. package/dist/{vue-ui-candlestick-lv78wnpS.cjs → vue-ui-candlestick-Bdo2RhhM.cjs} +1 -1
  37. package/dist/{vue-ui-candlestick-D9UteVvx.js → vue-ui-candlestick-DlwYwMdG.js} +9 -9
  38. package/dist/{vue-ui-carousel-table-Br6FwMKM.cjs → vue-ui-carousel-table-IN0an_Jc.cjs} +1 -1
  39. package/dist/{vue-ui-carousel-table-jxZ3h5pq.js → vue-ui-carousel-table-mo9C1GJ9.js} +4 -4
  40. package/dist/{vue-ui-chestnut-DbYHeNaL.cjs → vue-ui-chestnut-C9jiVBGB.cjs} +1 -1
  41. package/dist/{vue-ui-chestnut-DXuHRJy4.js → vue-ui-chestnut-DUeStDzz.js} +6 -6
  42. package/dist/{vue-ui-cursor-iss6SJ1Y.cjs → vue-ui-cursor-BoetT349.cjs} +1 -1
  43. package/dist/{vue-ui-cursor-BzPbdVRJ.js → vue-ui-cursor-x_Ai6P6S.js} +2 -2
  44. package/dist/{vue-ui-dashboard-CGjWuFrI.js → vue-ui-dashboard-B8IRsFc3.js} +2 -2
  45. package/dist/{vue-ui-dashboard-DKT82yQ4.cjs → vue-ui-dashboard-DUH23G5u.cjs} +1 -1
  46. package/dist/{vue-ui-digits-BCguvLxB.js → vue-ui-digits-BO5Bxyib.js} +2 -2
  47. package/dist/{vue-ui-digits-BfwDCfYp.cjs → vue-ui-digits-ByNeTvE4.cjs} +1 -1
  48. package/dist/vue-ui-donut-CDizH2x3.cjs +1 -0
  49. package/dist/{vue-ui-donut-DJTeGLVG.js → vue-ui-donut-DC6mZWdM.js} +318 -318
  50. package/dist/{vue-ui-donut-evolution-BaLDZNDG.js → vue-ui-donut-evolution-B2U3g0Yw.js} +9 -9
  51. package/dist/{vue-ui-donut-evolution-Bil1AIhX.cjs → vue-ui-donut-evolution-B7G4UB_e.cjs} +1 -1
  52. package/dist/{vue-ui-dumbbell-BqtDdV5w.js → vue-ui-dumbbell-81Azsrmw.js} +8 -8
  53. package/dist/{vue-ui-dumbbell-DiL3xhKY.cjs → vue-ui-dumbbell-DD7RtYjl.cjs} +1 -1
  54. package/dist/{vue-ui-flow-BVTbbsCK.cjs → vue-ui-flow-BbJmSWr4.cjs} +1 -1
  55. package/dist/{vue-ui-flow-zfTGon4s.js → vue-ui-flow-CTobijfD.js} +7 -7
  56. package/dist/{vue-ui-galaxy-5iRb5sQ-.js → vue-ui-galaxy-B9U-hTWd.js} +9 -9
  57. package/dist/{vue-ui-galaxy-GSO_6KIe.cjs → vue-ui-galaxy-BxkH3rZs.cjs} +1 -1
  58. package/dist/{vue-ui-gauge-DljHYdCS.js → vue-ui-gauge-BvS6Ep8K.js} +5 -5
  59. package/dist/{vue-ui-gauge-Bz7oLa51.cjs → vue-ui-gauge-DezT9Iw3.cjs} +1 -1
  60. package/dist/{vue-ui-gizmo-B-fxFOZy.js → vue-ui-gizmo-CCSV95Cw.js} +2 -2
  61. package/dist/{vue-ui-gizmo-KL0OJY2K.cjs → vue-ui-gizmo-CdGlyolL.cjs} +1 -1
  62. package/dist/{vue-ui-heatmap-ketn_NV3.js → vue-ui-heatmap-DQntMs3y.js} +8 -8
  63. package/dist/{vue-ui-heatmap-thMJPCfo.cjs → vue-ui-heatmap-Decb4BRV.cjs} +1 -1
  64. package/dist/{vue-ui-kpi-e1QWa8D4.cjs → vue-ui-kpi-MZSJlc3i.cjs} +1 -1
  65. package/dist/{vue-ui-kpi-Bxu8uZ21.js → vue-ui-kpi-yDsCX1qh.js} +3 -3
  66. package/dist/{vue-ui-mini-loader-BZ_2aV8O.js → vue-ui-mini-loader-DluKyWjA.js} +2 -2
  67. package/dist/{vue-ui-mini-loader-paRZQU8H.cjs → vue-ui-mini-loader-Dz3LxxFJ.cjs} +1 -1
  68. package/dist/{vue-ui-molecule-Bpp5unvI.js → vue-ui-molecule-BG1BbGts.js} +9 -9
  69. package/dist/{vue-ui-molecule-VOBL4Osc.cjs → vue-ui-molecule-rmhSL2tT.cjs} +1 -1
  70. package/dist/{vue-ui-mood-radar-BY8XP_Q5.js → vue-ui-mood-radar-EO6jRkGF.js} +9 -9
  71. package/dist/{vue-ui-mood-radar-CwtMLwP8.cjs → vue-ui-mood-radar-owAd1Twe.cjs} +1 -1
  72. package/dist/{vue-ui-nested-donuts-5uuLi3If.js → vue-ui-nested-donuts-HDfFuFhB.js} +302 -308
  73. package/dist/vue-ui-nested-donuts-u-4RFRIE.cjs +17 -0
  74. package/dist/{vue-ui-onion-CMSPSSSG.cjs → vue-ui-onion-BUOOD3WG.cjs} +1 -1
  75. package/dist/{vue-ui-onion-zDy4ecPl.js → vue-ui-onion-DqMY1iPE.js} +9 -9
  76. package/dist/{vue-ui-parallel-coordinate-plot-1PFxiI__.cjs → vue-ui-parallel-coordinate-plot-2JGpf8SJ.cjs} +1 -1
  77. package/dist/{vue-ui-parallel-coordinate-plot-BeEkL7Dq.js → vue-ui-parallel-coordinate-plot-CUU74I_R.js} +10 -10
  78. package/dist/{vue-ui-quadrant-Cx5z_c90.cjs → vue-ui-quadrant-BXUtKBlK.cjs} +1 -1
  79. package/dist/{vue-ui-quadrant-MCIlbbsW.js → vue-ui-quadrant-BrbrrHLN.js} +10 -10
  80. package/dist/{vue-ui-quick-chart-r6Qa7qg_.js → vue-ui-quick-chart-BeJMzQZr.js} +7 -7
  81. package/dist/{vue-ui-quick-chart-Xn-47NQG.cjs → vue-ui-quick-chart-CNn9Wt0K.cjs} +1 -1
  82. package/dist/{vue-ui-radar-DFV5cFkl.js → vue-ui-radar-BMbWx0XC.js} +10 -10
  83. package/dist/{vue-ui-radar-ANQ1wXFc.cjs → vue-ui-radar-yFYbYYI9.cjs} +1 -1
  84. package/dist/{vue-ui-rating-BVzCbQbv.cjs → vue-ui-rating-Ckh6xyv1.cjs} +1 -1
  85. package/dist/{vue-ui-rating-DYu1EuJF.js → vue-ui-rating-D19QGpzZ.js} +2 -2
  86. package/dist/{vue-ui-relation-circle-BAcmDQB_.js → vue-ui-relation-circle-DqdXa6V6.js} +5 -5
  87. package/dist/{vue-ui-relation-circle-DEM6C6Or.cjs → vue-ui-relation-circle-YH6EpWSC.cjs} +1 -1
  88. package/dist/{vue-ui-rings-BiLlYpgu.js → vue-ui-rings-CDqf78PA.js} +9 -9
  89. package/dist/{vue-ui-rings-Ce4G4hat.cjs → vue-ui-rings-Dbi3uWQh.cjs} +1 -1
  90. package/dist/{vue-ui-scatter-OtlcTCUF.cjs → vue-ui-scatter-Ch3iYYoX.cjs} +1 -1
  91. package/dist/{vue-ui-scatter-D2ndYfkQ.js → vue-ui-scatter-D3IFY9II.js} +10 -10
  92. package/dist/{vue-ui-screenshot-DTQx4VsM.cjs → vue-ui-screenshot-DBmmftjw.cjs} +1 -1
  93. package/dist/{vue-ui-screenshot-CKCNPn-e.js → vue-ui-screenshot-Xtz1BC-w.js} +1 -1
  94. package/dist/{vue-ui-skeleton-CwqzJlQf.cjs → vue-ui-skeleton-Bx_kbjKr.cjs} +1 -1
  95. package/dist/{vue-ui-skeleton-B30ZhUV7.js → vue-ui-skeleton-C3UWXP3Q.js} +2 -2
  96. package/dist/{vue-ui-smiley-L6o24M6h.cjs → vue-ui-smiley-BCorPn2E.cjs} +1 -1
  97. package/dist/{vue-ui-smiley-DzLvZR1k.js → vue-ui-smiley-FhcqViE3.js} +2 -2
  98. package/dist/{vue-ui-spark-trend-BoWeviHk.cjs → vue-ui-spark-trend-C1BmsVRe.cjs} +1 -1
  99. package/dist/{vue-ui-spark-trend-BKsmENbH.js → vue-ui-spark-trend-RJUm-CJC.js} +4 -4
  100. package/dist/{vue-ui-sparkbar-DNzZkp8z.js → vue-ui-sparkbar-C6sZ4mYK.js} +3 -3
  101. package/dist/{vue-ui-sparkbar-DY3iOLo4.cjs → vue-ui-sparkbar-CtQSQySy.cjs} +1 -1
  102. package/dist/{vue-ui-sparkgauge-B2DngjVP.js → vue-ui-sparkgauge-C1pOZo8V.js} +3 -3
  103. package/dist/{vue-ui-sparkgauge-BlZ-lJm4.cjs → vue-ui-sparkgauge-CoyqAUDp.cjs} +1 -1
  104. package/dist/{vue-ui-sparkhistogram-BUBewgdH.cjs → vue-ui-sparkhistogram-DvBJHfyk.cjs} +1 -1
  105. package/dist/{vue-ui-sparkhistogram-Co9N3BeQ.js → vue-ui-sparkhistogram-Mh93EuLF.js} +4 -4
  106. package/dist/{vue-ui-sparkline-BhL0mxXD.cjs → vue-ui-sparkline-CXIAmE5m.cjs} +1 -1
  107. package/dist/{vue-ui-sparkline-Dpqo4aRJ.js → vue-ui-sparkline-DiAIsoI3.js} +3 -3
  108. package/dist/{vue-ui-sparkstackbar-_JwfRxF8.js → vue-ui-sparkstackbar-Bb8ZtMfn.js} +3 -3
  109. package/dist/{vue-ui-sparkstackbar-DtNbx3EV.cjs → vue-ui-sparkstackbar-BePzQn-H.cjs} +1 -1
  110. package/dist/{vue-ui-stackbar-BtN7ZM7-.js → vue-ui-stackbar-B7KyGHZZ.js} +10 -10
  111. package/dist/{vue-ui-stackbar-C7AWHP6m.cjs → vue-ui-stackbar-BiNZ2pBZ.cjs} +1 -1
  112. package/dist/{vue-ui-strip-plot-6L9a7BSw.js → vue-ui-strip-plot-8d_juyi7.js} +9 -9
  113. package/dist/{vue-ui-strip-plot-cgOFTunJ.cjs → vue-ui-strip-plot-CY5rDwjh.cjs} +1 -1
  114. package/dist/{vue-ui-table-BFYHRMCS.js → vue-ui-table-CSm91gHM.js} +1 -1
  115. package/dist/{vue-ui-table-4Pf9tmFg.cjs → vue-ui-table-CoGh4xvF.cjs} +1 -1
  116. package/dist/{vue-ui-table-heatmap--kPCu8mA.js → vue-ui-table-heatmap-B30TipjK.js} +4 -4
  117. package/dist/{vue-ui-table-heatmap-CltKb2V9.cjs → vue-ui-table-heatmap-CwDproVr.cjs} +1 -1
  118. package/dist/{vue-ui-table-sparkline-B5OjJud8.cjs → vue-ui-table-sparkline-B8lCOsfc.cjs} +1 -1
  119. package/dist/{vue-ui-table-sparkline-CsWx1Ksy.js → vue-ui-table-sparkline-BcFIKA8V.js} +5 -5
  120. package/dist/{vue-ui-thermometer-nTD7sp8r.js → vue-ui-thermometer-CPqFKYwL.js} +5 -5
  121. package/dist/{vue-ui-thermometer-62_4QovL.cjs → vue-ui-thermometer-D6rDq4hj.cjs} +1 -1
  122. package/dist/{vue-ui-timer-BU0s7Vt9.cjs → vue-ui-timer-C70sw9Rc.cjs} +1 -1
  123. package/dist/{vue-ui-timer-DMFHjnzA.js → vue-ui-timer-DdQB8bF5.js} +4 -4
  124. package/dist/{vue-ui-tiremarks-1X9B1VKM.js → vue-ui-tiremarks-DDCOUKU9.js} +5 -5
  125. package/dist/{vue-ui-tiremarks-mwBeBMJY.cjs → vue-ui-tiremarks-o-KdCzZV.cjs} +1 -1
  126. package/dist/{vue-ui-treemap-CVTwqPFA.js → vue-ui-treemap-BOCZ8x4F.js} +9 -9
  127. package/dist/{vue-ui-treemap-DQmBbm7e.cjs → vue-ui-treemap-C3XRZk0P.cjs} +1 -1
  128. package/dist/{vue-ui-vertical-bar-BXiy8KRC.cjs → vue-ui-vertical-bar-C2ZIoY0I.cjs} +1 -1
  129. package/dist/{vue-ui-vertical-bar-Br6Z0A3F.js → vue-ui-vertical-bar-CAlQekf-.js} +9 -9
  130. package/dist/{vue-ui-waffle-DEXMh07q.js → vue-ui-waffle-CasLSUzY.js} +9 -9
  131. package/dist/{vue-ui-waffle-CLCsHw9j.cjs → vue-ui-waffle-D1eYO-NM.cjs} +1 -1
  132. package/dist/{vue-ui-wheel-DSFKKX65.cjs → vue-ui-wheel-C4ODblPX.cjs} +1 -1
  133. package/dist/{vue-ui-wheel-CwjuVi6U.js → vue-ui-wheel-CHn24pYD.js} +5 -5
  134. package/dist/{vue-ui-word-cloud-DZS4hCeR.cjs → vue-ui-word-cloud-XCS_A5_a.cjs} +1 -1
  135. package/dist/{vue-ui-word-cloud-BKeD3fHb.js → vue-ui-word-cloud-uGJLXPYv.js} +7 -7
  136. package/dist/{vue-ui-xy-B5aCogSL.cjs → vue-ui-xy-CH9wvh8w.cjs} +1 -1
  137. package/dist/{vue-ui-xy-DA3qqL8u.js → vue-ui-xy-KnfMOUv4.js} +12 -12
  138. package/dist/{vue-ui-xy-canvas-B7DH4RK5.js → vue-ui-xy-canvas-DVjSzeFt.js} +10 -10
  139. package/dist/{vue-ui-xy-canvas-heCdqh5X.cjs → vue-ui-xy-canvas-Yy7FaFLS.cjs} +1 -1
  140. package/package.json +1 -1
  141. package/dist/vue-ui-donut-uVPdO4UH.cjs +0 -1
  142. package/dist/vue-ui-nested-donuts-CLnVnAiD.cjs +0 -17
@@ -1,13 +1,13 @@
1
1
  import { computed as x, ref as m, onMounted as Ke, watch as Fe, openBlock as a, createElementBlock as u, normalizeClass as F, normalizeStyle as B, createBlock as E, createCommentVNode as d, unref as c, createSlots as qe, withCtx as P, renderSlot as T, normalizeProps as ue, guardReactiveProps as oe, createElementVNode as v, Fragment as p, renderList as k, toDisplayString as b, withKeys as Je, createTextVNode as Pe, nextTick as Qe } from "vue";
2
- import { u as Ze, o as et, e as Y, g as tt, c as De, t as lt, a as at, p as K, b as ut, G as ot, d as se, C as Te, m as re, X as st, s as U, D as rt, i as ne, f as q, j as Ie, k as J, n as Ee, H as Oe, q as nt, r as it } from "./index-DP8dqFNd.js";
3
- import { _ as ct } from "./Title-Bx-VO3md.js";
4
- import { u as vt, U as dt } from "./usePrinter-DiuHo4LO.js";
5
- import { D as ht } from "./DataTable-y1lX5jVj.js";
6
- import { L as yt } from "./Legend-BLXcdrri.js";
7
- import ft from "./vue-ui-skeleton-B30ZhUV7.js";
8
- import { S as gt } from "./Slicer-DzJZ4axa.js";
9
- import bt from "./vue-ui-accordion-Dl8zkZPk.js";
10
- import { u as He } from "./useNestedProp-B-oZxD4x.js";
2
+ import { u as Ze, o as et, e as Y, g as tt, c as De, t as lt, a as at, p as K, b as ut, G as ot, d as se, C as Te, m as re, X as st, s as U, D as rt, i as ne, f as q, j as Ie, k as J, n as Ee, H as Oe, q as nt, r as it } from "./index-C_xZ1jJj.js";
3
+ import { _ as ct } from "./Title-Bgh58KWs.js";
4
+ import { u as vt, U as dt } from "./usePrinter-BJ7GxAOO.js";
5
+ import { D as ht } from "./DataTable-CThhaAYT.js";
6
+ import { L as yt } from "./Legend-DxRA5XXC.js";
7
+ import ft from "./vue-ui-skeleton-C3UWXP3Q.js";
8
+ import { S as gt } from "./Slicer-BLFTdmNs.js";
9
+ import bt from "./vue-ui-accordion-issoIPFd.js";
10
+ import { u as He } from "./useNestedProp-9QKvGow8.js";
11
11
  import { _ as xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const mt = ["id"], pt = ["xmlns", "viewBox"], kt = ["id"], _t = ["stop-color"], Ct = ["stop-color"], wt = ["id"], Lt = ["stop-color"], $t = ["stop-color"], St = ["stop-color"], At = { key: 0 }, Nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ft = { key: 0 }, Pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x", "y", "font-size", "fill", "font-weight"], It = ["text-anchor", "font-size", "fill", "transform"], Et = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ot = { key: 1 }, Ht = ["cx", "cy", "r", "fill"], Mt = { key: 0 }, Vt = { key: 0 }, Wt = ["d", "stroke"], Rt = ["text-anchor", "x", "y", "fill"], Ut = ["cx", "cy", "r", "fill"], Xt = { key: 0 }, Gt = ["cx", "cy", "fill"], jt = { key: 1 }, Bt = ["d", "fill", "stroke"], Yt = { key: 2 }, Kt = ["d", "fill", "stroke"], qt = ["x", "y", "font-size", "fill"], Jt = ["x", "y", "width", "fill", "onClick"], Qt = ["x", "y", "width", "height", "onMouseenter", "onClick"], Zt = {
13
13
  key: 3,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CzjC8LfY.cjs"),be=require("./Title-BSpa3uge.cjs"),se=require("./usePrinter-DiLM6jav.cjs"),xe=require("./DataTable-C5TOiC61.cjs"),Be=require("./Legend-CGGD8NhP.cjs"),Ce=require("./vue-ui-skeleton-CwqzJlQf.cjs"),_e=require("./Slicer-CZJXKSeE.cjs"),Ee=require("./vue-ui-accordion-DpI7fTKZ.cjs"),ce=require("./useNestedProp-CY7DebVH.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Se=["xmlns","viewBox"],Le=["id"],Ve=["stop-color"],$e=["stop-color"],ze=["id"],Fe=["stop-color"],Ae=["stop-color"],De=["stop-color"],Pe={key:0},Te=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Ie={key:0},Me=["x1","x2","y1","y2","stroke","stroke-width"],He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","font-size","fill","font-weight"],We=["text-anchor","font-size","fill","transform"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Xe={key:1},qe=["cx","cy","r","fill"],Ge={key:0},Ye={key:0},je=["d","stroke"],Ke=["text-anchor","x","y","fill"],Je=["cx","cy","r","fill"],Qe={key:0},Ze=["cx","cy","fill"],et={key:1},tt=["d","fill","stroke"],lt={key:2},at=["d","fill","stroke"],ot=["x","y","font-size","fill"],ut=["x","y","width","fill","onClick"],rt=["x","y","width","height","onMouseenter","onClick"],nt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},st=["x","y","width","height","fill"],ct=["x1","y1","x2","y2","stroke"],it=["x1","y2","x2","y1","stroke"],dt=["onKeypress","cx","cy","r"],vt=["d","stroke"],ht=["cx","cy","r","fill"],yt=["d","fill","stroke"],mt={class:"vue-ui-donut-evolution-focus"},ft=["text-anchor","x","y","fill"],gt=["cx","cy","r","fill"],kt=["cx","cy","r","fill"],pt=["x","y","fill"],bt=["x","y","font-size","fill"],xt={key:3,class:"vue-data-ui-watermark"},Bt=["onClick"],Ct={key:0},_t={key:1},Et={key:0},Nt={key:1},wt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ie,{expose:de,emit:M}){const k=ie,{vue_ui_donut_evolution:ve}=r.useConfig(),$=e.computed(()=>!!k.dataset&&k.dataset.length),i=e.ref({start:0,end:Math.max(...k.dataset.map(a=>a.values.length))});function H(){i.value={start:0,end:L.value},X.value+=1}e.onMounted(()=>{R()});function R(){r.objectIsEmpty(k.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):k.dataset.length&&k.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),p=e.ref(!1),b=e.ref(null),W=e.ref(null),U=e.ref(0),X=e.ref(0),q=e.ref(0),G=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ce.useNestedProp({userConfig:k.config,defaultConfig:ve});return a.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||k.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),R(),q.value+=1,G.value+=1,Y.value+=1},{deep:!0}),e.watch(()=>k.dataset,a=>{H()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=se.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),he=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(k.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),k.dataset.map((a,c)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||he.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),I=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:I,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>n.value.width/16?n.value.width/16:d,I=h.value===o.index?n.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:I,hoverRadius:w,donut:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ye(a){return a/E.value.max}const me=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ye(a),value:a})));function ee(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function te(){p.value||(h.value=null,A.value=null)}function fe(a){p.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,p.value=!0,b.value=a,[null,void 0].includes(c)||(P.value=c))}function le(){b.value=null,p.value=!1,P.value=null}const ae=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>O(a.uid),isSegregated:y.value.includes(a.uid)}))),oe=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ge=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function O(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}b.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function ke(){return C.value}function ue(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function pe(a){V.value=a,U.value+=1}function re(){z.value.showTable=!z.value.showTable}return de({getData:ke,generatePdf:Q,generateCsv:ue,generateImage:Z,toggleTable:re}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:W,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:te},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(J),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:W.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(Q),onGenerateCsv:ue,onGenerateImage:e.unref(Z),onToggleTable:re},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,$e)],8,Le),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Fe),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,De)],8,ze)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Te),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*f.value,x2:u.value.left+(s+1)*f.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||p.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,He)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,Re)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":p.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*s+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,We)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||p.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ue)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Xe,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||p.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ge,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,je)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(ee(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Ke)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,Je)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||p.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Qe,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,Ze)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,tt))),256))])):(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,at))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||p.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(F(l.subtotal,l,s)),9,ot)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*f.value,y:n.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,ut))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*f.value,y:u.value.top,width:f.value,height:n.value.height,fill:"transparent",onMouseenter:o=>fe(l),onMouseleave:te,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,rt))),256)),p.value?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,st),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ct),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,it),e.createElementVNode("circle",{"data-cy-close":"",onClick:le,onKeypress:e.withKeys(le,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,dt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,vt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,ht),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",mt,[e.createElementVNode("text",{"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(ee(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,ft)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,gt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,kt),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(F(b.value.subtotal,b.value,null)),9,pt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,bt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(_e.Slicer,{key:`slicer_${X.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Be.Legend,{key:`legend_${Y.value}`,legendSet:ae.value,config:ge.value,onClickMarker:c[2]||(c[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",_t," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ct," ("+e.toDisplayString(isNaN(l.value/oe.value)?"-":e.unref(r.dataLabel)({v:l.value/oe.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Bt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(Ee.default,{key:7,hideDetails:"",config:{open:z.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.openBlock(),e.createBlock(xe.DataTable,{key:`table_${G.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>z.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",Et,"-")):(e.openBlock(),e.createElementBlock("b",Nt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,we))}},St=Ne._export_sfc(wt,[["__scopeId","data-v-df485855"]]);exports.default=St;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BofUHMEw.cjs"),be=require("./Title-DOzi72Pu.cjs"),se=require("./usePrinter-_JYb_33H.cjs"),xe=require("./DataTable-ysqfWT9v.cjs"),Be=require("./Legend-DtnPX_Dc.cjs"),Ce=require("./vue-ui-skeleton-Bx_kbjKr.cjs"),_e=require("./Slicer-xJl1pkRn.cjs"),Ee=require("./vue-ui-accordion-XtygMpX7.cjs"),ce=require("./useNestedProp-DGK0LGfN.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Se=["xmlns","viewBox"],Le=["id"],Ve=["stop-color"],$e=["stop-color"],ze=["id"],Fe=["stop-color"],Ae=["stop-color"],De=["stop-color"],Pe={key:0},Te=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Ie={key:0},Me=["x1","x2","y1","y2","stroke","stroke-width"],He=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","font-size","fill","font-weight"],We=["text-anchor","font-size","fill","transform"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Xe={key:1},qe=["cx","cy","r","fill"],Ge={key:0},Ye={key:0},je=["d","stroke"],Ke=["text-anchor","x","y","fill"],Je=["cx","cy","r","fill"],Qe={key:0},Ze=["cx","cy","fill"],et={key:1},tt=["d","fill","stroke"],lt={key:2},at=["d","fill","stroke"],ot=["x","y","font-size","fill"],ut=["x","y","width","fill","onClick"],rt=["x","y","width","height","onMouseenter","onClick"],nt={key:3,"data-cy-zoom":"",class:"vue-ui-donut-evolution-dialog"},st=["x","y","width","height","fill"],ct=["x1","y1","x2","y2","stroke"],it=["x1","y2","x2","y1","stroke"],dt=["onKeypress","cx","cy","r"],vt=["d","stroke"],ht=["cx","cy","r","fill"],yt=["d","fill","stroke"],mt={class:"vue-ui-donut-evolution-focus"},ft=["text-anchor","x","y","fill"],gt=["cx","cy","r","fill"],kt=["cx","cy","r","fill"],pt=["x","y","fill"],bt=["x","y","font-size","fill"],xt={key:3,class:"vue-data-ui-watermark"},Bt=["onClick"],Ct={key:0},_t={key:1},Et={key:0},Nt={key:1},wt={__name:"vue-ui-donut-evolution",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ie,{expose:de,emit:M}){const k=ie,{vue_ui_donut_evolution:ve}=r.useConfig(),$=e.computed(()=>!!k.dataset&&k.dataset.length),i=e.ref({start:0,end:Math.max(...k.dataset.map(a=>a.values.length))});function H(){i.value={start:0,end:L.value},X.value+=1}e.onMounted(()=>{R()});function R(){r.objectIsEmpty(k.dataset)?r.error({componentName:"VueUiDonutEvolution",type:"dataset"}):k.dataset.length&&k.dataset.forEach((a,c)=>{r.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:l,index:c})})})}const _=e.ref(r.createUid()),y=e.ref([]),h=e.ref(null),A=e.ref(null),p=e.ref(!1),b=e.ref(null),W=e.ref(null),U=e.ref(0),X=e.ref(0),q=e.ref(0),G=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>j(),set:a=>a});function j(){const a=ce.useNestedProp({userConfig:k.config,defaultConfig:ve});return a.theme?{...ce.useNestedProp({userConfig:r.themes.vue_ui_donut_evolution[a.theme]||k.config,defaultConfig:a}),customPalette:r.themePalettes[a.theme]||r.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),R(),q.value+=1,G.value+=1,Y.value+=1},{deep:!0}),e.watch(()=>k.dataset,a=>{H()},{deep:!0});const{isPrinting:K,isImaging:J,generatePdf:Q,generateImage:Z}=se.usePrinter({elementId:_.value,fileName:t.value.style.chart.title.text||"vue-ui-donut-evolution"}),he=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),u=e.computed(()=>({top:t.value.style.chart.layout.padding.top,right:t.value.style.chart.layout.padding.right,bottom:t.value.style.chart.layout.padding.bottom,left:t.value.style.chart.layout.padding.left})),n=e.computed(()=>{const a=t.value.style.chart.layout.height,c=t.value.style.chart.layout.width,l=a-u.value.top-u.value.bottom,s=c-u.value.left-u.value.right;return{absoluteHeight:a,absoluteWidth:c,centerX:u.value.left+s/2,centerY:u.value.top+l/2,height:l,width:s}}),C=e.computed(()=>(k.dataset.forEach((a,c)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"name",index:c}),[null,void 0].includes(a.values)&&r.error({componentName:"VueUiDonutEvolution",type:"datasetSerieAttribute",property:"values",index:c})}),k.dataset.map((a,c)=>({...a,values:r.sanitizeArray(a.values),color:r.convertColorToHex(a.color)||he.value[c]||r.palette[c]||r.palette[c%r.palette.length],length:(a.values||[]).length,uid:r.createUid()})))),S=e.computed(()=>C.value.filter(a=>!y.value.includes(a.uid)).map(a=>({...a,values:a.values.filter((c,l)=>l>=i.value.start&&l<=i.value.end)}))),L=e.computed(()=>Math.max(...S.value.map(a=>a.length))),f=e.computed(()=>n.value.width/(i.value.end-i.value.start)),m=e.computed(()=>{const a=[];for(let o=0;o<i.value.end-i.value.start;o+=1){const v=S.value.map(B=>B.values[o]??null),d=v.filter(B=>[void 0,null].includes(B)).length===v.length,x=v.reduce((B,g)=>B+g,0),I=v.map(B=>B/x),w=u.value.left+f.value*o+f.value/2;a.push({index:o,percentages:I,subtotal:d||x<0?null:x,values:v,x:w})}const c=0,l=Math.max(...a.map(o=>o.subtotal)),s=a.length===1?l*2:l;return a.map((o,v)=>{const d=f.value/2*.7,x=d>n.value.width/16?n.value.width/16:d,I=h.value===o.index?n.value.width/16:x,w=a.length>4?d*2:d*2>f.value/2*.7?f.value/2*.7:d*2,B=n.value.absoluteHeight-u.value.bottom-n.value.height*o.subtotal/r.calculateNiceScale(c,s,t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;return{...o,y:B,radius:x,activeRadius:I,hoverRadius:w,donut:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,x,x,1.99999,2,1,360,105.25,x/2),donutHover:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},o.x,B,w,w,1.99999,2,1,360,105.25,w/2),donutFocus:r.makeDonut({series:S.value.map((g,ne)=>({color:g.color,name:g.name,value:g.values[v]??0}))},n.value.centerX,n.value.centerY,n.value.height/3.6,n.value.height/3.6,1.99999,2,1,360,105.25,n.value.height/6)}})});function F(a,c,l){return r.applyDataLabel(t.value.style.chart.layout.dataLabels.formatter,a,r.dataLabel({p:t.value.style.chart.layout.dataLabels.prefix,v:a,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.dataLabels.rounding}),{datapoint:c,index:l})}const D=e.computed(()=>({max:Math.max(...m.value.map(a=>a.subtotal)),min:0})),E=e.computed(()=>{const a=m.value.length===1?D.value.max*2:D.value.max;return r.calculateNiceScale(D.value.min,a,t.value.style.chart.layout.grid.yAxis.dataLabels.steps)});function ye(a){return a/E.value.max}const me=e.computed(()=>E.value.ticks.map(a=>({y:n.value.absoluteHeight-u.value.bottom-n.value.height*ye(a),value:a})));function ee(a,c){return isNaN(a.value/r.sumByAttribute(c,"value"))?0:(a.value/r.sumByAttribute(c,"value")*100).toFixed(0)+"%"}function te(){p.value||(h.value=null,A.value=null)}function fe(a){p.value||(h.value=a.index,A.value=a)}const P=e.ref(null);function T(a,c){a.subtotal&&(A.value=null,h.value=null,p.value=!0,b.value=a,[null,void 0].includes(c)||(P.value=c))}function le(){b.value=null,p.value=!1,P.value=null}const ae=e.computed(()=>C.value.map((a,c)=>({name:a.name,value:a.values.slice(i.value.start,i.value.end).reduce((l,s)=>l+s,0),shape:"circle",uid:a.uid,color:a.color})).sort((a,c)=>c.value-a.value).map(a=>({...a,opacity:y.value.includes(a.uid)?.5:1,segregate:()=>O(a.uid),isSegregated:y.value.includes(a.uid)}))),oe=e.computed(()=>m.value.map(a=>a.subtotal).reduce((a,c)=>a+c,0)),ge=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function O(a){if(y.value.includes(a))y.value=y.value.filter(c=>c!==a),M("selectLegend",null);else{if(y.value.length===C.value.length-1)return;y.value.push(a),M("selectLegend",C.value.find(c=>c.uid===a))}b.value&&T(m.value.find((c,l)=>l===P.value))}const N=e.computed(()=>{const a=[""].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>({name:o.name,color:o.color}))).concat(["Σ"]);let c=[];for(let o=0;o<L.value;o+=1){const v=C.value.filter(d=>!y.value.includes(d.uid)).map(d=>d.values[o]??0).reduce((d,x)=>d+x,0);c.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[o]??"-"].concat(C.value.filter(d=>!y.value.includes(d.uid)).map(d=>({value:d.values[o]??0,percentage:d.values[o]?d.values[o]/v*100:0}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(v.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]))}const l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.period].concat(C.value.filter(o=>!y.value.includes(o.uid)).map(o=>o.name)).concat(t.value.table.columnNames.total);return{head:a,body:c,config:l,colNames:s}});function ke(){return C.value}function ue(){e.nextTick(()=>{const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],c=[...N.value.head.map(v=>v.name??v)],l=[...N.value.body.map(v=>v.map(d=>d.value??d))],s=a.concat([c]).concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut-evolution"})})}const V=e.ref(!1);function pe(a){V.value=a,U.value+=1}function re(){z.value.showTable=!z.value.showTable}return de({getData:ke,generatePdf:Q,generateCsv:ue,generateImage:Z,toggleTable:re}),(a,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutEvolutionChart",ref:W,class:e.normalizeClass(`vue-ui-donut-evolution ${V.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:_.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),onMouseleave:te},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"donut-evolution-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-evolution-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],36)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_options_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(J),uid:_.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:W.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(Q),onGenerateCsv:ue,onGenerateImage:e.unref(Z),onToggleTable:re},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${n.value.absoluteWidth} ${n.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`hover_${_.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.backgroundColor,t.value.style.chart.layout.highlighter.opacity)},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity)},null,8,$e)],8,Le),e.createElementVNode("radialGradient",{id:`focus_${_.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,Fe),e.createElementVNode("stop",{offset:"77%","stop-color":e.unref(r.setOpacity)("#FFFFFF",30)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.convertColorToHex)(t.value.style.chart.backgroundColor),0)},null,8,De)],8,ze)]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.top+n.value.height,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Te),e.createElementVNode("line",{x1:u.value.left,x2:n.value.absoluteWidth-u.value.right,y1:n.value.absoluteHeight-u.value.bottom,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe),t.value.style.chart.layout.grid.showVerticalLines?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.left+(s+1)*f.value,x2:u.value.left+(s+1)*f.value,y1:u.value.top,y2:n.value.absoluteHeight-u.value.bottom,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:1,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||p.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,He)):e.createCommentVNode("",!0),l.value>=E.value.min&&l.value<=E.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,y:l.y+t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize/3,"font-size":t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,"text-anchor":"end",fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.chart.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(r.canShowValue)(l.value)?e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue}),{datapoint:l,seriesIndex:s}):""),9,Re)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),t.value.style.chart.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",{key:2,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":p.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.end-i.value.start,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast&&(s===0||s===L.value-1)||!t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.chart.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,fill:t.value.style.chart.layout.grid.xAxis.dataLabels.color,transform:`translate(${u.value.left+f.value*s+f.value/2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY+n.value.absoluteHeight-u.value.bottom+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(s)+Number(i.value.start)]??""),9,We)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.line.show&&s<m.value.length-1&&![l.subtotal,m.value[s+1].subtotal].includes(null)?(e.openBlock(),e.createElementBlock("line",{key:0,class:e.normalizeClass({"donut-opacity":!0,"donut-behind":h.value!==null||p.value}),x1:l.x,y1:l.y,x2:m.value[s+1].x,y2:m.value[s+1].y,stroke:t.value.style.chart.layout.line.stroke,"stroke-width":t.value.style.chart.layout.line.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,10,Ue)):e.createCommentVNode("",!0),l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Xe,[l.subtotal?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:l.activeRadius,fill:t.value.style.chart.backgroundColor},null,8,qe)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||p.value})},[l.subtotal?(e.openBlock(),e.createElementBlock("g",Ge,[h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,o=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:e.unref(r.calcNutArrowPath)(o,{x:o.center.endX,y:o.center.endY},12,12,{x:l.x,y:l.y},!0),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,je)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{"data-cy-hover-label":"","text-anchor":e.unref(r.calcMarkerOffsetX)(o,!0,0).anchor,x:e.unref(r.calcMarkerOffsetX)(o,!0,3).x,y:e.unref(r.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":8,"font-weight":"bold"},e.toDisplayString(o.name)+": "+e.toDisplayString(ee(o,l.donut))+" ("+e.toDisplayString(o.value===null?"-":F(o.value,o,v))+") ",9,Ke)]))),256)),e.createElementVNode("g",null,[e.createElementVNode("circle",{cx:l.x,cy:l.y,r:l.hoverRadius,fill:t.value.style.chart.backgroundColor},null,8,Je)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||p.value})},[l.subtotal!==null?(e.openBlock(),e.createElementBlock("g",Qe,[l.subtotal===0?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:l.x,cy:l.y,r:3,fill:t.value.style.chart.color},null,8,Ze)):h.value!==null&&h.value===s?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donutHover,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,tt))),256))])):(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.donut,(o,v)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:`${o.color}`,"stroke-width":.5,stroke:t.value.style.chart.backgroundColor},null,8,at))),256))]))])):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",{class:e.normalizeClass({"donut-opacity":!0,"donut-behind":s!==h.value&&h.value!==null||p.value})},[l.subtotal!==null&&t.value.style.chart.layout.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",x:l.x,y:h.value===l.index&&l.subtotal?l.y+t.value.style.chart.layout.dataLabels.fontSize/3:l.y-l.radius-t.value.style.chart.layout.dataLabels.fontSize+t.value.style.chart.layout.dataLabels.offsetY,"font-size":t.value.style.chart.layout.dataLabels.fontSize,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(F(l.subtotal,l,s)),9,ot)):e.createCommentVNode("",!0)],2))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+s*f.value,y:n.value.absoluteHeight-u.value.bottom-10,width:f.value,height:10,fill:h.value===l.index?`url(#hover_${_.value})`:"transparent",onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,10,ut))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{"data-cy-trap":"",x:u.value.left+s*f.value,y:u.value.top,width:f.value,height:n.value.height,fill:"transparent",onMouseenter:o=>fe(l),onMouseleave:te,onClick:o=>T(l,s),class:e.normalizeClass({"donut-hover":h.value===l.index&&l.subtotal})},null,42,rt))),256)),p.value?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("rect",{rx:4,x:u.value.left,y:u.value.top,width:n.value.width,height:n.value.height,fill:t.value.style.chart.backgroundColor,style:{filter:"drop-shadow(0 12px 12px rgba(0,0,0,0.3))"}},null,8,st),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y1:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y2:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,ct),e.createElementVNode("line",{"data-html2canvas-ignore":"",x1:n.value.absoluteWidth-u.value.right-15,y2:u.value.top+5,x2:n.value.absoluteWidth-u.value.right-4,y1:u.value.top+15.5,"stroke-linecap":"round",stroke:t.value.style.chart.color,"stroke-width":"1.5"},null,8,it),e.createElementVNode("circle",{"data-cy-close":"",onClick:le,onKeypress:e.withKeys(le,["enter"]),cx:n.value.absoluteWidth-u.value.right-n.value.width/40,cy:u.value.top+n.value.height/30,r:n.value.height/12,fill:"transparent",style:{cursor:"pointer"},tabindex:"0"},null,40,dt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,l=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{"data-cy-zoom-donut":"",d:e.unref(r.calcNutArrowPath)(l,{x:n.value.centerX,y:n.value.centerY},12,12,!1,!1,15),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:"vue-ui-donut-evolution-focus"},null,8,vt)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7,fill:t.value.style.chart.backgroundColor},null,8,ht),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:`${l.color}`,"stroke-width":1,stroke:t.value.style.chart.backgroundColor,class:"vue-ui-donut-evolution-focus"},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.donutFocus,(l,s)=>(e.openBlock(),e.createElementBlock("g",mt,[e.createElementVNode("text",{"text-anchor":e.unref(r.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(r.calcMarkerOffsetX)(l,!0,10).x,y:e.unref(r.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.grid.yAxis.dataLabels.color,"font-size":10,"font-weight":"bold"},e.toDisplayString(l.name)+": "+e.toDisplayString(ee(l,b.value.donutFocus))+" ("+e.toDisplayString(l.value===null?"-":F(l.value,l,s))+") ",9,ft)]))),256)),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/3.8,fill:`url(#focus_${_.value})`},null,8,gt),e.createElementVNode("circle",{cx:u.value.left+n.value.width/2,cy:u.value.top+n.value.height/2,r:n.value.height/7.7,fill:t.value.style.chart.backgroundColor},null,8,kt),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.left+n.value.width/2,y:u.value.top+n.value.height/2+14/3,"font-size":14,"font-weight":"bold",fill:t.value.style.chart.layout.dataLabels.color,class:"vue-ui-donut-evolution-focus"},e.toDisplayString(F(b.value.subtotal,b.value,null)),9,pt),t.value.style.chart.layout.grid.xAxis.dataLabels.values[b.value.index]?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.value.left+6,y:u.value.top+t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*2,"font-size":t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize*1.6,fill:t.value.style.chart.layout.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(b.value.index)+Number(i.value.start)]),9,bt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:n.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",xt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:4,config:{type:"donutEvolution",style:{backgroundColor:t.value.style.chart.backgroundColor,donutEvolution:{axis:{color:"#CCCCCC"},donuts:{color:"#CCCCCC"}}}}},null,8,["config"])),L.value>1&&t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(_e.Slicer,{key:`slicer_${X.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.start)]||"",labelRight:t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(i.value.end)-1]||"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:L.value,min:0,valueStart:i.value.start,valueEnd:i.value.end,start:i.value.start,"onUpdate:start":c[0]||(c[0]=l=>i.value.start=l),end:i.value.end,"onUpdate:end":c[1]||(c[1]=l=>i.value.end=l),onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(a.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Be.Legend,{key:`legend_${Y.value}`,legendSet:ae.value,config:ge.value,onClickMarker:c[2]||(c[2]=({legend:l})=>O(l.uid))},{item:e.withCtx(({legend:l,index:s})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>O(l.uid),style:e.normalizeStyle(`opacity:${y.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:s}))+" ",1),y.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",_t," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ct," ("+e.toDisplayString(isNaN(l.value/oe.value)?"-":e.unref(r.dataLabel)({v:l.value/oe.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Bt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0),$.value?(e.openBlock(),e.createBlock(Ee.default,{key:7,hideDetails:"",config:{open:z.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.openBlock(),e.createBlock(xe.DataTable,{key:`table_${G.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[3]||(c[3]=l=>z.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name??l),1)]),td:e.withCtx(({td:l})=>[l.value===null?(e.openBlock(),e.createElementBlock("span",Et,"-")):(e.openBlock(),e.createElementBlock("b",Nt,e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.prefix)+e.toDisplayString(!isNaN(l.value)&&l.value!==null?Number(l.value.toFixed(t.value.table.td.roundingValue)).toLocaleString():l)+e.toDisplayString(isNaN(l.value)?"":t.value.style.chart.layout.dataLabels.suffix),1)),e.createElementVNode("span",null,e.toDisplayString(l.percentage&&!isNaN(l.percentage)?`(${Number(l.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)`:""),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,we))}},St=Ne._export_sfc(wt,[["__scopeId","data-v-df485855"]]);exports.default=St;
@@ -1,13 +1,13 @@
1
1
  import { computed as p, ref as y, watch as oe, onMounted as re, onBeforeUnmount as Le, openBlock as o, createElementBlock as r, normalizeClass as ne, normalizeStyle as F, createBlock as S, createCommentVNode as g, unref as d, createSlots as ze, withCtx as _, renderSlot as C, normalizeProps as ue, guardReactiveProps as ie, Fragment as w, renderList as $, createElementVNode as n, toDisplayString as L, createTextVNode as ce, nextTick as Xe } from "vue";
2
- import { u as Se, c as de, t as Ae, o as Ne, e as ve, g as Te, v as he, C as Pe, f as z, X as ye, i as V, l as be, h as fe, q as Ge, r as De } from "./index-DP8dqFNd.js";
2
+ import { u as Se, c as de, t as Ae, o as Ne, e as ve, g as Te, v as he, C as Pe, f as z, X as ye, i as V, l as be, h as fe, q as Ge, r as De } from "./index-C_xZ1jJj.js";
3
3
  import { t as Ie, u as Me } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Fe } from "./Title-Bx-VO3md.js";
5
- import { u as Oe, U as Ee } from "./usePrinter-DiuHo4LO.js";
6
- import { D as Ve } from "./DataTable-y1lX5jVj.js";
7
- import He from "./vue-ui-skeleton-B30ZhUV7.js";
8
- import { L as We } from "./Legend-BLXcdrri.js";
9
- import Re from "./vue-ui-accordion-Dl8zkZPk.js";
10
- import { u as ge } from "./useNestedProp-B-oZxD4x.js";
4
+ import { _ as Fe } from "./Title-Bgh58KWs.js";
5
+ import { u as Oe, U as Ee } from "./usePrinter-BJ7GxAOO.js";
6
+ import { D as Ve } from "./DataTable-CThhaAYT.js";
7
+ import He from "./vue-ui-skeleton-C3UWXP3Q.js";
8
+ import { L as We } from "./Legend-DxRA5XXC.js";
9
+ import Re from "./vue-ui-accordion-issoIPFd.js";
10
+ import { u as ge } from "./useNestedProp-9QKvGow8.js";
11
11
  import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Ue = ["id"], je = ["xmlns", "viewBox"], qe = { key: 0 }, Ye = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ze = { key: 1 }, Je = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ke = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Qe = { key: 2 }, et = ["x", "y", "font-size", "fill", "font-weight"], tt = ["x", "y", "font-size", "fill"], lt = { key: 3 }, at = ["x", "y", "font-size", "fill", "font-weight"], st = ["id"], ot = ["stop-color"], rt = ["stop-color"], nt = ["stop-color"], ut = ["id"], it = ["stop-color"], ct = ["stop-color"], dt = ["stop-color"], vt = ["id"], ht = ["stop-color"], yt = ["stop-color"], bt = ["id"], ft = ["stop-color"], gt = ["stop-color"], mt = { key: 0 }, pt = ["d", "fill"], _t = { key: 1 }, xt = ["x", "y", "height", "width", "fill"], kt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ct = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], wt = { key: 2 }, $t = ["x", "y", "fill", "font-size"], Lt = { key: 3 }, zt = ["x", "y", "fill", "font-size"], Xt = {
13
13
  key: 3,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CzjC8LfY.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-BSpa3uge.cjs"),W=require("./usePrinter-DiLM6jav.cjs"),ae=require("./DataTable-C5TOiC61.cjs"),oe=require("./vue-ui-skeleton-CwqzJlQf.cjs"),re=require("./Legend-CGGD8NhP.cjs"),se=require("./vue-ui-accordion-DpI7fTKZ.cjs"),U=require("./useNestedProp-CY7DebVH.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],ie={key:0},de=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ve={key:1},he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me={key:2},fe=["x","y","font-size","fill","font-weight"],be=["x","y","font-size","fill"],ge={key:3},pe=["x","y","font-size","fill","font-weight"],ke=["id"],_e=["stop-color"],xe=["stop-color"],Ce=["stop-color"],we=["id"],Be=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],$e=["stop-color"],Se=["stop-color"],Ve=["id"],ze=["stop-color"],Xe=["stop-color"],Ae={key:0},Pe=["d","fill"],Te={key:1},De=["x","y","height","width","fill"],Fe=["cx","cy","r","fill","stroke","stroke-width"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge={key:2},Ie=["x","y","fill","font-size"],He={key:3},Oe=["x","y","fill","font-size"],qe={key:3,class:"vue-data-ui-watermark"},Re=["xmlns","height","width"],We=["fill"],Ue=["innerHTML"],je={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Ze}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),S=e.ref(null),V=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>A(),set:a=>a});function A(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=A(),P(),V.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{P()});function P(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?S.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const H=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),K=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function O(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:O,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:O,onGenerateImage:e.unref(M),onToggleTable:q},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,de))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*i.value,y2:o.value.top+r*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,he))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ye)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,fe))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,be))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,pe))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,_e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ce)],8,ke),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Be),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ee)],8,we)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,Le),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Xe)],8,Ve)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BofUHMEw.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),le=require("./Title-DOzi72Pu.cjs"),W=require("./usePrinter-_JYb_33H.cjs"),ae=require("./DataTable-ysqfWT9v.cjs"),oe=require("./vue-ui-skeleton-Bx_kbjKr.cjs"),re=require("./Legend-DtnPX_Dc.cjs"),se=require("./vue-ui-accordion-XtygMpX7.cjs"),U=require("./useNestedProp-DGK0LGfN.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],ie={key:0},de=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ve={key:1},he=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],me={key:2},fe=["x","y","font-size","fill","font-weight"],be=["x","y","font-size","fill"],ge={key:3},pe=["x","y","font-size","fill","font-weight"],ke=["id"],_e=["stop-color"],xe=["stop-color"],Ce=["stop-color"],we=["id"],Be=["stop-color"],Ne=["stop-color"],Ee=["stop-color"],Le=["id"],$e=["stop-color"],Se=["stop-color"],Ve=["id"],ze=["stop-color"],Xe=["stop-color"],Ae={key:0},Pe=["d","fill"],Te={key:1},De=["x","y","height","width","fill"],Fe=["cx","cy","r","fill","stroke","stroke-width"],Me=["cx","cy","r","fill","stroke","stroke-width"],Ge={key:2},Ie=["x","y","fill","font-size"],He={key:3},Oe=["x","y","fill","font-size"],qe={key:3,class:"vue-data-ui-watermark"},Re=["xmlns","height","width"],We=["fill"],Ue=["innerHTML"],je={__name:"vue-ui-dumbbell",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(j,{expose:Y,emit:Ze}){const y=j,{vue_ui_dumbbell:Z}=s.useConfig(),b=e.computed({get(){return!!y.dataset&&y.dataset.length},set(a){return a}}),d=e.ref(s.createUid()),L=e.ref(0),k=e.ref(null),$=e.ref(null),S=e.ref(null),V=e.ref(0),z=e.ref(0),X=e.ref(0),t=e.computed({get:()=>A(),set:a=>a});function A(){const a=U.useNestedProp({userConfig:y.config,defaultConfig:Z});return a.theme?{...U.useNestedProp({userConfig:s.themes.vue_ui_dumbbell[a.theme]||y.config,defaultConfig:a})}:a}e.watch(()=>y.config,a=>{t.value=A(),P(),V.value+=1,z.value+=1,X.value+=1,i.value=t.value.style.chart.rowHeight,g.value=t.value.style.chart.width},{deep:!0}),e.watch(()=>y.dataset,a=>{I()},{deep:!0});const _=e.ref(null);e.onMounted(()=>{P()});function P(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiDumbbell",type:"dataset"}):y.dataset.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","start","end"]}).forEach(l=>{b.value=!1,s.error({componentName:"VueUiDumbbell",type:"datasetSerieAttribute",property:l,index:n})})}),t.value.responsive){const a=R.throttle(()=>{const{width:n,height:l}=R.useResponsive({chart:k.value,title:t.value.style.chart.title.text?$.value:null,legend:t.value.style.chart.legend.show?S.value:null});g.value=n,i.value=l/y.dataset.length,v.value=C()});_.value=new ResizeObserver(a),_.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{_.value&&_.value.disconnect()});const{isPrinting:T,isImaging:D,generatePdf:F,generateImage:M}=W.usePrinter({elementId:`dumbbell_${d.value}`,fileName:t.value.style.chart.title.text||"vue-ui-dumbbell"}),x=e.ref({showTable:t.value.table.show}),m=e.computed(()=>y.dataset.map((a,n)=>({...a,start:s.checkNaN(a.start),end:s.checkNaN(a.end),id:s.createUid()}))),N=e.computed(()=>({max:Math.max(...m.value.flatMap(a=>[a.start,a.end])),min:Math.min(...m.value.flatMap(a=>[a.start,a.end]))})),c=e.computed(()=>s.calculateNiceScale(N.value.min<0?N.value.min:0,N.value.max,t.value.style.chart.grid.scaleSteps)),i=e.ref(t.value.style.chart.rowHeight),g=e.ref(t.value.style.chart.width),o=e.computed(()=>{const a=i.value,n=t.value.style.chart.padding.left+t.value.style.chart.padding.right+g.value,l=t.value.style.chart.padding.top+t.value.style.chart.padding.bottom+a*y.dataset.length,r=c.value.ticks.length*(g.value/c.value.ticks.length);return{left:t.value.style.chart.padding.left,right:n-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,bottom:l-t.value.style.chart.padding.bottom,width:g.value,height:a*y.dataset.length,rowHeight:a,absoluteHeight:l,absoluteWidth:n,widthPlotReference:r}});function C(){return m.value.map((a,n)=>{const l=o.value.left+(a.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,r=o.value.left+(a.end+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,u=l+(r-l)/2;return{...a,startX:l,endX:r,centerX:u,y:o.value.top+n*i.value+i.value/2,endVal:a.start}})}const v=e.ref([]),G=e.ref(null),J=e.computed(()=>m.value.map(a=>a.end).reduce((a,n)=>a+n,0));e.onMounted(()=>{I()});function I(){v.value=C();let a=v.value.map(l=>l.start).reduce((l,r)=>l+r,0);function n(){const l=m.value.map(r=>r.end-r.start);a>=J.value?(cancelAnimationFrame(G.value),v.value=C()):(v.value=v.value.map((r,u)=>{r.endVal+=l[u]*(t.value.animationSpeed/100);const h=o.value.left+(r.start+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,B=o.value.left+(r.endVal+Math.abs(c.value.min))/(c.value.max+Math.abs(c.value.min))*o.value.widthPlotReference,E=h+(B-h)/2;return{...r,startX:h,endX:B,centerX:E,y:o.value.top+u*i.value+i.value/2,endVal:r.endVal}}),a=v.value.map(r=>r.endVal).reduce((r,u)=>r+u,0),G.value=requestAnimationFrame(n))}t.value.useAnimation?n():v.value=C()}const H=e.computed(()=>[{name:t.value.style.chart.legend.labelStart,color:t.value.style.chart.plots.gradient.show?`url(#start_grad_${d.value})`:t.value.style.chart.plots.startColor},{name:t.value.style.chart.legend.labelEnd,color:t.value.style.chart.plots.gradient.show?`url(#end_grad_${d.value})`:t.value.style.chart.plots.endColor}]),K=e.computed(()=>({cy:"donut-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,paddingTop:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),f=e.computed(()=>{const a=v.value.map(l=>({name:l.name})),n=v.value.map(l=>({start:l.start,end:l.end}));return{head:a,body:n}}),w=e.computed(()=>{const a=[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],n=f.value.head.map((u,h)=>{const B=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].start,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),E=s.dataLabel({p:t.value.style.chart.labels.prefix,v:f.value.body[h].end,s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue}),te=s.dataLabel({v:100*(f.value.body[h].end/f.value.body[h].start-1),s:"%",r:t.value.table.td.roundingPercentage});return[{name:u.name},B,E,te]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.start,t.value.table.columnNames.end,t.value.table.columnNames.progression],head:a,body:n,config:l}});function O(){e.nextTick(()=>{const a=f.value.head.map((r,u)=>[[r.name],[f.value.body[u].start],[f.value.body[u].end]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.start],[t.value.table.columnNames.end]]].concat(a),l=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-dumbbell"})})}const p=e.ref(!1);function Q(a){p.value=a,L.value+=1}function ee(){return v.value}function q(){x.value.showTable=!x.value.showTable}return Y({getData:ee,generatePdf:F,generateCsv:O,generateImage:M,toggleTable:q}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dumbbellChart",ref:k,class:e.normalizeClass(`vue-ui-dumbbell ${p.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`dumbbell_${d.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:$,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(le._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(D),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(F),onGenerateCsv:O,onGenerateImage:e.unref(M),onToggleTable:q},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),viewBox:`0 0 ${o.value.absoluteWidth<=0?10:o.value.absoluteWidth} ${o.value.absoluteHeight<=0?10:o.value.absoluteHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left+r*o.value.width/(c.value.ticks.length-1),x2:o.value.left+r*o.value.width/(c.value.ticks.length-1),y1:o.value.top,y2:o.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray},null,8,de))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:o.value.left,x2:o.value.right,y1:o.value.top+r*i.value,y2:o.value.top+r*i.value,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,he))),256)),e.createElementVNode("line",{x1:o.value.left,x2:o.value.right,y1:o.value.bottom,y2:o.value.bottom,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray},null,8,ye)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+(t.value.style.chart.labels.yAxisLabels.showProgression?i.value/3:i.value/2)+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"font-weight":t.value.style.chart.labels.yAxisLabels.bold?"bold":"normal","text-anchor":"end"},e.toDisplayString(l.name),9,fe))),256)),t.value.style.chart.labels.yAxisLabels.showProgression?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(m.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left-6+t.value.style.chart.labels.yAxisLabels.offsetX,y:o.value.top+r*i.value+i.value/1.3+t.value.style.chart.labels.yAxisLabels.fontSize/3,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,fill:t.value.style.chart.labels.yAxisLabels.color,"text-anchor":"end"},e.toDisplayString(e.unref(s.dataLabel)({v:100*(l.end/l.start-1),s:"%",r:t.value.style.chart.labels.yAxisLabels.rounding})),9,be))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+r*(o.value.width/(c.value.ticks.length-1)),y:o.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"font-weight":t.value.style.chart.labels.xAxisLabels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.labels.formatter,l,e.unref(s.dataLabel)({p:t.value.style.chart.labels.prefix,v:l,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.xAxisLabels.rounding}),{datapoint:l,seriesIndex:r})),9,pe))),256))])):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`start_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.startColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,_e),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.startColor,.1)},null,8,xe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Ce)],8,ke),e.createElementVNode("radialGradient",{id:`end_grad_${d.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(s.lightenHexColor)(t.value.style.chart.plots.endColor,t.value.style.chart.plots.gradient.intensity/100)},null,8,Be),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(s.darkenHexColor)(t.value.style.chart.plots.endColor,.1)},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Ee)],8,we)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`grad_positive_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.startColor},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.endColor},null,8,Se)],8,Le),e.createElementVNode("linearGradient",{id:`grad_negative_${d.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.chart.plots.endColor},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.chart.plots.startColor},null,8,Xe)],8,Ve)]),t.value.style.chart.plots.link.type==="curved"?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("path",{d:`M
2
2
  ${l.startX},${l.y+t.value.style.chart.plots.radius/2}
3
3
  C ${l.centerX},${l.y} ${l.centerX},${l.y}
4
4
  ${l.endX},${l.y+t.value.style.chart.plots.radius/2}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CzjC8LfY.cjs"),he=require("./Title-BSpa3uge.cjs"),Z=require("./usePrinter-DiLM6jav.cjs"),fe=require("./DataTable-C5TOiC61.cjs"),ve=require("./vue-ui-accordion-DpI7fTKZ.cjs"),me=require("./vue-ui-skeleton-CwqzJlQf.cjs"),J=require("./useNestedProp-CY7DebVH.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],ye=["id"],be=["stop-color"],we=["stop-color"],Ce=["d","fill","stroke","stroke-width"],Ne=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],xe=["x","y","font-size","fill"],$e=["x","y","font-size","fill"],Be={key:2,class:"vue-data-ui-watermark"},_e=["innerHTML"],Ee={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const f=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(f.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const $=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:f.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||f.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>f.config,l=>{t.value=I(),P(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:M,generateImage:V}=Z.usePrinter({elementId:`flow_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),B=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),_=e.computed(()=>!f.dataset||!f.dataset.length?[]:f.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}_.value.forEach(([s,a,i])=>{n(s),n(a),l[s].outflow+=i,l[a].inflow+=i});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,c){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=c),o[c]||(o[c]=[]),o[c].includes(u)||o[c].push(u)}l.forEach(([u,c,h],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(c,N),n[u].children||(n[u].children=[]),n[u].children.push({target:c,value:h}),n[u].outflow+=h,n[c].inflow+=h}),Object.keys(n).forEach((u,c)=>{n[u].color=B.value[c]||B.value[c%B.value.length]||r.palette[c]||r.palette[c%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let c=0;o[u].forEach((h,k)=>{const p=n[h].height;a[h]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p,i:k,color:n[h].color,value:oe(p)},c+=p+D.value})}const i=[];for(const u in n){let c=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:h,value:k},p)=>{const N=a[h].y,S=a[u],T=a[h],A=r.checkNaN(c),W=r.checkNaN(c+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[h].inflow*T.height),de={id:r.createUid(),source:u,target:h,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(T.x)} ${R} L ${r.checkNaN(T.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[h].color};i.push(de),c+=W-A,a[h].y+=R-X})}return{nodeCoordinates:a,links:i}}const v=e.computed(()=>{const l=ne(f.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:i}=l[s];n[a]||(n[a]=0),n[a]+=i+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=_.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(i=>i.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return _.value.forEach(([a,i,u])=>{n[a]||(n[a]=[]),o[i]||(o[i]=[]),n[a].push(i),o[i].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ce(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,i)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ie(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ie,generateCsv:U,generateImage:V,generatePdf:M,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${$.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,onToggleFullscreen:te,onGeneratePdf:e.unref(M),onGenerateCsv:U,onGenerateImage:e.unref(V),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,we)],8,ye))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Ce))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ce()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,$e))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,ke)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(fe.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,_e)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ge))}},Se=pe._export_sfc(Ee,[["__scopeId","data-v-948bb0e4"]]);exports.default=Se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BofUHMEw.cjs"),he=require("./Title-DOzi72Pu.cjs"),Z=require("./usePrinter-_JYb_33H.cjs"),fe=require("./DataTable-ysqfWT9v.cjs"),ve=require("./vue-ui-accordion-XtygMpX7.cjs"),me=require("./vue-ui-skeleton-Bx_kbjKr.cjs"),J=require("./useNestedProp-DGK0LGfN.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],ye=["id"],be=["stop-color"],we=["stop-color"],Ce=["d","fill","stroke","stroke-width"],Ne=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],xe=["x","y","font-size","fill"],$e=["x","y","font-size","fill"],Be={key:2,class:"vue-data-ui-watermark"},_e=["innerHTML"],Ee={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(K,{expose:Q}){const f=K,{vue_ui_flow:ee}=r.useConfig(),x=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(f.dataset)&&r.error({componentName:"VueUiFlow",type:"dataset"})}const $=e.ref(r.createUid()),F=e.ref(null),L=e.ref(0),z=e.ref(0),y=e.ref(!1);function te(l){y.value=l,L.value+=1}const t=e.computed({get:()=>I(),set:l=>l});function I(){const l=J.useNestedProp({userConfig:f.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_flow[l.theme]||f.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>f.config,l=>{t.value=I(),P(),z.value+=1},{deep:!0});const{isPrinting:H,isImaging:O,generatePdf:M,generateImage:V}=Z.usePrinter({elementId:`flow_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),B=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),D=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),Y=e.computed(()=>t.value.style.chart.links.width),_=e.computed(()=>!f.dataset||!f.dataset.length?[]:f.dataset.map(l=>[l[0],l[1],r.checkNaN(l[2])])),q=e.computed(()=>{const l={};function n(s){l[s]||(l[s]={inflow:0,outflow:0})}_.value.forEach(([s,a,i])=>{n(s),n(a),l[s].outflow+=i,l[a].inflow+=i});let o=0;for(const s in l){const a=Math.max(l[s].inflow,l[s].outflow);o=Math.max(o,a)}return o});function le(l){return l/q.value*100+t.value.style.chart.nodes.minHeight}function oe(l){const n=t.value.style.chart.nodes.minHeight;return(l-n)/100*q.value}function ne(l){const n={},o={};function s(u,c){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=c),o[c]||(o[c]=[]),o[c].includes(u)||o[c].push(u)}l.forEach(([u,c,h],k)=>{const p=n[u]?n[u].level:0,N=p+1;s(u,p),s(c,N),n[u].children||(n[u].children=[]),n[u].children.push({target:c,value:h}),n[u].outflow+=h,n[c].inflow+=h}),Object.keys(n).forEach((u,c)=>{n[u].color=B.value[c]||B.value[c%B.value.length]||r.palette[c]||r.palette[c%d.length]});for(const u in n)n[u].height=le(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in o){let c=0;o[u].forEach((h,k)=>{const p=n[h].height;a[h]={x:parseInt(u,10)*Y.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p,i:k,color:n[h].color,value:oe(p)},c+=p+D.value})}const i=[];for(const u in n){let c=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:h,value:k},p)=>{const N=a[h].y,S=a[u],T=a[h],A=r.checkNaN(c),W=r.checkNaN(c+k/n[u].outflow*S.height),X=r.checkNaN(N),R=r.checkNaN(N+k/n[h].inflow*T.height),de={id:r.createUid(),source:u,target:h,path:`M ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${A} L ${r.checkNaN(S.x)+r.checkNaN(g.value)} ${W} L ${r.checkNaN(T.x)} ${R} L ${r.checkNaN(T.x)} ${X} Z`,value:k,sourceColor:n[u].color,targetColor:n[h].color};i.push(de),c+=W-A,a[h].y+=R-X})}return{nodeCoordinates:a,links:i}}const v=e.computed(()=>{const l=ne(f.dataset);return{nodes:Object.keys(l.nodeCoordinates).map((n,o)=>({...l.nodeCoordinates[n],name:n})),links:l.links}}),ae=e.computed(()=>re(v.value.nodes));function re(l){const n={};for(const s in l){const{x:a,height:i}=l[s];n[a]||(n[a]=0),n[a]+=i+D.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:l,right:n,left:o,bottom:s}=t.value.style.chart.padding,a=_.value.length*Y.value;return{height:ae.value+l+s,width:n+Math.max(...v.value.nodes.map(i=>i.x))+g.value,left:o,top:l,right:a-n,p_top:l,p_bottom:s}});function se(l){const n={},o={},s=new Set;return _.value.forEach(([a,i,u])=>{n[a]||(n[a]=[]),o[i]||(o[i]=[]),n[a].push(i),o[i].push(a)}),n[l]&&n[l].forEach(a=>s.add(a)),o[l]&&o[l].forEach(a=>s.add(a)),Array.from(s).concat(l)}const m=e.ref(null),w=e.ref(null);function ue(l){m.value=se(l.name),w.value=l.name}function ce(){m.value=null,w.value=null}const G=e.computed(()=>v.value.links.map(({source:l,target:n,sourceColor:o,targetColor:s,value:a})=>({source:l,target:n,sourceColor:o,targetColor:s,value:a})));function U(){e.nextTick(()=>{const l=G.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(l),o=r.createCsvContent(n);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const l=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=G.value.map((a,i)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},r.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:l,body:n,config:o}});function ie(){return v.value}function j(){b.value.showTable=!b.value.showTable}return Q({getData:ie,generateCsv:U,generateImage:V,generatePdf:M,toggleTable:j}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:F,class:e.normalizeClass(`vue-ui-flow ${y.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${$.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(he._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(H),isImaging:e.unref(O),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,onToggleFullscreen:te,onGeneratePdf:e.unref(M),onGenerateCsv:U,onGenerateImage:e.unref(V),onToggleTable:j},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,(o,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:o.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.sourceColor},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":o.targetColor},null,8,we)],8,ye))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.links,o=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:o.path,fill:`url(#${o.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[o.target,o.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,Ce))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:o.x,y:e.unref(r.checkNaN)(o.absoluteY),height:e.unref(r.checkNaN)(o.height),width:g.value,fill:o.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ue(o),onMouseleave:n[0]||(n[0]=a=>ce()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(o.name)?1:.2:1}`)},null,44,Ne))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2-t.value.style.chart.nodes.labels.fontSize/4),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):o.name),13,xe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.nodes,(o,s)=>(e.openBlock(),e.createElementBlock("text",{x:o.x+g.value/2,y:e.unref(r.checkNaN)(o.absoluteY+o.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(r.adaptColorToBackground)(o.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(o.name)?1:0:1}`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:o.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:o,seriesIndex:s})),13,$e))),256)),e.renderSlot(l.$slots,"svg",{svg:E.value},void 0,!0)],14,ke)),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(me.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(ve.default,{key:4,hideDetails:"",config:{open:b.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(fe.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=o=>b.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,_e)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ge))}},Se=pe._export_sfc(Ee,[["__scopeId","data-v-948bb0e4"]]);exports.default=Se;
@@ -1,11 +1,11 @@
1
1
  import { computed as m, onMounted as Le, ref as y, watch as He, openBlock as r, createElementBlock as h, normalizeClass as ce, normalizeStyle as C, createBlock as E, createCommentVNode as T, unref as i, createSlots as Oe, withCtx as k, renderSlot as x, normalizeProps as de, guardReactiveProps as ve, createElementVNode as S, Fragment as P, renderList as F, toDisplayString as U, createVNode as Ee, createTextVNode as Se, nextTick as Me } from "vue";
2
- import { u as ze, o as Ye, e as De, c as fe, t as Ge, a as Be, p as V, b as Ae, v, f as he, X as Ue, F as me, I as Ve, i as je, q as Xe, r as We } from "./index-DP8dqFNd.js";
3
- import { _ as qe } from "./Title-Bx-VO3md.js";
4
- import { u as Re, U as Ze } from "./usePrinter-DiuHo4LO.js";
5
- import { D as Je } from "./DataTable-y1lX5jVj.js";
6
- import Ke from "./vue-ui-accordion-Dl8zkZPk.js";
7
- import Qe from "./vue-ui-skeleton-B30ZhUV7.js";
8
- import { u as ge } from "./useNestedProp-B-oZxD4x.js";
2
+ import { u as ze, o as Ye, e as De, c as fe, t as Ge, a as Be, p as V, b as Ae, v, f as he, X as Ue, F as me, I as Ve, i as je, q as Xe, r as We } from "./index-C_xZ1jJj.js";
3
+ import { _ as qe } from "./Title-Bgh58KWs.js";
4
+ import { u as Re, U as Ze } from "./usePrinter-BJ7GxAOO.js";
5
+ import { D as Je } from "./DataTable-CThhaAYT.js";
6
+ import Ke from "./vue-ui-accordion-issoIPFd.js";
7
+ import Qe from "./vue-ui-skeleton-C3UWXP3Q.js";
8
+ import { u as ge } from "./useNestedProp-9QKvGow8.js";
9
9
  import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const tt = ["id"], lt = ["xmlns", "viewBox"], ot = ["id"], at = ["stop-color"], nt = ["stop-color"], st = ["d", "fill", "stroke", "stroke-width"], ut = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], rt = ["x", "y", "font-size", "fill"], it = ["x", "y", "font-size", "fill"], ct = {
11
11
  key: 2,
@@ -1,13 +1,13 @@
1
1
  import { computed as v, onMounted as $e, ref as u, watch as _e, openBlock as s, createElementBlock as n, normalizeClass as L, normalizeStyle as I, createBlock as x, createCommentVNode as d, unref as h, createSlots as Te, withCtx as i, renderSlot as y, normalizeProps as F, guardReactiveProps as O, createElementVNode as $, Fragment as oe, renderList as se, createTextVNode as re, toDisplayString as E, createVNode as Pe, nextTick as Se } from "vue";
2
- import { u as Ne, o as Le, e as ue, g as Ie, c as ne, t as Fe, a as Oe, p as D, b as Ee, d as De, G as ie, J as Ge, f as k, X as Ve, i as ce, x as ve, y as Be, q as Me, r as ze } from "./index-DP8dqFNd.js";
3
- import { L as We } from "./Legend-BLXcdrri.js";
4
- import { _ as Ae } from "./Title-Bx-VO3md.js";
5
- import { _ as He } from "./Tooltip-Dk-cimhQ.js";
6
- import { D as Ue } from "./DataTable-y1lX5jVj.js";
7
- import { u as Xe, U as Re } from "./usePrinter-DiuHo4LO.js";
8
- import Ye from "./vue-ui-skeleton-B30ZhUV7.js";
9
- import je from "./vue-ui-accordion-Dl8zkZPk.js";
10
- import { u as de } from "./useNestedProp-B-oZxD4x.js";
2
+ import { u as Ne, o as Le, e as ue, g as Ie, c as ne, t as Fe, a as Oe, p as D, b as Ee, d as De, G as ie, J as Ge, f as k, X as Ve, i as ce, x as ve, y as Be, q as Me, r as ze } from "./index-C_xZ1jJj.js";
3
+ import { L as We } from "./Legend-DxRA5XXC.js";
4
+ import { _ as Ae } from "./Title-Bgh58KWs.js";
5
+ import { _ as He } from "./Tooltip-HqwVgkYT.js";
6
+ import { D as Ue } from "./DataTable-CThhaAYT.js";
7
+ import { u as Xe, U as Re } from "./usePrinter-BJ7GxAOO.js";
8
+ import Ye from "./vue-ui-skeleton-C3UWXP3Q.js";
9
+ import je from "./vue-ui-accordion-issoIPFd.js";
10
+ import { u as de } from "./useNestedProp-9QKvGow8.js";
11
11
  import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Je = ["id"], Ke = ["xmlns", "viewBox"], Qe = ["id"], Ze = ["stdDeviation"], et = ["d", "stroke", "stroke-width"], tt = ["d", "stroke", "stroke-width"], lt = ["filter"], at = ["d", "stroke", "stroke-width"], ot = ["d", "stroke-width", "onMouseenter", "onClick"], st = {
13
13
  key: 3,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CzjC8LfY.cjs"),le=require("./Legend-CGGD8NhP.cjs"),ae=require("./Title-BSpa3uge.cjs"),oe=require("./Tooltip-rmhZhv96.cjs"),re=require("./DataTable-C5TOiC61.cjs"),W=require("./usePrinter-DiLM6jav.cjs"),ne=require("./vue-ui-skeleton-CwqzJlQf.cjs"),ue=require("./vue-ui-accordion-DpI7fTKZ.cjs"),U=require("./useNestedProp-CY7DebVH.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce=["xmlns","viewBox"],de=["id"],ve=["stdDeviation"],he=["d","stroke","stroke-width"],pe=["d","stroke","stroke-width"],ye=["filter"],fe=["d","stroke","stroke-width"],ge=["d","stroke-width","onMouseenter","onClick"],me={key:3,class:"vue-data-ui-watermark"},be=["onClick"],ke={key:0},Ce={key:1},we=["innerHTML"],xe={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:a,index:o})})})}const f=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),_=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:z,generateImage:O}=W.usePrinter({elementId:`galaxy_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),s=e.ref([]);function B(l){s.value.includes(l.id)?s.value=s.value.filter(o=>o!==l.id):s.value.push(l.id),T("selectLegend",g.value.map(o=>({name:o.name,color:o.color,value:o.value})))}const p=e.computed(()=>i.dataset.map((l,o)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((a,n)=>a+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:o})).sort((l,o)=>o.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id)).map(l=>l.value).reduce((l,o)=>l+o,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let o=0;o<D.value.length;o+=1){const a=D.value[o];let n=a.value/d.value*K.value;o>0&&l.length&&(n+=l[o-1].points),l.push({points:n,...a,seriesIndex:o,proportion:a.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((o,a)=>!s.value.includes(o.id)).toSorted((o,a)=>a.points-o.points)}),m=e.ref(!1);function Q(l){m.value=l,_.value+=1}const S=e.ref(null);function Z({datapoint:l,_relativeIndex:o,seriesIndex:a,show:n=!1}){S.value={datapoint:l,seriesIndex:a,series:p.value,config:t.value},w.value=n,c.value=l.id;let u="";const y=t.value.style.chart.tooltip.customFormat;r.isFunction(y)&&r.functionReturnsString(()=>y({seriesIndex:a,datapoint:l,series:p.value,config:t.value}))?x.value=y({seriesIndex:a,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${u}</div>`)}const q=e.computed(()=>p.value.map((l,o)=>({...l,proportion:(l.value||0)/i.dataset.map(a=>(a.values||[]).reduce((n,u)=>n+u,0)).reduce((a,n)=>a+n,0),opacity:s.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:s.value.includes(l.id)}))),ee=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=g.value.map(a=>({name:a.name,color:a.color})),o=g.value.map(a=>a.value);return{head:l,body:o}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,u)=>[[n.name],[h.value.body[u]],[isNaN(h.value.body[u]/d.value)?"-":h.value.body[u]/d.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=h.value.head.map((u,y)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[y],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},te,isNaN(h.value.body[y]/d.value)?"-":r.dataLabel({v:h.value.body[y]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:o,config:a}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:z,generateCsv:G,generateImage:O,toggleTable:M,toggleTooltip:A}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${_.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(z),onGenerateCsv:G,onGenerateImage:e.unref(O),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ve)],8,de)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[a.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:a.path,fill:"none",stroke:a.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==a.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,pe)):e.createCommentVNode("",!0),a.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${f.value})`},[e.createElementVNode("path",{d:a.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==a.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,fe)],8,ye)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[a.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>Z({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex,show:!0}),onMouseleave:o[0]||(o[0]=u=>{w.value=!1,c.value=null}),onClick:u=>T("selectDatapoint",a)},null,40,ge)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:o[1]||(o[1]=({legend:a})=>B(a))},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:u=>B(a),style:e.normalizeStyle(`opacity:${s.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:n}))+" ",1),s.value.includes(a.id)?(e.openBlock(),e.createElementBlock("span",Ce," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ke," ("+e.toDisplayString(isNaN(a.value/d.value)?"-":e.unref(r.dataLabel)({v:a.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,be)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(oe._sfc_main,{show:v.value.showTooltip&&w.value,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:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ue.default,{key:6,hideDetails:"",config:{open:v.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.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,we)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ie))}},$e=se._export_sfc(xe,[["__scopeId","data-v-5fb613d4"]]);exports.default=$e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BofUHMEw.cjs"),le=require("./Legend-DtnPX_Dc.cjs"),ae=require("./Title-DOzi72Pu.cjs"),oe=require("./Tooltip-DWx3KcqE.cjs"),re=require("./DataTable-ysqfWT9v.cjs"),W=require("./usePrinter-_JYb_33H.cjs"),ne=require("./vue-ui-skeleton-Bx_kbjKr.cjs"),ue=require("./vue-ui-accordion-XtygMpX7.cjs"),U=require("./useNestedProp-DGK0LGfN.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce=["xmlns","viewBox"],de=["id"],ve=["stdDeviation"],he=["d","stroke","stroke-width"],pe=["d","stroke","stroke-width"],ye=["filter"],fe=["d","stroke","stroke-width"],ge=["d","stroke-width","onMouseenter","onClick"],me={key:3,class:"vue-data-ui-watermark"},be=["onClick"],ke={key:0},Ce={key:1},we=["innerHTML"],xe={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(H,{expose:R,emit:T}){const i=H,{vue_ui_galaxy:X}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:a,index:o})})})}const f=e.ref(r.createUid()),C=e.ref(null),j=e.ref(null),w=e.ref(!1),x=e.ref(""),c=e.ref(null),_=e.ref(0),P=e.ref(0),L=e.ref(0),E=e.ref(0),t=e.computed({get:()=>V(),set:l=>l});function V(){const l=U.useNestedProp({userConfig:i.config,defaultConfig:X});return l.theme?{...U.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=V(),N(),P.value+=1,L.value+=1,E.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:z,generateImage:O}=W.usePrinter({elementId:`galaxy_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),Y=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),s=e.ref([]);function B(l){s.value.includes(l.id)?s.value=s.value.filter(o=>o!==l.id):s.value.push(l.id),T("selectLegend",g.value.map(o=>({name:o.name,color:o.color,value:o.value})))}const p=e.computed(()=>i.dataset.map((l,o)=>({name:l.name,color:r.convertColorToHex(l.color)||Y.value[o]||r.palette[o]||r.palette[o%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((a,n)=>a+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:o})).sort((l,o)=>o.value-l.value));function J(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id)).map(l=>l.value).reduce((l,o)=>l+o,0)),K=e.ref(190),D=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let o=0;o<D.value.length;o+=1){const a=D.value[o];let n=a.value/d.value*K.value;o>0&&l.length&&(n+=l[o-1].points),l.push({points:n,...a,seriesIndex:o,proportion:a.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((o,a)=>!s.value.includes(o.id)).toSorted((o,a)=>a.points-o.points)}),m=e.ref(!1);function Q(l){m.value=l,_.value+=1}const S=e.ref(null);function Z({datapoint:l,_relativeIndex:o,seriesIndex:a,show:n=!1}){S.value={datapoint:l,seriesIndex:a,series:p.value,config:t.value},w.value=n,c.value=l.id;let u="";const y=t.value.style.chart.tooltip.customFormat;r.isFunction(y)&&r.functionReturnsString(()=>y({seriesIndex:a,datapoint:l,series:p.value,config:t.value}))?x.value=y({seriesIndex:a,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${u}</div>`)}const q=e.computed(()=>p.value.map((l,o)=>({...l,proportion:(l.value||0)/i.dataset.map(a=>(a.values||[]).reduce((n,u)=>n+u,0)).reduce((a,n)=>a+n,0),opacity:s.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>B(l),isSegregated:s.value.includes(l.id)}))),ee=e.computed(()=>({cy:"galaxy-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":""})),h=e.computed(()=>{const l=g.value.map(a=>({name:a.name,color:a.color})),o=g.value.map(a=>a.value);return{head:l,body:o}});function G(){e.nextTick(()=>{const l=h.value.head.map((n,u)=>[[n.name],[h.value.body[u]],[isNaN(h.value.body[u]/d.value)?"-":h.value.body[u]/d.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=h.value.head.map((u,y)=>{const te=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[y],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},te,isNaN(h.value.body[y]/d.value)?"-":r.dataLabel({v:h.value.body[y]/d.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:o,config:a}});function M(){v.value.showTable=!v.value.showTable}function A(){v.value.showTooltip=!v.value.showTooltip}return R({getData:J,generatePdf:z,generateCsv:G,generateImage:O,toggleTable:M,toggleTooltip:A}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${P.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:j,key:`user_option_${_.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(z),onGenerateCsv:G,onGenerateImage:e.unref(O),onToggleTable:M,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ve)],8,de)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[a.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:a.path,fill:"none",stroke:a.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==a.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,pe)):e.createCommentVNode("",!0),a.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${f.value})`},[e.createElementVNode("path",{d:a.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===a.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==a.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,fe)],8,ye)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[a.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:a.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>Z({datapoint:a,relativeIndex:n,seriesIndex:a.seriesIndex,show:!0}),onMouseleave:o[0]||(o[0]=u=>{w.value=!1,c.value=null}),onClick:u=>T("selectDatapoint",a)},null,40,ge)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{key:`legend_${E.value}`,legendSet:q.value,config:ee.value,onClickMarker:o[1]||(o[1]=({legend:a})=>B(a))},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:u=>B(a),style:e.normalizeStyle(`opacity:${s.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:n}))+" ",1),s.value.includes(a.id)?(e.openBlock(),e.createElementBlock("span",Ce," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ke," ("+e.toDisplayString(isNaN(a.value/d.value)?"-":e.unref(r.dataLabel)({v:a.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,be)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:q.value},void 0,!0),e.createVNode(oe._sfc_main,{show:v.value.showTooltip&&w.value,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:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...S.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ue.default,{key:6,hideDetails:"",config:{open:v.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.openBlock(),e.createBlock(re.DataTable,{key:`table_${L.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,we)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ie))}},$e=se._export_sfc(xe,[["__scopeId","data-v-5fb613d4"]]);exports.default=$e;
@@ -1,10 +1,10 @@
1
1
  import { computed as p, ref as h, watch as Q, onMounted as ke, onBeforeUnmount as be, openBlock as o, createElementBlock as i, normalizeClass as ee, normalizeStyle as G, createBlock as R, withCtx as I, toDisplayString as S, createCommentVNode as g, unref as c, createSlots as _e, renderSlot as x, normalizeProps as te, guardReactiveProps as ae, createElementVNode as f, Fragment as E, renderList as A } from "vue";
2
- import { u as xe, c as we, t as Fe, a as Se, p as le, b as ze, o as se, d as Ce, e as O, g as re, m as oe, X as $e, s as j, K as X, i as Me, f as Pe, E as ue } from "./index-DP8dqFNd.js";
2
+ import { u as xe, c as we, t as Fe, a as Se, p as le, b as ze, o as se, d as Ce, e as O, g as re, m as oe, X as $e, s as j, K as X, i as Me, f as Pe, E as ue } from "./index-C_xZ1jJj.js";
3
3
  import { t as Ie, u as Oe } from "./useResponsive-NZB-WLRF.js";
4
- import { u as Xe, U as Ne } from "./usePrinter-DiuHo4LO.js";
5
- import Ye from "./vue-ui-skeleton-B30ZhUV7.js";
6
- import { _ as Ge } from "./Title-Bx-VO3md.js";
7
- import { u as ne } from "./useNestedProp-B-oZxD4x.js";
4
+ import { u as Xe, U as Ne } from "./usePrinter-BJ7GxAOO.js";
5
+ import Ye from "./vue-ui-skeleton-C3UWXP3Q.js";
6
+ import { _ as Ge } from "./Title-Bgh58KWs.js";
7
+ import { u as ne } from "./useNestedProp-9QKvGow8.js";
8
8
  import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const Ee = ["id"], Ae = { key: 0 }, je = ["xmlns", "viewBox"], De = ["id"], Ue = ["stop-color"], Be = ["stop-color"], Le = ["stop-color"], We = ["id"], Te = ["stdDeviation"], Ve = ["d", "fill", "stroke"], qe = ["d", "filter"], He = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ke = ["x", "y", "font-size", "font-weight", "fill"], Ze = { key: 1 }, Je = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Qe = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], et = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], tt = { key: 2 }, at = ["d", "fill", "stroke", "stroke-width"], lt = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], st = ["x", "y", "font-size", "fill"], rt = {
10
10
  key: 3,