vue-data-ui 3.15.12 → 3.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +132 -59
  2. package/dist/A11yDataTable-KcVAX2cP.js +54 -0
  3. package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
  4. package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
  5. package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
  6. package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
  7. package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
  8. package/dist/ColorPicker-B0mV4xzu.js +255 -0
  9. package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
  10. package/dist/Legend-CS7Xo5LK.js +101 -0
  11. package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
  12. package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
  13. package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
  14. package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
  15. package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
  16. package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
  17. package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
  18. package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
  19. package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
  20. package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-heatmap.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
  91. package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
  92. package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
  93. package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
  94. package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
  95. package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
  96. package/dist/style.css +1 -1
  97. package/dist/types/vue-data-ui.d.ts +59 -0
  98. package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
  99. package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
  100. package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
  101. package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
  102. package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
  103. package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
  104. package/dist/utils.js +3 -3
  105. package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
  106. package/dist/vue-data-ui.js +72 -72
  107. package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
  108. package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
  109. package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
  110. package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
  111. package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
  112. package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
  113. package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
  114. package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
  115. package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
  116. package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
  117. package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
  118. package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
  119. package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
  120. package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
  121. package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
  122. package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
  123. package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
  124. package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
  125. package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
  126. package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
  127. package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
  128. package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
  129. package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
  130. package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
  131. package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
  132. package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
  133. package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
  134. package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
  135. package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
  136. package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
  137. package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
  138. package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
  139. package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
  140. package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
  141. package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
  142. package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
  143. package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
  144. package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
  145. package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
  146. package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
  147. package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
  148. package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
  149. package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
  150. package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
  151. package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
  152. package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
  153. package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
  154. package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
  155. package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
  156. package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
  157. package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
  158. package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
  159. package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
  160. package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
  161. package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
  162. package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
  163. package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
  164. package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
  165. package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
  166. package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
  167. package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
  168. package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
  169. package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
  170. package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
  171. package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
  172. package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
  173. package/package.json +2 -2
  174. package/dist/ColorPicker-j0ySewhI.js +0 -244
  175. package/dist/Legend-1LMMsPxL.js +0 -90
  176. package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
  177. package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
  178. package/dist/vue-ui-bump-C_fKharc.js +0 -1059
  179. package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
  180. package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
  181. package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
  182. package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
  183. package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
  184. package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
  185. package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
  186. package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
  187. package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
  188. package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
  189. package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
  190. package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
  191. package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
  192. package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
  193. package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
  194. package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
  195. package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
  196. package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
  197. package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
  198. package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
  199. package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
  200. package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
  201. package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
  202. package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
  203. package/dist/vue-ui-rings-80ZUki42.js +0 -1083
  204. package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
  205. package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
  206. package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
  207. package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
  208. package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
  209. package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
  210. package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
  211. package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
  212. package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
  213. package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
  214. package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
  215. package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
  216. package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
  217. package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
  218. package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
