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,2229 @@
1
+ import { computed as m, defineAsyncComponent as Me, useSlots as aa, shallowRef as Ie, ref as b, onMounted as vl, onBeforeUnmount as dl, toRefs as oa, watch as je, openBlock as u, createElementBlock as i, normalizeStyle as L, normalizeClass as qt, createElementVNode as w, toDisplayString as ye, createBlock as ge, createCommentVNode as d, unref as s, withCtx as _, renderSlot as k, normalizeProps as K, guardReactiveProps as Q, createSlots as Wt, createVNode as At, Fragment as P, renderList as J, mergeProps as jt, withDirectives as Tt, vShow as Pt, Teleport as na, resolveDynamicComponent as sa, createTextVNode as hl, nextTick as fl } from "vue";
2
+ import { o as yl, q as Kt, r as ua, j as ra, t as gl, n as ia, p as Re, K as ca, s as pl, k as pe, l as ve, a4 as ml, ax as va, X as da, u as St, v as ha, a5 as fa, ae as X, G as bl, a6 as we, a7 as A, as as wl, C as ya, m as ga, a0 as pa, a1 as ma, T as ba, ay as kl, ai as xl } from "./lib-DBptbyyI.js";
3
+ import { f as wa, b as ka } from "./labelUtils-CqTHa20R.js";
4
+ import { t as xa, u as $a } from "./useResponsive-DfdjqQps.js";
5
+ import { u as Ca } from "./useConfig-DO94Aj5s.js";
6
+ import { u as _a } from "./usePrinter-CEpYU3r5.js";
7
+ import { u as Aa, B as Ta } from "./BaseScanner-BhhkKVoj.js";
8
+ import { u as Pa } from "./useSvgExport-ByUukOZt.js";
9
+ import { u as Qt } from "./useNestedProp-Bf5XFbs8.js";
10
+ import { u as Sa } from "./useThemeCheck-D1ZYXUwG.js";
11
+ import { u as La } from "./useUserOptionState-BIvW1Kz7.js";
12
+ import { u as Ma } from "./useChartAccessibility-9icAAmYg.js";
13
+ import Ia from "./img-LXxMLmCg.js";
14
+ import { _ as Fa } from "./Shape-BKRUOeKk.js";
15
+ import za from "./Title-BeMKE1cj.js";
16
+ import Oa from "./vue_ui_donut-CA4dgV8J.js";
17
+ import Ya from "./Legend-CS7Xo5LK.js";
18
+ import { A as Da } from "./A11yDataTable-KcVAX2cP.js";
19
+ import { B as Ba } from "./BaseLegendToggle-BQVIawmA.js";
20
+ import { _ as Xa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
+ function Na(it) {
22
+ const {
23
+ FINAL_CONFIG: ct,
24
+ noGhostDonut: Lt,
25
+ svg: Ke,
26
+ padding: vt,
27
+ labels_inline_fontSize: Mt,
28
+ minSize: dt,
29
+ findArcMidpoint: It,
30
+ calcMarkerOffsetX: Ft,
31
+ calcMarkerOffsetY: zt,
32
+ animatingIndex: Ot,
33
+ segregated: Yt,
34
+ isSmallArc: Dt
35
+ } = it;
36
+ return { smallArcLayoutsClassic: m(() => {
37
+ if (ct.value.type !== "classic") return {};
38
+ const Qe = {}, E = Lt.value || [];
39
+ if (!E.length) return Qe;
40
+ const B = Ke.value.width / 2, M = Ke.value.height / 2, Fe = vt.value.top + 16, ht = Ke.value.height - vt.value.bottom - 16, Je = Mt.value, ft = Je / 3, yt = Je * 1.5, ne = 8, me = 6, Ze = B - (dt.value + me), et = B + (dt.value + me), gt = !!ct.value.style.chart.layout.curvedMarkers;
41
+ function pt({ midX: h, midY: g, bandX: f, bandY: C }) {
42
+ if (!gt)
43
+ return `M ${h} ${g} L ${h} ${C} L ${f} ${C}`;
44
+ const I = f < B ? -1 : 1, F = f - h, le = C - g, ae = Math.sqrt(F * F + le * le) || 1, ke = h - B, p = g - M, oe = Math.sqrt(ke * ke + p * p) || 1, se = ke / oe, z = p / oe, Oe = oe + 9;
45
+ function e({ x: _e, y: de }) {
46
+ const re = _e - B, Z = de - M, Ae = Math.sqrt(re * re + Z * Z) || 1;
47
+ if (Ae >= Oe) return { x: _e, y: de };
48
+ const Te = Oe / Ae;
49
+ return {
50
+ x: B + re * Te,
51
+ y: M + Z * Te
52
+ };
53
+ }
54
+ if (ae < 56) {
55
+ const _e = F / ae;
56
+ let re = -(le / ae), Z = _e;
57
+ const Ae = (h + f) * 0.5, Te = (g + C) * 0.5, W = Ae + re, kt = Te + Z, Xt = (W - B) * (W - B) + (kt - M) * (kt - M), He = Ae - re, Ge = Te - Z;
58
+ (He - B) * (He - B) + (Ge - M) * (Ge - M) > Xt && (re = -re, Z = -Z);
59
+ const at = 0.78, $t = h + F * at, Nt = g + le * at, qe = Math.max(0, Math.min(1, (ae - 18) / 44)), x = qe * qe * (3 - 2 * qe);
60
+ let n = 2.5 + x * 4, he = 1 + x * 2.5;
61
+ n *= 0.9;
62
+ const ot = {
63
+ x: $t + re * n + se * he,
64
+ y: Nt + Z * n + z * he
65
+ }, U = e(ot);
66
+ return `M ${h} ${g} Q ${U.x} ${U.y} ${f} ${C}`;
67
+ }
68
+ let $e = ae * 0.34;
69
+ $e < 20 && ($e = 20), $e > 46 && ($e = 46);
70
+ let ue = ae * 0.46;
71
+ ue < 22 && (ue = 22), ue > 70 && (ue = 70);
72
+ const Ye = {
73
+ x: h + se * $e,
74
+ y: g + z * $e
75
+ }, Ue = B + I * Math.max(Math.abs(f - B), Oe), Bt = {
76
+ x: f - I * Math.min(ue, Math.abs(Ue - f) * 0.75),
77
+ y: C
78
+ }, Y = e(Ye), Ce = e(Bt);
79
+ return `M ${h} ${g} C ${Y.x} ${Y.y} ${Ce.x} ${Ce.y} ${f} ${C}`;
80
+ }
81
+ function mt(h) {
82
+ const g = String(h ?? "").split(/\n/g), f = Math.max(0, g.length - 1), C = Je * 1.2, I = f * C;
83
+ return yt + I;
84
+ }
85
+ function bt({ arc: h, index: g }) {
86
+ const { x: f, y: C } = It(h.path), I = Ft(h).x, F = zt(h) - 3.5, le = mt(h.name);
87
+ return {
88
+ arc: h,
89
+ index: g,
90
+ midX: f,
91
+ midY: C,
92
+ inlineMarkerX: I,
93
+ inlineMarkerY: F,
94
+ labelHeight: le
95
+ };
96
+ }
97
+ function ze(h) {
98
+ const { arc: g } = h, f = g.seriesIndex ?? 0;
99
+ return Ot.value === f || Yt.value.includes(f) ? !1 : Dt(g, f);
100
+ }
101
+ function tt(h) {
102
+ const g = h.inlineMarkerY < M, f = h.inlineMarkerX < B;
103
+ return g && f ? "TL" : g && !f ? "TR" : !g && f ? "BL" : "BR";
104
+ }
105
+ function Ve(h, g) {
106
+ if (g.startsWith("T")) {
107
+ h.sort((C, I) => C.inlineMarkerY - I.inlineMarkerY || C.index - I.index);
108
+ return;
109
+ }
110
+ h.sort((C, I) => I.inlineMarkerY - C.inlineMarkerY || C.index - I.index);
111
+ }
112
+ function Ee({ side: h, markerX: g, markerY: f, labelY: C, connectorPath: I }) {
113
+ return {
114
+ side: h,
115
+ labelX: h === "left" ? g - ne : g + ne,
116
+ labelY: C + ft,
117
+ textAnchor: h === "left" ? "end" : "start",
118
+ markerX: g,
119
+ markerY: f,
120
+ connectorPath: I
121
+ };
122
+ }
123
+ function H({
124
+ candidateList: h,
125
+ side: g,
126
+ bandMarkerX: f,
127
+ startY: C,
128
+ direction: I
129
+ }) {
130
+ let F = C;
131
+ h.forEach((le) => {
132
+ const { index: ae, midX: ke, midY: p, labelHeight: oe } = le;
133
+ let se;
134
+ I === "down" ? (se = F, F += oe) : (F -= oe, se = F);
135
+ const z = se, lt = pt({
136
+ midX: ke,
137
+ midY: p,
138
+ bandX: f,
139
+ bandY: z
140
+ });
141
+ Qe[ae] = Ee({
142
+ side: g,
143
+ markerX: f,
144
+ markerY: z,
145
+ labelY: se,
146
+ connectorPath: lt
147
+ });
148
+ });
149
+ }
150
+ const wt = E.map((h, g) => bt({ arc: h, index: g })).filter(ze), G = {
151
+ TL: [],
152
+ TR: [],
153
+ BL: [],
154
+ BR: []
155
+ };
156
+ return wt.forEach((h) => {
157
+ G[tt(h)].push(h);
158
+ }), Object.keys(G).forEach((h) => {
159
+ Ve(G[h], h);
160
+ }), H({
161
+ candidateList: G.TL,
162
+ side: "left",
163
+ bandMarkerX: Ze,
164
+ startY: Fe,
165
+ direction: "down"
166
+ }), H({
167
+ candidateList: G.TR,
168
+ side: "right",
169
+ bandMarkerX: et,
170
+ startY: Fe,
171
+ direction: "down"
172
+ }), G.BL.length > 1 && H({
173
+ candidateList: G.BL,
174
+ side: "left",
175
+ bandMarkerX: Ze,
176
+ startY: ht,
177
+ direction: "up"
178
+ }), G.BR.length > 1 && H({
179
+ candidateList: G.BR,
180
+ side: "right",
181
+ bandMarkerX: et,
182
+ startY: ht,
183
+ direction: "up"
184
+ }), Qe;
185
+ }) };
186
+ }
187
+ const Ra = ["id"], Va = ["id"], Ea = ["id"], Ua = { style: { position: "relative" } }, Ha = ["xmlns", "aria-describedby", "viewBox"], Ga = ["width", "height"], qa = { key: 1 }, Wa = ["id"], ja = ["stop-color"], Ka = ["offset", "stop-color"], Qa = ["offset", "stop-color"], Ja = ["stop-color"], Za = { key: 2 }, eo = ["id", "cx", "cy"], to = ["stop-color", "stop-opacity"], lo = ["stop-color"], ao = ["id"], oo = ["id"], no = ["id"], so = ["flood-color"], uo = ["id"], ro = ["flood-color"], io = ["d", "stroke", "filter"], co = ["d", "stroke", "filter"], vo = ["cx", "cy", "r", "fill", "filter"], ho = { key: 6 }, fo = ["stroke", "d"], yo = ["d", "fill", "stroke", "stroke-width", "filter"], go = { key: 0 }, po = ["d", "fill", "stroke", "stroke-width", "filter"], mo = { key: 0 }, bo = ["stroke", "d"], wo = { key: 0 }, ko = ["d", "stroke", "stroke-width", "filter"], xo = { key: 1 }, $o = ["d", "fill", "stroke", "stroke-width", "filter"], Co = ["d", "fill", "stroke", "stroke-width", "filter"], _o = { key: 1 }, Ao = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], To = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Po = { key: 0 }, So = ["d", "fill", "stroke", "stroke-width"], Lo = ["cx", "cy", "r", "stroke"], Mo = ["cx", "cy", "r", "fill"], Io = ["cx", "cy", "r"], Fo = { key: 0 }, zo = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], Oo = { key: 1 }, Yo = ["cx", "cy", "r"], Do = ["x", "y", "fill", "font-size"], Bo = ["x", "y", "fill", "font-size"], Xo = ["x", "y", "fill", "font-size"], No = ["x", "y", "fill", "font-size"], Ro = ["filter", "opacity"], Vo = { key: 0 }, Eo = ["x", "y"], Uo = { key: 1 }, Ho = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Go = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], qo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Wo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], jo = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Ko = ["text-anchor", "x", "y", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Qo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Jo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave", "innerHTML"], Zo = { key: 2 }, en = ["x", "y", "width"], tn = ["x", "y", "width"], ln = {
188
+ key: 0,
189
+ style: { position: "absolute", top: "100%", left: "0", width: "100%" },
190
+ "data-dom-to-png-ignore": "",
191
+ "aria-hidden": "true"
192
+ }, an = {
193
+ key: 5,
194
+ class: "vue-data-ui-watermark"
195
+ }, on = ["id"], nn = ["onClick"], sn = {
196
+ key: 8,
197
+ class: "vue-ui-donut-hollow"
198
+ }, un = ["innerHTML"], rn = {
199
+ __name: "vue-ui-donut",
200
+ props: {
201
+ config: {
202
+ type: Object,
203
+ default() {
204
+ return {};
205
+ }
206
+ },
207
+ dataset: {
208
+ type: Array,
209
+ default() {
210
+ return [];
211
+ }
212
+ }
213
+ },
214
+ emits: ["selectLegend", "selectDatapoint", "copyAlt"],
215
+ setup(it, { expose: ct, emit: Lt }) {
216
+ const Ke = Me(() => import("./Tooltip-Bf-kM3_A.js")), vt = Me(() => import("./BaseIcon-Cb3zzG6s.js")), Mt = Me(() => import("./vue-ui-accordion-nvggWcGN.js")), dt = Me(() => import("./DataTable-DT2kIdQ6.js")), It = Me(() => import("./PenAndPaper-Ct3qJ4lA.js")), Ft = Me(() => import("./UserOptions-rW2fRf3V.js")), zt = Me(() => import("./PackageVersion-DPO-OOVI.js")), Ot = Me(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_donut: Yt } = Ca(), { isThemeValid: Dt, warnInvalidTheme: Jt } = Sa(), Qe = aa(), E = it, B = m({
217
+ get() {
218
+ return !!E.dataset && E.dataset.length;
219
+ },
220
+ set(t) {
221
+ return t;
222
+ }
223
+ }), M = Ie(null), Fe = b(null), ht = b(null), Je = b(null), ft = Ie(null), yt = Ie(null), ne = Ie(null), me = Ie(null), Ze = Ie(null), et = Ie(null), gt = b(0), pt = b(0), mt = b(0), bt = b(!1), ze = b(null), tt = b(null), Ve = b(!1), Ee = b(!1), H = b(null), wt = b({ x: 0, y: 0 }), G = b("pointer"), h = b(!1), g = m({
224
+ get: () => e.value.style.chart.layout.labels.percentage.fontSize,
225
+ set: (t) => t
226
+ }), f = m({
227
+ get: () => e.value.style.chart.layout.labels.name.fontSize,
228
+ set: (t) => t
229
+ }), C = m({
230
+ get: () => e.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
231
+ set: (t) => t
232
+ });
233
+ let I = !1;
234
+ const F = () => {
235
+ !e.value.autoSize || I || (I = !0, requestAnimationFrame(() => {
236
+ I = !1;
237
+ const t = e.value, o = Fe.value, l = W.value;
238
+ if (!t.autoSize || !o || !l) return;
239
+ const [a, r, c, y] = l.getAttribute("viewBox").split(" ").map(Number), $ = { x: a, y: r, width: c, height: y }, D = [
240
+ {
241
+ selector: ".vue-data-ui-datalabel-value",
242
+ baseSize: t.style.chart.layout.labels.percentage.fontSize,
243
+ minSize: t.style.chart.layout.labels.percentage.minFontSize,
244
+ sizeRef: g
245
+ },
246
+ {
247
+ selector: ".vue-data-ui-datalabel-name",
248
+ baseSize: t.style.chart.layout.labels.name.fontSize,
249
+ minSize: t.style.chart.layout.labels.name.minFontSize,
250
+ sizeRef: f
251
+ },
252
+ {
253
+ selector: ".vue-data-ui-datalabel-inline",
254
+ baseSize: t.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
255
+ minSize: t.style.chart.layout.labels.name.minFontSize,
256
+ sizeRef: C
257
+ }
258
+ ];
259
+ D.map((V) => o.querySelectorAll(V.selector).length).reduce((V, Ne) => V + Ne, 0) !== 0 && D.forEach(({ selector: V, baseSize: Ne, minSize: Zl, sizeRef: ea }) => {
260
+ o.querySelectorAll(V).forEach((ta) => {
261
+ const la = ya({
262
+ el: ta,
263
+ bounds: $,
264
+ currentFontSize: Ne,
265
+ minFontSize: Zl,
266
+ attempts: 200,
267
+ padding: 1
268
+ });
269
+ ea.value = la;
270
+ });
271
+ });
272
+ }));
273
+ };
274
+ vl(async () => {
275
+ bt.value = !0, ke(), requestAnimationFrame(F);
276
+ });
277
+ let le;
278
+ vl(() => {
279
+ M.value && (le = new ResizeObserver((t) => {
280
+ for (const o of t) {
281
+ const { width: l, height: a } = o.contentRect;
282
+ if (l > 0 && a > 0) {
283
+ F();
284
+ break;
285
+ }
286
+ }
287
+ }), le.observe(M.value.parentElement));
288
+ }), dl(() => {
289
+ le?.disconnect();
290
+ }), dl(() => {
291
+ ne.value && (me.value && ne.value.unobserve(me.value), ne.value.disconnect());
292
+ });
293
+ const ae = m(() => !!e.value.debug);
294
+ function ke() {
295
+ if (yl(E.dataset) ? (Kt({
296
+ componentName: "VueUiDonut",
297
+ type: "dataset",
298
+ debug: ae.value
299
+ }), B.value = !1, Ue.value = !0) : (E.dataset.forEach((t, o) => {
300
+ ua({
301
+ datasetObject: t,
302
+ requiredAttributes: ["name", "values"]
303
+ }).forEach((l) => {
304
+ Kt({
305
+ componentName: "VueUiDonut",
306
+ type: "datasetSerieAttribute",
307
+ property: l,
308
+ index: o,
309
+ debug: ae.value
310
+ }), B.value = !1, Ue.value = !0;
311
+ });
312
+ }), E.dataset.forEach((t, o) => {
313
+ (!t.name || t.name === "") && Kt({
314
+ componentName: "VueUiDonut",
315
+ type: "datasetAttributeEmpty",
316
+ property: "name",
317
+ index: o,
318
+ debug: ae.value
319
+ });
320
+ })), yl(E.dataset) || (Ue.value = e.value.loading), e.value.responsive) {
321
+ const t = xa(() => {
322
+ const { width: o, height: l } = $a({
323
+ chart: M.value,
324
+ title: e.value.style.chart.title.text ? ft.value : null,
325
+ legend: e.value.style.chart.legend.show ? yt.value : null,
326
+ source: Ze.value,
327
+ noTitle: et.value,
328
+ padding: e.value.autoSize ? void 0 : He.value
329
+ });
330
+ requestAnimationFrame(() => {
331
+ n.value.width = o, n.value.height = l, F();
332
+ });
333
+ });
334
+ ne.value && (me.value && ne.value.unobserve(me.value), ne.value.disconnect()), ne.value = new ResizeObserver(t), me.value = M.value.parentNode, ne.value.observe(me.value);
335
+ }
336
+ }
337
+ const p = b(ra()), oe = b(!1), se = b(""), z = b(null), lt = b(0);
338
+ function Oe() {
339
+ const t = Qt({
340
+ userConfig: E.config,
341
+ defaultConfig: Yt
342
+ });
343
+ let o = {};
344
+ const l = t.theme;
345
+ if (!l)
346
+ o = t;
347
+ else if (!Dt.value(t))
348
+ Jt(t), o = t;
349
+ else {
350
+ const a = Qt({
351
+ userConfig: Oa[l] || E.config,
352
+ defaultConfig: t
353
+ });
354
+ o = {
355
+ ...Qt({
356
+ userConfig: E.config,
357
+ defaultConfig: a
358
+ }),
359
+ customPalette: t.customPalette.length ? t.customPalette : ga[l] || Re
360
+ };
361
+ }
362
+ return o;
363
+ }
364
+ const e = b(Oe()), xe = m(() => e.value.userOptions.useCursorPointer), $e = m(() => gl({
365
+ defaultConfig: {
366
+ useCssAnimation: !1,
367
+ table: { show: !1 },
368
+ startAnimation: {
369
+ show: !1
370
+ },
371
+ userOptions: { show: !1 },
372
+ style: {
373
+ chart: {
374
+ backgroundColor: "#99999930",
375
+ layout: {
376
+ labels: {
377
+ dataLabels: { show: !1 },
378
+ hollow: {
379
+ average: { show: !1 },
380
+ total: { show: !1 }
381
+ },
382
+ value: { show: !1 }
383
+ }
384
+ },
385
+ legend: {
386
+ backgroundColor: "transparent",
387
+ showValue: !1,
388
+ showPercentage: !1
389
+ },
390
+ title: {
391
+ color: "#1A1A1A",
392
+ subtitle: {
393
+ color: "#5A5A5A"
394
+ }
395
+ }
396
+ }
397
+ }
398
+ },
399
+ userConfig: e.value.skeletonConfig ?? {}
400
+ })), { loading: ue, FINAL_DATASET: Ye, manualLoading: Ue, skeletonDataset: Bt } = Aa({
401
+ ...oa(E),
402
+ FINAL_CONFIG: e,
403
+ prepareConfig: Oe,
404
+ skeletonDataset: E.config?.skeletonDataset ?? [
405
+ {
406
+ name: "",
407
+ values: [3],
408
+ color: "#BABABA"
409
+ },
410
+ {
411
+ name: "",
412
+ values: [2],
413
+ color: "#AAAAAA"
414
+ },
415
+ {
416
+ name: "",
417
+ values: [1],
418
+ color: "#CACACA"
419
+ }
420
+ ],
421
+ skeletonConfig: gl({
422
+ defaultConfig: e.value,
423
+ userConfig: $e.value
424
+ })
425
+ }), Y = b(!0), Ce = b(0), _e = b(!1);
426
+ let de = null;
427
+ function re(t = 1e3) {
428
+ return new Promise((o) => {
429
+ const l = performance.now();
430
+ function a(r) {
431
+ const c = r - l, y = Math.min(
432
+ c / t,
433
+ 1
434
+ ), $ = xl(y);
435
+ Ce.value = $, y < 1 ? de = requestAnimationFrame(a) : (Ce.value = 1, de = null, o());
436
+ }
437
+ de !== null && cancelAnimationFrame(de), Ce.value = 0, de = requestAnimationFrame(a);
438
+ });
439
+ }
440
+ je(
441
+ () => ue.value,
442
+ async (t) => {
443
+ if (t || _e.value)
444
+ return;
445
+ const o = Ye.value === Bt, l = e.value.startAnimation?.show;
446
+ if (!o && l) {
447
+ _e.value = !0;
448
+ const a = e.value.startAnimation.durationMs || 1e3;
449
+ await re(a);
450
+ } else
451
+ Ce.value = 1;
452
+ Y.value = !1;
453
+ },
454
+ { immediate: !0 }
455
+ );
456
+ const { userOptionsVisible: Z, setUserOptionsVisibility: Ae, keepUserOptionState: Te } = La({ config: e.value }), { svgRef: W } = Ma({ config: e.value.style.chart.title });
457
+ function kt() {
458
+ Ae(!0);
459
+ }
460
+ function Xt() {
461
+ Ae(!1);
462
+ }
463
+ je(() => E.config, (t) => {
464
+ ue.value || (e.value = Oe()), Z.value = !e.value.userOptions.showOnChartHover, ke(), gt.value += 1, pt.value += 1, mt.value += 1, x.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, x.value.showTable = e.value.table.show, x.value.showTooltip = e.value.style.chart.tooltip.show, n.value.height = e.value.style.chart.height, n.value.width = e.value.style.chart.width;
465
+ }, { deep: !0 });
466
+ const He = m(() => {
467
+ const { top: t, right: o, bottom: l, left: a } = e.value.style.chart.padding;
468
+ return {
469
+ css: `padding:${t}px ${o}px ${l}px ${a}px`,
470
+ top: t,
471
+ right: o,
472
+ bottom: l,
473
+ left: a
474
+ };
475
+ }), { isPrinting: Ge, isImaging: xt, generatePdf: at, generateImage: $t } = _a({
476
+ elementId: `donut__${p.value}`,
477
+ fileName: e.value.style.chart.title.text || "vue-ui-donut",
478
+ options: e.value.userOptions.print
479
+ }), Nt = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), qe = m(() => ia(e.value.customPalette)), x = b({
480
+ dataLabels: {
481
+ show: e.value.style.chart.layout.labels.dataLabels.show
482
+ },
483
+ showTable: e.value.table.show,
484
+ showTooltip: e.value.style.chart.tooltip.show
485
+ });
486
+ je(e, () => {
487
+ x.value = {
488
+ dataLabels: {
489
+ show: e.value.style.chart.layout.labels.dataLabels.show
490
+ },
491
+ showTable: e.value.table.show,
492
+ showTooltip: e.value.style.chart.tooltip.show
493
+ };
494
+ }, { immediate: !0 });
495
+ const n = b({
496
+ height: e.value.style.chart.height,
497
+ width: e.value.style.chart.width
498
+ }), he = m(() => {
499
+ if (e.value.pie)
500
+ return O.value;
501
+ const t = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(n.value.width, n.value.height) * t, l = o > O.value ? O.value : o;
502
+ return Math.max(l, 12 * (1 + t));
503
+ }), ot = Lt, U = m(() => Ye.value.sort((t, o) => {
504
+ const l = Array.isArray(t.values) ? t.values.reduce((r, c) => r + c, 0) : t.value ?? 0, a = Array.isArray(o.values) ? o.values.reduce((r, c) => r + c, 0) : o.value ?? 0;
505
+ return t.ghost && !o.ghost ? 1 : o.ghost && !t.ghost ? -1 : a - l;
506
+ }).map((t, o) => ({
507
+ name: t.name,
508
+ color: pl(t.color) || qe.value[o] || Re[o] || Re[o % Re.length],
509
+ value: ca(t.values.reduce((l, a) => l + a, 0)),
510
+ absoluteValues: t.values,
511
+ comment: t.comment || "",
512
+ patternIndex: o,
513
+ seriesIndex: o,
514
+ ghost: !1,
515
+ pattern: `pattern_${p.value}_${o}`
516
+ })));
517
+ je(() => E.dataset, (t) => {
518
+ Array.isArray(t) && t.length > 0 && (Ue.value = !1);
519
+ }, { immediate: !0 });
520
+ const j = Ie(U.value);
521
+ je(() => U.value, (t) => {
522
+ j.value = t, requestAnimationFrame(F);
523
+ });
524
+ function $l() {
525
+ return U.value.map((t) => ({
526
+ name: t.name,
527
+ color: t.color,
528
+ value: t.value
529
+ }));
530
+ }
531
+ const N = b([]), Pe = b(!1), De = b(null);
532
+ function Zt({ from: t, to: o, duration: l, onUpdate: a, onDone: r, easing: c = xl }) {
533
+ const y = performance.now();
534
+ function $(D) {
535
+ const S = Math.min((D - y) / l, 1), V = c(S), Ne = t + (o - t) * V;
536
+ a(Ne, S), S < 1 ? requestAnimationFrame($) : (a(o, 1), r && r());
537
+ }
538
+ requestAnimationFrame($);
539
+ }
540
+ function Cl() {
541
+ N.value.length ? N.value = [] : nt.value.forEach((t, o) => {
542
+ N.value.push(o);
543
+ });
544
+ }
545
+ function Ct(t) {
546
+ const o = U.value.find((r, c) => c === t);
547
+ let a = j.value.find((r, c) => c === t).value;
548
+ if (N.value.includes(t)) {
549
+ let c = function() {
550
+ j.value = j.value.map(
551
+ ($, D) => t === D ? { ...$, value: r } : $
552
+ );
553
+ }, y = function() {
554
+ Pe.value = !0, De.value = t, Zt({
555
+ from: a,
556
+ to: r,
557
+ duration: e.value.serieToggleAnimation.durationMs,
558
+ onUpdate: ($, D) => {
559
+ j.value = j.value.map(
560
+ (S, V) => t === V ? { ...S, value: $ } : S
561
+ ), requestAnimationFrame(F);
562
+ },
563
+ onDone: () => {
564
+ c(), Pe.value = !1, De.value = null;
565
+ }
566
+ });
567
+ };
568
+ N.value = N.value.filter(($) => $ !== t);
569
+ const r = o.value;
570
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? y() : (c(), requestAnimationFrame(F));
571
+ } else if (N.value.length < U.value.length - 1) {
572
+ let r = function() {
573
+ N.value.push(t), j.value = j.value.map(
574
+ (y, $) => t === $ ? { ...y, value: 0 } : y
575
+ );
576
+ }, c = function() {
577
+ Pe.value = !0, De.value = t, Zt({
578
+ from: a,
579
+ to: 0,
580
+ duration: e.value.serieToggleAnimation.durationMs,
581
+ onUpdate: (y, $) => {
582
+ j.value = j.value.map(
583
+ (D, S) => t === S ? { ...D, value: y } : D
584
+ ), requestAnimationFrame(F);
585
+ },
586
+ onDone: () => {
587
+ r(), requestAnimationFrame(F), Pe.value = !1, De.value = null;
588
+ }
589
+ });
590
+ };
591
+ e.value.serieToggleAnimation.show && e.value.type === "classic" ? c() : r();
592
+ }
593
+ ot("selectLegend", be.value.map((r) => ({
594
+ name: r.name,
595
+ color: r.color,
596
+ value: r.value
597
+ })));
598
+ }
599
+ function el(t) {
600
+ if (!U.value.length)
601
+ return e.value.debug && console.warn("VueUiDonut - There are no series to show."), null;
602
+ const o = U.value.find((l) => l.name === t);
603
+ return o || (e.value.debug && console.warn(`VueUiDonut - Series name not found "${t}"`), null);
604
+ }
605
+ function _l(t) {
606
+ const o = el(t);
607
+ o !== null && N.value.includes(o.seriesIndex) && Ct(o.seriesIndex);
608
+ }
609
+ function Al(t) {
610
+ const o = el(t);
611
+ o !== null && (N.value.includes(o.seriesIndex) || Ct(o.seriesIndex));
612
+ }
613
+ const Tl = m(
614
+ () => Ye.value.reduce(
615
+ (t, o) => t + o.values.reduce((l, a) => l + a, 0),
616
+ 0
617
+ )
618
+ ), be = m(() => {
619
+ if (Y.value && !ue.value) {
620
+ const t = Ce.value, o = U.value.map((a) => ({
621
+ ...a,
622
+ value: a.value * t,
623
+ color: a.color,
624
+ ghost: !1
625
+ })), l = Tl.value * (1 - t);
626
+ return l > 0 && o.push({
627
+ name: "__ghost__",
628
+ value: l,
629
+ color: "transparent",
630
+ ghost: !0
631
+ }), o;
632
+ } else
633
+ return j.value.forEach((t) => {
634
+ if ([null, void 0].includes(t.values))
635
+ return {
636
+ ...t,
637
+ values: []
638
+ };
639
+ }), j.value.map((t, o) => ({
640
+ ...t,
641
+ seriesIndex: o
642
+ })).filter((t, o) => !N.value.includes(o));
643
+ }), nt = m(() => Ye.value.map((t, o) => {
644
+ const l = (t.values || []).reduce((r, c) => r + c, 0), a = l / Ye.value.map((r) => (r.values || []).reduce((c, y) => c + y, 0)).reduce((r, c) => r + c, 0);
645
+ return {
646
+ name: t.name,
647
+ color: pl(t.color) || qe.value[o] || Re[o] || Re[o % Re.length],
648
+ value: l,
649
+ shape: "circle",
650
+ patternIndex: o,
651
+ proportion: a
652
+ };
653
+ }).map((t, o) => {
654
+ const l = pe(e.value.style.chart.layout.labels.value.formatter, t.value, ve({
655
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
656
+ v: t.value,
657
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
658
+ r: e.value.style.chart.legend.roundingValue
659
+ }), { datapoint: t, index: o }), a = pe(e.value.style.chart.layout.labels.percentage.formatter, ll(t), ve({
660
+ v: ll(t),
661
+ s: "%",
662
+ r: e.value.style.chart.legend.roundingPercentage
663
+ })), r = Ut({
664
+ val: l,
665
+ percentage: N.value.includes(o) ? `${Xl(t.proportion * 100)}%` : a,
666
+ showVal: e.value.style.chart.legend.showValue,
667
+ showPercentage: e.value.style.chart.legend.showPercentage,
668
+ config: e.value.style.chart.legend
669
+ });
670
+ return {
671
+ ...t,
672
+ opacity: N.value.includes(o) ? 0.5 : 1,
673
+ segregate: () => !Pe.value && Ct(o),
674
+ isSegregated: N.value.includes(o),
675
+ display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${r}`
676
+ };
677
+ })), Pl = m(() => ({
678
+ cy: "donut-div-legend",
679
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
680
+ color: e.value.style.chart.legend.color,
681
+ fontSize: e.value.style.chart.legend.fontSize,
682
+ paddingBottom: 12,
683
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
684
+ })), O = m(() => {
685
+ const t = e.value.style.chart.layout.donut.radiusRatio, o = Math.max(0.1, Math.min(0.50001, t)), l = Math.min(n.value.width * o, n.value.height * o);
686
+ return Math.max(12, l);
687
+ }), q = m(() => ml({ series: be.value }, n.value.width / 2, n.value.height / 2, O.value, O.value, 1.99999, 2, 1, 360, 105.25, he.value)), Sl = m(() => Math.abs(be.value.map((t) => t.value).reduce((t, o) => t + o, 0)) > 0), Ll = m(() => ml({
688
+ series: [
689
+ {
690
+ value: 1,
691
+ color: e.value.style.chart.layout.donut.emptyFill,
692
+ name: "_",
693
+ seriesIndex: 0,
694
+ patternIndex: -1,
695
+ ghost: !1,
696
+ absoluteValues: [1]
697
+ }
698
+ ]
699
+ }, n.value.width / 2, n.value.height / 2, O.value, O.value, 1.99999, 2, 1, 360, 105.25, he.value)), T = m(() => q.value.filter((t) => !t.ghost)), v = m(() => {
700
+ const t = Math.max(...be.value.map((l) => l.value)), o = be.value.map((l) => l.value / t);
701
+ return va({
702
+ series: o,
703
+ center: {
704
+ x: n.value.width / 2,
705
+ y: n.value.height / 2
706
+ },
707
+ maxRadius: Math.min(n.value.width, n.value.height) / 3,
708
+ hasGhost: Y.value
709
+ });
710
+ });
711
+ function Se(t) {
712
+ return t.x > n.value.width / 2 + 6 ? "start" : t.x < n.value.width / 2 - 6 ? "end" : "middle";
713
+ }
714
+ function Ml(t) {
715
+ return t.middlePoint.y > n.value.height / 2 ? X({ initX: t.middlePoint.x, initY: t.middlePoint.y, offset: 100, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y : X({ initX: t.middlePoint.x, initY: t.middlePoint.y, offset: 0, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y - 100;
716
+ }
717
+ function ee(t) {
718
+ return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
719
+ }
720
+ function Il(t, o) {
721
+ const l = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, a = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, c = (zl.value[o] ?? t.proportion ?? 0) * 100;
722
+ return c > l && c <= a;
723
+ }
724
+ const { smallArcLayoutsClassic: R } = Na({
725
+ FINAL_CONFIG: e,
726
+ noGhostDonut: T,
727
+ svg: n,
728
+ padding: He,
729
+ labels_inline_fontSize: C,
730
+ minSize: O,
731
+ findArcMidpoint: kl,
732
+ calcMarkerOffsetX: A,
733
+ calcMarkerOffsetY: we,
734
+ animatingIndex: De,
735
+ segregated: N,
736
+ isSmallArc: Il
737
+ });
738
+ function tl(t, o) {
739
+ const l = t.value / Fl(o);
740
+ return isNaN(l) ? 0 : pe(
741
+ e.value.style.chart.layout.labels.percentage.formatter,
742
+ l * 100,
743
+ ve({
744
+ v: l * 100,
745
+ s: "%",
746
+ r: e.value.style.chart.layout.labels.percentage.rounding
747
+ }),
748
+ { datapoint: t }
749
+ );
750
+ }
751
+ function Fl(t) {
752
+ return [...t].map((o) => o.value).reduce((o, l) => o + l, 0);
753
+ }
754
+ const te = m(() => be.value.map((t) => t.value).reduce((t, o) => t + o, 0)), zl = m(() => {
755
+ const t = U.value.reduce((o, l) => o + l.value, 0);
756
+ return t <= 0 ? [] : U.value.map((o) => o.value / t);
757
+ }), Rt = m(() => te.value / be.value.length);
758
+ function ll(t) {
759
+ return Pe.value ? t.proportion * 100 : t.value / te.value * 100;
760
+ }
761
+ const Vt = b(null), st = b(!1);
762
+ function fe({ datapoint: t, seriesIndex: o }) {
763
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: o }), oe.value = !1, z.value = null, H.value = null, G.value = "pointer";
764
+ }
765
+ function ie({ datapoint: t, relativeIndex: o, seriesIndex: l, show: a = !1, triggerMode: r = "pointer" }) {
766
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: l }), G.value = r, H.value = o, Vt.value = { datapoint: t, seriesIndex: l, config: e.value, series: U.value }, oe.value = a, z.value = o;
767
+ let c = "";
768
+ const y = e.value.style.chart.tooltip.customFormat;
769
+ if (st.value = !1, ba(y))
770
+ try {
771
+ const $ = y({
772
+ seriesIndex: l,
773
+ datapoint: t,
774
+ series: U.value,
775
+ config: e.value
776
+ });
777
+ typeof $ == "string" && (se.value = $, st.value = !0);
778
+ } catch {
779
+ console.warn("Custom format cannot be applied."), st.value = !1;
780
+ }
781
+ st.value || (c += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, c += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${t.color}"/>${Qe.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${p.value}_${l})"/>` : ""}</svg>`, c += `<b>${Ut({
782
+ showVal: e.value.style.chart.tooltip.showValue,
783
+ showPercentage: e.value.style.chart.tooltip.showPercentage,
784
+ val: `<span>${pe(
785
+ e.value.style.chart.layout.labels.value.formatter,
786
+ t.value,
787
+ ve({
788
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
789
+ v: t.value,
790
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
791
+ r: e.value.style.chart.tooltip.roundingValue
792
+ }),
793
+ {
794
+ datapoint: t,
795
+ relativeIndex: o,
796
+ seriesIndex: l
797
+ }
798
+ )}</span>`,
799
+ percentage: pe(
800
+ e.value.style.chart.layout.labels.percentage.formatter,
801
+ t.proportion * 100,
802
+ ve({
803
+ v: t.proportion * 100,
804
+ s: "%",
805
+ r: e.value.style.chart.tooltip.roundingPercentage
806
+ }),
807
+ {
808
+ datapoint: t,
809
+ relativeIndex: o,
810
+ seriesIndex: l
811
+ }
812
+ ),
813
+ config: e.value.style.chart.tooltip
814
+ })}</b></div>`, e.value.style.chart.comments.showInTooltip && t.comment && (c += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${t.color}">${t.comment}</div>`), se.value = `<div>${c}</div>`);
815
+ }
816
+ function Ol(t, o) {
817
+ const l = R.value[o];
818
+ if (l)
819
+ return {
820
+ textAnchor: l.textAnchor,
821
+ x: l.labelX,
822
+ y: l.labelY
823
+ };
824
+ const a = A(t, !0, 12);
825
+ return {
826
+ textAnchor: a.anchor,
827
+ x: a.x,
828
+ y: we(t)
829
+ };
830
+ }
831
+ function Yl(t, o, l) {
832
+ const { textAnchor: a, x: r } = Ol(t, o), c = _t(t), y = `
833
+ <tspan
834
+ class="vue-data-ui-datalabel-inline"
835
+ fill="${e.value.style.chart.layout.labels.percentage.color}"
836
+ font-size="${l ? C.value : g.value}px"
837
+ style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
838
+ >${c}</tspan>
839
+ `, $ = String(t.name ?? "").split(/\n/g);
840
+ let D = "";
841
+ return $.forEach((S, V) => {
842
+ V === 0 ? D += `
843
+ <tspan
844
+ class="${l ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
845
+ fill="${e.value.style.chart.layout.labels.name.color}"
846
+ font-size="${l ? C.value : f.value}px"
847
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
848
+ >${S}</tspan>
849
+ ` : D += `
850
+ <tspan
851
+ class="${l ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
852
+ x="${r}"
853
+ dy="${(l ? C.value : f.value) * 1.2}"
854
+ fill="${e.value.style.chart.layout.labels.name.color}"
855
+ font-size="${l ? C.value : f.value}px"
856
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
857
+ >${S}</tspan>
858
+ `;
859
+ }), a === "end" ? `${e.value.style.chart.layout.labels.name.show ? D : ""}${y}` : `${y}${e.value.style.chart.layout.labels.name.show ? D : ""}`;
860
+ }
861
+ function Dl(t, o) {
862
+ const l = v.value[o].middlePoint, a = Se(l), r = X({
863
+ initX: l.x,
864
+ initY: l.y,
865
+ offset: 42,
866
+ centerX: n.value.width / 2,
867
+ centerY: n.value.height / 2
868
+ }), c = r.x;
869
+ r.y;
870
+ const y = _t(t), $ = `
871
+ <tspan
872
+ class="vue-data-ui-datalabel-value"
873
+ fill="${e.value.style.chart.layout.labels.percentage.color}"
874
+ font-size="${g.value}px"
875
+ style="font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
876
+ >${y}</tspan>
877
+ `, D = String(t.name ?? "").split(/\n/g);
878
+ let S = "";
879
+ return D.forEach((V, Ne) => {
880
+ Ne === 0 ? S += `
881
+ <tspan
882
+ class="vue-data-ui-datalabel-name"
883
+ fill="${e.value.style.chart.layout.labels.name.color}"
884
+ font-size="${f.value}px"
885
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
886
+ >${V}</tspan>
887
+ ` : S += `
888
+ <tspan
889
+ class="vue-data-ui-datalabel-name"
890
+ x="${c}"
891
+ dy="${f.value * 1.2}"
892
+ fill="${e.value.style.chart.layout.labels.name.color}"
893
+ font-size="${f.value}px"
894
+ style="font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
895
+ >${V}</tspan>
896
+ `;
897
+ }), a === "end" ? `${e.value.style.chart.layout.labels.name.show ? S : ""}${$}` : `${$}${e.value.style.chart.layout.labels.name.show ? S : ""}`;
898
+ }
899
+ function Be(t) {
900
+ return e.value.useBlurOnHover && ![null, void 0].includes(z.value) && z.value !== t ? `url(#blur_${p.value})` : "";
901
+ }
902
+ function Bl(t) {
903
+ if (!Pe.value || De.value === null || t.seriesIndex !== De.value)
904
+ return 1;
905
+ const o = (t.proportion ?? 0) * 100, l = e.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = e.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, c = l;
906
+ return o >= r ? 1 : o <= c ? 0 : (o - c) / (r - c);
907
+ }
908
+ const Le = m(() => {
909
+ const t = be.value.map((l) => ({
910
+ name: l.name,
911
+ color: l.color
912
+ })), o = be.value.map((l) => l.value);
913
+ return { head: t, body: o };
914
+ });
915
+ function Et(t = null) {
916
+ fl(() => {
917
+ const o = Le.value.head.map((r, c) => [[
918
+ r.name
919
+ ], [Le.value.body[c]], [isNaN(Le.value.body[c] / te.value) ? "-" : Le.value.body[c] / te.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = pa(l);
920
+ t ? t(a) : ma({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-donut" });
921
+ });
922
+ }
923
+ const We = m(() => {
924
+ const t = [
925
+ ' <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>',
926
+ ve({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: te.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
927
+ "100%"
928
+ ], o = Le.value.head.map((c, y) => [
929
+ {
930
+ color: c.color,
931
+ name: c.name || "-"
932
+ },
933
+ Le.value.body[y],
934
+ isNaN(Le.value.body[y] / te.value) ? "-" : (Le.value.body[y] / te.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
935
+ ]), l = o.map((c) => c.map((y, $) => $ === 0 ? y.name : y)), a = {
936
+ th: {
937
+ backgroundColor: e.value.table.th.backgroundColor,
938
+ color: e.value.table.th.color,
939
+ outline: e.value.table.th.outline
940
+ },
941
+ td: {
942
+ backgroundColor: e.value.table.td.backgroundColor,
943
+ color: e.value.table.td.color,
944
+ outline: e.value.table.td.outline
945
+ },
946
+ breakpoint: e.value.table.responsiveBreakpoint
947
+ };
948
+ return {
949
+ colNames: [
950
+ e.value.table.columnNames.series,
951
+ e.value.table.columnNames.value,
952
+ e.value.table.columnNames.percentage
953
+ ],
954
+ head: t,
955
+ body: o,
956
+ a11yBody: l,
957
+ config: a
958
+ };
959
+ }), Xe = b(!1);
960
+ function al(t) {
961
+ Xe.value = t, lt.value += 1;
962
+ }
963
+ const ol = m(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
964
+ function Xl(t) {
965
+ return wa({
966
+ num: t,
967
+ rounding: e.value.style.chart.legend.roundingPercentage
968
+ });
969
+ }
970
+ function Ut({
971
+ val: t,
972
+ percentage: o,
973
+ showVal: l,
974
+ showPercentage: a,
975
+ config: r
976
+ }) {
977
+ return ka({
978
+ config: r,
979
+ val: t,
980
+ percentage: o,
981
+ showVal: l,
982
+ showPercentage: a
983
+ });
984
+ }
985
+ function _t(t) {
986
+ return Ut({
987
+ val: pe(
988
+ e.value.style.chart.layout.labels.value.formatter,
989
+ t.value,
990
+ ve({
991
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
992
+ v: t.value,
993
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
994
+ r: e.value.style.chart.layout.labels.value.rounding
995
+ }),
996
+ { datapoint: t }
997
+ ),
998
+ percentage: tl(t, T.value),
999
+ showVal: e.value.style.chart.layout.labels.value.show,
1000
+ showPercentage: e.value.style.chart.layout.labels.percentage.show,
1001
+ config: e.value.style.chart.layout.labels.dataLabels
1002
+ });
1003
+ }
1004
+ function ce(t, o) {
1005
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex }), ot("selectDatapoint", { datapoint: t, index: o });
1006
+ }
1007
+ function nl() {
1008
+ x.value.showTable = !x.value.showTable;
1009
+ }
1010
+ function sl() {
1011
+ x.value.dataLabels.show = !x.value.dataLabels.show;
1012
+ }
1013
+ function ul() {
1014
+ x.value.showTooltip = !x.value.showTooltip;
1015
+ }
1016
+ const ut = b(!1);
1017
+ function Ht() {
1018
+ ut.value = !ut.value;
1019
+ }
1020
+ async function Nl({ scale: t = 2 } = {}) {
1021
+ if (!M.value) return;
1022
+ const { width: o, height: l } = M.value.getBoundingClientRect(), a = o / l, { imageUri: r, base64: c } = await Ia({ domElement: M.value, base64: !0, img: !0, scale: t });
1023
+ return {
1024
+ imageUri: r,
1025
+ base64: c,
1026
+ title: e.value.style.chart.title.text,
1027
+ width: o,
1028
+ height: l,
1029
+ aspectRatio: a
1030
+ };
1031
+ }
1032
+ function Rl() {
1033
+ if (!Fe.value) return;
1034
+ const { x: t, y: o, width: l, height: a } = Fe.value.getBBox();
1035
+ W.value && W.value.setAttribute("viewBox", `${t} ${o} ${l + Math.min(0, t)} ${a + Math.min(0, o)}`);
1036
+ }
1037
+ const rt = m(() => {
1038
+ const t = e.value.table.useDialog && !e.value.table.show, o = x.value.showTable;
1039
+ return {
1040
+ component: t ? Ot : Mt,
1041
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
1042
+ props: t ? {
1043
+ backgroundColor: e.value.table.th.backgroundColor,
1044
+ color: e.value.table.th.color,
1045
+ headerColor: e.value.table.th.color,
1046
+ headerBg: e.value.table.th.backgroundColor,
1047
+ isFullscreen: Xe.value,
1048
+ fullscreenParent: M.value,
1049
+ forcedWidth: Math.min(500, window.innerWidth * 0.8),
1050
+ isCursorPointer: xe.value
1051
+ } : {
1052
+ hideDetails: !0,
1053
+ config: {
1054
+ open: o,
1055
+ maxHeight: 1e4,
1056
+ body: {
1057
+ backgroundColor: e.value.style.chart.backgroundColor,
1058
+ color: e.value.style.chart.color
1059
+ },
1060
+ head: {
1061
+ backgroundColor: e.value.style.chart.backgroundColor,
1062
+ color: e.value.style.chart.color
1063
+ }
1064
+ }
1065
+ }
1066
+ };
1067
+ });
1068
+ je(() => x.value.showTable, (t) => {
1069
+ e.value.table.show || (t && e.value.table.useDialog && ze.value ? ze.value.open() : "close" in ze.value && ze.value.close());
1070
+ });
1071
+ function rl() {
1072
+ x.value.showTable = !1, tt.value && tt.value.setTableIconState(!1);
1073
+ }
1074
+ const Vl = m(() => nt.value.map((t) => ({
1075
+ ...t,
1076
+ name: t.display
1077
+ }))), El = m(() => e.value.style.chart.backgroundColor), Ul = m(() => e.value.style.chart.legend), Hl = m(() => e.value.style.chart.title), { exportSvg: Gl, getSvg: ql } = Pa({
1078
+ svg: W,
1079
+ title: Hl,
1080
+ legend: Ul,
1081
+ legendItems: Vl,
1082
+ backgroundColor: El
1083
+ });
1084
+ async function il({ isCb: t }) {
1085
+ Ee.value = !0, await fl();
1086
+ try {
1087
+ if (t) {
1088
+ const { blob: o, url: l, text: a, dataUrl: r } = await ql();
1089
+ await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: o, url: l, text: a, dataUrl: r }));
1090
+ } else
1091
+ await Promise.resolve(Gl());
1092
+ } finally {
1093
+ Ee.value = !1;
1094
+ }
1095
+ }
1096
+ function Wl(t) {
1097
+ if (t?.stage === "start") {
1098
+ Ve.value = !0;
1099
+ return;
1100
+ }
1101
+ if (t?.stage === "end") {
1102
+ Ve.value = !1;
1103
+ return;
1104
+ }
1105
+ $t();
1106
+ }
1107
+ async function cl() {
1108
+ if (ot("copyAlt", {
1109
+ config: e.value,
1110
+ dataset: j.value
1111
+ }), !e.value.userOptions.callbacks.altCopy) {
1112
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1113
+ return;
1114
+ }
1115
+ await Promise.resolve(e.value.userOptions.callbacks.altCopy({
1116
+ config: e.value,
1117
+ dataset: j.value
1118
+ }));
1119
+ }
1120
+ function jl() {
1121
+ H.value = null, h.value = !0;
1122
+ }
1123
+ function Kl() {
1124
+ H.value = null, G.value = "pointer", oe.value = !1, z.value = null, h.value = !1;
1125
+ }
1126
+ function Ql(t) {
1127
+ if (!W.value || ut.value || document.activeElement !== W.value || !T.value.length) return;
1128
+ const o = ["ArrowLeft", "ArrowUp"].includes(t.key), l = ["ArrowRight", "ArrowDown"].includes(t.key), a = t.key === "Enter" || t.key === " ", r = t.key === "Escape";
1129
+ if (!o && !l && !a && !r) return;
1130
+ if (t.preventDefault(), t.stopPropagation(), r) {
1131
+ H.value = null, G.value = "pointer", oe.value = !1, z.value = null;
1132
+ return;
1133
+ }
1134
+ if (a) {
1135
+ if (H.value === null) return;
1136
+ const V = T.value[H.value];
1137
+ if (!V) return;
1138
+ ce(V, H.value);
1139
+ return;
1140
+ }
1141
+ let c = H.value;
1142
+ const y = z.value, $ = c !== null && c >= 0 && c < T.value.length, D = y !== null && y >= 0 && y < T.value.length;
1143
+ $ ? l ? (c += 1, c >= T.value.length && (c = 0)) : o && (c -= 1, c < 0 && (c = T.value.length - 1)) : D ? (c = l ? y + 1 : y - 1, c >= T.value.length && (c = 0), c < 0 && (c = T.value.length - 1)) : l ? c = 0 : c = T.value.length - 1;
1144
+ const S = T.value[c];
1145
+ S && (H.value = c, Jl(c), ie({
1146
+ datapoint: S,
1147
+ relativeIndex: c,
1148
+ seriesIndex: S.seriesIndex,
1149
+ show: !0,
1150
+ triggerMode: "keyboard"
1151
+ }));
1152
+ }
1153
+ function Jl(t) {
1154
+ if (!Number.isFinite(t) || !W.value) return;
1155
+ let o = n.value.width / 2, l = n.value.height / 2;
1156
+ if (e.value.type === "classic") {
1157
+ const r = T.value[t];
1158
+ if (!r?.arcSlice) return;
1159
+ const c = kl(r.arcSlice);
1160
+ if (!c) return;
1161
+ o = c.x, l = c.y;
1162
+ } else {
1163
+ const r = v.value[t]?.middlePoint;
1164
+ if (!r) return;
1165
+ o = r.x, l = r.y;
1166
+ }
1167
+ const a = W.value.getBoundingClientRect();
1168
+ wt.value = {
1169
+ x: a.left + o / n.value.width * a.width,
1170
+ y: a.top + l / n.value.height * a.height
1171
+ };
1172
+ }
1173
+ const Gt = m(() => {
1174
+ const t = We.value?.colNames ?? [], o = We.value?.a11yBody ?? [];
1175
+ return { headers: t, rows: o };
1176
+ });
1177
+ return ct({
1178
+ autoSize: Rl,
1179
+ getData: $l,
1180
+ getImage: Nl,
1181
+ generatePdf: at,
1182
+ generateCsv: Et,
1183
+ generateImage: $t,
1184
+ generateSvg: il,
1185
+ hideSeries: Al,
1186
+ showSeries: _l,
1187
+ toggleTable: nl,
1188
+ toggleLabels: sl,
1189
+ toggleTooltip: ul,
1190
+ toggleAnnotator: Ht,
1191
+ toggleFullscreen: al,
1192
+ copyAlt: cl
1193
+ }), (t, o) => (u(), i("div", {
1194
+ ref_key: "donutChart",
1195
+ ref: M,
1196
+ class: qt(`vue-data-ui-component vue-ui-donut ${Xe.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1197
+ style: L(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
1198
+ id: `donut__${p.value}`,
1199
+ onMouseenter: kt,
1200
+ onMouseleave: Xt
1201
+ }, [
1202
+ w("div", {
1203
+ id: `chart-instructions-${p.value}`,
1204
+ class: "sr-only"
1205
+ }, [
1206
+ w("p", null, ye(e.value.a11y.translations.keyboardNavigation), 1)
1207
+ ], 8, Va),
1208
+ Gt.value?.rows?.length ? (u(), ge(Da, {
1209
+ key: 0,
1210
+ uid: p.value,
1211
+ head: Gt.value.headers,
1212
+ body: Gt.value.rows,
1213
+ notice: e.value.a11y.translations.tableAvailable,
1214
+ caption: e.value.a11y.translations.tableCaption
1215
+ }, null, 8, ["uid", "head", "body", "notice", "caption"])) : d("", !0),
1216
+ e.value.userOptions.buttons.annotator && s(W) ? (u(), ge(s(It), {
1217
+ key: 1,
1218
+ color: e.value.style.chart.color,
1219
+ backgroundColor: e.value.style.chart.backgroundColor,
1220
+ active: ut.value,
1221
+ svgRef: s(W),
1222
+ isCursorPointer: xe.value,
1223
+ onClose: Ht
1224
+ }, {
1225
+ "annotator-action-close": _(() => [
1226
+ k(t.$slots, "annotator-action-close", {}, void 0, !0)
1227
+ ]),
1228
+ "annotator-action-color": _(({ color: l }) => [
1229
+ k(t.$slots, "annotator-action-color", K(Q({ color: l })), void 0, !0)
1230
+ ]),
1231
+ "annotator-action-draw": _(({ mode: l }) => [
1232
+ k(t.$slots, "annotator-action-draw", K(Q({ mode: l })), void 0, !0)
1233
+ ]),
1234
+ "annotator-action-undo": _(({ disabled: l }) => [
1235
+ k(t.$slots, "annotator-action-undo", K(Q({ disabled: l })), void 0, !0)
1236
+ ]),
1237
+ "annotator-action-redo": _(({ disabled: l }) => [
1238
+ k(t.$slots, "annotator-action-redo", K(Q({ disabled: l })), void 0, !0)
1239
+ ]),
1240
+ "annotator-action-delete": _(({ disabled: l }) => [
1241
+ k(t.$slots, "annotator-action-delete", K(Q({ disabled: l })), void 0, !0)
1242
+ ]),
1243
+ _: 3
1244
+ }, 8, ["color", "backgroundColor", "active", "svgRef", "isCursorPointer"])) : d("", !0),
1245
+ k(t.$slots, "userConfig", {}, void 0, !0),
1246
+ Nt.value ? (u(), i("div", {
1247
+ key: 2,
1248
+ ref_key: "noTitle",
1249
+ ref: et,
1250
+ class: "vue-data-ui-no-title-space",
1251
+ style: "height:36px; width: 100%;background:transparent"
1252
+ }, null, 512)) : d("", !0),
1253
+ e.value.style.chart.title.text ? (u(), i("div", {
1254
+ key: 3,
1255
+ ref_key: "chartTitle",
1256
+ ref: ft,
1257
+ style: "width:100%;background:transparent;padding-bottom:24px"
1258
+ }, [
1259
+ (u(), ge(za, {
1260
+ key: `title_${gt.value}`,
1261
+ config: {
1262
+ title: {
1263
+ cy: "donut-div-title",
1264
+ ...e.value.style.chart.title
1265
+ },
1266
+ subtitle: {
1267
+ cy: "donut-div-subtitle",
1268
+ ...e.value.style.chart.title.subtitle
1269
+ }
1270
+ }
1271
+ }, null, 8, ["config"]))
1272
+ ], 512)) : d("", !0),
1273
+ w("div", {
1274
+ id: `legend-top-${p.value}`
1275
+ }, null, 8, Ea),
1276
+ e.value.userOptions.show && B.value && (s(Te) || s(Z)) ? (u(), ge(s(Ft), {
1277
+ ref_key: "userOptionsRef",
1278
+ ref: tt,
1279
+ key: `user_option_${lt.value}`,
1280
+ backgroundColor: e.value.style.chart.backgroundColor,
1281
+ color: e.value.style.chart.color,
1282
+ isPrinting: s(Ge),
1283
+ isImaging: s(xt),
1284
+ uid: p.value,
1285
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
1286
+ hasPdf: e.value.userOptions.buttons.pdf,
1287
+ hasImg: e.value.userOptions.buttons.img,
1288
+ hasSvg: e.value.userOptions.buttons.svg,
1289
+ hasXls: e.value.userOptions.buttons.csv,
1290
+ hasTable: e.value.userOptions.buttons.table,
1291
+ hasLabel: e.value.userOptions.buttons.labels,
1292
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
1293
+ hasAltCopy: e.value.userOptions.buttons.altCopy,
1294
+ isFullscreen: Xe.value,
1295
+ chartElement: M.value,
1296
+ position: e.value.userOptions.position,
1297
+ callbacks: e.value.userOptions.callbacks,
1298
+ isTooltip: x.value.showTooltip,
1299
+ titles: { ...e.value.userOptions.buttonTitles },
1300
+ hasAnnotator: e.value.userOptions.buttons.annotator,
1301
+ isAnnotation: ut.value,
1302
+ printScale: e.value.userOptions.print.scale,
1303
+ tableDialog: e.value.table.useDialog,
1304
+ isCursorPointer: xe.value,
1305
+ onToggleFullscreen: al,
1306
+ onGeneratePdf: s(at),
1307
+ onGenerateCsv: Et,
1308
+ onGenerateImage: Wl,
1309
+ onGenerateSvg: il,
1310
+ onToggleTable: nl,
1311
+ onToggleLabels: sl,
1312
+ onToggleTooltip: ul,
1313
+ onToggleAnnotator: Ht,
1314
+ onCopyAlt: cl,
1315
+ style: L({ visibility: s(Te) ? s(Z) ? "visible" : "hidden" : "visible" })
1316
+ }, Wt({ _: 2 }, [
1317
+ t.$slots.menuIcon ? {
1318
+ name: "menuIcon",
1319
+ fn: _(({ isOpen: l, color: a }) => [
1320
+ k(t.$slots, "menuIcon", K(Q({ isOpen: l, color: a })), void 0, !0)
1321
+ ]),
1322
+ key: "0"
1323
+ } : void 0,
1324
+ t.$slots.optionTooltip ? {
1325
+ name: "optionTooltip",
1326
+ fn: _(() => [
1327
+ k(t.$slots, "optionTooltip", {}, void 0, !0)
1328
+ ]),
1329
+ key: "1"
1330
+ } : void 0,
1331
+ t.$slots.optionPdf ? {
1332
+ name: "optionPdf",
1333
+ fn: _(() => [
1334
+ k(t.$slots, "optionPdf", {}, void 0, !0)
1335
+ ]),
1336
+ key: "2"
1337
+ } : void 0,
1338
+ t.$slots.optionCsv ? {
1339
+ name: "optionCsv",
1340
+ fn: _(() => [
1341
+ k(t.$slots, "optionCsv", {}, void 0, !0)
1342
+ ]),
1343
+ key: "3"
1344
+ } : void 0,
1345
+ t.$slots.optionImg ? {
1346
+ name: "optionImg",
1347
+ fn: _(() => [
1348
+ k(t.$slots, "optionImg", {}, void 0, !0)
1349
+ ]),
1350
+ key: "4"
1351
+ } : void 0,
1352
+ t.$slots.optionSvg ? {
1353
+ name: "optionSvg",
1354
+ fn: _(() => [
1355
+ k(t.$slots, "optionSvg", {}, void 0, !0)
1356
+ ]),
1357
+ key: "5"
1358
+ } : void 0,
1359
+ t.$slots.optionTable ? {
1360
+ name: "optionTable",
1361
+ fn: _(() => [
1362
+ k(t.$slots, "optionTable", {}, void 0, !0)
1363
+ ]),
1364
+ key: "6"
1365
+ } : void 0,
1366
+ t.$slots.optionLabels ? {
1367
+ name: "optionLabels",
1368
+ fn: _(() => [
1369
+ k(t.$slots, "optionLabels", {}, void 0, !0)
1370
+ ]),
1371
+ key: "7"
1372
+ } : void 0,
1373
+ t.$slots.optionFullscreen ? {
1374
+ name: "optionFullscreen",
1375
+ fn: _(({ toggleFullscreen: l, isFullscreen: a }) => [
1376
+ k(t.$slots, "optionFullscreen", K(Q({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
1377
+ ]),
1378
+ key: "8"
1379
+ } : void 0,
1380
+ t.$slots.optionAnnotator ? {
1381
+ name: "optionAnnotator",
1382
+ fn: _(({ toggleAnnotator: l, isAnnotator: a }) => [
1383
+ k(t.$slots, "optionAnnotator", K(Q({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
1384
+ ]),
1385
+ key: "9"
1386
+ } : void 0,
1387
+ t.$slots.optionAltCopy ? {
1388
+ name: "optionAltCopy",
1389
+ fn: _(({ altCopy: l }) => [
1390
+ k(t.$slots, "optionAltCopy", K(Q({ altCopy: l })), void 0, !0)
1391
+ ]),
1392
+ key: "10"
1393
+ } : void 0
1394
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : d("", !0),
1395
+ w("div", Ua, [
1396
+ (u(), i("svg", {
1397
+ ref_key: "svgRef",
1398
+ ref: W,
1399
+ xmlns: s(da),
1400
+ "aria-describedby": `chart-instructions-${p.value}`,
1401
+ class: qt({ "vue-data-ui-fullscreen--on": Xe.value, "vue-data-ui-fulscreen--off": !Xe.value, "vue-data-ui-svg": !0 }),
1402
+ viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
1403
+ style: L(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${He.value.css}`),
1404
+ tabindex: "0",
1405
+ onFocus: jl,
1406
+ onBlur: Kl,
1407
+ onKeydown: Ql
1408
+ }, [
1409
+ w("g", {
1410
+ ref_key: "G",
1411
+ ref: Fe,
1412
+ class: "vue-data-ui-g"
1413
+ }, [
1414
+ At(s(zt)),
1415
+ t.$slots["chart-background"] ? (u(), i("foreignObject", {
1416
+ key: 0,
1417
+ x: 0,
1418
+ y: 0,
1419
+ width: n.value.width <= 0 ? 10 : n.value.width,
1420
+ height: n.value.height <= 0 ? 10 : n.value.height,
1421
+ style: {
1422
+ pointerEvents: "none"
1423
+ }
1424
+ }, [
1425
+ k(t.$slots, "chart-background", {}, void 0, !0)
1426
+ ], 8, Ga)) : d("", !0),
1427
+ e.value.type === "classic" && !isNaN(he.value / O.value) ? (u(), i("defs", qa, [
1428
+ e.value.style.chart.useGradient ? (u(), i("radialGradient", {
1429
+ key: 0,
1430
+ id: `gradient_${p.value}`
1431
+ }, [
1432
+ w("stop", {
1433
+ offset: "0%",
1434
+ "stop-color": s(St)(e.value.style.chart.backgroundColor, 0),
1435
+ "stop-opacity": "0"
1436
+ }, null, 8, ja),
1437
+ w("stop", {
1438
+ offset: `${(1 - he.value / O.value) * 100}%`,
1439
+ "stop-color": s(St)("#FFFFFF", 0),
1440
+ "stop-opacity": "0"
1441
+ }, null, 8, Ka),
1442
+ w("stop", {
1443
+ offset: `${(1 - he.value / O.value / 2) * 100}%`,
1444
+ "stop-color": s(St)("#FFFFFF", e.value.style.chart.gradientIntensity)
1445
+ }, null, 8, Qa),
1446
+ w("stop", {
1447
+ offset: "100%",
1448
+ "stop-color": s(St)(e.value.style.chart.backgroundColor, 0),
1449
+ "stop-opacity": "0"
1450
+ }, null, 8, Ja)
1451
+ ], 8, Wa)) : d("", !0)
1452
+ ])) : d("", !0),
1453
+ e.value.type === "polar" ? (u(), i("defs", Za, [
1454
+ (u(!0), i(P, null, J(v.value, (l, a) => (u(), i("radialGradient", {
1455
+ id: `polar_gradient_${a}_${p.value}`,
1456
+ cx: (isNaN(l.middlePoint.x / n.value.width * 100) ? 0 : l.middlePoint.x / n.value.width * 100) + "%",
1457
+ cy: (isNaN(l.middlePoint.y / n.value.height * 100) ? 0 : l.middlePoint.y / n.value.height * 100) + "%",
1458
+ r: "62%"
1459
+ }, [
1460
+ w("stop", {
1461
+ offset: "0%",
1462
+ "stop-color": s(ha)(q.value[a].color, 0.05),
1463
+ "stop-opacity": e.value.style.chart.gradientIntensity / 100
1464
+ }, null, 8, to),
1465
+ w("stop", {
1466
+ offset: "100%",
1467
+ "stop-color": q.value[a].color
1468
+ }, null, 8, lo)
1469
+ ], 8, eo))), 256))
1470
+ ])) : d("", !0),
1471
+ w("defs", null, [
1472
+ w("filter", {
1473
+ id: `blur_${p.value}`,
1474
+ x: "-50%",
1475
+ y: "-50%",
1476
+ width: "200%",
1477
+ height: "200%"
1478
+ }, [
1479
+ w("feGaussianBlur", {
1480
+ in: "SourceGraphic",
1481
+ stdDeviation: 2,
1482
+ id: `blur_std_${p.value}`
1483
+ }, null, 8, oo),
1484
+ o[5] || (o[5] = w("feColorMatrix", {
1485
+ type: "saturate",
1486
+ values: "0"
1487
+ }, null, -1))
1488
+ ], 8, ao),
1489
+ w("filter", {
1490
+ id: `shadow_${p.value}`,
1491
+ "color-interpolation-filters": "sRGB"
1492
+ }, [
1493
+ w("feDropShadow", {
1494
+ dx: "0",
1495
+ dy: "0",
1496
+ stdDeviation: "10",
1497
+ "flood-opacity": "0.5",
1498
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
1499
+ }, null, 8, so)
1500
+ ], 8, no),
1501
+ w("filter", {
1502
+ id: `drop_shadow_${p.value}`,
1503
+ "color-interpolation-filters": "sRGB",
1504
+ x: "-50%",
1505
+ y: "-50%",
1506
+ width: "200%",
1507
+ height: "200%"
1508
+ }, [
1509
+ w("feDropShadow", {
1510
+ dx: "0",
1511
+ dy: "0",
1512
+ stdDeviation: "3",
1513
+ "flood-opacity": "1",
1514
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
1515
+ }, null, 8, ro)
1516
+ ], 8, uo)
1517
+ ]),
1518
+ e.value.type === "classic" ? (u(!0), i(P, { key: 3 }, J(q.value.filter((l) => !l.ghost), (l, a) => (u(), i("g", null, [
1519
+ ee(l) && x.value.dataLabels.show ? (u(), i("path", {
1520
+ key: 0,
1521
+ d: s(R)[a]?.connectorPath || s(fa)(
1522
+ l,
1523
+ { x: n.value.width / 2, y: n.value.height / 2 },
1524
+ 16,
1525
+ 16,
1526
+ !1,
1527
+ !1,
1528
+ he.value,
1529
+ 12,
1530
+ e.value.style.chart.layout.curvedMarkers
1531
+ ),
1532
+ stroke: l.color,
1533
+ "stroke-width": "1",
1534
+ "stroke-linecap": "round",
1535
+ "stroke-linejoin": "round",
1536
+ fill: "none",
1537
+ filter: Be(a)
1538
+ }, null, 8, io)) : d("", !0)
1539
+ ]))), 256)) : d("", !0),
1540
+ e.value.type === "polar" ? (u(!0), i(P, { key: 4 }, J(q.value.filter((l) => !l.ghost), (l, a) => (u(), i("g", null, [
1541
+ ee(l) && x.value.dataLabels.show ? (u(), i("path", {
1542
+ key: 0,
1543
+ d: `M ${s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x},${s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y} ${v.value[a].middlePoint.x},${v.value[a].middlePoint.y}`,
1544
+ stroke: l.color,
1545
+ "stroke-width": "1",
1546
+ "stroke-linecap": "round",
1547
+ "stroke-linejoin": "round",
1548
+ fill: "none",
1549
+ filter: Be(a),
1550
+ style: L({
1551
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1552
+ })
1553
+ }, null, 12, co)) : d("", !0)
1554
+ ]))), 256)) : d("", !0),
1555
+ e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (u(), i("circle", {
1556
+ key: 5,
1557
+ cx: n.value.width / 2,
1558
+ cy: n.value.height / 2,
1559
+ r: O.value <= 0 ? 10 : O.value,
1560
+ fill: e.value.style.chart.backgroundColor,
1561
+ filter: `url(#shadow_${p.value})`
1562
+ }, null, 8, vo)) : d("", !0),
1563
+ t.$slots.pattern ? (u(), i("g", ho, [
1564
+ (u(!0), i(P, null, J(it.dataset, (l, a) => (u(), i("defs", {
1565
+ key: `pattern-${l.patternIndex}`
1566
+ }, [
1567
+ k(t.$slots, "pattern", jt({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${p.value}_${a}` }), void 0, !0)
1568
+ ]))), 128))
1569
+ ])) : d("", !0),
1570
+ te.value && e.value.type === "classic" ? (u(), i(P, { key: 7 }, [
1571
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1572
+ stroke: e.value.style.chart.backgroundColor,
1573
+ d: l.arcSlice,
1574
+ fill: "#FFFFFF"
1575
+ }, null, 8, fo))), 256)),
1576
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1577
+ class: "vue-ui-donut-arc-path",
1578
+ d: l.arcSlice,
1579
+ fill: l.color,
1580
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1581
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1582
+ filter: Be(a)
1583
+ }, null, 8, yo))), 256)),
1584
+ t.$slots.pattern ? (u(), i("g", go, [
1585
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1586
+ class: "vue-ui-donut-arc-path",
1587
+ d: l.arcSlice,
1588
+ fill: `url(#${l.pattern})`,
1589
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1590
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1591
+ filter: Be(a)
1592
+ }, null, 8, po))), 256))
1593
+ ])) : d("", !0)
1594
+ ], 64)) : d("", !0),
1595
+ te.value && e.value.type === "polar" ? (u(), i(P, { key: 8 }, [
1596
+ q.value.length > 1 ? (u(), i("g", mo, [
1597
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1598
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1599
+ d: v.value[a].path,
1600
+ fill: "#FFFFFF",
1601
+ style: L({
1602
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1603
+ })
1604
+ }, null, 12, bo))), 256)),
1605
+ e.value.style.chart.layout.donut.useShadow ? (u(), i("g", wo, [
1606
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1607
+ class: "vue-ui-donut-arc-path",
1608
+ d: v.value[a].path,
1609
+ fill: "transparent",
1610
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1611
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1612
+ filter: `url(#drop_shadow_${p.value})`,
1613
+ style: L({
1614
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1615
+ })
1616
+ }, null, 12, ko))), 256))
1617
+ ])) : d("", !0),
1618
+ t.$slots.pattern ? (u(), i("g", xo, [
1619
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1620
+ class: "vue-ui-donut-arc-path",
1621
+ d: v.value[a].path,
1622
+ fill: `url(#${l.pattern})`,
1623
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1624
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1625
+ filter: Be(a),
1626
+ style: L({
1627
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1628
+ transformOrigin: "center"
1629
+ })
1630
+ }, null, 12, $o))), 256))
1631
+ ])) : d("", !0),
1632
+ (u(!0), i(P, null, J(T.value, (l, a) => (u(), i("path", {
1633
+ class: "vue-ui-donut-arc-path",
1634
+ d: v.value[a].path,
1635
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${p.value})` : l.color,
1636
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1637
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
1638
+ filter: Be(a),
1639
+ style: L({
1640
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1641
+ })
1642
+ }, null, 12, Co))), 256))
1643
+ ])) : (u(), i("g", _o, [
1644
+ t.$slots.pattern ? (u(), i("circle", {
1645
+ key: 0,
1646
+ cx: n.value.width / 2,
1647
+ cy: n.value.height / 2,
1648
+ r: O.value,
1649
+ fill: `url(#pattern_${p.value}_${q.value[0].patternIndex})`,
1650
+ stroke: e.value.style.chart.backgroundColor,
1651
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
1652
+ }, null, 8, Ao)) : d("", !0),
1653
+ w("circle", {
1654
+ cx: n.value.width / 2,
1655
+ cy: n.value.height / 2,
1656
+ r: O.value,
1657
+ fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${p.value})` : q.value[0].color,
1658
+ stroke: e.value.style.chart.backgroundColor,
1659
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
1660
+ }, null, 8, To)
1661
+ ]))
1662
+ ], 64)) : (u(), i(P, { key: 9 }, [
1663
+ e.value.type === "classic" && !Sl.value ? (u(), i("g", Po, [
1664
+ (u(!0), i(P, null, J(Ll.value, (l, a) => (u(), i("path", {
1665
+ class: "vue-ui-donut-arc-path",
1666
+ d: l.arcSlice,
1667
+ fill: l.color,
1668
+ stroke: e.value.style.chart.backgroundColor,
1669
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
1670
+ }, null, 8, So))), 256))
1671
+ ])) : d("", !0),
1672
+ w("circle", {
1673
+ cx: n.value.width / 2,
1674
+ cy: n.value.height / 2,
1675
+ r: O.value <= 0 ? 10 : O.value,
1676
+ fill: "transparent",
1677
+ stroke: e.value.style.chart.backgroundColor
1678
+ }, null, 8, Lo)
1679
+ ], 64)),
1680
+ e.value.style.chart.useGradient && e.value.type === "classic" ? (u(), i("circle", {
1681
+ key: 10,
1682
+ cx: n.value.width / 2,
1683
+ cy: n.value.height / 2,
1684
+ r: (
1685
+ /* This might require adjustments */
1686
+ O.value <= 0 ? 10 : O.value
1687
+ ),
1688
+ fill: `url(#gradient_${p.value})`
1689
+ }, null, 8, Mo)) : d("", !0),
1690
+ w("circle", {
1691
+ ref_key: "circle_hollow",
1692
+ ref: Je,
1693
+ style: { pointerEvents: "none" },
1694
+ fill: "none",
1695
+ cx: n.value.width / 2,
1696
+ cy: n.value.height / 2,
1697
+ r: Math.max(0.1, he.value * 1.7)
1698
+ }, null, 8, Io),
1699
+ te.value ? (u(), i(P, { key: 11 }, [
1700
+ q.value.length > 1 || e.value.type === "classic" ? (u(), i("g", Fo, [
1701
+ (u(!0), i(P, null, J(q.value.filter((l) => !l.ghost), (l, a) => (u(), i("path", {
1702
+ d: e.value.type === "classic" ? l.arcSlice : v.value[a].path,
1703
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
1704
+ fill: z.value === a ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1705
+ onMouseenter: (r) => ie({
1706
+ datapoint: l,
1707
+ relativeIndex: a,
1708
+ seriesIndex: l.seriesIndex,
1709
+ show: !0
1710
+ }),
1711
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex }),
1712
+ onClick: (r) => ce(l, a)
1713
+ }, null, 40, zo))), 256))
1714
+ ])) : (u(), i("g", Oo, [
1715
+ w("circle", {
1716
+ cx: n.value.width / 2,
1717
+ cy: n.value.height / 2,
1718
+ r: O.value,
1719
+ fill: "transparent",
1720
+ onMouseenter: o[0] || (o[0] = (l) => ie({
1721
+ datapoint: q.value[0],
1722
+ relativeIndex: 0,
1723
+ seriesIndex: q.value[0].seriesIndex,
1724
+ show: !0
1725
+ })),
1726
+ onMouseleave: o[1] || (o[1] = (l) => fe({ datapoint: q.value[0], seriesIndex: q.value[0].seriesIndex })),
1727
+ onClick: o[2] || (o[2] = (l) => ce(q.value[0], t.i))
1728
+ }, null, 40, Yo)
1729
+ ]))
1730
+ ], 64)) : d("", !0),
1731
+ e.value.type === "classic" ? (u(), i("g", {
1732
+ key: 12,
1733
+ ref_key: "G_hollow",
1734
+ ref: ht,
1735
+ class: "vue-data-ui-donut-hollow-labels"
1736
+ }, [
1737
+ e.value.style.chart.layout.labels.hollow.total.show ? (u(), i("text", {
1738
+ key: 0,
1739
+ "text-anchor": "middle",
1740
+ x: n.value.width / 2,
1741
+ y: n.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
1742
+ fill: e.value.style.chart.layout.labels.hollow.total.color,
1743
+ "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
1744
+ style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1745
+ }, ye(e.value.style.chart.layout.labels.hollow.total.text), 13, Do)) : d("", !0),
1746
+ e.value.style.chart.layout.labels.hollow.total.show ? (u(), i("text", {
1747
+ key: 1,
1748
+ "text-anchor": "middle",
1749
+ x: n.value.width / 2,
1750
+ y: n.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
1751
+ fill: e.value.style.chart.layout.labels.hollow.total.value.color,
1752
+ "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
1753
+ style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1754
+ }, ye(s(pe)(
1755
+ e.value.style.chart.layout.labels.hollow.total.value.formatter,
1756
+ te.value,
1757
+ s(ve)({
1758
+ p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
1759
+ v: te.value,
1760
+ s: e.value.style.chart.layout.labels.hollow.total.value.suffix
1761
+ })
1762
+ )), 13, Bo)) : d("", !0),
1763
+ e.value.style.chart.layout.labels.hollow.average.show ? (u(), i("text", {
1764
+ key: 2,
1765
+ "text-anchor": "middle",
1766
+ x: n.value.width / 2,
1767
+ y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
1768
+ fill: e.value.style.chart.layout.labels.hollow.average.color,
1769
+ "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
1770
+ style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1771
+ }, ye(e.value.style.chart.layout.labels.hollow.average.text), 13, Xo)) : d("", !0),
1772
+ e.value.style.chart.layout.labels.hollow.average.show ? (u(), i("text", {
1773
+ key: 3,
1774
+ "text-anchor": "middle",
1775
+ x: n.value.width / 2,
1776
+ y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
1777
+ fill: e.value.style.chart.layout.labels.hollow.average.value.color,
1778
+ "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
1779
+ style: L(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1780
+ }, ye(Pe.value || Y.value ? "--" : s(pe)(
1781
+ e.value.style.chart.layout.labels.hollow.average.value.formatter,
1782
+ s(bl)(Rt.value),
1783
+ s(ve)({
1784
+ p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
1785
+ v: s(bl)(Rt.value),
1786
+ s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
1787
+ r: e.value.style.chart.layout.labels.hollow.average.value.rounding
1788
+ })
1789
+ )), 13, No)) : d("", !0)
1790
+ ], 512)) : d("", !0),
1791
+ (u(!0), i(P, null, J(T.value.filter((l) => !l.ghost), (l, a) => (u(), i("g", {
1792
+ filter: Be(a),
1793
+ class: qt({ animated: e.value.useCssAnimation }),
1794
+ key: l.seriesIndex,
1795
+ opacity: Bl(l)
1796
+ }, [
1797
+ e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (u(), i("g", Vo, [
1798
+ (u(), i("foreignObject", {
1799
+ x: s(A)(l, !0).anchor === "end" ? s(A)(l).x - 120 : s(A)(l, !0).anchor === "middle" ? s(A)(l).x - 60 : s(A)(l).x,
1800
+ y: s(we)(l) - (ol.value ? 20 : 0),
1801
+ width: "120",
1802
+ height: "60",
1803
+ style: { overflow: "visible" }
1804
+ }, [
1805
+ w("div", null, [
1806
+ k(t.$slots, "dataLabel", jt({ ref_for: !0 }, {
1807
+ datapoint: l,
1808
+ isBlur: !e.value.useBlurOnHover || [null, void 0].includes(z.value) || z.value === a,
1809
+ isSafari: ol.value,
1810
+ isVisible: ee(l) && x.value.dataLabels.show,
1811
+ textAlign: s(A)(l, !0, 16, !0).anchor,
1812
+ flexAlign: s(A)(l, !0, 16).anchor,
1813
+ percentage: tl(l, T.value)
1814
+ }), void 0, !0)
1815
+ ])
1816
+ ], 8, Eo))
1817
+ ])) : (u(), i("g", Uo, [
1818
+ e.value.type === "classic" ? (u(), i(P, { key: 0 }, [
1819
+ ee(l) && x.value.dataLabels.show ? (u(), i("circle", {
1820
+ key: 0,
1821
+ cx: s(R)[a]?.markerX ?? s(A)(l).x,
1822
+ cy: s(R)[a]?.markerY ?? s(we)(l) - 3.5,
1823
+ fill: l.color,
1824
+ stroke: e.value.style.chart.backgroundColor,
1825
+ "stroke-width": 1,
1826
+ r: 3,
1827
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(z.value) || z.value === a ? "" : `url(#blur_${p.value})`,
1828
+ onClick: (r) => ce(l, a),
1829
+ onMouseenter: (r) => ie({
1830
+ datapoint: l,
1831
+ relativeIndex: a,
1832
+ seriesIndex: l.seriesIndex,
1833
+ show: !0
1834
+ }),
1835
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex })
1836
+ }, null, 40, Ho)) : d("", !0),
1837
+ e.value.style.chart.layout.labels.dataLabels.oneLine || s(R)[a] ? Tt((u(), i("text", {
1838
+ key: 1,
1839
+ class: "vue-data-ui-datalabel-inline",
1840
+ "text-anchor": s(R)[a]?.textAnchor || s(A)(l, !0, 12).anchor,
1841
+ x: s(R)[a]?.labelX ?? s(A)(l, !0, 12).x,
1842
+ y: s(R)[a]?.labelY ?? s(we)(l),
1843
+ onClick: (r) => ce(l, a),
1844
+ onMouseenter: (r) => ie({
1845
+ datapoint: l,
1846
+ relativeIndex: a,
1847
+ seriesIndex: l.seriesIndex,
1848
+ show: !0
1849
+ }),
1850
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex }),
1851
+ innerHTML: Yl(l, a, !!s(R)[a])
1852
+ }, null, 40, Go)), [
1853
+ [Pt, ee(l) && x.value.dataLabels.show]
1854
+ ]) : (u(), i(P, { key: 2 }, [
1855
+ Tt(w("text", {
1856
+ class: "vue-data-ui-datalabel-value",
1857
+ "text-anchor": s(R)[a]?.textAnchor || s(A)(l, !0, 12).anchor,
1858
+ x: s(R)[a]?.labelX ?? s(A)(l, !0, 12).x,
1859
+ y: s(R)[a]?.labelY ?? s(we)(l),
1860
+ fill: e.value.style.chart.layout.labels.percentage.color,
1861
+ "font-size": g.value + "px",
1862
+ style: L(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1863
+ onClick: (r) => ce(l, a),
1864
+ onMouseenter: (r) => ie({
1865
+ datapoint: l,
1866
+ relativeIndex: a,
1867
+ seriesIndex: l.seriesIndex,
1868
+ show: !0
1869
+ }),
1870
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex })
1871
+ }, ye(_t(l)), 45, qo), [
1872
+ [Pt, ee(l) && x.value.dataLabels.show]
1873
+ ]),
1874
+ Tt(w("text", {
1875
+ class: "vue-data-ui-datalabel-name",
1876
+ "text-anchor": s(R)[a]?.textAnchor || s(A)(l).anchor,
1877
+ x: s(R)[a]?.labelX ?? s(A)(l, !0, 12).x,
1878
+ y: (s(R)[a]?.labelY ?? s(we)(l)) + f.value * 1.2,
1879
+ fill: e.value.style.chart.layout.labels.name.color,
1880
+ "font-size": f.value + "px",
1881
+ style: L(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1882
+ onClick: (r) => ce(l, a),
1883
+ onMouseenter: (r) => ie({
1884
+ datapoint: l,
1885
+ relativeIndex: a,
1886
+ seriesIndex: l.seriesIndex,
1887
+ show: !0
1888
+ }),
1889
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex }),
1890
+ innerHTML: s(wl)({
1891
+ content: l.name,
1892
+ fontSize: f.value,
1893
+ fill: e.value.style.chart.layout.labels.name.color,
1894
+ x: s(R)[a]?.labelX ?? s(A)(l, !0, 12).x,
1895
+ y: (s(R)[a]?.labelY ?? s(we)(l)) + f.value
1896
+ })
1897
+ }, null, 44, Wo), [
1898
+ [Pt, ee(l) && x.value.dataLabels.show && e.value.style.chart.layout.labels.name.show]
1899
+ ])
1900
+ ], 64))
1901
+ ], 64)) : d("", !0),
1902
+ e.value.type === "polar" ? (u(), i(P, { key: 1 }, [
1903
+ ee(l) && x.value.dataLabels.show ? (u(), i("circle", {
1904
+ key: 0,
1905
+ cx: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1906
+ cy: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1907
+ fill: l.color,
1908
+ stroke: e.value.style.chart.backgroundColor,
1909
+ "stroke-width": 1,
1910
+ r: 3,
1911
+ filter: !e.value.useBlurOnHover || [null, void 0].includes(z.value) || z.value === a ? "" : `url(#blur_${p.value})`,
1912
+ onClick: (r) => ce(l, a),
1913
+ onMouseenter: (r) => ie({
1914
+ datapoint: l,
1915
+ relativeIndex: a,
1916
+ seriesIndex: l.seriesIndex,
1917
+ show: !0
1918
+ }),
1919
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex }),
1920
+ style: L({
1921
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1922
+ })
1923
+ }, null, 44, jo)) : d("", !0),
1924
+ e.value.style.chart.layout.labels.dataLabels.oneLine ? Tt((u(), i("text", {
1925
+ key: 1,
1926
+ class: "vue-data-ui-datalabel-inline",
1927
+ "text-anchor": Se(v.value[a].middlePoint),
1928
+ x: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1929
+ y: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1930
+ style: L({
1931
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1932
+ }),
1933
+ onClick: (r) => ce(l, a),
1934
+ onMouseenter: (r) => ie({
1935
+ datapoint: l,
1936
+ relativeIndex: a,
1937
+ seriesIndex: l.seriesIndex,
1938
+ show: !0
1939
+ }),
1940
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex }),
1941
+ innerHTML: Dl(l, a)
1942
+ }, null, 44, Ko)), [
1943
+ [Pt, ee(l) && x.value.dataLabels.show]
1944
+ ]) : (u(), i(P, { key: 2 }, [
1945
+ ee(l) && x.value.dataLabels.show ? (u(), i("text", {
1946
+ key: 0,
1947
+ class: "vue-data-ui-datalabel-value",
1948
+ "text-anchor": Se(v.value[a].middlePoint),
1949
+ x: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1950
+ y: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
1951
+ fill: e.value.style.chart.layout.labels.percentage.color,
1952
+ "font-size": g.value,
1953
+ style: L({
1954
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1955
+ fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1956
+ }),
1957
+ onClick: (r) => ce(l, a),
1958
+ onMouseenter: (r) => ie({
1959
+ datapoint: l,
1960
+ relativeIndex: a,
1961
+ seriesIndex: l.seriesIndex,
1962
+ show: !0
1963
+ }),
1964
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex })
1965
+ }, ye(_t(l)), 45, Qo)) : d("", !0),
1966
+ ee(l) && x.value.dataLabels.show && e.value.style.chart.layout.labels.name.show ? (u(), i("text", {
1967
+ key: 1,
1968
+ class: "vue-data-ui-datalabel-name",
1969
+ "text-anchor": Se(v.value[a].middlePoint),
1970
+ x: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1971
+ y: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + f.value * 1.2,
1972
+ fill: e.value.style.chart.layout.labels.name.color,
1973
+ "font-size": f.value,
1974
+ style: L({
1975
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1976
+ fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1977
+ }),
1978
+ onClick: (r) => ce(l, a),
1979
+ onMouseenter: (r) => ie({
1980
+ datapoint: l,
1981
+ relativeIndex: a,
1982
+ seriesIndex: l.seriesIndex,
1983
+ show: !0
1984
+ }),
1985
+ onMouseleave: (r) => fe({ datapoint: l, seriesIndex: l.seriesIndex }),
1986
+ innerHTML: s(wl)({
1987
+ content: l.name,
1988
+ fontSize: f.value,
1989
+ fill: e.value.style.chart.layout.labels.name.color,
1990
+ x: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
1991
+ y: s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + f.value * 1.2
1992
+ })
1993
+ }, null, 44, Jo)) : d("", !0)
1994
+ ], 64))
1995
+ ], 64)) : d("", !0)
1996
+ ])),
1997
+ x.value.dataLabels.show && e.value.style.chart.comments.show && l.comment ? (u(), i("g", Zo, [
1998
+ ee(l) && e.value.type === "classic" ? (u(), i("foreignObject", {
1999
+ key: 0,
2000
+ x: e.value.style.chart.comments.offsetX + (s(A)(l, !0).anchor === "end" ? s(A)(l).x - e.value.style.chart.comments.width : s(A)(l, !0).anchor === "middle" ? s(A)(l).x - e.value.style.chart.comments.width / 2 : s(A)(l).x),
2001
+ y: s(we)(l) + 24 + e.value.style.chart.comments.offsetY,
2002
+ width: e.value.style.chart.comments.width,
2003
+ height: "200",
2004
+ style: { overflow: "visible", "pointer-events": "none" }
2005
+ }, [
2006
+ w("div", null, [
2007
+ k(t.$slots, "plot-comment", {
2008
+ plot: { ...l, textAlign: s(A)(l, !0, 16, !0).anchor, flexAlign: s(A)(l, !0, 16).anchor, isFirstLoad: Y.value }
2009
+ }, void 0, !0)
2010
+ ])
2011
+ ], 8, en)) : d("", !0),
2012
+ ee(l) && e.value.type === "polar" ? (u(), i("foreignObject", {
2013
+ key: 1,
2014
+ x: e.value.style.chart.comments.offsetX + (Se(v.value[a].middlePoint) === "end" ? s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width : Se(v.value[a].middlePoint) === "middle" ? s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : s(X)({ initX: v.value[a].middlePoint.x, initY: v.value[a].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x),
2015
+ y: Ml(v.value[a]) + e.value.style.chart.comments.offsetY,
2016
+ width: e.value.style.chart.comments.width,
2017
+ height: "200",
2018
+ style: L({
2019
+ transition: Y.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2020
+ overflow: "visible",
2021
+ pointerEvents: "none"
2022
+ })
2023
+ }, [
2024
+ w("div", null, [
2025
+ k(t.$slots, "plot-comment", {
2026
+ plot: { ...l, textAlign: Se(v.value[a].middlePoint), flexAlign: Se(v.value[a].middlePoint), isFirstLoad: Y.value }
2027
+ }, void 0, !0)
2028
+ ])
2029
+ ], 12, tn)) : d("", !0)
2030
+ ])) : d("", !0)
2031
+ ], 10, Ro))), 128)),
2032
+ k(t.$slots, "svg", {
2033
+ svg: {
2034
+ ...n.value,
2035
+ isPrintingImg: s(Ge) | s(xt) | Ve.value,
2036
+ isPrintingSvg: Ee.value
2037
+ }
2038
+ }, void 0, !0)
2039
+ ], 512)
2040
+ ], 46, Ha)),
2041
+ t.$slots.hint ? (u(), i("div", ln, [
2042
+ k(t.$slots, "hint", K(Q({ hint: e.value.a11y.translations.keyboardNavigation, isVisible: h.value })), void 0, !0)
2043
+ ])) : d("", !0)
2044
+ ]),
2045
+ t.$slots.watermark ? (u(), i("div", an, [
2046
+ k(t.$slots, "watermark", K(Q({ isPrinting: s(Ge) || s(xt) || Ve.value || Ee.value })), void 0, !0)
2047
+ ])) : d("", !0),
2048
+ w("div", {
2049
+ id: `legend-bottom-${p.value}`
2050
+ }, null, 8, on),
2051
+ bt.value ? (u(), ge(na, {
2052
+ key: 6,
2053
+ to: e.value.style.chart.legend.position === "top" ? `#legend-top-${p.value}` : `#legend-bottom-${p.value}`
2054
+ }, [
2055
+ w("div", {
2056
+ ref_key: "chartLegend",
2057
+ ref: yt
2058
+ }, [
2059
+ e.value.style.chart.legend.show ? (u(), ge(Ya, {
2060
+ key: `legend_${mt.value}`,
2061
+ legendSet: nt.value,
2062
+ config: Pl.value,
2063
+ onClickMarker: o[3] || (o[3] = ({ i: l }) => Ct(l)),
2064
+ isCursorPointer: xe.value
2065
+ }, Wt({
2066
+ item: _(({ legend: l, index: a }) => [
2067
+ w("div", {
2068
+ style: L(`opacity:${N.value.includes(a) ? 0.5 : 1}`),
2069
+ onClick: (r) => l.segregate()
2070
+ }, ye(l.display), 13, nn)
2071
+ ]),
2072
+ legendToggle: _(() => [
2073
+ nt.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !s(ue) ? (u(), ge(Ba, {
2074
+ key: 0,
2075
+ backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
2076
+ color: e.value.style.chart.legend.selectAllToggle.color,
2077
+ fontSize: e.value.style.chart.legend.fontSize,
2078
+ checked: N.value.length > 0,
2079
+ isCursorPointer: xe.value,
2080
+ onToggle: Cl
2081
+ }, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : d("", !0)
2082
+ ]),
2083
+ _: 2
2084
+ }, [
2085
+ t.$slots.pattern ? {
2086
+ name: "legend-pattern",
2087
+ fn: _(({ legend: l, index: a }) => [
2088
+ At(Fa, {
2089
+ shape: l.shape,
2090
+ radius: 30,
2091
+ stroke: "none",
2092
+ plot: { x: 30, y: 30 },
2093
+ fill: `url(#pattern_${p.value}_${a})`
2094
+ }, null, 8, ["shape", "fill"])
2095
+ ]),
2096
+ key: "0"
2097
+ } : void 0
2098
+ ]), 1032, ["legendSet", "config", "isCursorPointer"])) : d("", !0),
2099
+ k(t.$slots, "legend", { legend: nt.value }, void 0, !0)
2100
+ ], 512)
2101
+ ], 8, ["to"])) : d("", !0),
2102
+ t.$slots.source ? (u(), i("div", {
2103
+ key: 7,
2104
+ ref_key: "source",
2105
+ ref: Ze,
2106
+ dir: "auto"
2107
+ }, [
2108
+ k(t.$slots, "source", {}, void 0, !0)
2109
+ ], 512)) : d("", !0),
2110
+ t.$slots.hollow ? (u(), i("div", sn, [
2111
+ k(t.$slots, "hollow", K(Q({
2112
+ total: te.value,
2113
+ average: Rt.value,
2114
+ dataset: U.value
2115
+ })), void 0, !0)
2116
+ ])) : d("", !0),
2117
+ At(s(Ke), {
2118
+ teleportTo: e.value.style.chart.tooltip.teleportTo,
2119
+ show: x.value.showTooltip && oe.value,
2120
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
2121
+ color: e.value.style.chart.tooltip.color,
2122
+ fontSize: e.value.style.chart.tooltip.fontSize,
2123
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
2124
+ borderColor: e.value.style.chart.tooltip.borderColor,
2125
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
2126
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
2127
+ position: e.value.style.chart.tooltip.position,
2128
+ offsetY: e.value.style.chart.tooltip.offsetY,
2129
+ parent: M.value,
2130
+ content: se.value,
2131
+ isCustom: st.value,
2132
+ isFullscreen: Xe.value,
2133
+ smooth: e.value.style.chart.tooltip.smooth,
2134
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter,
2135
+ smoothForce: e.value.style.chart.tooltip.smoothForce,
2136
+ smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThrehsold,
2137
+ isA11yMode: G.value === "keyboard",
2138
+ a11yPosition: wt.value
2139
+ }, {
2140
+ "tooltip-before": _(() => [
2141
+ k(t.$slots, "tooltip-before", K(Q({ ...Vt.value })), void 0, !0)
2142
+ ]),
2143
+ "tooltip-after": _(() => [
2144
+ k(t.$slots, "tooltip-after", K(Q({ ...Vt.value })), void 0, !0)
2145
+ ]),
2146
+ _: 3
2147
+ }, 8, ["teleportTo", "show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
2148
+ B.value && e.value.userOptions.buttons.table ? (u(), ge(sa(rt.value.component), jt({ key: 9 }, rt.value.props, {
2149
+ ref_key: "tableUnit",
2150
+ ref: ze,
2151
+ onClose: rl
2152
+ }), Wt({
2153
+ content: _(() => [
2154
+ (u(), ge(s(dt), {
2155
+ key: `table_${pt.value}`,
2156
+ colNames: We.value.colNames,
2157
+ head: We.value.head,
2158
+ body: We.value.body,
2159
+ config: We.value.config,
2160
+ title: e.value.table.useDialog ? "" : rt.value.title,
2161
+ withCloseButton: !e.value.table.useDialog,
2162
+ isCursorPointer: xe.value,
2163
+ onClose: rl
2164
+ }, {
2165
+ th: _(({ th: l }) => [
2166
+ w("div", {
2167
+ innerHTML: l,
2168
+ style: { display: "flex", "align-items": "center" }
2169
+ }, null, 8, un)
2170
+ ]),
2171
+ td: _(({ td: l }) => [
2172
+ hl(ye(l.name ? l.name : isNaN(Number(l)) ? l.includes("%") ? l : s(pe)(
2173
+ e.value.style.chart.layout.labels.percentage.formatter,
2174
+ l,
2175
+ s(ve)({
2176
+ v: l,
2177
+ s: "%",
2178
+ r: e.value.style.chart.layout.labels.percentage.rounding
2179
+ })
2180
+ ) : s(pe)(
2181
+ e.value.style.chart.layout.labels.value.formatter,
2182
+ l,
2183
+ s(ve)({
2184
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
2185
+ v: l,
2186
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
2187
+ r: e.value.style.chart.layout.labels.value.rounding
2188
+ })
2189
+ )), 1)
2190
+ ]),
2191
+ _: 1
2192
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
2193
+ ]),
2194
+ _: 2
2195
+ }, [
2196
+ e.value.table.useDialog ? {
2197
+ name: "title",
2198
+ fn: _(() => [
2199
+ hl(ye(rt.value.title), 1)
2200
+ ]),
2201
+ key: "0"
2202
+ } : void 0,
2203
+ e.value.table.useDialog ? {
2204
+ name: "actions",
2205
+ fn: _(() => [
2206
+ w("button", {
2207
+ tabindex: "0",
2208
+ class: "vue-ui-user-options-button",
2209
+ onClick: o[4] || (o[4] = (l) => Et(e.value.userOptions.callbacks.csv)),
2210
+ style: L({ cursor: xe.value ? "pointer" : "default" })
2211
+ }, [
2212
+ At(s(vt), {
2213
+ name: "fileCsv",
2214
+ stroke: rt.value.props.color
2215
+ }, null, 8, ["stroke"])
2216
+ ], 4)
2217
+ ]),
2218
+ key: "1"
2219
+ } : void 0
2220
+ ]), 1040)) : d("", !0),
2221
+ k(t.$slots, "skeleton", {}, () => [
2222
+ s(ue) ? (u(), ge(Ta, { key: 0 })) : d("", !0)
2223
+ ], !0)
2224
+ ], 46, Ra));
2225
+ }
2226
+ }, Ln = /* @__PURE__ */ Xa(rn, [["__scopeId", "data-v-af8588d0"]]);
2227
+ export {
2228
+ Ln as default
2229
+ };