@@ -0,0 +1,1321 @@
1
+ import { defineAsyncComponent as W, useSlots as ml, computed as i, ref as r, toRefs as bl, watch as de, shallowRef as Tt, onMounted as wl, onBeforeUnmount as kl, openBlock as s, createElementBlock as v, unref as d, normalizeStyle as he, normalizeClass as St, createElementVNode as C, toDisplayString as pe, createBlock as I, createCommentVNode as m, withCtx as h, renderSlot as p, normalizeProps as x, guardReactiveProps as $, createSlots as We, createVNode as Ce, Fragment as P, renderList as G, mergeProps as Ge, Teleport as Cl, resolveDynamicComponent as xl, createTextVNode as At, nextTick as It } from "vue";
2
+ import { j as $l, t as Pt, m as Tl, p as Y, o as _t, q as je, r as Sl, n as Al, k as fe, l as z, X as Il, u as Pl, v as _l, W as Bl, s as Ol, a0 as Fl, a1 as Ll, a as Dl, T as Nl, U as Ml } from "./lib-DBptbyyI.js";
3
+ import { b as zl } from "./labelUtils-CqTHa20R.js";
4
+ import { t as Vl, u as Rl } from "./useResponsive-DfdjqQps.js";
5
+ import { u as El } from "./useConfig-DO94Aj5s.js";
6
+ import { u as Ul, B as Wl } from "./BaseScanner-BhhkKVoj.js";
7
+ import { u as Gl } from "./usePrinter-CEpYU3r5.js";
8
+ import { u as jl } from "./useSvgExport-ByUukOZt.js";
9
+ import { u as He } from "./useNestedProp-Bf5XFbs8.js";
10
+ import { u as Hl } from "./useThemeCheck-D1ZYXUwG.js";
11
+ import { u as ql } from "./useUserOptionState-BIvW1Kz7.js";
12
+ import { u as Xl } from "./useChartAccessibility-9icAAmYg.js";
13
+ import Yl from "./img-LXxMLmCg.js";
14
+ import { _ as Kl } from "./Shape-BKRUOeKk.js";
15
+ import Jl from "./Title-BeMKE1cj.js";
16
+ import Ql from "./vue_ui_waffle-M2h-uJQ_.js";
17
+ import Zl from "./Legend-CS7Xo5LK.js";
18
+ import { A as ea } from "./A11yDataTable-KcVAX2cP.js";
19
+ import { B as ta } from "./BaseLegendToggle-BQVIawmA.js";
20
+ import { _ as la } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
+ const aa = ["id"], oa = ["id"], na = ["id"], ua = { style: { position: "relative" } }, sa = ["xmlns", "aria-describedby", "viewBox"], ra = ["id"], ia = ["stop-color"], ca = ["stop-color"], va = ["id"], da = ["x", "y", "height", "width"], ha = ["height", "width"], pa = { key: 0 }, fa = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], ga = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], ya = { key: 1 }, ma = ["rx", "x", "y", "height", "width", "fill", "filter"], ba = ["textContent", "x", "y", "font-size", "fill", "filter"], wa = ["x", "y", "height", "width", "onMouseover", "onMouseleave", "onClick"], ka = {
22
+ key: 0,
23
+ style: { position: "absolute", top: "100%", left: "0", width: "100%" },
24
+ "data-dom-to-png-ignore": "",
25
+ "aria-hidden": "true"
26
+ }, Ca = {
27
+ key: 5,
28
+ class: "vue-data-ui-watermark"
29
+ }, xa = ["id"], $a = ["onClick"], Ta = ["innerHTML"], Sa = {
30
+ __name: "vue-ui-waffle",
31
+ props: {
32
+ config: {
33
+ type: Object,
34
+ default() {
35
+ return {};
36
+ }
37
+ },
38
+ dataset: {
39
+ type: Array,
40
+ default() {
41
+ return [];
42
+ }
43
+ }
44
+ },
45
+ emits: ["selectLegend", "copyAlt"],
46
+ setup(Bt, { expose: Ot, emit: Ft }) {
47
+ const Lt = W(() => import("./Tooltip-Bf-kM3_A.js")), Dt = W(() => import("./BaseIcon-Cb3zzG6s.js")), Nt = W(() => import("./DataTable-DT2kIdQ6.js")), Mt = W(() => import("./vue-ui-accordion-nvggWcGN.js")), zt = W(() => import("./UserOptions-rW2fRf3V.js")), Vt = W(() => import("./PenAndPaper-Ct3qJ4lA.js")), Rt = W(() => import("./PackageVersion-DPO-OOVI.js")), Et = W(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_waffle: Ut } = El(), { isThemeValid: Wt, warnInvalidTheme: Gt } = Hl(), b = Bt, jt = ml(), xe = i({
48
+ get() {
49
+ return !!b.dataset && b.dataset.length;
50
+ },
51
+ set(e) {
52
+ return e;
53
+ }
54
+ }), y = r($l()), te = r(!1), $e = r(""), V = r(null), qe = r(0), _ = r(null), Xe = r(null), Ye = r(null), Ke = r(null), Je = r(null), Qe = r(0), Ze = r(0), et = r(0), tt = r(!1), le = r(null), Te = r(null), ge = r(!1), ye = r(!1), R = r(null), lt = r({ x: 0, y: 0 }), ae = r("pointer"), Se = r(!1), t = r(_e()), j = i(() => t.value.userOptions.useCursorPointer), Ht = i(() => Pt({
55
+ defaultConfig: {
56
+ useCustomCells: !1,
57
+ userOptions: { show: !1 },
58
+ table: { show: !1 },
59
+ style: {
60
+ chart: {
61
+ backgroundColor: "#99999930",
62
+ layout: {
63
+ labels: {
64
+ captions: { show: !1 }
65
+ },
66
+ rect: {
67
+ stroke: "#999999"
68
+ }
69
+ },
70
+ legend: {
71
+ backgroundColor: "transparent",
72
+ showValue: !1,
73
+ showPercentage: !1
74
+ }
75
+ }
76
+ }
77
+ },
78
+ userConfig: t.value.skeletonConfig ?? {}
79
+ })), { loading: Ae, FINAL_DATASET: K, manualLoading: Ie } = Ul({
80
+ ...bl(b),
81
+ FINAL_CONFIG: t,
82
+ prepareConfig: _e,
83
+ callback: () => {
84
+ Promise.resolve().then(async () => {
85
+ w.value = Le();
86
+ });
87
+ },
88
+ skeletonDataset: b.config?.skeletonDataset ?? [
89
+ {
90
+ name: "",
91
+ values: [1],
92
+ color: "#AAAAAA"
93
+ },
94
+ {
95
+ name: "",
96
+ values: [1],
97
+ color: "#BABABA"
98
+ },
99
+ {
100
+ name: "",
101
+ values: [1],
102
+ color: "#CACACA"
103
+ }
104
+ ],
105
+ skeletonConfig: Pt({
106
+ defaultConfig: t.value,
107
+ userConfig: Ht.value
108
+ })
109
+ }), { userOptionsVisible: Pe, setUserOptionsVisibility: at, keepUserOptionState: ot } = ql({ config: t.value }), { svgRef: H } = Xl({ config: t.value.style.chart.title });
110
+ function _e() {
111
+ const e = He({
112
+ userConfig: b.config,
113
+ defaultConfig: Ut
114
+ }), a = e.theme;
115
+ if (!a) return e;
116
+ if (!Wt.value(e))
117
+ return Gt(e), e;
118
+ const l = He({
119
+ userConfig: Ql[a] || b.config,
120
+ defaultConfig: e
121
+ }), o = He({
122
+ userConfig: b.config,
123
+ defaultConfig: l
124
+ });
125
+ return {
126
+ ...o,
127
+ customPalette: o.customPalette.length ? o.customPalette : Tl[a] || Y
128
+ };
129
+ }
130
+ de(() => b.config, (e) => {
131
+ Ae.value || (t.value = _e()), Pe.value = !t.value.userOptions.showOnChartHover, ut(), Qe.value += 1, Ze.value += 1, et.value += 1, T.value.showTable = t.value.table.show, T.value.showTooltip = t.value.style.chart.tooltip.show;
132
+ }, { deep: !0 });
133
+ const E = Tt(null), J = Tt(null), nt = i(() => !!t.value.debug);
134
+ function ut() {
135
+ if (_t(b.dataset) ? (je({
136
+ componentName: "VueUiWaffle",
137
+ type: "dataset",
138
+ debug: nt.value
139
+ }), xe.value = !1, Ie.value = !0) : b.dataset.forEach((e, a) => {
140
+ Sl({
141
+ datasetObject: e,
142
+ requiredAttributes: ["name", "values"]
143
+ }).forEach((l) => {
144
+ je({
145
+ componentName: "VueUiWaffle",
146
+ type: "datasetSerieAttribute",
147
+ property: l,
148
+ index: a,
149
+ debug: nt.value
150
+ });
151
+ });
152
+ }), _t(b.dataset) || (Ie.value = t.value.loading), t.value.responsive) {
153
+ const e = Vl(() => {
154
+ const { width: a, height: l } = Rl({
155
+ chart: _.value,
156
+ title: t.value.style.chart.title.text ? Xe.value : null,
157
+ legend: t.value.style.chart.legend.show ? Ye.value : null,
158
+ source: Ke.value,
159
+ noTitle: Je.value
160
+ });
161
+ requestAnimationFrame(() => {
162
+ B.value.width = a, B.value.height = l, O.value.width = a, O.value.height = l;
163
+ });
164
+ });
165
+ E.value && (J.value && E.value.unobserve(J.value), E.value.disconnect()), E.value = new ResizeObserver(e), J.value = _.value.parentNode, E.value.observe(J.value);
166
+ }
167
+ }
168
+ wl(() => {
169
+ tt.value = !0, ut();
170
+ }), kl(() => {
171
+ E.value && (J.value && E.value.unobserve(J.value), E.value.disconnect());
172
+ });
173
+ const { isPrinting: Be, isImaging: Oe, generatePdf: st, generateImage: rt } = Gl({
174
+ elementId: `vue-ui-waffle_${y.value}`,
175
+ fileName: t.value.style.chart.title.text || "vue-ui-waffle",
176
+ options: t.value.userOptions.print
177
+ }), qt = i(() => t.value.userOptions.show && !t.value.style.chart.title.text), it = i(() => Al(t.value.customPalette)), T = r({
178
+ showTable: t.value.table.show,
179
+ showTooltip: t.value.style.chart.tooltip.show
180
+ });
181
+ de(t, () => {
182
+ T.value = {
183
+ showTable: t.value.table.show,
184
+ showTooltip: t.value.style.chart.tooltip.show
185
+ };
186
+ }, { immediate: !0 });
187
+ const B = r({
188
+ height: 512,
189
+ width: 512
190
+ }), O = r({
191
+ top: 0,
192
+ left: 0,
193
+ height: 512,
194
+ width: 512
195
+ }), F = i(() => (O.value.width - t.value.style.chart.layout.grid.size * t.value.style.chart.layout.grid.spaceBetween) / t.value.style.chart.layout.grid.size), L = i(() => (O.value.height - t.value.style.chart.layout.grid.size * t.value.style.chart.layout.grid.spaceBetween) / t.value.style.chart.layout.grid.size), ct = i(() => Math.max(1e-4, O.value.width / t.value.style.chart.layout.grid.size)), Fe = i(() => Math.max(1e-4, O.value.height / t.value.style.chart.layout.grid.size));
196
+ function vt(e) {
197
+ const a = t.value.style.chart.layout.grid.size * t.value.style.chart.layout.grid.size, l = e.reduce((k, A) => k + A, 0), o = e.map((k) => k / l * a), n = o.map(Math.floor), u = o.map((k) => k % 1);
198
+ let g = a - n.reduce((k, A) => k + A, 0);
199
+ for (; g > 0; ) {
200
+ let k = u.indexOf(Math.max(...u));
201
+ n[k] += 1, u[k] = 0, g -= 1;
202
+ }
203
+ return n;
204
+ }
205
+ const oe = r(!1);
206
+ function Le() {
207
+ return oe.value = K.value.flatMap((e) => e.values.reduce((a, l) => a + l, 0)).reduce((e, a) => e + a, 0) === 0, K.value.map((e, a) => ({
208
+ ...e,
209
+ color: Ol(e.color) || it.value[a] || Y[a] || Y[a % Y.length],
210
+ uid: `serie_${a}`,
211
+ absoluteIndex: a
212
+ }));
213
+ }
214
+ const me = i(() => Le()), w = r(me.value);
215
+ de(() => b.dataset, (e) => {
216
+ Array.isArray(e) && e.length > 0 && (Ie.value = !1);
217
+ }, { immediate: !0 }), de(() => b.dataset, (e) => {
218
+ w.value = Le();
219
+ }, { deep: !0 });
220
+ const Xt = i(() => {
221
+ const e = w.value.filter((a, l) => !f.value.includes(a.uid)).map((a, l) => oe.value ? 1 : (a.values || []).reduce((o, n) => o + n, 0));
222
+ return vt(e);
223
+ }), Yt = i(() => {
224
+ const e = w.value.map((a, l) => oe.value ? 1 : (a.values || []).reduce((o, n) => o + n));
225
+ return vt(e);
226
+ }), Q = i(() => (K.value.forEach((e, a) => {
227
+ [null, void 0].includes(e.values) && je({
228
+ componentName: "VueUiWaffle",
229
+ type: "datasetSerieAttribute",
230
+ property: "values (number[])",
231
+ index: a
232
+ });
233
+ }), w.value.filter((e, a) => !f.value.includes(e.uid)).map((e, a) => ({
234
+ absoluteIndex: e.absoluteIndex,
235
+ uid: e.uid,
236
+ name: e.name,
237
+ color: e.color,
238
+ value: (e.values || []).reduce((l, o) => l + o, 0),
239
+ absoluteValues: e.values || [],
240
+ proportion: Xt.value[a]
241
+ })))), De = i(() => w.value.map((e, a) => ({
242
+ absoluteIndex: e.absoluteIndex,
243
+ uid: e.uid,
244
+ name: e.name,
245
+ color: e.color,
246
+ value: (e.values || []).reduce((l, o) => l + o, 0),
247
+ absoluteValues: e.values || [],
248
+ proportion: Yt.value[a]
249
+ })));
250
+ function Kt() {
251
+ return De.value.map((e) => ({
252
+ name: e.name,
253
+ color: e.color,
254
+ value: e.value,
255
+ proportion: e.proportion
256
+ }));
257
+ }
258
+ const Jt = i(() => {
259
+ let e = 0;
260
+ return Q.value.map((a, l) => {
261
+ const o = e, n = o + a.proportion, u = [];
262
+ for (let g = Math.floor(o); g < Math.floor(n); g += 1)
263
+ u.push(g);
264
+ return e = n, {
265
+ ...a,
266
+ start: o,
267
+ rects: u
268
+ };
269
+ });
270
+ }), c = i(() => Jt.value.flatMap((e, a) => e.rects.map((l, o) => ({
271
+ isFirst: o === 0,
272
+ isLongEnough: l.length > 2,
273
+ name: e.name,
274
+ color: e.color,
275
+ value: e.value,
276
+ serieIndex: a,
277
+ absoluteStartIndex: o < 3,
278
+ serieId: e.uid,
279
+ ...e
280
+ }))).map((e, a) => ({
281
+ ...e,
282
+ isAbsoluteFirst: a % t.value.style.chart.layout.grid.size === 0
283
+ }))), q = i(() => {
284
+ const e = [];
285
+ for (let a = 0; a < t.value.style.chart.layout.grid.size; a += 1)
286
+ for (let l = 0; l < t.value.style.chart.layout.grid.size; l += 1)
287
+ e.push({
288
+ isStartOfLine: l === 0,
289
+ position: t.value.style.chart.layout.grid.vertical ? a : l,
290
+ x: (t.value.style.chart.layout.grid.vertical ? a : l) * (F.value + t.value.style.chart.layout.grid.spaceBetween),
291
+ y: (t.value.style.chart.layout.grid.vertical ? l : a) * (L.value + t.value.style.chart.layout.grid.spaceBetween) + O.value.top
292
+ });
293
+ return e;
294
+ }), f = r([]), be = r(!1), ne = r(/* @__PURE__ */ Object.create(null)), ue = r(/* @__PURE__ */ Object.create(null)), se = r(0);
295
+ function re(e, a) {
296
+ w.value = w.value.map((l) => l.uid === e ? {
297
+ ...l,
298
+ values: [a]
299
+ } : l);
300
+ }
301
+ function dt(e, a) {
302
+ const l = a.find((o) => o.uid === e);
303
+ return l ? (l.values || []).reduce((o, n) => o + n, 0) : 0;
304
+ }
305
+ function Qt(e) {
306
+ ne.value[e] && (cancelAnimationFrame(ne.value[e]), delete ne.value[e]), ue.value[e] && (cancelAnimationFrame(ue.value[e]), delete ue.value[e]);
307
+ }
308
+ function ht({
309
+ seriesId: e,
310
+ fromValue: a,
311
+ toValue: l,
312
+ mode: o
313
+ }) {
314
+ Qt(e), se.value += 1, be.value = !0;
315
+ let n = a;
316
+ return new Promise((u) => {
317
+ function g() {
318
+ if (o === "increase") {
319
+ if (n >= l) {
320
+ re(e, l), se.value -= 1, se.value <= 0 && (be.value = !1), delete ne.value[e], u();
321
+ return;
322
+ }
323
+ n += l * 0.025, n > l && (n = l), re(e, n), ne.value[e] = requestAnimationFrame(g);
324
+ } else {
325
+ if (n <= a / 100) {
326
+ re(e, 0), se.value -= 1, se.value <= 0 && (be.value = !1), delete ue.value[e], u();
327
+ return;
328
+ }
329
+ n /= 1.15, re(e, n), ue.value[e] = requestAnimationFrame(g);
330
+ }
331
+ }
332
+ g();
333
+ });
334
+ }
335
+ function Zt() {
336
+ w.value = me.value;
337
+ const e = f.value.length > 0;
338
+ if (!t.value.useAnimation) {
339
+ e ? f.value = [] : f.value = U.value.map((a) => a.uid);
340
+ return;
341
+ }
342
+ e ? [...f.value].forEach((l) => {
343
+ Z(l, !0);
344
+ }) : U.value.map((l) => l.uid).forEach((l) => {
345
+ Z(l, !0);
346
+ });
347
+ }
348
+ function Z(e, a = !1) {
349
+ if (oe.value && !a) return;
350
+ const l = a || f.value.length < U.value.length - 1 && U.value.length > 1;
351
+ if (!t.value.useAnimation) {
352
+ f.value.includes(e) ? f.value = f.value.filter((u) => u !== e) : l && f.value.push(e);
353
+ return;
354
+ }
355
+ const o = dt(e, me.value), n = dt(e, w.value);
356
+ if (!(n === 0 && o === 0)) {
357
+ if (f.value.includes(e)) {
358
+ f.value = f.value.filter((u) => u !== e), ht({
359
+ seriesId: e,
360
+ fromValue: n,
361
+ toValue: o,
362
+ mode: "increase"
363
+ }).then(() => {
364
+ ze(
365
+ "selectLegend",
366
+ Q.value.map((u) => ({
367
+ name: u.name,
368
+ color: u.color,
369
+ value: u.value,
370
+ proportion: u.proportion / Math.pow(t.value.style.chart.layout.grid.size, 2)
371
+ }))
372
+ );
373
+ });
374
+ return;
375
+ }
376
+ l && ht({
377
+ seriesId: e,
378
+ fromValue: n,
379
+ toValue: 0,
380
+ mode: "decrease"
381
+ }).then(() => {
382
+ f.value.includes(e) || f.value.push(e), re(e, 0), ze(
383
+ "selectLegend",
384
+ Q.value.map((u) => ({
385
+ name: u.name,
386
+ color: u.color,
387
+ value: u.value,
388
+ proportion: u.proportion / Math.pow(t.value.style.chart.layout.grid.size, 2)
389
+ }))
390
+ );
391
+ });
392
+ }
393
+ }
394
+ function pt(e) {
395
+ if (!De.value.length)
396
+ return t.value.debug && console.warn("VueUiWaffle - There are no series to show."), null;
397
+ const a = De.value.find((l) => l.name === e);
398
+ return a || (t.value.debug && console.warn(`VueUiWaffle - Series name not found "${e}"`), null);
399
+ }
400
+ function el(e) {
401
+ const a = pt(e);
402
+ a !== null && f.value.includes(a.uid) && Z(a.uid);
403
+ }
404
+ function tl(e) {
405
+ const a = pt(e);
406
+ a !== null && (f.value.includes(a.uid) || Z(a.uid));
407
+ }
408
+ function Ne({
409
+ val: e,
410
+ percentage: a,
411
+ showVal: l,
412
+ showPercentage: o,
413
+ config: n
414
+ }) {
415
+ return zl({
416
+ config: n,
417
+ val: e,
418
+ percentage: a,
419
+ showVal: l,
420
+ showPercentage: o
421
+ });
422
+ }
423
+ const U = i(() => w.value.map((e, a) => {
424
+ const l = (e.values || []).reduce((n, u) => n + u, 0), o = l / w.value.map((n) => (n.values || []).reduce((u, g) => u + g, 0)).reduce((n, u) => n + u, 0);
425
+ return {
426
+ name: e.name,
427
+ color: e.color || it[a] || Y[a] || Y[a % Y.length],
428
+ value: l,
429
+ proportion: o,
430
+ uid: e.uid,
431
+ shape: "square"
432
+ };
433
+ }).map((e, a) => {
434
+ const l = fe(t.value.style.chart.layout.labels.dataLabels.formatter, e.value, z({
435
+ p: t.value.style.chart.layout.labels.dataLabels.prefix,
436
+ v: e.value,
437
+ s: t.value.style.chart.layout.labels.dataLabels.suffix,
438
+ r: t.value.style.chart.legend.roundingValue
439
+ }), { datapoint: e, index: a }), o = isNaN(e.value / D.value) ? "-" : z({ v: e.value / D.value * 100, s: "%", r: t.value.style.chart.legend.roundingPercentage }), n = Ne({
440
+ val: l,
441
+ percentage: o,
442
+ showVal: t.value.style.chart.legend.showValue,
443
+ showPercentage: t.value.style.chart.legend.showPercentage,
444
+ config: t.value.style.chart.legend
445
+ });
446
+ return {
447
+ ...e,
448
+ opacity: f.value.includes(e.uid) ? 0.5 : 1,
449
+ segregate: () => Z(e.uid),
450
+ isSegregated: f.value.includes(e.uid),
451
+ display: `${e.name}${t.value.style.chart.legend.showPercentage || t.value.style.chart.legend.showValue ? ": " : ""}${n}`
452
+ };
453
+ })), ll = i(() => ({
454
+ cy: "waffle-div-legend",
455
+ backgroundColor: t.value.style.chart.legend.backgroundColor,
456
+ color: t.value.style.chart.legend.color,
457
+ fontSize: t.value.style.chart.legend.fontSize,
458
+ paddingBottom: 12,
459
+ fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
460
+ })), D = i(() => Q.value.map((e) => e.value).reduce((e, a) => e + a, 0)), Me = r(null), ie = r(null), S = i(() => {
461
+ const e = /* @__PURE__ */ new Map();
462
+ return c.value.forEach((a, l) => {
463
+ e.has(a.serieIndex) ? e.get(a.serieIndex).rectIndexes.push(l) : e.set(a.serieIndex, {
464
+ serieIndex: a.serieIndex,
465
+ absoluteIndex: a.absoluteIndex,
466
+ serieId: a.serieId,
467
+ name: a.name,
468
+ color: a.color,
469
+ value: a.value,
470
+ proportion: a.proportion,
471
+ rectIndexes: [l]
472
+ });
473
+ }), Array.from(e.values()).sort((a, l) => a.serieIndex - l.serieIndex);
474
+ });
475
+ function ft(e) {
476
+ return S.value.find((a) => a.serieIndex === e) || null;
477
+ }
478
+ function gt(e) {
479
+ const a = ft(e);
480
+ return !a || !a.rectIndexes.length ? null : a.rectIndexes[0];
481
+ }
482
+ function yt(e) {
483
+ const a = c.value[e];
484
+ t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: a, seriesIndex: a.serieIndex });
485
+ }
486
+ function al(e) {
487
+ const a = c.value[e];
488
+ t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: a, seriesIndex: a.serieIndex }), ie.value = null, te.value = !1, V.value = null, R.value = null, ae.value = "pointer";
489
+ }
490
+ function mt(e, a = "pointer") {
491
+ if (f.value.length === b.dataset.length) return;
492
+ const l = c.value[e];
493
+ if (!l) return;
494
+ ae.value = a, R.value = l.serieIndex, Me.value = {
495
+ datapoint: l,
496
+ seriesIndex: l.absoluteIndex,
497
+ series: w.value,
498
+ config: t.value
499
+ }, t.value.events.datapointEnter && ie.value !== l.serieIndex && t.value.events.datapointEnter({
500
+ datapoint: l,
501
+ seriesIndex: l.serieIndex
502
+ }), ie.value = l.serieIndex, te.value = !0, V.value = l.serieIndex;
503
+ const o = t.value.style.chart.tooltip.customFormat;
504
+ if (Nl(o) && Ml(
505
+ () => o({
506
+ seriesIndex: l.absoluteIndex,
507
+ datapoint: l,
508
+ series: w.value,
509
+ config: t.value
510
+ })
511
+ ))
512
+ $e.value = o({
513
+ seriesIndex: l.absoluteIndex,
514
+ datapoint: l,
515
+ series: w.value,
516
+ config: t.value
517
+ });
518
+ else {
519
+ let n = "";
520
+ n += `<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>`, n += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${l.color}" />${jt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${y.value}_${l.absoluteIndex})"/>` : ""}</svg>`, n += `<b>${Ne({
521
+ config: t.value.style.chart.tooltip,
522
+ showVal: t.value.style.chart.tooltip.showValue,
523
+ showPercentage: t.value.style.chart.tooltip.showPercentage,
524
+ val: `<span>${fe(
525
+ t.value.style.chart.layout.labels.dataLabels.formatter,
526
+ l.value,
527
+ z({
528
+ p: t.value.style.chart.layout.labels.dataLabels.prefix,
529
+ v: l.value,
530
+ s: t.value.style.chart.layout.labels.dataLabels.suffix,
531
+ r: t.value.style.chart.tooltip.roundingValue
532
+ }),
533
+ {
534
+ datapoint: l,
535
+ seriesIndex: l.absoluteIndex,
536
+ series: w.value
537
+ }
538
+ )}</span>`,
539
+ percentage: `<span>${z({
540
+ v: oe.value ? 1 / K.value.length * 100 : l.value / D.value * 100,
541
+ s: "%",
542
+ r: t.value.style.chart.tooltip.roundingPercentage
543
+ })}</span>`
544
+ })}</b></div>`, $e.value = n;
545
+ }
546
+ }
547
+ const ze = Ft, N = i(() => {
548
+ const e = Q.value.map((l) => ({
549
+ name: l.name,
550
+ color: l.color
551
+ })), a = Q.value.map((l) => l.value);
552
+ return { head: e, body: a };
553
+ });
554
+ function we(e) {
555
+ return t.value.useBlurOnHover && ![null, void 0].includes(V.value) && V.value !== e ? `url(#blur_${y.value})` : "";
556
+ }
557
+ function ol(e, a) {
558
+ return t.value.style.chart.layout.labels.captions.show ? c.value.length && !be.value && !t.value.style.chart.layout.grid.vertical && (c.value[e].isFirst && a.position < t.value.style.chart.layout.grid.size - 2 || c.value[e].isAbsoluteFirst && e % t.value.style.chart.layout.grid.size === 0 && c.value[e].absoluteStartIndex) : !1;
559
+ }
560
+ function nl(e, a = null) {
561
+ const l = fe(
562
+ t.value.style.chart.layout.labels.dataLabels.formatter,
563
+ c.value[e].value,
564
+ z({
565
+ p: t.value.style.chart.layout.labels.dataLabels.prefix,
566
+ v: c.value[e].value,
567
+ s: t.value.style.chart.layout.labels.dataLabels.suffix,
568
+ r: t.value.style.chart.layout.labels.captions.roundingValue
569
+ }),
570
+ { datapoint: c.value[e], position: a }
571
+ ), o = z({ v: c.value[e].proportion, s: "%", r: t.value.style.chart.layout.labels.captions.roundingPercentage }), n = (t.value.style.chart.layout.labels.captions.serieNameAbbreviation ? Dl({ source: c.value[e].name, length: t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : c.value[e].name) + (t.value.style.chart.layout.labels.captions.showPercentage || t.value.style.chart.layout.labels.captions.showValue ? ":" : ""), u = t.value.style.chart.layout.labels.captions.showSerieName ? n : "", g = Ne({
572
+ val: l,
573
+ percentage: o,
574
+ showVal: t.value.style.chart.layout.labels.captions.showValue,
575
+ showPercentage: t.value.style.chart.layout.labels.captions.showPercentage,
576
+ config: t.value.style.chart.layout.labels.dataLabels
577
+ });
578
+ return `${u} ${g}`;
579
+ }
580
+ function Ve(e = null) {
581
+ It(() => {
582
+ const a = N.value.head.map((n, u) => [[
583
+ n.name
584
+ ], [N.value.body[u]], [isNaN(N.value.body[u] / D.value) ? "-" : N.value.body[u] / D.value * 100]]), l = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = Fl(l);
585
+ e ? e(o) : Ll({ csvContent: o, title: t.value.style.chart.title.text || "vue-ui-waffle" });
586
+ });
587
+ }
588
+ const ee = i(() => {
589
+ const e = [
590
+ ' <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>',
591
+ fe(
592
+ t.value.style.chart.layout.labels.dataLabels.formatter,
593
+ D.value,
594
+ z({
595
+ p: t.value.style.chart.layout.labels.dataLabels.prefix,
596
+ v: D.value,
597
+ s: t.value.style.chart.layout.labels.dataLabels.suffix,
598
+ r: t.value.table.td.roundingValue
599
+ })
600
+ ),
601
+ "100%"
602
+ ], a = N.value.head.map((n, u) => [
603
+ {
604
+ color: n.color,
605
+ name: n.name
606
+ },
607
+ fe(
608
+ t.value.style.chart.layout.labels.dataLabels.formatter,
609
+ N.value.body[u],
610
+ z({
611
+ p: t.value.style.chart.layout.labels.dataLabels.prefix,
612
+ v: N.value.body[u],
613
+ s: t.value.style.chart.layout.labels.dataLabels.suffix,
614
+ r: t.value.table.td.roundingValue
615
+ })
616
+ ),
617
+ isNaN(N.value.body[u] / D.value) ? "-" : z({
618
+ v: N.value.body[u] / D.value * 100,
619
+ s: "%",
620
+ r: t.value.table.td.roundingPercentage
621
+ })
622
+ ]), l = {
623
+ th: {
624
+ backgroundColor: t.value.table.th.backgroundColor,
625
+ color: t.value.table.th.color,
626
+ outline: t.value.table.th.outline
627
+ },
628
+ td: {
629
+ backgroundColor: t.value.table.td.backgroundColor,
630
+ color: t.value.table.td.color,
631
+ outline: t.value.table.td.outline
632
+ },
633
+ shape: "square",
634
+ breakpoint: t.value.table.responsiveBreakpoint
635
+ }, o = [
636
+ t.value.table.columnNames.series,
637
+ t.value.table.columnNames.value,
638
+ t.value.table.columnNames.percentage
639
+ ];
640
+ return {
641
+ head: e,
642
+ body: a,
643
+ config: l,
644
+ colNames: o
645
+ };
646
+ }), X = r(!1);
647
+ function bt(e) {
648
+ X.value = e, qe.value += 1;
649
+ }
650
+ function wt() {
651
+ T.value.showTable = !T.value.showTable;
652
+ }
653
+ function kt() {
654
+ T.value.showTooltip = !T.value.showTooltip;
655
+ }
656
+ const ce = r(!1);
657
+ function Re() {
658
+ ce.value = !ce.value;
659
+ }
660
+ async function ul({ scale: e = 2 } = {}) {
661
+ if (!_.value) return;
662
+ const { width: a, height: l } = _.value.getBoundingClientRect(), o = a / l, { imageUri: n, base64: u } = await Yl({ domElement: _.value, base64: !0, img: !0, scale: e });
663
+ return {
664
+ imageUri: n,
665
+ base64: u,
666
+ title: t.value.style.chart.title.text,
667
+ width: a,
668
+ height: l,
669
+ aspectRatio: o
670
+ };
671
+ }
672
+ const ve = i(() => {
673
+ const e = t.value.table.useDialog && !t.value.table.show, a = T.value.showTable;
674
+ return {
675
+ component: e ? Et : Mt,
676
+ title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? `: ${t.value.style.chart.title.subtitle.text}` : ""}`,
677
+ props: e ? {
678
+ backgroundColor: t.value.table.th.backgroundColor,
679
+ color: t.value.table.th.color,
680
+ headerColor: t.value.table.th.color,
681
+ headerBg: t.value.table.th.backgroundColor,
682
+ isFullscreen: X.value,
683
+ fullscreenParent: _.value,
684
+ forcedWidth: Math.min(500, window.innerWidth * 0.8),
685
+ isCursorPointer: j.value
686
+ } : {
687
+ hideDetails: !0,
688
+ config: {
689
+ open: a,
690
+ maxHeight: 1e4,
691
+ body: {
692
+ backgroundColor: t.value.style.chart.backgroundColor,
693
+ color: t.value.style.chart.color
694
+ },
695
+ head: {
696
+ backgroundColor: t.value.style.chart.backgroundColor,
697
+ color: t.value.style.chart.color
698
+ }
699
+ }
700
+ }
701
+ };
702
+ });
703
+ de(() => T.value.showTable, (e) => {
704
+ t.value.table.show || (e && t.value.table.useDialog && le.value ? le.value.open() : "close" in le.value && le.value.close());
705
+ });
706
+ function Ct() {
707
+ T.value.showTable = !1, Te.value && Te.value.setTableIconState(!1);
708
+ }
709
+ const sl = i(() => U.value.map((e) => ({
710
+ ...e,
711
+ name: e.display
712
+ }))), rl = i(() => t.value.style.chart.backgroundColor), il = i(() => t.value.style.chart.legend), cl = i(() => t.value.style.chart.title), { exportSvg: vl, getSvg: dl } = jl({
713
+ svg: H,
714
+ title: cl,
715
+ legend: il,
716
+ legendItems: sl,
717
+ backgroundColor: rl
718
+ });
719
+ async function xt({ isCb: e }) {
720
+ ye.value = !0, await It();
721
+ try {
722
+ if (e) {
723
+ const { blob: a, url: l, text: o, dataUrl: n } = await dl();
724
+ await Promise.resolve(t.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: n }));
725
+ } else
726
+ await Promise.resolve(vl());
727
+ } finally {
728
+ ye.value = !1;
729
+ }
730
+ }
731
+ function hl(e) {
732
+ if (e?.stage === "start") {
733
+ ge.value = !0;
734
+ return;
735
+ }
736
+ if (e?.stage === "end") {
737
+ ge.value = !1;
738
+ return;
739
+ }
740
+ rt();
741
+ }
742
+ async function $t() {
743
+ if (ze("copyAlt", {
744
+ config: t.value,
745
+ dataset: K.value
746
+ }), !t.value.userOptions.callbacks.altCopy) {
747
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
748
+ return;
749
+ }
750
+ await Promise.resolve(t.value.userOptions.callbacks.altCopy({
751
+ config: t.value,
752
+ dataset: K.value
753
+ }));
754
+ }
755
+ function pl() {
756
+ R.value = null, Se.value = !0;
757
+ }
758
+ function fl() {
759
+ R.value = null, ae.value = "pointer", te.value = !1, V.value = null, ie.value = null, Se.value = !1;
760
+ }
761
+ function gl(e) {
762
+ if (!H.value || ce.value || document.activeElement !== H.value || !S.value.length || f.value.length === b.dataset.length) return;
763
+ const a = ["ArrowLeft", "ArrowUp"].includes(e.key), l = ["ArrowRight", "ArrowDown"].includes(e.key), o = e.key === "Enter" || e.key === " ", n = e.key === "Escape";
764
+ if (!a && !l && !o && !n) return;
765
+ if (e.preventDefault(), e.stopPropagation(), n) {
766
+ R.value = null, ae.value = "pointer", te.value = !1, V.value = null, ie.value = null;
767
+ return;
768
+ }
769
+ if (o) {
770
+ if (R.value === null) return;
771
+ const A = gt(R.value);
772
+ if (A === null) return;
773
+ yt(A);
774
+ return;
775
+ }
776
+ const u = S.value.findIndex(
777
+ (A) => A.serieIndex === R.value
778
+ );
779
+ let g = null;
780
+ if (u === -1 ? g = l ? S.value[0] : S.value[S.value.length - 1] : l ? g = S.value[(u + 1) % S.value.length] : g = S.value[(u - 1 + S.value.length) % S.value.length], !g) return;
781
+ const k = gt(g.serieIndex);
782
+ k !== null && (yl(g.serieIndex), mt(k, "keyboard"));
783
+ }
784
+ function yl(e) {
785
+ if (!Number.isFinite(e) || !H.value) return;
786
+ const a = ft(e);
787
+ if (!a || !a.rectIndexes.length) return;
788
+ const l = a.rectIndexes.map((M) => {
789
+ const Ue = q.value[M];
790
+ return Ue ? {
791
+ x: Ue.x + t.value.style.chart.layout.grid.spaceBetween / 2 + ct.value / 2,
792
+ y: Ue.y + t.value.style.chart.layout.grid.spaceBetween / 2 + Fe.value / 2
793
+ } : null;
794
+ }).filter(Boolean);
795
+ if (!l.length) return;
796
+ const o = Math.min(...l.map((M) => M.x)), n = Math.max(...l.map((M) => M.x)), u = Math.min(...l.map((M) => M.y)), g = Math.max(...l.map((M) => M.y)), k = (o + n) / 2, A = (u + g) / 2, ke = H.value.getBoundingClientRect();
797
+ lt.value = {
798
+ x: ke.left + k / B.value.width * ke.width,
799
+ y: ke.top + A / B.value.height * ke.height
800
+ };
801
+ }
802
+ const Ee = i(() => {
803
+ const e = ee.value?.colNames ?? [], a = ee.value?.body ?? [];
804
+ return { headers: e, rows: a };
805
+ });
806
+ return Ot({
807
+ getData: Kt,
808
+ getImage: ul,
809
+ generatePdf: st,
810
+ generateCsv: Ve,
811
+ generateImage: rt,
812
+ generateSvg: xt,
813
+ hideSeries: tl,
814
+ showSeries: el,
815
+ toggleTable: wt,
816
+ toggleTooltip: kt,
817
+ toggleAnnotator: Re,
818
+ toggleFullscreen: bt,
819
+ copyAlt: $t
820
+ }), (e, a) => (s(), v("div", {
821
+ class: St(`vue-data-ui-component vue-ui-waffle ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
822
+ ref_key: "waffleChart",
823
+ ref: _,
824
+ id: `vue-ui-waffle_${y.value}`,
825
+ style: he(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive ? "height: 100%" : ""}`),
826
+ onMouseenter: a[2] || (a[2] = () => d(at)(!0)),
827
+ onMouseleave: a[3] || (a[3] = () => d(at)(!1))
828
+ }, [
829
+ C("div", {
830
+ id: `chart-instructions-${y.value}`,
831
+ class: "sr-only"
832
+ }, [
833
+ C("p", null, pe(t.value.a11y.translations.keyboardNavigation), 1)
834
+ ], 8, oa),
835
+ Ee.value?.rows?.length ? (s(), I(ea, {
836
+ key: 0,
837
+ uid: y.value,
838
+ head: Ee.value.headers,
839
+ body: Ee.value.rows,
840
+ notice: t.value.a11y.translations.tableAvailable,
841
+ caption: t.value.a11y.translations.tableCaption
842
+ }, null, 8, ["uid", "head", "body", "notice", "caption"])) : m("", !0),
843
+ t.value.userOptions.buttons.annotator ? (s(), I(d(Vt), {
844
+ key: 1,
845
+ svgRef: d(H),
846
+ backgroundColor: t.value.style.chart.backgroundColor,
847
+ color: t.value.style.chart.color,
848
+ active: ce.value,
849
+ isCursorPointer: j.value,
850
+ onClose: Re
851
+ }, {
852
+ "annotator-action-close": h(() => [
853
+ p(e.$slots, "annotator-action-close", {}, void 0, !0)
854
+ ]),
855
+ "annotator-action-color": h(({ color: l }) => [
856
+ p(e.$slots, "annotator-action-color", x($({ color: l })), void 0, !0)
857
+ ]),
858
+ "annotator-action-draw": h(({ mode: l }) => [
859
+ p(e.$slots, "annotator-action-draw", x($({ mode: l })), void 0, !0)
860
+ ]),
861
+ "annotator-action-undo": h(({ disabled: l }) => [
862
+ p(e.$slots, "annotator-action-undo", x($({ disabled: l })), void 0, !0)
863
+ ]),
864
+ "annotator-action-redo": h(({ disabled: l }) => [
865
+ p(e.$slots, "annotator-action-redo", x($({ disabled: l })), void 0, !0)
866
+ ]),
867
+ "annotator-action-delete": h(({ disabled: l }) => [
868
+ p(e.$slots, "annotator-action-delete", x($({ disabled: l })), void 0, !0)
869
+ ]),
870
+ _: 3
871
+ }, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : m("", !0),
872
+ qt.value ? (s(), v("div", {
873
+ key: 2,
874
+ ref_key: "noTitle",
875
+ ref: Je,
876
+ class: "vue-data-ui-no-title-space",
877
+ style: "height:36px; width: 100%;background:transparent"
878
+ }, null, 512)) : m("", !0),
879
+ t.value.style.chart.title.text ? (s(), v("div", {
880
+ key: 3,
881
+ ref_key: "chartTitle",
882
+ ref: Xe,
883
+ style: "width:100%;background:transparent;padding-bottom:12px"
884
+ }, [
885
+ (s(), I(Jl, {
886
+ key: `title_${Qe.value}`,
887
+ config: {
888
+ title: {
889
+ cy: "waffle-title",
890
+ ...t.value.style.chart.title
891
+ },
892
+ subtitle: {
893
+ cy: "waffle-subtitle",
894
+ ...t.value.style.chart.title.subtitle
895
+ }
896
+ }
897
+ }, null, 8, ["config"]))
898
+ ], 512)) : m("", !0),
899
+ C("div", {
900
+ id: `legend-top-${y.value}`
901
+ }, null, 8, na),
902
+ t.value.userOptions.show && xe.value && (d(ot) || d(Pe)) ? (s(), I(d(zt), {
903
+ ref_key: "userOptionsRef",
904
+ ref: Te,
905
+ key: `user_options_${qe.value}`,
906
+ backgroundColor: t.value.style.chart.backgroundColor,
907
+ color: t.value.style.chart.color,
908
+ isPrinting: d(Be),
909
+ isImaging: d(Oe),
910
+ uid: y.value,
911
+ hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
912
+ hasPdf: t.value.userOptions.buttons.pdf,
913
+ hasImg: t.value.userOptions.buttons.img,
914
+ hasSvg: t.value.userOptions.buttons.svg,
915
+ hasXls: t.value.userOptions.buttons.csv,
916
+ hasTable: t.value.userOptions.buttons.table,
917
+ hasFullscreen: t.value.userOptions.buttons.fullscreen,
918
+ hasAltCopy: t.value.userOptions.buttons.altCopy,
919
+ isFullscreen: X.value,
920
+ isTooltip: T.value.showTooltip,
921
+ titles: { ...t.value.userOptions.buttonTitles },
922
+ chartElement: _.value,
923
+ position: t.value.userOptions.position,
924
+ hasAnnotator: t.value.userOptions.buttons.annotator,
925
+ isAnnotation: ce.value,
926
+ callbacks: t.value.userOptions.callbacks,
927
+ printScale: t.value.userOptions.print.scale,
928
+ tableDialog: t.value.table.useDialog,
929
+ isCursorPointer: j.value,
930
+ onToggleFullscreen: bt,
931
+ onGeneratePdf: d(st),
932
+ onGenerateCsv: Ve,
933
+ onGenerateImage: hl,
934
+ onGenerateSvg: xt,
935
+ onToggleTable: wt,
936
+ onToggleTooltip: kt,
937
+ onToggleAnnotator: Re,
938
+ onCopyAlt: $t,
939
+ style: he({
940
+ visibility: d(ot) ? d(Pe) ? "visible" : "hidden" : "visible"
941
+ })
942
+ }, We({ _: 2 }, [
943
+ e.$slots.menuIcon ? {
944
+ name: "menuIcon",
945
+ fn: h(({ isOpen: l, color: o }) => [
946
+ p(e.$slots, "menuIcon", x($({ isOpen: l, color: o })), void 0, !0)
947
+ ]),
948
+ key: "0"
949
+ } : void 0,
950
+ e.$slots.optionTooltip ? {
951
+ name: "optionTooltip",
952
+ fn: h(() => [
953
+ p(e.$slots, "optionTooltip", {}, void 0, !0)
954
+ ]),
955
+ key: "1"
956
+ } : void 0,
957
+ e.$slots.optionPdf ? {
958
+ name: "optionPdf",
959
+ fn: h(() => [
960
+ p(e.$slots, "optionPdf", {}, void 0, !0)
961
+ ]),
962
+ key: "2"
963
+ } : void 0,
964
+ e.$slots.optionCsv ? {
965
+ name: "optionCsv",
966
+ fn: h(() => [
967
+ p(e.$slots, "optionCsv", {}, void 0, !0)
968
+ ]),
969
+ key: "3"
970
+ } : void 0,
971
+ e.$slots.optionImg ? {
972
+ name: "optionImg",
973
+ fn: h(() => [
974
+ p(e.$slots, "optionImg", {}, void 0, !0)
975
+ ]),
976
+ key: "4"
977
+ } : void 0,
978
+ e.$slots.optionSvg ? {
979
+ name: "optionSvg",
980
+ fn: h(() => [
981
+ p(e.$slots, "optionSvg", {}, void 0, !0)
982
+ ]),
983
+ key: "5"
984
+ } : void 0,
985
+ e.$slots.optionTable ? {
986
+ name: "optionTable",
987
+ fn: h(() => [
988
+ p(e.$slots, "optionTable", {}, void 0, !0)
989
+ ]),
990
+ key: "6"
991
+ } : void 0,
992
+ e.$slots.optionFullscreen ? {
993
+ name: "optionFullscreen",
994
+ fn: h(({ toggleFullscreen: l, isFullscreen: o }) => [
995
+ p(e.$slots, "optionFullscreen", x($({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
996
+ ]),
997
+ key: "7"
998
+ } : void 0,
999
+ e.$slots.optionAnnotator ? {
1000
+ name: "optionAnnotator",
1001
+ fn: h(({ toggleAnnotator: l, isAnnotator: o }) => [
1002
+ p(e.$slots, "optionAnnotator", x($({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
1003
+ ]),
1004
+ key: "8"
1005
+ } : void 0,
1006
+ e.$slots.optionAltCopy ? {
1007
+ name: "optionAltCopy",
1008
+ fn: h(({ altCopy: l }) => [
1009
+ p(e.$slots, "optionAltCopy", x($({ altCopy: l })), void 0, !0)
1010
+ ]),
1011
+ key: "9"
1012
+ } : void 0
1013
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : m("", !0),
1014
+ C("div", ua, [
1015
+ (s(), v("svg", {
1016
+ ref_key: "svgRef",
1017
+ ref: H,
1018
+ xmlns: d(Il),
1019
+ "aria-describedby": `chart-instructions-${y.value}`,
1020
+ class: St({ "vue-data-ui-fullscreen--on": X.value, "vue-data-ui-fulscreen--off": !X.value }),
1021
+ tabindex: "0",
1022
+ viewBox: `0 0 ${B.value.width <= 0 ? 10 : B.value.width} ${B.value.height <= 0 ? 10 : B.value.height}`,
1023
+ style: he(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`),
1024
+ onFocus: pl,
1025
+ onBlur: fl,
1026
+ onKeydown: gl
1027
+ }, [
1028
+ Ce(d(Rt)),
1029
+ C("defs", null, [
1030
+ (s(!0), v(P, null, G(c.value, (l, o) => (s(), v("radialGradient", {
1031
+ cx: "50%",
1032
+ cy: "50%",
1033
+ r: "50%",
1034
+ fx: "50%",
1035
+ fy: "50%",
1036
+ id: `gradient_${y.value}_${o}`
1037
+ }, [
1038
+ C("stop", {
1039
+ offset: "0%",
1040
+ "stop-color": d(Pl)(d(_l)(l.color, 0.05), 100 - t.value.style.chart.layout.rect.gradientIntensity)
1041
+ }, null, 8, ia),
1042
+ C("stop", {
1043
+ offset: "100%",
1044
+ "stop-color": l.color
1045
+ }, null, 8, ca)
1046
+ ], 8, ra))), 256))
1047
+ ]),
1048
+ C("defs", null, [
1049
+ C("filter", {
1050
+ id: `blur_${y.value}`,
1051
+ x: "-50%",
1052
+ y: "-50%",
1053
+ width: "200%",
1054
+ height: "200%"
1055
+ }, [...a[4] || (a[4] = [
1056
+ C("feGaussianBlur", {
1057
+ in: "SourceGraphic",
1058
+ stdDeviation: 2
1059
+ }, null, -1),
1060
+ C("feColorMatrix", {
1061
+ type: "saturate",
1062
+ values: "0"
1063
+ }, null, -1)
1064
+ ])], 8, va)
1065
+ ]),
1066
+ t.value.useCustomCells && c.value.length ? (s(!0), v(P, { key: 0 }, G(q.value, (l, o) => (s(), v("foreignObject", {
1067
+ x: l.x,
1068
+ y: l.y,
1069
+ height: L.value <= 0 ? 1e-4 : L.value,
1070
+ width: F.value <= 0 ? 1e-4 : F.value,
1071
+ class: "vue-ui-waffle-custom-cell-foreignObject"
1072
+ }, [
1073
+ p(e.$slots, "cell", Ge({ ref_for: !0 }, { cell: { ...l, color: c.value[o].color, ...c.value[o] }, isSelected: [null, void 0].includes(V.value) ? !0 : c.value[o].serieIndex === V.value }), void 0, !0)
1074
+ ], 8, da))), 256)) : m("", !0),
1075
+ !c.value.length && !t.value.useCustomCells ? (s(), v("rect", {
1076
+ key: 1,
1077
+ x: 12,
1078
+ y: 12,
1079
+ height: O.value.height - 24,
1080
+ width: O.value.width - 24,
1081
+ rx: 3,
1082
+ fill: "none",
1083
+ stroke: "black"
1084
+ }, null, 8, ha)) : c.value.length && !t.value.useCustomCells ? (s(), v(P, { key: 2 }, [
1085
+ e.$slots.pattern ? (s(), v("g", pa, [
1086
+ (s(!0), v(P, null, G(me.value, (l) => (s(), v("defs", null, [
1087
+ p(e.$slots, "pattern", Ge({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${y.value}_${l.absoluteIndex}` }), void 0, !0)
1088
+ ]))), 256))
1089
+ ])) : m("", !0),
1090
+ (s(!0), v(P, null, G(q.value, (l, o) => (s(), v("rect", {
1091
+ rx: t.value.style.chart.layout.rect.rounded ? t.value.style.chart.layout.rect.rounding : 0,
1092
+ x: l.x + t.value.style.chart.layout.grid.spaceBetween / 2,
1093
+ y: l.y + t.value.style.chart.layout.grid.spaceBetween / 2,
1094
+ height: L.value <= 0 ? 1e-4 : L.value,
1095
+ width: F.value <= 0 ? 1e-4 : F.value,
1096
+ fill: "white",
1097
+ stroke: t.value.style.chart.layout.rect.stroke,
1098
+ "stroke-width": t.value.style.chart.layout.rect.strokeWidth,
1099
+ filter: we(c.value[o].serieIndex)
1100
+ }, null, 8, fa))), 256)),
1101
+ (s(!0), v(P, null, G(q.value, (l, o) => (s(), v("rect", {
1102
+ rx: t.value.style.chart.layout.rect.rounded ? t.value.style.chart.layout.rect.rounding : 0,
1103
+ x: l.x + t.value.style.chart.layout.grid.spaceBetween / 2,
1104
+ y: l.y + t.value.style.chart.layout.grid.spaceBetween / 2,
1105
+ height: L.value <= 0 ? 1e-4 : L.value,
1106
+ width: F.value <= 0 ? 1e-4 : F.value,
1107
+ fill: t.value.style.chart.layout.rect.useGradient && t.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${y.value}_${o})` : c.value[o].color,
1108
+ stroke: t.value.style.chart.layout.rect.stroke,
1109
+ "stroke-width": t.value.style.chart.layout.rect.strokeWidth,
1110
+ filter: we(c.value[o].serieIndex)
1111
+ }, null, 8, ga))), 256)),
1112
+ e.$slots.pattern ? (s(), v("g", ya, [
1113
+ (s(!0), v(P, null, G(q.value, (l, o) => (s(), v("rect", {
1114
+ rx: t.value.style.chart.layout.rect.rounded ? t.value.style.chart.layout.rect.rounding : 0,
1115
+ x: l.x + t.value.style.chart.layout.grid.spaceBetween / 2,
1116
+ y: l.y + t.value.style.chart.layout.grid.spaceBetween / 2,
1117
+ height: L.value <= 0 ? 1e-4 : L.value,
1118
+ width: F.value <= 0 ? 1e-4 : F.value,
1119
+ fill: `url(#pattern_${y.value}_${c.value[o].absoluteIndex})`,
1120
+ stroke: "none",
1121
+ filter: we(c.value[o].serieIndex)
1122
+ }, null, 8, ma))), 256))
1123
+ ])) : m("", !0)
1124
+ ], 64)) : m("", !0),
1125
+ (s(!0), v(P, null, G(q.value, (l, o) => (s(), v(P, null, [
1126
+ ol(o, l) ? (s(), v("text", {
1127
+ key: `datalabel_${o}`,
1128
+ textContent: pe(nl(o, l)),
1129
+ x: l.x + t.value.style.chart.layout.labels.captions.offsetX + t.value.style.chart.layout.grid.spaceBetween / 2 + 6,
1130
+ y: l.y + t.value.style.chart.layout.labels.captions.offsetY + t.value.style.chart.layout.grid.spaceBetween / 2 + Fe.value / 2 + t.value.style.chart.layout.labels.captions.fontSize / 3,
1131
+ "font-size": t.value.style.chart.layout.labels.captions.fontSize,
1132
+ fill: d(Bl)(c.value[o].color),
1133
+ filter: we(c.value[o].serieIndex)
1134
+ }, null, 8, ba)) : m("", !0)
1135
+ ], 64))), 256)),
1136
+ (s(!0), v(P, null, G(q.value, (l, o) => (s(), v("rect", {
1137
+ x: l.x + t.value.style.chart.layout.grid.spaceBetween / 2,
1138
+ y: l.y + t.value.style.chart.layout.grid.spaceBetween / 2,
1139
+ height: Fe.value,
1140
+ width: ct.value,
1141
+ fill: "transparent",
1142
+ stroke: "none",
1143
+ onMouseover: (n) => mt(o),
1144
+ onMouseleave: (n) => al(o),
1145
+ onClick: (n) => yt(o)
1146
+ }, null, 40, wa))), 256)),
1147
+ p(e.$slots, "svg", {
1148
+ svg: {
1149
+ ...B.value,
1150
+ isPrintingImg: d(Be) | d(Oe) | ge.value,
1151
+ isPrintingSvg: ye.value
1152
+ }
1153
+ }, void 0, !0)
1154
+ ], 46, sa)),
1155
+ e.$slots.hint ? (s(), v("div", ka, [
1156
+ p(e.$slots, "hint", x($({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: Se.value })), void 0, !0)
1157
+ ])) : m("", !0)
1158
+ ]),
1159
+ e.$slots.watermark ? (s(), v("div", Ca, [
1160
+ p(e.$slots, "watermark", x($({ isPrinting: d(Be) || d(Oe) || ge.value || ye.value })), void 0, !0)
1161
+ ])) : m("", !0),
1162
+ C("div", {
1163
+ id: `legend-bottom-${y.value}`
1164
+ }, null, 8, xa),
1165
+ tt.value ? (s(), I(Cl, {
1166
+ key: 6,
1167
+ to: t.value.style.chart.legend.position === "top" ? `#legend-top-${y.value}` : `#legend-bottom-${y.value}`
1168
+ }, [
1169
+ C("div", {
1170
+ ref_key: "chartLegend",
1171
+ ref: Ye
1172
+ }, [
1173
+ t.value.style.chart.legend.show ? (s(), I(Zl, {
1174
+ key: `legend_${et.value}`,
1175
+ legendSet: U.value,
1176
+ config: ll.value,
1177
+ isCursorPointer: j.value,
1178
+ onClickMarker: a[0] || (a[0] = ({ legend: l }) => Z(l.uid))
1179
+ }, We({
1180
+ item: h(({ legend: l }) => [
1181
+ C("div", {
1182
+ onClick: (o) => l.segregate(),
1183
+ style: he(`opacity:${f.value.includes(l.uid) ? 0.5 : 1}`)
1184
+ }, pe(l.display), 13, $a)
1185
+ ]),
1186
+ legendToggle: h(() => [
1187
+ U.value.length > 2 && t.value.style.chart.legend.selectAllToggle.show && !d(Ae) ? (s(), I(ta, {
1188
+ key: 0,
1189
+ backgroundColor: t.value.style.chart.legend.selectAllToggle.backgroundColor,
1190
+ color: t.value.style.chart.legend.selectAllToggle.color,
1191
+ fontSize: t.value.style.chart.legend.fontSize,
1192
+ checked: f.value.length > 0,
1193
+ isCursorPointer: j.value,
1194
+ onToggle: Zt
1195
+ }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : m("", !0)
1196
+ ]),
1197
+ _: 2
1198
+ }, [
1199
+ e.$slots.pattern ? {
1200
+ name: "legend-pattern",
1201
+ fn: h(({ legend: l, index: o }) => [
1202
+ Ce(Kl, {
1203
+ shape: l.shape,
1204
+ radius: 30,
1205
+ stroke: "none",
1206
+ plot: { x: 30, y: 30 },
1207
+ fill: `url(#pattern_${y.value}_${o})`
1208
+ }, null, 8, ["shape", "fill"])
1209
+ ]),
1210
+ key: "0"
1211
+ } : void 0
1212
+ ]), 1032, ["legendSet", "config", "isCursorPointer"])) : p(e.$slots, "legend", {
1213
+ key: 1,
1214
+ legend: U.value
1215
+ }, void 0, !0)
1216
+ ], 512)
1217
+ ], 8, ["to"])) : m("", !0),
1218
+ e.$slots.source ? (s(), v("div", {
1219
+ key: 7,
1220
+ ref_key: "source",
1221
+ ref: Ke,
1222
+ dir: "auto"
1223
+ }, [
1224
+ p(e.$slots, "source", {}, void 0, !0)
1225
+ ], 512)) : m("", !0),
1226
+ Ce(d(Lt), {
1227
+ teleportTo: t.value.style.chart.tooltip.teleportTo,
1228
+ show: T.value.showTooltip && te.value && f.value.length < b.dataset.length,
1229
+ backgroundColor: t.value.style.chart.tooltip.backgroundColor,
1230
+ color: t.value.style.chart.tooltip.color,
1231
+ borderRadius: t.value.style.chart.tooltip.borderRadius,
1232
+ borderColor: t.value.style.chart.tooltip.borderColor,
1233
+ borderWidth: t.value.style.chart.tooltip.borderWidth,
1234
+ backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
1235
+ position: t.value.style.chart.tooltip.position,
1236
+ offsetY: t.value.style.chart.tooltip.offsetY,
1237
+ parent: _.value,
1238
+ content: $e.value,
1239
+ isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function",
1240
+ fontSize: t.value.style.chart.tooltip.fontSize,
1241
+ isFullscreen: X.value,
1242
+ smooth: t.value.style.chart.tooltip.smooth,
1243
+ backdropFilter: t.value.style.chart.tooltip.backdropFilter,
1244
+ smoothForce: t.value.style.chart.tooltip.smoothForce,
1245
+ smoothSnapThreshold: t.value.style.chart.tooltip.smoothSnapThreshold,
1246
+ isA11yMode: ae.value === "keyboard",
1247
+ a11yPosition: lt.value
1248
+ }, {
1249
+ "tooltip-before": h(() => [
1250
+ p(e.$slots, "tooltip-before", x($({ ...Me.value })), void 0, !0)
1251
+ ]),
1252
+ "tooltip-after": h(() => [
1253
+ p(e.$slots, "tooltip-after", x($({ ...Me.value })), void 0, !0)
1254
+ ]),
1255
+ _: 3
1256
+ }, 8, ["teleportTo", "show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "fontSize", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
1257
+ xe.value && t.value.userOptions.buttons.table ? (s(), I(xl(ve.value.component), Ge({ key: 8 }, ve.value.props, {
1258
+ ref_key: "tableUnit",
1259
+ ref: le,
1260
+ onClose: Ct
1261
+ }), We({
1262
+ content: h(() => [
1263
+ (s(), I(d(Nt), {
1264
+ key: `table_${Ze.value}`,
1265
+ colNames: ee.value.colNames,
1266
+ head: ee.value.head,
1267
+ body: ee.value.body,
1268
+ config: ee.value.config,
1269
+ title: t.value.table.useDialog ? "" : ve.value.title,
1270
+ withCloseButton: !t.value.table.useDialog,
1271
+ isCursorPointer: j.value,
1272
+ onClose: Ct
1273
+ }, {
1274
+ th: h(({ th: l }) => [
1275
+ C("div", {
1276
+ innerHTML: l,
1277
+ style: { display: "flex", "align-items": "center" }
1278
+ }, null, 8, Ta)
1279
+ ]),
1280
+ td: h(({ td: l }) => [
1281
+ At(pe(l.name || l), 1)
1282
+ ]),
1283
+ _: 1
1284
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
1285
+ ]),
1286
+ _: 2
1287
+ }, [
1288
+ t.value.table.useDialog ? {
1289
+ name: "title",
1290
+ fn: h(() => [
1291
+ At(pe(ve.value.title), 1)
1292
+ ]),
1293
+ key: "0"
1294
+ } : void 0,
1295
+ t.value.table.useDialog ? {
1296
+ name: "actions",
1297
+ fn: h(() => [
1298
+ C("button", {
1299
+ tabindex: "0",
1300
+ class: "vue-ui-user-options-button",
1301
+ onClick: a[1] || (a[1] = (l) => Ve(t.value.userOptions.callbacks.csv)),
1302
+ style: he({ cursor: j.value ? "pointer" : "default" })
1303
+ }, [
1304
+ Ce(d(Dt), {
1305
+ name: "fileCsv",
1306
+ stroke: ve.value.props.color
1307
+ }, null, 8, ["stroke"])
1308
+ ], 4)
1309
+ ]),
1310
+ key: "1"
1311
+ } : void 0
1312
+ ]), 1040)) : m("", !0),
1313
+ p(e.$slots, "skeleton", {}, () => [
1314
+ d(Ae) ? (s(), I(Wl, { key: 0 })) : m("", !0)
1315
+ ], !0)
1316
+ ], 46, aa));
1317
+ }
1318
+ }, qa = /* @__PURE__ */ la(Sa, [["__scopeId", "data-v-7a0b4694"]]);
1319
+ export {
1320
+ qa as default
1321
+ };