vue-data-ui 3.22.8 → 3.22.10

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 (209) hide show
  1. package/dist/{Arrow-DdymhUfY.js → Arrow-Ku6rQ87g.js} +1 -1
  2. package/dist/{BaseDraggableDialog-DcfGlH8A.js → BaseDraggableDialog-CdkCqtag.js} +2 -2
  3. package/dist/BaseIcon-CDTIUIKV.js +483 -0
  4. package/dist/{BaseLegendToggle-DtQ8vyfr.js → BaseLegendToggle-BrQ2OlzI.js} +1 -1
  5. package/dist/{BaseZoomControls-C6zonwhr.js → BaseZoomControls-CkEX0292.js} +2 -2
  6. package/dist/{ColorPicker-CK2-h611.js → ColorPicker-C959ZIW9.js} +2 -2
  7. package/dist/{DataTable-D9NvewTT.js → DataTable-ByZy5gt1.js} +2 -2
  8. package/dist/DefGrad-DVBqDjhO.js +48 -0
  9. package/dist/{Legend-ROt6ugzW.js → Legend-5VQGLnmx.js} +2 -2
  10. package/dist/{NonSvgPenAndPaper-BHHNsVVP.js → NonSvgPenAndPaper-Bd8OzTqw.js} +3 -3
  11. package/dist/{PackageVersion-DW7zwRcm.js → PackageVersion-BoTvk0i5.js} +1 -1
  12. package/dist/{PenAndPaper-pcgwlYr2.js → PenAndPaper-CLaZJl6K.js} +3 -3
  13. package/dist/{Shape-UpH0a4Ur.js → Shape-B5ksaGa1.js} +3 -3
  14. package/dist/{Slicer-BZ5VnOOS.js → Slicer-WsWTQPKt.js} +368 -363
  15. package/dist/{SlicerPreview-BQFeCw0m.js → SlicerPreview-3n516NyE.js} +460 -455
  16. package/dist/{SparkTooltip-BTLN-Kex.js → SparkTooltip-CbYYc-xb.js} +1 -1
  17. package/dist/{Title-CcNiYzEo.js → Title-Cr3jP7Qd.js} +1 -1
  18. package/dist/{Tooltip-CxOrWlFy.js → Tooltip-CDbLl3TD.js} +1 -1
  19. package/dist/{UserOptions-16uF1ayB.js → UserOptions-BUQOnoPR.js} +2 -2
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-history-plot.js +1 -1
  47. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  48. package/dist/components/vue-ui-icon.js +1 -1
  49. package/dist/components/vue-ui-kpi.js +1 -1
  50. package/dist/components/vue-ui-mini-loader.js +1 -1
  51. package/dist/components/vue-ui-molecule.js +1 -1
  52. package/dist/components/vue-ui-mood-radar.js +1 -1
  53. package/dist/components/vue-ui-nested-donuts.js +1 -1
  54. package/dist/components/vue-ui-onion.js +1 -1
  55. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  56. package/dist/components/vue-ui-quadrant.js +1 -1
  57. package/dist/components/vue-ui-quick-chart.js +1 -1
  58. package/dist/components/vue-ui-radar.js +1 -1
  59. package/dist/components/vue-ui-rating.js +1 -1
  60. package/dist/components/vue-ui-relation-circle.js +1 -1
  61. package/dist/components/vue-ui-ridgeline.js +1 -1
  62. package/dist/components/vue-ui-rings.js +1 -1
  63. package/dist/components/vue-ui-scatter.js +1 -1
  64. package/dist/components/vue-ui-skeleton.js +1 -1
  65. package/dist/components/vue-ui-smiley.js +1 -1
  66. package/dist/components/vue-ui-spark-trend.js +1 -1
  67. package/dist/components/vue-ui-sparkbar.js +1 -1
  68. package/dist/components/vue-ui-sparkgauge.js +1 -1
  69. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  70. package/dist/components/vue-ui-sparkline.js +1 -1
  71. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  72. package/dist/components/vue-ui-stackbar.js +1 -1
  73. package/dist/components/vue-ui-stackline.js +1 -1
  74. package/dist/components/vue-ui-strip-plot.js +1 -1
  75. package/dist/components/vue-ui-table-heatmap.js +1 -1
  76. package/dist/components/vue-ui-table-sparkline.js +1 -1
  77. package/dist/components/vue-ui-table.js +1 -1
  78. package/dist/components/vue-ui-thermometer.js +1 -1
  79. package/dist/components/vue-ui-timer.js +1 -1
  80. package/dist/components/vue-ui-tiremarks.js +1 -1
  81. package/dist/components/vue-ui-treemap.js +1 -1
  82. package/dist/components/vue-ui-vertical-bar.js +1 -1
  83. package/dist/components/vue-ui-waffle.js +1 -1
  84. package/dist/components/vue-ui-wheel.js +1 -1
  85. package/dist/components/vue-ui-word-cloud.js +1 -1
  86. package/dist/components/vue-ui-world.js +1 -1
  87. package/dist/components/vue-ui-xy-canvas.js +1 -1
  88. package/dist/components/vue-ui-xy.js +1 -1
  89. package/dist/{dom-to-png-BbwhsRIr.js → dom-to-png-COPbGrdd.js} +1 -1
  90. package/dist/exposedLib-CZbtc2a6.js +25 -0
  91. package/dist/{img-DnP3eXuv.js → img-CNdXiUfZ.js} +1 -1
  92. package/dist/{labelUtils-DBEh078l.js → labelUtils-JaoYKi2N.js} +1 -1
  93. package/dist/{lib-JqW18y5I.js → lib-CnHx5WfV.js} +118 -107
  94. package/dist/{package-gp9pYCfN.js → package-BRBLwZUc.js} +1 -1
  95. package/dist/{pdf-hj3gzrE7.js → pdf-CEMzBeuV.js} +1 -1
  96. package/dist/{render-common-CLn1VXJ9.js → render-common-DJXFRGhU.js} +10 -10
  97. package/dist/ssr/vue-ui-donut.js +1 -1
  98. package/dist/ssr/vue-ui-xy.js +1 -1
  99. package/dist/ssr.js +2 -2
  100. package/dist/style.css +1 -1
  101. package/dist/types/utils.d.ts +40 -0
  102. package/dist/{useAutoSizeLabelsInsideViewbox-BGnDfZdg.js → useAutoSizeLabelsInsideViewbox-BUPt2iaP.js} +1 -1
  103. package/dist/{useNestedProp-DIuuzG1r.js → useNestedProp-D8NuRneO.js} +2 -2
  104. package/dist/{usePrinter-CqqHmnBI.js → usePrinter-B-X_Pub0.js} +2 -2
  105. package/dist/utils.js +26 -24
  106. package/dist/{vue-data-ui-AZZ9Cq-4.js → vue-data-ui-Bx_8d3b_.js} +68 -68
  107. package/dist/vue-data-ui.js +77 -77
  108. package/dist/vue-ui-3d-bar-CfUfbpSE.js +1825 -0
  109. package/dist/{vue-ui-accordion-YyosvEPo.js → vue-ui-accordion-Oo3IsX3-.js} +3 -3
  110. package/dist/vue-ui-age-pyramid-DD-4y5Jd.js +1247 -0
  111. package/dist/{vue-ui-annotator-CfJXeAOE.js → vue-ui-annotator-BvGE3lzE.js} +8 -8
  112. package/dist/vue-ui-bullet-DYOdbaO2.js +710 -0
  113. package/dist/vue-ui-bump-B8fJoxHF.js +1249 -0
  114. package/dist/{vue-ui-candlestick-D-Z9pEaA.js → vue-ui-candlestick-BUP1JoNs.js} +555 -544
  115. package/dist/vue-ui-carousel-table-D-Bwhydt.js +455 -0
  116. package/dist/vue-ui-chestnut-C2VK2NEx.js +2042 -0
  117. package/dist/{vue-ui-chord-Db1O_diJ.js → vue-ui-chord-AA-QjUQI.js} +42 -42
  118. package/dist/vue-ui-circle-pack-CdBFGYOK.js +1614 -0
  119. package/dist/{vue-ui-cursor-DLP7wxsw.js → vue-ui-cursor-Cm_J_5Gk.js} +5 -5
  120. package/dist/{vue-ui-dag-DL3zq0F2.js → vue-ui-dag-CgRph4-n.js} +32 -32
  121. package/dist/{vue-ui-dashboard-C2ozZ-LI.js → vue-ui-dashboard-BuPw5QjB.js} +69 -69
  122. package/dist/{vue-ui-digits-ThFVNO3l.js → vue-ui-digits-ClrukmcB.js} +3 -3
  123. package/dist/vue-ui-donut-Bc-EPZvu.js +2419 -0
  124. package/dist/{vue-ui-donut-BuTd6dt4.js → vue-ui-donut-DtQCrMKL.js} +207 -207
  125. package/dist/vue-ui-donut-evolution-DHkiY-BD.js +1522 -0
  126. package/dist/vue-ui-dumbbell-BlHEH4Mw.js +1564 -0
  127. package/dist/{vue-ui-flow-BTUNfWb7.js → vue-ui-flow-PjwAW2tY.js} +71 -71
  128. package/dist/vue-ui-funnel-DojI09FV.js +782 -0
  129. package/dist/{vue-ui-galaxy-DJ2uNYcN.js → vue-ui-galaxy-txYIK_LG.js} +276 -276
  130. package/dist/vue-ui-gauge-CoL0OzSd.js +926 -0
  131. package/dist/{vue-ui-geo-ovHu_Sc9.js → vue-ui-geo-yuL-_sqF.js} +20 -20
  132. package/dist/{vue-ui-gizmo-DDxEj-qe.js → vue-ui-gizmo-CbC5zV3K.js} +66 -61
  133. package/dist/{vue-ui-heatmap-Npqnvb1r.js → vue-ui-heatmap-CwqsZIsR.js} +331 -331
  134. package/dist/{vue-ui-history-plot-C3Kjy2tc.js → vue-ui-history-plot-CuWssH-D.js} +561 -550
  135. package/dist/vue-ui-horizontal-bar-Dyje3GND.js +1689 -0
  136. package/dist/{vue-ui-kpi-BrlfYO-j.js → vue-ui-kpi-BdYenScF.js} +3 -3
  137. package/dist/{vue-ui-mini-loader-D5we7V_W.js → vue-ui-mini-loader-BbwE3vBT.js} +2 -2
  138. package/dist/vue-ui-molecule-BBh31vmd.js +931 -0
  139. package/dist/{vue-ui-mood-radar-DlVh6hwx.js → vue-ui-mood-radar-B_6GFlaR.js} +336 -331
  140. package/dist/vue-ui-nested-donuts-BWq-At5Y.js +1493 -0
  141. package/dist/vue-ui-onion-BwGbSE-6.js +1200 -0
  142. package/dist/vue-ui-parallel-coordinate-plot-Bh9hNoqf.js +1416 -0
  143. package/dist/vue-ui-quadrant-B72Y4Zuw.js +1984 -0
  144. package/dist/{vue-ui-quick-chart-WMzSJxGZ.js → vue-ui-quick-chart-B3LF2ViM.js} +108 -108
  145. package/dist/vue-ui-radar-4v_E8oGX.js +1287 -0
  146. package/dist/vue-ui-rating-CzLGCFWK.js +352 -0
  147. package/dist/vue-ui-relation-circle-B_8dyIv2.js +924 -0
  148. package/dist/{vue-ui-ridgeline-Cp3YP0xe.js → vue-ui-ridgeline-BArLhskj.js} +543 -537
  149. package/dist/vue-ui-rings-Csn5BgLk.js +1252 -0
  150. package/dist/vue-ui-scatter-BBaOx94M.js +2422 -0
  151. package/dist/{vue-ui-skeleton-CuFm4PtB.js → vue-ui-skeleton-KeIPGp9U.js} +426 -423
  152. package/dist/{vue-ui-smiley-D4NnZ1mg.js → vue-ui-smiley-C1mYDh4R.js} +120 -107
  153. package/dist/{vue-ui-spark-trend-C38ysZ-c.js → vue-ui-spark-trend-EqCqmHmU.js} +145 -140
  154. package/dist/vue-ui-sparkbar-BPh45vBP.js +398 -0
  155. package/dist/{vue-ui-sparkgauge-DgPc4vPT.js → vue-ui-sparkgauge-CtouPcyW.js} +81 -76
  156. package/dist/{vue-ui-sparkhistogram-D02ff7ZI.js → vue-ui-sparkhistogram-D4sI0DHN.js} +166 -150
  157. package/dist/vue-ui-sparkline-BDFZ78Fz.js +1560 -0
  158. package/dist/vue-ui-sparkstackbar-CbTXIfxm.js +674 -0
  159. package/dist/{vue-ui-stackbar-BVdApDnY.js → vue-ui-stackbar-nMXIY9x8.js} +603 -596
  160. package/dist/vue-ui-stackline-CzfXl5ah.js +2425 -0
  161. package/dist/{vue-ui-strip-plot-C-TFNvgz.js → vue-ui-strip-plot-BCf5nthl.js} +415 -408
  162. package/dist/vue-ui-table-BAKkFXki.js +1338 -0
  163. package/dist/{vue-ui-table-heatmap-D0pZbBOH.js → vue-ui-table-heatmap-CUMxqHKK.js} +15 -15
  164. package/dist/{vue-ui-table-sparkline-Q6BHPKUn.js → vue-ui-table-sparkline-BVTm16fd.js} +20 -20
  165. package/dist/vue-ui-thermometer-CGeEW1KV.js +770 -0
  166. package/dist/{vue-ui-timer-BdzKpoRj.js → vue-ui-timer-Bz7EnsM1.js} +94 -89
  167. package/dist/{vue-ui-tiremarks-DWb69ofh.js → vue-ui-tiremarks-IOqtk_Rr.js} +17 -17
  168. package/dist/{vue-ui-treemap-uUz07Prw.js → vue-ui-treemap-JxNNtb7v.js} +509 -504
  169. package/dist/vue-ui-waffle-D34mcJWi.js +1368 -0
  170. package/dist/{vue-ui-wheel-DTfvWYA7.js → vue-ui-wheel-B_qEhyvk.js} +44 -44
  171. package/dist/{vue-ui-word-cloud-DqfljAqH.js → vue-ui-word-cloud-TtObhd91.js} +32 -32
  172. package/dist/{vue-ui-world-BtBrH92Z.js → vue-ui-world-R9o00A6c.js} +359 -348
  173. package/dist/{vue-ui-xy-Bvgy2do1.js → vue-ui-xy-CUt6sU1s.js} +1678 -1652
  174. package/dist/{vue-ui-xy-D5KsuNR2.js → vue-ui-xy-Do34-UbE.js} +134 -134
  175. package/dist/vue-ui-xy-canvas-C6eRRH--.js +1790 -0
  176. package/package.json +1 -1
  177. package/dist/BaseIcon-C2qlyHc7.js +0 -502
  178. package/dist/exposedLib-VXFp3Z2c.js +0 -19
  179. package/dist/vue-ui-3d-bar-B3HxJmDI.js +0 -1757
  180. package/dist/vue-ui-age-pyramid-DTAOc7fn.js +0 -1238
  181. package/dist/vue-ui-bullet-CCLnrOLm.js +0 -710
  182. package/dist/vue-ui-bump-Rq7efdoe.js +0 -1249
  183. package/dist/vue-ui-carousel-table-Lx5Zk4dG.js +0 -455
  184. package/dist/vue-ui-chestnut-RfWMGUD-.js +0 -2010
  185. package/dist/vue-ui-circle-pack-B4Ro7UuI.js +0 -1608
  186. package/dist/vue-ui-donut-C3Rt6j-I.js +0 -2410
  187. package/dist/vue-ui-donut-evolution-DY46UPF_.js +0 -1510
  188. package/dist/vue-ui-dumbbell-wK7vUB0x.js +0 -1530
  189. package/dist/vue-ui-funnel-BhoHzyHa.js +0 -777
  190. package/dist/vue-ui-gauge-Cf4NqvrO.js +0 -920
  191. package/dist/vue-ui-horizontal-bar-D1rCsgqt.js +0 -1683
  192. package/dist/vue-ui-molecule-CExCqZ08.js +0 -925
  193. package/dist/vue-ui-nested-donuts-3TRV8pN-.js +0 -1487
  194. package/dist/vue-ui-onion-DwKK9DXn.js +0 -1200
  195. package/dist/vue-ui-parallel-coordinate-plot-DSp_cwU-.js +0 -1416
  196. package/dist/vue-ui-quadrant-ByVg-NBs.js +0 -1978
  197. package/dist/vue-ui-radar-DE-me6OC.js +0 -1281
  198. package/dist/vue-ui-rating-CzD3EQ3G.js +0 -343
  199. package/dist/vue-ui-relation-circle-L7-dTqet.js +0 -924
  200. package/dist/vue-ui-rings-WzWiEo9W.js +0 -1246
  201. package/dist/vue-ui-scatter-DwrAydha.js +0 -2413
  202. package/dist/vue-ui-sparkbar-B03ndcUe.js +0 -393
  203. package/dist/vue-ui-sparkline-DlTfNQj8.js +0 -1547
  204. package/dist/vue-ui-sparkstackbar-DrmiWFlw.js +0 -662
  205. package/dist/vue-ui-stackline-QzQQ7lTy.js +0 -2419
  206. package/dist/vue-ui-table-Q3brrivC.js +0 -1338
  207. package/dist/vue-ui-thermometer-Bg0RR6m4.js +0 -763
  208. package/dist/vue-ui-waffle-Pi9e7Ae7.js +0 -1362
  209. package/dist/vue-ui-xy-canvas-BfgeE3TW.js +0 -1790
@@ -0,0 +1,2419 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, A as n, At as r, Bt as i, C as a, E as o, G as s, Gt as c, K as l, Nt as u, Ot as ee, Q as te, Y as d, at as f, bt as ne, d as p, et as m, f as h, ft as re, i as g, it as ie, jt as _, m as ae, o as oe, qt as se, t as ce, x as le, y as ue, zt as de } from "./lib-CnHx5WfV.js";
3
+ import { t as fe } from "./useConfig-DYM3f6EI.js";
4
+ import { t as pe } from "./usePrinter-B-X_Pub0.js";
5
+ import { n as me, t as he } from "./BaseScanner-DZvpgOjM.js";
6
+ import { t as ge } from "./useSvgExport-SVIsDot8.js";
7
+ import { t as _e } from "./useNestedProp-D8NuRneO.js";
8
+ import { t as ve } from "./useThemeCheck-C43Tcqmk.js";
9
+ import { t as ye } from "./img-CNdXiUfZ.js";
10
+ import { n as be } from "./Title-Cr3jP7Qd.js";
11
+ import { t as xe } from "./Shape-B5ksaGa1.js";
12
+ import { t as Se } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
+ import { c as Ce } from "./canvas-lib-BOP_HS11.js";
14
+ import { t as we } from "./useResponsive-BfnK0KxU.js";
15
+ import { t as Te } from "./DefGrad-DVBqDjhO.js";
16
+ import { t as Ee } from "./BaseLegendToggle-BrQ2OlzI.js";
17
+ import { t as De } from "./A11yDataTable-DdRsVULz.js";
18
+ import { t as Oe } from "./useUserOptionState-DK-_1ddE.js";
19
+ import { t as ke } from "./useChartAccessibility-DYqac8yF.js";
20
+ import { n as Ae, t as je } from "./labelUtils-JaoYKi2N.js";
21
+ import { t as Me } from "./vue_ui_donut-BDGqG07h.js";
22
+ import { t as Ne } from "./Legend-5VQGLnmx.js";
23
+ import { Fragment as v, Teleport as Pe, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as Fe, createTextVNode as Ie, createVNode as Le, defineAsyncComponent as Re, guardReactiveProps as w, mergeProps as ze, nextTick as Be, normalizeClass as Ve, normalizeProps as T, normalizeStyle as E, onBeforeUnmount as He, onMounted as Ue, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as We, shallowRef as Ge, toDisplayString as Ke, toRefs as qe, unref as j, useSlots as Je, vShow as Ye, watch as Xe, withCtx as M, withDirectives as Ze } from "vue";
24
+ //#region src/useSmallArcLayouts.js
25
+ function Qe(e) {
26
+ let { FINAL_CONFIG: t, noGhostDonut: n, svg: r, padding: i, labels_inline_fontSize: a, minSize: o, findArcMidpoint: s, calcMarkerOffsetX: c, calcMarkerOffsetY: l, animatingIndex: u, segregated: ee, isSmallArc: te } = e;
27
+ return { smallArcLayoutsClassic: y(() => {
28
+ if (t.value.type !== "classic") return {};
29
+ let e = {}, d = n.value || [];
30
+ if (!d.length) return e;
31
+ let f = r.value.width / 2, ne = r.value.height / 2, p = i.value.top + 16, m = r.value.height - i.value.bottom - 16, h = a.value, re = h / 3, g = h * 1.5, ie = f - (o.value + 6), _ = f + (o.value + 6), ae = !!t.value.style.chart.layout.curvedMarkers;
32
+ function oe({ midX: e, midY: t, bandX: n, bandY: r }) {
33
+ if (!ae) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
34
+ let i = n < f ? -1 : 1, a = n - e, o = r - t, s = Math.sqrt(a * a + o * o) || 1, c = e - f, l = t - ne, u = Math.sqrt(c * c + l * l) || 1, ee = c / u, te = l / u, d = u + 9;
35
+ function p({ x: e, y: t }) {
36
+ let n = e - f, r = t - ne, i = Math.sqrt(n * n + r * r) || 1;
37
+ if (i >= d) return {
38
+ x: e,
39
+ y: t
40
+ };
41
+ let a = d / i;
42
+ return {
43
+ x: f + n * a,
44
+ y: ne + r * a
45
+ };
46
+ }
47
+ if (s < 56) {
48
+ let i = a / s, c = -(o / s), l = i, u = (e + n) * .5, d = (t + r) * .5, m = u + c, h = d + l, re = (m - f) * (m - f) + (h - ne) * (h - ne), g = u - c, ie = d - l;
49
+ (g - f) * (g - f) + (ie - ne) * (ie - ne) > re && (c = -c, l = -l);
50
+ let _ = .78, ae = e + a * _, oe = t + o * _, se = Math.max(0, Math.min(1, (s - 18) / 44)), ce = se * se * (3 - 2 * se), le = 2.5 + ce * 4, ue = 1 + ce * 2.5;
51
+ le *= .9;
52
+ let de = p({
53
+ x: ae + c * le + ee * ue,
54
+ y: oe + l * le + te * ue
55
+ });
56
+ return `M ${e} ${t} Q ${de.x} ${de.y} ${n} ${r}`;
57
+ }
58
+ let m = s * .34;
59
+ m < 20 && (m = 20), m > 46 && (m = 46);
60
+ let h = s * .46;
61
+ h < 22 && (h = 22), h > 70 && (h = 70);
62
+ let re = {
63
+ x: e + ee * m,
64
+ y: t + te * m
65
+ }, g = f + i * Math.max(Math.abs(n - f), d), ie = {
66
+ x: n - i * Math.min(h, Math.abs(g - n) * .75),
67
+ y: r
68
+ }, _ = p(re), oe = p(ie);
69
+ return `M ${e} ${t} C ${_.x} ${_.y} ${oe.x} ${oe.y} ${n} ${r}`;
70
+ }
71
+ function se(e) {
72
+ let t = String(e ?? "").split(/\n/g);
73
+ return g + Math.max(0, t.length - 1) * (h * 1.2);
74
+ }
75
+ function ce({ arc: e, index: t }) {
76
+ let { x: n, y: r } = s(e.path);
77
+ return {
78
+ arc: e,
79
+ index: t,
80
+ midX: n,
81
+ midY: r,
82
+ inlineMarkerX: c(e).x,
83
+ inlineMarkerY: l(e) - 3.5,
84
+ labelHeight: se(e.name)
85
+ };
86
+ }
87
+ function le(e) {
88
+ let { arc: t } = e, n = t.seriesIndex ?? 0;
89
+ return u.value === n || ee.value.includes(n) ? !1 : te(t, n);
90
+ }
91
+ function ue(e) {
92
+ let t = e.inlineMarkerY < ne, n = e.inlineMarkerX < f;
93
+ return t && n ? "TL" : t && !n ? "TR" : !t && n ? "BL" : "BR";
94
+ }
95
+ function de(e, t) {
96
+ if (t.startsWith("T")) {
97
+ e.sort((e, t) => e.inlineMarkerY - t.inlineMarkerY || e.index - t.index);
98
+ return;
99
+ }
100
+ e.sort((e, t) => t.inlineMarkerY - e.inlineMarkerY || e.index - t.index);
101
+ }
102
+ function fe({ side: e, markerX: t, markerY: n, labelY: r, connectorPath: i }) {
103
+ return {
104
+ side: e,
105
+ labelX: e === "left" ? t - 8 : t + 8,
106
+ labelY: r + re,
107
+ textAnchor: e === "left" ? "end" : "start",
108
+ markerX: t,
109
+ markerY: n,
110
+ connectorPath: i
111
+ };
112
+ }
113
+ function pe({ candidateList: t, side: n, bandMarkerX: r, startY: i, direction: a }) {
114
+ let o = i;
115
+ t.forEach((t) => {
116
+ let { index: i, midX: s, midY: c, labelHeight: l } = t, u;
117
+ a === "down" ? (u = o, o += l) : (o -= l, u = o);
118
+ let ee = u, te = oe({
119
+ midX: s,
120
+ midY: c,
121
+ bandX: r,
122
+ bandY: ee
123
+ });
124
+ e[i] = fe({
125
+ side: n,
126
+ markerX: r,
127
+ markerY: ee,
128
+ labelY: u,
129
+ connectorPath: te
130
+ });
131
+ });
132
+ }
133
+ let me = d.map((e, t) => ce({
134
+ arc: e,
135
+ index: t
136
+ })).filter(le), he = {
137
+ TL: [],
138
+ TR: [],
139
+ BL: [],
140
+ BR: []
141
+ };
142
+ return me.forEach((e) => {
143
+ he[ue(e)].push(e);
144
+ }), Object.keys(he).forEach((e) => {
145
+ de(he[e], e);
146
+ }), pe({
147
+ candidateList: he.TL,
148
+ side: "left",
149
+ bandMarkerX: ie,
150
+ startY: p,
151
+ direction: "down"
152
+ }), pe({
153
+ candidateList: he.TR,
154
+ side: "right",
155
+ bandMarkerX: _,
156
+ startY: p,
157
+ direction: "down"
158
+ }), he.BL.length > 1 && pe({
159
+ candidateList: he.BL,
160
+ side: "left",
161
+ bandMarkerX: ie,
162
+ startY: m,
163
+ direction: "up"
164
+ }), he.BR.length > 1 && pe({
165
+ candidateList: he.BR,
166
+ side: "right",
167
+ bandMarkerX: _,
168
+ startY: m,
169
+ direction: "up"
170
+ }), e;
171
+ }) };
172
+ }
173
+ //#endregion
174
+ //#region src/components/vue-ui-donut.vue
175
+ var $e = /* @__PURE__ */ e({ default: () => pn }), et = ["id"], tt = ["id"], nt = ["id"], rt = { style: { position: "relative" } }, it = [
176
+ "xmlns",
177
+ "aria-describedby",
178
+ "viewBox"
179
+ ], at = ["width", "height"], ot = { key: 1 }, st = { key: 2 }, ct = ["id"], lt = ["id"], ut = ["id"], dt = ["flood-color"], ft = ["id"], pt = ["flood-color"], mt = [
180
+ "d",
181
+ "stroke",
182
+ "filter"
183
+ ], ht = [
184
+ "d",
185
+ "stroke",
186
+ "filter"
187
+ ], gt = [
188
+ "cx",
189
+ "cy",
190
+ "r",
191
+ "fill",
192
+ "filter"
193
+ ], _t = { key: 6 }, vt = ["stroke", "d"], yt = [
194
+ "d",
195
+ "fill",
196
+ "stroke",
197
+ "stroke-width",
198
+ "filter"
199
+ ], bt = { key: 0 }, xt = [
200
+ "d",
201
+ "fill",
202
+ "stroke",
203
+ "stroke-width",
204
+ "filter"
205
+ ], St = { key: 0 }, Ct = ["stroke", "d"], wt = { key: 0 }, Tt = [
206
+ "d",
207
+ "stroke",
208
+ "stroke-width",
209
+ "filter"
210
+ ], Et = { key: 1 }, Dt = [
211
+ "d",
212
+ "fill",
213
+ "stroke",
214
+ "stroke-width",
215
+ "filter"
216
+ ], Ot = [
217
+ "d",
218
+ "fill",
219
+ "stroke",
220
+ "stroke-width",
221
+ "filter"
222
+ ], kt = { key: 1 }, At = [
223
+ "cx",
224
+ "cy",
225
+ "r",
226
+ "fill",
227
+ "stroke",
228
+ "stroke-width"
229
+ ], jt = [
230
+ "cx",
231
+ "cy",
232
+ "r",
233
+ "fill",
234
+ "stroke",
235
+ "stroke-width"
236
+ ], Mt = { key: 0 }, Nt = [
237
+ "d",
238
+ "fill",
239
+ "stroke",
240
+ "stroke-width"
241
+ ], Pt = [
242
+ "cx",
243
+ "cy",
244
+ "r",
245
+ "stroke"
246
+ ], Ft = [
247
+ "cx",
248
+ "cy",
249
+ "r",
250
+ "fill"
251
+ ], It = [
252
+ "cx",
253
+ "cy",
254
+ "r"
255
+ ], Lt = { key: 0 }, Rt = [
256
+ "d",
257
+ "stroke",
258
+ "fill",
259
+ "onMouseenter",
260
+ "onMouseleave",
261
+ "onClick"
262
+ ], zt = { key: 1 }, Bt = [
263
+ "cx",
264
+ "cy",
265
+ "r"
266
+ ], Vt = [
267
+ "x",
268
+ "y",
269
+ "fill",
270
+ "font-size"
271
+ ], Ht = [
272
+ "x",
273
+ "y",
274
+ "fill",
275
+ "font-size"
276
+ ], Ut = [
277
+ "x",
278
+ "y",
279
+ "fill",
280
+ "font-size"
281
+ ], Wt = [
282
+ "x",
283
+ "y",
284
+ "fill",
285
+ "font-size"
286
+ ], Gt = ["filter", "opacity"], Kt = { key: 0 }, qt = ["x", "y"], Jt = { key: 1 }, Yt = [
287
+ "cx",
288
+ "cy",
289
+ "fill",
290
+ "stroke",
291
+ "filter",
292
+ "onClick",
293
+ "onMouseenter",
294
+ "onMouseleave"
295
+ ], Xt = [
296
+ "text-anchor",
297
+ "x",
298
+ "y",
299
+ "onClick",
300
+ "onMouseenter",
301
+ "onMouseleave",
302
+ "innerHTML"
303
+ ], Zt = [
304
+ "text-anchor",
305
+ "x",
306
+ "y",
307
+ "fill",
308
+ "font-size",
309
+ "onClick",
310
+ "onMouseenter",
311
+ "onMouseleave"
312
+ ], Qt = [
313
+ "text-anchor",
314
+ "x",
315
+ "y",
316
+ "fill",
317
+ "font-size",
318
+ "onClick",
319
+ "onMouseenter",
320
+ "onMouseleave",
321
+ "innerHTML"
322
+ ], $t = [
323
+ "cx",
324
+ "cy",
325
+ "fill",
326
+ "stroke",
327
+ "filter",
328
+ "onClick",
329
+ "onMouseenter",
330
+ "onMouseleave"
331
+ ], en = [
332
+ "text-anchor",
333
+ "x",
334
+ "y",
335
+ "onClick",
336
+ "onMouseenter",
337
+ "onMouseleave",
338
+ "innerHTML"
339
+ ], tn = [
340
+ "text-anchor",
341
+ "x",
342
+ "y",
343
+ "fill",
344
+ "font-size",
345
+ "onClick",
346
+ "onMouseenter",
347
+ "onMouseleave"
348
+ ], nn = [
349
+ "text-anchor",
350
+ "x",
351
+ "y",
352
+ "fill",
353
+ "font-size",
354
+ "onClick",
355
+ "onMouseenter",
356
+ "onMouseleave",
357
+ "innerHTML"
358
+ ], rn = { key: 2 }, an = [
359
+ "x",
360
+ "y",
361
+ "width"
362
+ ], on = [
363
+ "x",
364
+ "y",
365
+ "width"
366
+ ], sn = {
367
+ key: 0,
368
+ style: {
369
+ position: "absolute",
370
+ top: "100%",
371
+ left: "0",
372
+ width: "100%"
373
+ },
374
+ "data-dom-to-png-ignore": "",
375
+ "aria-hidden": "true"
376
+ }, cn = {
377
+ key: 5,
378
+ class: "vue-data-ui-watermark"
379
+ }, ln = ["id"], un = ["onClick"], dn = {
380
+ key: 8,
381
+ class: "vue-ui-donut-hollow"
382
+ }, fn = ["innerHTML"], pn = /*#__PURE__*/ Se({
383
+ __name: "vue-ui-donut",
384
+ props: {
385
+ config: {
386
+ type: Object,
387
+ default() {
388
+ return {};
389
+ }
390
+ },
391
+ dataset: {
392
+ type: Array,
393
+ default() {
394
+ return [];
395
+ }
396
+ }
397
+ },
398
+ emits: [
399
+ "selectLegend",
400
+ "selectDatapoint",
401
+ "copyAlt"
402
+ ],
403
+ setup(e, { expose: Se, emit: $e }) {
404
+ let pn = Re(() => import("./Tooltip-CDbLl3TD.js")), mn = Re(() => import("./BaseIcon-CDTIUIKV.js").then((e) => e.n)), hn = Re(() => import("./vue-ui-accordion-Oo3IsX3-.js").then((e) => e.n)), gn = Re(() => import("./DataTable-ByZy5gt1.js")), _n = Re(() => import("./PenAndPaper-CLaZJl6K.js").then((e) => e.t)), vn = Re(() => import("./UserOptions-BUQOnoPR.js").then((e) => e.n)), yn = Re(() => import("./PackageVersion-BoTvk0i5.js").then((e) => e.t)), bn = Re(() => import("./BaseDraggableDialog-CdkCqtag.js").then((e) => e.n)), { vue_ui_donut: xn } = fe(), { isThemeValid: Sn, warnInvalidTheme: Cn } = ve(), wn = Je(), N = e, Tn = y({
405
+ get() {
406
+ return !!N.dataset && N.dataset.length;
407
+ },
408
+ set(e) {
409
+ return e;
410
+ }
411
+ }), P = Ge(null), En = O(null), Dn = O(null), On = O(null), kn = Ge(null), An = Ge(null), jn = Ge(null), Mn = Ge(null), Nn = Ge(null), Pn = Ge(null), Fn = O(0), In = O(0), Ln = O(0), Rn = O(!1), zn = O(null), Bn = O(null), Vn = O(!1), Hn = O(!1), Un = O(null), Wn = O({
412
+ x: 0,
413
+ y: 0
414
+ }), Gn = O("pointer"), Kn = O(!1), qn = y({
415
+ get: () => R.value.style.chart.layout.labels.percentage.fontSize,
416
+ set: (e) => e
417
+ }), F = y({
418
+ get: () => R.value.style.chart.layout.labels.name.fontSize,
419
+ set: (e) => e
420
+ }), Jn = y({
421
+ get: () => R.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
422
+ set: (e) => e
423
+ }), Yn = !1, Xn = () => {
424
+ !R.value.autoSize || Yn || (Yn = !0, requestAnimationFrame(() => {
425
+ Yn = !1;
426
+ let e = R.value, t = En.value, n = B.value;
427
+ if (!e.autoSize || !t || !n) return;
428
+ let [r, i, a, o] = n.getAttribute("viewBox").split(" ").map(Number), s = {
429
+ x: r,
430
+ y: i,
431
+ width: a,
432
+ height: o
433
+ }, c = [
434
+ {
435
+ selector: ".vue-data-ui-datalabel-value",
436
+ baseSize: e.style.chart.layout.labels.percentage.fontSize,
437
+ minSize: e.style.chart.layout.labels.percentage.minFontSize,
438
+ sizeRef: qn
439
+ },
440
+ {
441
+ selector: ".vue-data-ui-datalabel-name",
442
+ baseSize: e.style.chart.layout.labels.name.fontSize,
443
+ minSize: e.style.chart.layout.labels.name.minFontSize,
444
+ sizeRef: F
445
+ },
446
+ {
447
+ selector: ".vue-data-ui-datalabel-inline",
448
+ baseSize: e.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,
449
+ minSize: e.style.chart.layout.labels.name.minFontSize,
450
+ sizeRef: Jn
451
+ }
452
+ ];
453
+ c.map((e) => t.querySelectorAll(e.selector).length).reduce((e, t) => e + t, 0) !== 0 && c.forEach(({ selector: e, baseSize: n, minSize: r, sizeRef: i }) => {
454
+ t.querySelectorAll(e).forEach((e) => {
455
+ i.value = oe({
456
+ el: e,
457
+ bounds: s,
458
+ currentFontSize: n,
459
+ minFontSize: r,
460
+ attempts: 200,
461
+ padding: 1
462
+ });
463
+ });
464
+ });
465
+ }));
466
+ };
467
+ Ue(async () => {
468
+ Rn.value = !0, $n(), requestAnimationFrame(Xn);
469
+ });
470
+ let Zn;
471
+ Ue(() => {
472
+ P.value && (Zn = new ResizeObserver((e) => {
473
+ for (let t of e) {
474
+ let { width: e, height: n } = t.contentRect;
475
+ if (e > 0 && n > 0) {
476
+ Xn();
477
+ break;
478
+ }
479
+ }
480
+ }), Zn.observe(P.value.parentElement));
481
+ }), He(() => {
482
+ Zn?.disconnect();
483
+ }), He(() => {
484
+ jn.value && (Mn.value && jn.value.unobserve(Mn.value), jn.value.disconnect());
485
+ });
486
+ let Qn = y(() => !!R.value.debug);
487
+ function $n() {
488
+ if (r(N.dataset) ? (m({
489
+ componentName: "VueUiDonut",
490
+ type: "dataset",
491
+ debug: Qn.value
492
+ }), Tn.value = !1, cr.value = !0) : (N.dataset.forEach((e, t) => {
493
+ re({
494
+ datasetObject: e,
495
+ requiredAttributes: ["name", "values"]
496
+ }).forEach((e) => {
497
+ m({
498
+ componentName: "VueUiDonut",
499
+ type: "datasetSerieAttribute",
500
+ property: e,
501
+ index: t,
502
+ debug: Qn.value
503
+ }), Tn.value = !1, cr.value = !0;
504
+ });
505
+ }), N.dataset.forEach((e, t) => {
506
+ (!e.name || e.name === "") && m({
507
+ componentName: "VueUiDonut",
508
+ type: "datasetAttributeEmpty",
509
+ property: "name",
510
+ index: t,
511
+ debug: Qn.value
512
+ });
513
+ })), r(N.dataset) || (cr.value = R.value.loading), R.value.responsive) {
514
+ let e = Ce(() => {
515
+ let { width: e, height: t } = we({
516
+ chart: P.value,
517
+ title: R.value.style.chart.title.text ? kn.value : null,
518
+ legend: R.value.style.chart.legend.show ? An.value : null,
519
+ source: Nn.value,
520
+ noTitle: Pn.value,
521
+ padding: R.value.autoSize ? void 0 : yr.value
522
+ });
523
+ requestAnimationFrame(() => {
524
+ H.value.width = e, H.value.height = t, Xn();
525
+ });
526
+ });
527
+ jn.value && (Mn.value && jn.value.unobserve(Mn.value), jn.value.disconnect()), jn.value = new ResizeObserver(e), Mn.value = P.value.parentNode, jn.value.observe(Mn.value);
528
+ }
529
+ }
530
+ let I = O(l()), er = O(!1), tr = O(""), L = O(null), nr = O(0);
531
+ function rr() {
532
+ let e = _e({
533
+ userConfig: N.config,
534
+ defaultConfig: xn
535
+ }), t = {}, n = e.theme;
536
+ if (!n) t = e;
537
+ else if (!Sn.value(e)) Cn(e), t = e;
538
+ else {
539
+ let r = _e({
540
+ userConfig: Me[n] || N.config,
541
+ defaultConfig: e
542
+ });
543
+ t = {
544
+ ..._e({
545
+ userConfig: N.config,
546
+ defaultConfig: r
547
+ }),
548
+ customPalette: e.customPalette.length ? e.customPalette : c[n] || u
549
+ };
550
+ }
551
+ return t;
552
+ }
553
+ let R = O(rr()), ir = y(() => R.value.userOptions.useCursorPointer), ar = y(() => se({
554
+ defaultConfig: {
555
+ useCssAnimation: !1,
556
+ table: { show: !1 },
557
+ startAnimation: { show: !1 },
558
+ userOptions: { show: !1 },
559
+ style: { chart: {
560
+ backgroundColor: "#99999930",
561
+ layout: { labels: {
562
+ dataLabels: { show: !1 },
563
+ hollow: {
564
+ average: { show: !1 },
565
+ total: { show: !1 }
566
+ },
567
+ value: { show: !1 }
568
+ } },
569
+ legend: {
570
+ backgroundColor: "transparent",
571
+ showValue: !1,
572
+ showPercentage: !1
573
+ },
574
+ title: {
575
+ color: "#1A1A1A",
576
+ subtitle: { color: "#5A5A5A" }
577
+ }
578
+ } }
579
+ },
580
+ userConfig: R.value.skeletonConfig ?? {}
581
+ })), { loading: or, FINAL_DATASET: sr, manualLoading: cr, skeletonDataset: lr } = me({
582
+ ...qe(N),
583
+ FINAL_CONFIG: R,
584
+ prepareConfig: rr,
585
+ skeletonDataset: N.config?.skeletonDataset ?? [
586
+ {
587
+ name: "",
588
+ values: [3],
589
+ color: "#BABABA"
590
+ },
591
+ {
592
+ name: "",
593
+ values: [2],
594
+ color: "#AAAAAA"
595
+ },
596
+ {
597
+ name: "",
598
+ values: [1],
599
+ color: "#CACACA"
600
+ }
601
+ ],
602
+ skeletonConfig: se({
603
+ defaultConfig: R.value,
604
+ userConfig: ar.value
605
+ })
606
+ }), z = O(!0), ur = O(0), dr = O(!1), fr = null;
607
+ function pr(e = 1e3) {
608
+ return new Promise((n) => {
609
+ let r = performance.now();
610
+ function i(a) {
611
+ let o = a - r, s = Math.min(o / e, 1);
612
+ ur.value = t(s), s < 1 ? fr = requestAnimationFrame(i) : (ur.value = 1, fr = null, n());
613
+ }
614
+ fr !== null && cancelAnimationFrame(fr), ur.value = 0, fr = requestAnimationFrame(i);
615
+ });
616
+ }
617
+ Xe(() => or.value, async (e) => {
618
+ if (e || dr.value) return;
619
+ let t = sr.value === lr, n = R.value.startAnimation?.show;
620
+ !t && n ? (dr.value = !0, await pr(R.value.startAnimation.durationMs || 1e3)) : ur.value = 1, z.value = !1;
621
+ }, { immediate: !0 });
622
+ let { userOptionsVisible: mr, setUserOptionsVisibility: hr, keepUserOptionState: gr } = Oe({ config: R.value }), { svgRef: B } = ke({ config: R.value.style.chart.title });
623
+ function _r() {
624
+ hr(!0);
625
+ }
626
+ function vr() {
627
+ hr(!1);
628
+ }
629
+ Xe(() => N.config, (e) => {
630
+ or.value || (R.value = rr()), mr.value = !R.value.userOptions.showOnChartHover, $n(), Fn.value += 1, In.value += 1, Ln.value += 1, V.value.dataLabels.show = R.value.style.chart.layout.labels.dataLabels.show, V.value.showTable = R.value.table.show, V.value.showTooltip = R.value.style.chart.tooltip.show, H.value.height = R.value.style.chart.height, H.value.width = R.value.style.chart.width;
631
+ }, { deep: !0 });
632
+ let yr = y(() => {
633
+ let { top: e, right: t, bottom: n, left: r } = R.value.style.chart.padding;
634
+ return {
635
+ css: `padding:${e}px ${t}px ${n}px ${r}px`,
636
+ top: e,
637
+ right: t,
638
+ bottom: n,
639
+ left: r
640
+ };
641
+ }), { isPrinting: br, isImaging: xr, generatePdf: Sr, generateImage: Cr } = pe({
642
+ elementId: `donut__${I.value}`,
643
+ fileName: R.value.style.chart.title.text || "vue-ui-donut",
644
+ options: R.value.userOptions.print
645
+ }), wr = y(() => R.value.userOptions.show && !R.value.style.chart.title.text), Tr = y(() => a(R.value.customPalette)), V = O({
646
+ dataLabels: { show: R.value.style.chart.layout.labels.dataLabels.show },
647
+ showTable: R.value.table.show,
648
+ showTooltip: R.value.style.chart.tooltip.show
649
+ });
650
+ Xe(R, () => {
651
+ V.value = {
652
+ dataLabels: { show: R.value.style.chart.layout.labels.dataLabels.show },
653
+ showTable: R.value.table.show,
654
+ showTooltip: R.value.style.chart.tooltip.show
655
+ };
656
+ }, { immediate: !0 });
657
+ let H = O({
658
+ height: R.value.style.chart.height,
659
+ width: R.value.style.chart.width
660
+ }), Er = y(() => {
661
+ if (R.value.pie) return K.value;
662
+ let e = R.value.style.chart.layout.donut.strokeWidth / 512, t = Math.min(H.value.width, H.value.height) * e, n = t > K.value ? K.value : t;
663
+ return Math.max(n, 12 * (1 + e));
664
+ }), Dr = $e, U = y(() => sr.value.sort((e, t) => {
665
+ let n = Array.isArray(e.values) ? e.values.reduce((e, t) => e + t, 0) : e.value ?? 0, r = Array.isArray(t.values) ? t.values.reduce((e, t) => e + t, 0) : t.value ?? 0;
666
+ return e.ghost && !t.ghost ? 1 : t.ghost && !e.ghost ? -1 : r - n;
667
+ }).map((e, t) => ({
668
+ name: e.name,
669
+ color: le(e.color) || Tr.value[t] || u[t] || u[t % u.length],
670
+ value: ue(e.values.reduce((e, t) => e + t, 0)),
671
+ absoluteValues: e.values,
672
+ comment: e.comment || "",
673
+ patternIndex: t,
674
+ seriesIndex: t,
675
+ ghost: !1,
676
+ pattern: `pattern_${I.value}_${t}`
677
+ })));
678
+ Xe(() => N.dataset, (e) => {
679
+ Array.isArray(e) && e.length > 0 && (cr.value = !1);
680
+ }, { immediate: !0 });
681
+ let W = Ge(U.value);
682
+ Xe(() => U.value, (e) => {
683
+ W.value = e, requestAnimationFrame(Xn);
684
+ });
685
+ function Or() {
686
+ return U.value.map((e) => ({
687
+ name: e.name,
688
+ color: e.color,
689
+ value: e.value
690
+ }));
691
+ }
692
+ let G = O([]), kr = O(!1), Ar = O(null);
693
+ function jr() {
694
+ Dr("selectLegend", zr.value.map((e) => ({
695
+ name: e.name,
696
+ color: e.color,
697
+ value: e.value
698
+ })));
699
+ }
700
+ function Mr({ from: e, to: n, duration: r, onUpdate: i, onDone: a, easing: o = t }) {
701
+ let s = performance.now();
702
+ function c(t) {
703
+ let l = Math.min((t - s) / r, 1), u = o(l);
704
+ i(e + (n - e) * u, l), l < 1 ? requestAnimationFrame(c) : (i(n, 1), a && a());
705
+ }
706
+ requestAnimationFrame(c);
707
+ }
708
+ function Nr() {
709
+ G.value.length ? G.value = [] : Br.value.forEach((e, t) => {
710
+ G.value.push(t);
711
+ }), jr();
712
+ }
713
+ function Pr(e) {
714
+ let t = U.value.find((t, n) => n === e), n = W.value.find((t, n) => n === e).value;
715
+ if (G.value.includes(e)) {
716
+ G.value = G.value.filter((t) => t !== e);
717
+ let r = t.value;
718
+ function i() {
719
+ W.value = W.value.map((t, n) => e === n ? {
720
+ ...t,
721
+ value: r
722
+ } : t), jr();
723
+ }
724
+ function a() {
725
+ kr.value = !0, Ar.value = e, Mr({
726
+ from: n,
727
+ to: r,
728
+ duration: R.value.serieToggleAnimation.durationMs,
729
+ onUpdate: (t, n) => {
730
+ W.value = W.value.map((n, r) => e === r ? {
731
+ ...n,
732
+ value: t
733
+ } : n), requestAnimationFrame(Xn);
734
+ },
735
+ onDone: () => {
736
+ i(), kr.value = !1, Ar.value = null;
737
+ }
738
+ });
739
+ }
740
+ R.value.serieToggleAnimation.show && R.value.type === "classic" ? a() : (i(), requestAnimationFrame(Xn));
741
+ } else if (G.value.length < U.value.length - 1) {
742
+ function t() {
743
+ G.value.push(e), W.value = W.value.map((t, n) => e === n ? {
744
+ ...t,
745
+ value: 0
746
+ } : t), jr();
747
+ }
748
+ function r() {
749
+ kr.value = !0, Ar.value = e, Mr({
750
+ from: n,
751
+ to: 0,
752
+ duration: R.value.serieToggleAnimation.durationMs,
753
+ onUpdate: (t, n) => {
754
+ W.value = W.value.map((n, r) => e === r ? {
755
+ ...n,
756
+ value: t
757
+ } : n), requestAnimationFrame(Xn);
758
+ },
759
+ onDone: () => {
760
+ t(), requestAnimationFrame(Xn), kr.value = !1, Ar.value = null;
761
+ }
762
+ });
763
+ }
764
+ R.value.serieToggleAnimation.show && R.value.type === "classic" ? r() : t();
765
+ }
766
+ }
767
+ function Fr(e) {
768
+ return U.value.length ? U.value.find((t) => t.name === e) || (R.value.debug && console.warn(`VueUiDonut - Series name not found "${e}"`), null) : (R.value.debug && console.warn("VueUiDonut - There are no series to show."), null);
769
+ }
770
+ function Ir(e) {
771
+ let t = Fr(e);
772
+ t !== null && G.value.includes(t.seriesIndex) && Pr(t.seriesIndex);
773
+ }
774
+ function Lr(e) {
775
+ let t = Fr(e);
776
+ t !== null && (G.value.includes(t.seriesIndex) || Pr(t.seriesIndex));
777
+ }
778
+ let Rr = y(() => sr.value.reduce((e, t) => e + t.values.reduce((e, t) => e + t, 0), 0)), zr = y(() => {
779
+ if (z.value && !or.value) {
780
+ let e = ur.value, t = U.value.map((t) => ({
781
+ ...t,
782
+ value: t.value * e,
783
+ color: t.color,
784
+ ghost: !1
785
+ })), n = Rr.value * (1 - e);
786
+ return n > 0 && t.push({
787
+ name: "__ghost__",
788
+ value: n,
789
+ color: "transparent",
790
+ ghost: !0
791
+ }), t;
792
+ } else return W.value.forEach((e) => {
793
+ if ([null, void 0].includes(e.values)) return {
794
+ ...e,
795
+ values: []
796
+ };
797
+ }), W.value.map((e, t) => ({
798
+ ...e,
799
+ seriesIndex: t
800
+ })).filter((e, t) => !G.value.includes(t));
801
+ }), Br = y(() => sr.value.map((e, t) => {
802
+ let n = (e.values || []).reduce((e, t) => e + t, 0), r = n / sr.value.map((e) => (e.values || []).reduce((e, t) => e + t, 0)).reduce((e, t) => e + t, 0);
803
+ return {
804
+ name: e.name,
805
+ color: le(e.color) || Tr.value[t] || u[t] || u[t % u.length],
806
+ value: n,
807
+ shape: "circle",
808
+ patternIndex: t,
809
+ proportion: r
810
+ };
811
+ }).map((e, t) => {
812
+ let n = g(R.value.style.chart.layout.labels.value.formatter, e.value, d({
813
+ p: R.value.style.chart.layout.labels.dataLabels.prefix,
814
+ v: e.value,
815
+ s: R.value.style.chart.layout.labels.dataLabels.suffix,
816
+ r: R.value.style.chart.legend.roundingValue
817
+ }), {
818
+ datapoint: e,
819
+ index: t
820
+ }), r = g(R.value.style.chart.layout.labels.percentage.formatter, Zr(e), d({
821
+ v: Zr(e),
822
+ s: "%",
823
+ r: R.value.style.chart.legend.roundingPercentage
824
+ })), i = mi({
825
+ val: n,
826
+ percentage: G.value.includes(t) ? `${pi(e.proportion * 100)}%` : r,
827
+ showVal: R.value.style.chart.legend.showValue,
828
+ showPercentage: R.value.style.chart.legend.showPercentage,
829
+ config: R.value.style.chart.legend
830
+ });
831
+ return {
832
+ ...e,
833
+ opacity: G.value.includes(t) ? .5 : 1,
834
+ segregate: () => !kr.value && Pr(t),
835
+ isSegregated: G.value.includes(t),
836
+ display: `${e.name}${R.value.style.chart.legend.showPercentage || R.value.style.chart.legend.showValue ? ": " : ""}${i}`
837
+ };
838
+ })), Vr = y(() => ({
839
+ cy: "donut-div-legend",
840
+ backgroundColor: R.value.style.chart.legend.backgroundColor,
841
+ color: R.value.style.chart.legend.color,
842
+ fontSize: R.value.style.chart.legend.fontSize,
843
+ paddingBottom: 12,
844
+ fontWeight: R.value.style.chart.legend.bold ? "bold" : ""
845
+ })), K = y(() => {
846
+ let e = R.value.style.chart.layout.donut.radiusRatio, t = Math.max(.1, Math.min(.50001, e)), n = Math.min(H.value.width * t, H.value.height * t);
847
+ return Math.max(12, n);
848
+ }), q = y(() => ee({ series: zr.value }, H.value.width / 2, H.value.height / 2, K.value, K.value, 1.99999, 2, 1, 360, 105.25, Er.value)), Hr = y(() => Math.abs(zr.value.map((e) => e.value).reduce((e, t) => e + t, 0)) > 0), Ur = y(() => ee({ series: [{
849
+ value: 1,
850
+ color: R.value.style.chart.layout.donut.emptyFill,
851
+ name: "_",
852
+ seriesIndex: 0,
853
+ patternIndex: -1,
854
+ ghost: !1,
855
+ absoluteValues: [1]
856
+ }] }, H.value.width / 2, H.value.height / 2, K.value, K.value, 1.99999, 2, 1, 360, 105.25, Er.value)), J = y(() => q.value.filter((e) => !e.ghost)), Y = y(() => {
857
+ let e = Math.max(...zr.value.map((e) => e.value));
858
+ return n({
859
+ series: zr.value.map((t) => t.value / e),
860
+ center: {
861
+ x: H.value.width / 2,
862
+ y: H.value.height / 2
863
+ },
864
+ maxRadius: Math.min(H.value.width, H.value.height) / 3,
865
+ hasGhost: z.value
866
+ });
867
+ });
868
+ function Wr(e) {
869
+ return e.x > H.value.width / 2 + 6 ? "start" : e.x < H.value.width / 2 - 6 ? "end" : "middle";
870
+ }
871
+ function Gr(e) {
872
+ return e.middlePoint.y > H.value.height / 2 ? _({
873
+ initX: e.middlePoint.x,
874
+ initY: e.middlePoint.y,
875
+ offset: 100,
876
+ centerX: H.value.width / 2,
877
+ centerY: H.value.height / 2
878
+ }).y : _({
879
+ initX: e.middlePoint.x,
880
+ initY: e.middlePoint.y,
881
+ offset: 0,
882
+ centerX: H.value.width / 2,
883
+ centerY: H.value.height / 2
884
+ }).y - 100;
885
+ }
886
+ function X(e) {
887
+ return e.proportion * 100 > R.value.style.chart.layout.labels.dataLabels.hideUnderValue;
888
+ }
889
+ function Kr(e, t) {
890
+ let n = R.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = R.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold, i = (Yr.value[t] ?? e.proportion ?? 0) * 100;
891
+ return i > n && i <= r;
892
+ }
893
+ let { smallArcLayoutsClassic: Z } = Qe({
894
+ FINAL_CONFIG: R,
895
+ noGhostDonut: J,
896
+ svg: H,
897
+ padding: yr,
898
+ labels_inline_fontSize: Jn,
899
+ minSize: K,
900
+ findArcMidpoint: ie,
901
+ calcMarkerOffsetX: p,
902
+ calcMarkerOffsetY: h,
903
+ animatingIndex: Ar,
904
+ segregated: G,
905
+ isSmallArc: Kr
906
+ });
907
+ function qr(e, t) {
908
+ let n = e.value / Jr(t);
909
+ return isNaN(n) ? 0 : g(R.value.style.chart.layout.labels.percentage.formatter, n * 100, d({
910
+ v: n * 100,
911
+ s: "%",
912
+ r: R.value.style.chart.layout.labels.percentage.rounding
913
+ }), { datapoint: e });
914
+ }
915
+ function Jr(e) {
916
+ return [...e].map((e) => e.value).reduce((e, t) => e + t, 0);
917
+ }
918
+ let Q = y(() => zr.value.map((e) => e.value).reduce((e, t) => e + t, 0)), Yr = y(() => {
919
+ let e = U.value.reduce((e, t) => e + t.value, 0);
920
+ return e <= 0 ? [] : U.value.map((t) => t.value / e);
921
+ }), Xr = y(() => Q.value / zr.value.length);
922
+ function Zr(e) {
923
+ return kr.value ? e.proportion * 100 : e.value / Q.value * 100;
924
+ }
925
+ let Qr = O(null), $r = O(!1);
926
+ function ei({ datapoint: e, seriesIndex: t }) {
927
+ R.value.events.datapointLeave && R.value.events.datapointLeave({
928
+ datapoint: e,
929
+ seriesIndex: t
930
+ }), er.value = !1, L.value = null, Un.value = null, Gn.value = "pointer";
931
+ }
932
+ function ti({ datapoint: e, relativeIndex: t, seriesIndex: n, show: r = !1, triggerMode: i = "pointer" }) {
933
+ R.value.events.datapointEnter && R.value.events.datapointEnter({
934
+ datapoint: e,
935
+ seriesIndex: n
936
+ }), Gn.value = i, Un.value = t, Qr.value = {
937
+ datapoint: e,
938
+ seriesIndex: n,
939
+ config: R.value,
940
+ series: U.value
941
+ }, er.value = r, L.value = t;
942
+ let a = "", o = R.value.style.chart.tooltip.customFormat;
943
+ if ($r.value = !1, ne(o)) try {
944
+ let t = o({
945
+ seriesIndex: n,
946
+ datapoint: e,
947
+ series: U.value,
948
+ config: R.value
949
+ });
950
+ typeof t == "string" && (tr.value = t, $r.value = !0);
951
+ } catch {
952
+ console.warn("Custom format cannot be applied."), $r.value = !1;
953
+ }
954
+ $r.value || (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, a += `<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="${e.color}"/>${wn.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${I.value}_${n})"/>` : ""}</svg>`, a += `<b>${mi({
955
+ showVal: R.value.style.chart.tooltip.showValue,
956
+ showPercentage: R.value.style.chart.tooltip.showPercentage,
957
+ val: `<span>${g(R.value.style.chart.layout.labels.value.formatter, e.value, d({
958
+ p: R.value.style.chart.layout.labels.dataLabels.prefix,
959
+ v: e.value,
960
+ s: R.value.style.chart.layout.labels.dataLabels.suffix,
961
+ r: R.value.style.chart.tooltip.roundingValue
962
+ }), {
963
+ datapoint: e,
964
+ relativeIndex: t,
965
+ seriesIndex: n
966
+ })}</span>`,
967
+ percentage: g(R.value.style.chart.layout.labels.percentage.formatter, e.proportion * 100, d({
968
+ v: e.proportion * 100,
969
+ s: "%",
970
+ r: R.value.style.chart.tooltip.roundingPercentage
971
+ }), {
972
+ datapoint: e,
973
+ relativeIndex: t,
974
+ seriesIndex: n
975
+ }),
976
+ config: R.value.style.chart.tooltip
977
+ })}</b></div>`, R.value.style.chart.comments.showInTooltip && e.comment && (a += `<div class="vue-data-ui-tooltip-comment" style="background:${e.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`), tr.value = `<div>${a}</div>`);
978
+ }
979
+ function ni(e, t) {
980
+ let n = Z.value[t];
981
+ if (n) return {
982
+ textAnchor: n.textAnchor,
983
+ x: n.labelX,
984
+ y: n.labelY
985
+ };
986
+ let r = p(e, !0, 12);
987
+ return {
988
+ textAnchor: r.anchor,
989
+ x: r.x,
990
+ y: h(e)
991
+ };
992
+ }
993
+ function ri(e, t, n) {
994
+ let { textAnchor: r, x: i } = ni(e, t), a = hi(e), o = `
995
+ <tspan
996
+ class="vue-data-ui-datalabel-inline"
997
+ fill="${R.value.style.chart.layout.labels.percentage.color}"
998
+ font-size="${n ? Jn.value : qn.value}px"
999
+ style="font-weight:${R.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}"
1000
+ >${a}</tspan>
1001
+ `, s = String(e.name ?? "").split(/\n/g), c = "";
1002
+ return s.forEach((e, t) => {
1003
+ t === 0 ? c += `
1004
+ <tspan
1005
+ class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1006
+ fill="${R.value.style.chart.layout.labels.name.color}"
1007
+ font-size="${n ? Jn.value : F.value}px"
1008
+ style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1009
+ >${e}</tspan>
1010
+ ` : c += `
1011
+ <tspan
1012
+ class="${n ? "vue-data-ui-datalabel-inline" : "vue-data-ui-datalabel-name"}"
1013
+ x="${i}"
1014
+ dy="${(n ? Jn.value : F.value) * 1.2}"
1015
+ fill="${R.value.style.chart.layout.labels.name.color}"
1016
+ font-size="${n ? Jn.value : F.value}px"
1017
+ style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : ""}"
1018
+ >${e}</tspan>
1019
+ `;
1020
+ }), r === "end" ? `${R.value.style.chart.layout.labels.name.show ? c : ""}${o}` : `${o}${R.value.style.chart.layout.labels.name.show ? c : ""}`;
1021
+ }
1022
+ function ii(e, t) {
1023
+ let n = Y.value[t].middlePoint, r = Wr(n), i = _({
1024
+ initX: n.x,
1025
+ initY: n.y,
1026
+ offset: 42,
1027
+ centerX: H.value.width / 2,
1028
+ centerY: H.value.height / 2
1029
+ }), a = i.x;
1030
+ i.y;
1031
+ let o = hi(e), s = `
1032
+ <tspan
1033
+ class="vue-data-ui-datalabel-value"
1034
+ fill="${R.value.style.chart.layout.labels.percentage.color}"
1035
+ font-size="${qn.value}px"
1036
+ style="font-weight:${R.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"}"
1037
+ >${o}</tspan>
1038
+ `, c = String(e.name ?? "").split(/\n/g), l = "";
1039
+ return c.forEach((e, t) => {
1040
+ t === 0 ? l += `
1041
+ <tspan
1042
+ class="vue-data-ui-datalabel-name"
1043
+ fill="${R.value.style.chart.layout.labels.name.color}"
1044
+ font-size="${F.value}px"
1045
+ style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1046
+ >${e}</tspan>
1047
+ ` : l += `
1048
+ <tspan
1049
+ class="vue-data-ui-datalabel-name"
1050
+ x="${a}"
1051
+ dy="${F.value * 1.2}"
1052
+ fill="${R.value.style.chart.layout.labels.name.color}"
1053
+ font-size="${F.value}px"
1054
+ style="font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : "normal"}"
1055
+ >${e}</tspan>
1056
+ `;
1057
+ }), r === "end" ? `${R.value.style.chart.layout.labels.name.show ? l : ""}${s}` : `${s}${R.value.style.chart.layout.labels.name.show ? l : ""}`;
1058
+ }
1059
+ function ai(e) {
1060
+ return R.value.useBlurOnHover && ![null, void 0].includes(L.value) && L.value !== e ? `url(#blur_${I.value})` : "";
1061
+ }
1062
+ function oi(e) {
1063
+ if (!kr.value || Ar.value === null || e.seriesIndex !== Ar.value) return 1;
1064
+ let t = (e.proportion ?? 0) * 100, n = R.value.style.chart.layout.labels.dataLabels.hideUnderValue, r = R.value.style.chart.layout.labels.dataLabels.smallArcClusterThreshold + 2, i = n;
1065
+ return t >= r ? 1 : t <= i ? 0 : (t - i) / (r - i);
1066
+ }
1067
+ let si = y(() => ({
1068
+ head: zr.value.map((e) => ({
1069
+ name: e.name,
1070
+ color: e.color
1071
+ })),
1072
+ body: zr.value.map((e) => e.value)
1073
+ }));
1074
+ function ci(e = null) {
1075
+ Be(() => {
1076
+ let t = si.value.head.map((e, t) => [
1077
+ [e.name],
1078
+ [si.value.body[t]],
1079
+ [isNaN(si.value.body[t] / Q.value) ? "-" : si.value.body[t] / Q.value * 100]
1080
+ ]), n = o([
1081
+ [R.value.style.chart.title.text],
1082
+ [R.value.style.chart.title.subtitle.text],
1083
+ [
1084
+ [""],
1085
+ ["val"],
1086
+ ["%"]
1087
+ ]
1088
+ ].concat(t));
1089
+ e ? e(n) : te({
1090
+ csvContent: n,
1091
+ title: R.value.style.chart.title.text || "vue-ui-donut"
1092
+ });
1093
+ });
1094
+ }
1095
+ let li = y(() => {
1096
+ let e = [
1097
+ " <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>",
1098
+ d({
1099
+ p: R.value.style.chart.layout.labels.dataLabels.prefix,
1100
+ v: Q.value,
1101
+ s: R.value.style.chart.layout.labels.dataLabels.suffix,
1102
+ r: R.value.table.td.roundingValue
1103
+ }),
1104
+ "100%"
1105
+ ], t = si.value.head.map((e, t) => [
1106
+ {
1107
+ color: e.color,
1108
+ name: e.name || "-"
1109
+ },
1110
+ si.value.body[t],
1111
+ isNaN(si.value.body[t] / Q.value) ? "-" : (si.value.body[t] / Q.value * 100).toFixed(R.value.table.td.roundingPercentage) + "%"
1112
+ ]), n = t.map((e) => e.map((e, t) => t === 0 ? e.name : e)), r = {
1113
+ th: {
1114
+ backgroundColor: R.value.table.th.backgroundColor,
1115
+ color: R.value.table.th.color,
1116
+ outline: R.value.table.th.outline
1117
+ },
1118
+ td: {
1119
+ backgroundColor: R.value.table.td.backgroundColor,
1120
+ color: R.value.table.td.color,
1121
+ outline: R.value.table.td.outline
1122
+ },
1123
+ breakpoint: R.value.table.responsiveBreakpoint
1124
+ };
1125
+ return {
1126
+ colNames: [
1127
+ R.value.table.columnNames.series,
1128
+ R.value.table.columnNames.value,
1129
+ R.value.table.columnNames.percentage
1130
+ ],
1131
+ head: e,
1132
+ body: t,
1133
+ a11yBody: n,
1134
+ config: r
1135
+ };
1136
+ }), ui = O(!1);
1137
+ function di(e) {
1138
+ ui.value = e, nr.value += 1;
1139
+ }
1140
+ let fi = y(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
1141
+ function pi(e) {
1142
+ return Ae({
1143
+ num: e,
1144
+ rounding: R.value.style.chart.legend.roundingPercentage
1145
+ });
1146
+ }
1147
+ function mi({ val: e, percentage: t, showVal: n, showPercentage: r, config: i }) {
1148
+ return je({
1149
+ config: i,
1150
+ val: e,
1151
+ percentage: t,
1152
+ showVal: n,
1153
+ showPercentage: r
1154
+ });
1155
+ }
1156
+ function hi(e) {
1157
+ return mi({
1158
+ val: g(R.value.style.chart.layout.labels.value.formatter, e.value, d({
1159
+ p: R.value.style.chart.layout.labels.dataLabels.prefix,
1160
+ v: e.value,
1161
+ s: R.value.style.chart.layout.labels.dataLabels.suffix,
1162
+ r: R.value.style.chart.layout.labels.value.rounding
1163
+ }), { datapoint: e }),
1164
+ percentage: qr(e, J.value),
1165
+ showVal: R.value.style.chart.layout.labels.value.show,
1166
+ showPercentage: R.value.style.chart.layout.labels.percentage.show,
1167
+ config: R.value.style.chart.layout.labels.dataLabels
1168
+ });
1169
+ }
1170
+ function $(e, t) {
1171
+ R.value.events.datapointClick && R.value.events.datapointClick({
1172
+ datapoint: e,
1173
+ seriesIndex: e.seriesIndex
1174
+ }), Dr("selectDatapoint", {
1175
+ datapoint: e,
1176
+ index: t
1177
+ });
1178
+ }
1179
+ function gi() {
1180
+ V.value.showTable = !V.value.showTable;
1181
+ }
1182
+ function _i() {
1183
+ V.value.dataLabels.show = !V.value.dataLabels.show;
1184
+ }
1185
+ function vi() {
1186
+ V.value.showTooltip = !V.value.showTooltip;
1187
+ }
1188
+ let yi = O(!1);
1189
+ function bi() {
1190
+ yi.value = !yi.value;
1191
+ }
1192
+ async function xi({ scale: e = 2 } = {}) {
1193
+ if (!P.value) return;
1194
+ let { width: t, height: n } = P.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ye({
1195
+ domElement: P.value,
1196
+ base64: !0,
1197
+ img: !0,
1198
+ scale: e
1199
+ });
1200
+ return {
1201
+ imageUri: i,
1202
+ base64: a,
1203
+ title: R.value.style.chart.title.text,
1204
+ width: t,
1205
+ height: n,
1206
+ aspectRatio: r
1207
+ };
1208
+ }
1209
+ function Si() {
1210
+ if (!En.value) return;
1211
+ let { x: e, y: t, width: n, height: r } = En.value.getBBox();
1212
+ B.value && B.value.setAttribute("viewBox", `${e} ${t} ${n + Math.min(0, e)} ${r + Math.min(0, t)}`);
1213
+ }
1214
+ let Ci = y(() => {
1215
+ let e = R.value.table.useDialog && !R.value.table.show, t = V.value.showTable;
1216
+ return {
1217
+ component: e ? bn : hn,
1218
+ title: `${R.value.style.chart.title.text}${R.value.style.chart.title.subtitle.text ? `: ${R.value.style.chart.title.subtitle.text}` : ""}`,
1219
+ props: e ? {
1220
+ backgroundColor: R.value.table.th.backgroundColor,
1221
+ color: R.value.table.th.color,
1222
+ headerColor: R.value.table.th.color,
1223
+ headerBg: R.value.table.th.backgroundColor,
1224
+ isFullscreen: ui.value,
1225
+ fullscreenParent: P.value,
1226
+ forcedWidth: Math.min(500, window.innerWidth * .8),
1227
+ isCursorPointer: ir.value
1228
+ } : {
1229
+ hideDetails: !0,
1230
+ config: {
1231
+ open: t,
1232
+ maxHeight: 1e4,
1233
+ body: {
1234
+ backgroundColor: R.value.style.chart.backgroundColor,
1235
+ color: R.value.style.chart.color
1236
+ },
1237
+ head: {
1238
+ backgroundColor: R.value.style.chart.backgroundColor,
1239
+ color: R.value.style.chart.color
1240
+ }
1241
+ }
1242
+ }
1243
+ };
1244
+ });
1245
+ Xe(() => V.value.showTable, (e) => {
1246
+ R.value.table.show || (e && R.value.table.useDialog && zn.value ? zn.value.open() : "close" in zn.value && zn.value.close());
1247
+ });
1248
+ function wi() {
1249
+ V.value.showTable = !1, Bn.value && Bn.value.setTableIconState(!1);
1250
+ }
1251
+ let Ti = y(() => Br.value.map((e) => ({
1252
+ ...e,
1253
+ name: e.display
1254
+ }))), Ei = y(() => R.value.style.chart.backgroundColor), Di = y(() => R.value.style.chart.legend), { exportSvg: Oi, getSvg: ki } = ge({
1255
+ svg: B,
1256
+ title: y(() => R.value.style.chart.title),
1257
+ legend: Di,
1258
+ legendItems: Ti,
1259
+ backgroundColor: Ei
1260
+ });
1261
+ async function Ai({ isCb: e }) {
1262
+ Hn.value = !0, await Be();
1263
+ try {
1264
+ if (e) {
1265
+ let { blob: e, url: t, text: n, dataUrl: r } = await ki();
1266
+ await Promise.resolve(R.value.userOptions.callbacks.svg({
1267
+ blob: e,
1268
+ url: t,
1269
+ text: n,
1270
+ dataUrl: r
1271
+ }));
1272
+ } else await Promise.resolve(Oi());
1273
+ } finally {
1274
+ Hn.value = !1;
1275
+ }
1276
+ }
1277
+ function ji(e) {
1278
+ if (e?.stage === "start") {
1279
+ Vn.value = !0;
1280
+ return;
1281
+ }
1282
+ if (e?.stage === "end") {
1283
+ Vn.value = !1;
1284
+ return;
1285
+ }
1286
+ Cr();
1287
+ }
1288
+ async function Mi() {
1289
+ if (Dr("copyAlt", {
1290
+ config: R.value,
1291
+ dataset: W.value
1292
+ }), !R.value.userOptions.callbacks.altCopy) {
1293
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1294
+ return;
1295
+ }
1296
+ await Promise.resolve(R.value.userOptions.callbacks.altCopy({
1297
+ config: R.value,
1298
+ dataset: W.value
1299
+ }));
1300
+ }
1301
+ function Ni() {
1302
+ Un.value = null, Kn.value = !0;
1303
+ }
1304
+ function Pi() {
1305
+ Un.value = null, Gn.value = "pointer", er.value = !1, L.value = null, Kn.value = !1;
1306
+ }
1307
+ function Fi(e) {
1308
+ if (!B.value || yi.value || document.activeElement !== B.value || !J.value.length) return;
1309
+ let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1310
+ if (!t && !n && !r && !i) return;
1311
+ if (e.preventDefault(), e.stopPropagation(), i) {
1312
+ Un.value = null, Gn.value = "pointer", er.value = !1, L.value = null;
1313
+ return;
1314
+ }
1315
+ if (r) {
1316
+ if (Un.value === null) return;
1317
+ let e = J.value[Un.value];
1318
+ if (!e) return;
1319
+ $(e, Un.value);
1320
+ return;
1321
+ }
1322
+ let a = Un.value, o = L.value, s = a !== null && a >= 0 && a < J.value.length, c = o !== null && o >= 0 && o < J.value.length;
1323
+ s ? n ? (a += 1, a >= J.value.length && (a = 0)) : t && (--a, a < 0 && (a = J.value.length - 1)) : c ? (a = n ? o + 1 : o - 1, a >= J.value.length && (a = 0), a < 0 && (a = J.value.length - 1)) : a = n ? 0 : J.value.length - 1;
1324
+ let l = J.value[a];
1325
+ l && (Un.value = a, Ii(a), ti({
1326
+ datapoint: l,
1327
+ relativeIndex: a,
1328
+ seriesIndex: l.seriesIndex,
1329
+ show: !0,
1330
+ triggerMode: "keyboard"
1331
+ }));
1332
+ }
1333
+ function Ii(e) {
1334
+ if (!Number.isFinite(e) || !B.value) return;
1335
+ let t = H.value.width / 2, n = H.value.height / 2;
1336
+ if (R.value.type === "classic") {
1337
+ let r = J.value[e];
1338
+ if (!r?.arcSlice) return;
1339
+ let i = ie(r.arcSlice);
1340
+ if (!i) return;
1341
+ t = i.x, n = i.y;
1342
+ } else {
1343
+ let r = Y.value[e]?.middlePoint;
1344
+ if (!r) return;
1345
+ t = r.x, n = r.y;
1346
+ }
1347
+ let r = B.value.getBoundingClientRect();
1348
+ Wn.value = {
1349
+ x: r.left + t / H.value.width * r.width,
1350
+ y: r.top + n / H.value.height * r.height
1351
+ };
1352
+ }
1353
+ let Li = y(() => ({
1354
+ headers: li.value?.colNames ?? [],
1355
+ rows: li.value?.a11yBody ?? []
1356
+ }));
1357
+ return Se({
1358
+ autoSize: Si,
1359
+ getData: Or,
1360
+ getImage: xi,
1361
+ generatePdf: Sr,
1362
+ generateCsv: ci,
1363
+ generateImage: Cr,
1364
+ generateSvg: Ai,
1365
+ hideSeries: Lr,
1366
+ showSeries: Ir,
1367
+ toggleTable: gi,
1368
+ toggleLabels: _i,
1369
+ toggleTooltip: vi,
1370
+ toggleAnnotator: bi,
1371
+ toggleFullscreen: di,
1372
+ copyAlt: Mi
1373
+ }), (t, n) => (D(), S("div", {
1374
+ ref_key: "donutChart",
1375
+ ref: P,
1376
+ class: Ve(`vue-data-ui-component vue-ui-donut ${ui.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${R.value.useCssAnimation ? "" : "vue-ui-dna"}`),
1377
+ style: E(`font-family:${R.value.style.fontFamily};width:100%; ${R.value.responsive ? "height:100%;" : ""} text-align:center;background:${R.value.style.chart.backgroundColor}`),
1378
+ id: `donut__${I.value}`,
1379
+ onMouseenter: _r,
1380
+ onMouseleave: vr
1381
+ }, [
1382
+ C("div", {
1383
+ id: `chart-instructions-${I.value}`,
1384
+ class: "sr-only"
1385
+ }, [C("p", null, Ke(R.value.a11y.translations.keyboardNavigation), 1)], 8, tt),
1386
+ Li.value?.rows?.length ? (D(), b(De, {
1387
+ key: 0,
1388
+ uid: I.value,
1389
+ head: Li.value.headers,
1390
+ body: Li.value.rows,
1391
+ notice: R.value.a11y.translations.tableAvailable,
1392
+ caption: R.value.a11y.translations.tableCaption
1393
+ }, null, 8, [
1394
+ "uid",
1395
+ "head",
1396
+ "body",
1397
+ "notice",
1398
+ "caption"
1399
+ ])) : x("", !0),
1400
+ R.value.userOptions.buttons.annotator && j(B) ? (D(), b(j(_n), {
1401
+ key: 1,
1402
+ color: R.value.style.chart.color,
1403
+ backgroundColor: R.value.style.chart.backgroundColor,
1404
+ active: yi.value,
1405
+ svgRef: j(B),
1406
+ isCursorPointer: ir.value,
1407
+ onClose: bi
1408
+ }, {
1409
+ "annotator-action-close": M(() => [A(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1410
+ "annotator-action-color": M(({ color: e }) => [A(t.$slots, "annotator-action-color", T(w({ color: e })), void 0, !0)]),
1411
+ "annotator-action-draw": M(({ mode: e }) => [A(t.$slots, "annotator-action-draw", T(w({ mode: e })), void 0, !0)]),
1412
+ "annotator-action-undo": M(({ disabled: e }) => [A(t.$slots, "annotator-action-undo", T(w({ disabled: e })), void 0, !0)]),
1413
+ "annotator-action-redo": M(({ disabled: e }) => [A(t.$slots, "annotator-action-redo", T(w({ disabled: e })), void 0, !0)]),
1414
+ "annotator-action-delete": M(({ disabled: e }) => [A(t.$slots, "annotator-action-delete", T(w({ disabled: e })), void 0, !0)]),
1415
+ _: 3
1416
+ }, 8, [
1417
+ "color",
1418
+ "backgroundColor",
1419
+ "active",
1420
+ "svgRef",
1421
+ "isCursorPointer"
1422
+ ])) : x("", !0),
1423
+ A(t.$slots, "userConfig", {}, void 0, !0),
1424
+ wr.value ? (D(), S("div", {
1425
+ key: 2,
1426
+ ref_key: "noTitle",
1427
+ ref: Pn,
1428
+ class: "vue-data-ui-no-title-space",
1429
+ style: "height:36px; width: 100%;background:transparent"
1430
+ }, null, 512)) : x("", !0),
1431
+ R.value.style.chart.title.text ? (D(), S("div", {
1432
+ key: 3,
1433
+ ref_key: "chartTitle",
1434
+ ref: kn,
1435
+ style: "width:100%;background:transparent;padding-bottom:24px"
1436
+ }, [(D(), b(be, {
1437
+ key: `title_${Fn.value}`,
1438
+ config: {
1439
+ title: {
1440
+ cy: "donut-div-title",
1441
+ ...R.value.style.chart.title
1442
+ },
1443
+ subtitle: {
1444
+ cy: "donut-div-subtitle",
1445
+ ...R.value.style.chart.title.subtitle
1446
+ }
1447
+ }
1448
+ }, null, 8, ["config"]))], 512)) : x("", !0),
1449
+ C("div", { id: `legend-top-${I.value}` }, null, 8, nt),
1450
+ R.value.userOptions.show && Tn.value && (j(gr) || j(mr)) ? (D(), b(j(vn), {
1451
+ ref_key: "userOptionsRef",
1452
+ ref: Bn,
1453
+ key: `user_option_${nr.value}`,
1454
+ backgroundColor: R.value.style.chart.backgroundColor,
1455
+ color: R.value.style.chart.color,
1456
+ isPrinting: j(br),
1457
+ isImaging: j(xr),
1458
+ uid: I.value,
1459
+ hasTooltip: R.value.style.chart.tooltip.show && R.value.userOptions.buttons.tooltip,
1460
+ hasPdf: R.value.userOptions.buttons.pdf,
1461
+ hasImg: R.value.userOptions.buttons.img,
1462
+ hasSvg: R.value.userOptions.buttons.svg,
1463
+ hasXls: R.value.userOptions.buttons.csv,
1464
+ hasTable: R.value.userOptions.buttons.table,
1465
+ hasLabel: R.value.userOptions.buttons.labels,
1466
+ hasFullscreen: R.value.userOptions.buttons.fullscreen,
1467
+ hasAltCopy: R.value.userOptions.buttons.altCopy,
1468
+ isFullscreen: ui.value,
1469
+ chartElement: P.value,
1470
+ position: R.value.userOptions.position,
1471
+ callbacks: R.value.userOptions.callbacks,
1472
+ isTooltip: V.value.showTooltip,
1473
+ titles: { ...R.value.userOptions.buttonTitles },
1474
+ hasAnnotator: R.value.userOptions.buttons.annotator,
1475
+ isAnnotation: yi.value,
1476
+ printScale: R.value.userOptions.print.scale,
1477
+ tableDialog: R.value.table.useDialog,
1478
+ isCursorPointer: ir.value,
1479
+ onToggleFullscreen: di,
1480
+ onGeneratePdf: j(Sr),
1481
+ onGenerateCsv: ci,
1482
+ onGenerateImage: ji,
1483
+ onGenerateSvg: Ai,
1484
+ onToggleTable: gi,
1485
+ onToggleLabels: _i,
1486
+ onToggleTooltip: vi,
1487
+ onToggleAnnotator: bi,
1488
+ onCopyAlt: Mi,
1489
+ style: E({ visibility: j(gr) ? j(mr) ? "visible" : "hidden" : "visible" })
1490
+ }, Fe({ _: 2 }, [
1491
+ t.$slots.menuIcon ? {
1492
+ name: "menuIcon",
1493
+ fn: M(({ isOpen: e, color: n }) => [A(t.$slots, "menuIcon", T(w({
1494
+ isOpen: e,
1495
+ color: n
1496
+ })), void 0, !0)]),
1497
+ key: "0"
1498
+ } : void 0,
1499
+ t.$slots.optionTooltip ? {
1500
+ name: "optionTooltip",
1501
+ fn: M(() => [A(t.$slots, "optionTooltip", {}, void 0, !0)]),
1502
+ key: "1"
1503
+ } : void 0,
1504
+ t.$slots.optionPdf ? {
1505
+ name: "optionPdf",
1506
+ fn: M(() => [A(t.$slots, "optionPdf", {}, void 0, !0)]),
1507
+ key: "2"
1508
+ } : void 0,
1509
+ t.$slots.optionCsv ? {
1510
+ name: "optionCsv",
1511
+ fn: M(() => [A(t.$slots, "optionCsv", {}, void 0, !0)]),
1512
+ key: "3"
1513
+ } : void 0,
1514
+ t.$slots.optionImg ? {
1515
+ name: "optionImg",
1516
+ fn: M(() => [A(t.$slots, "optionImg", {}, void 0, !0)]),
1517
+ key: "4"
1518
+ } : void 0,
1519
+ t.$slots.optionSvg ? {
1520
+ name: "optionSvg",
1521
+ fn: M(() => [A(t.$slots, "optionSvg", {}, void 0, !0)]),
1522
+ key: "5"
1523
+ } : void 0,
1524
+ t.$slots.optionTable ? {
1525
+ name: "optionTable",
1526
+ fn: M(() => [A(t.$slots, "optionTable", {}, void 0, !0)]),
1527
+ key: "6"
1528
+ } : void 0,
1529
+ t.$slots.optionLabels ? {
1530
+ name: "optionLabels",
1531
+ fn: M(() => [A(t.$slots, "optionLabels", {}, void 0, !0)]),
1532
+ key: "7"
1533
+ } : void 0,
1534
+ t.$slots.optionFullscreen ? {
1535
+ name: "optionFullscreen",
1536
+ fn: M(({ toggleFullscreen: e, isFullscreen: n }) => [A(t.$slots, "optionFullscreen", T(w({
1537
+ toggleFullscreen: e,
1538
+ isFullscreen: n
1539
+ })), void 0, !0)]),
1540
+ key: "8"
1541
+ } : void 0,
1542
+ t.$slots.optionAnnotator ? {
1543
+ name: "optionAnnotator",
1544
+ fn: M(({ toggleAnnotator: e, isAnnotator: n }) => [A(t.$slots, "optionAnnotator", T(w({
1545
+ toggleAnnotator: e,
1546
+ isAnnotator: n
1547
+ })), void 0, !0)]),
1548
+ key: "9"
1549
+ } : void 0,
1550
+ t.$slots.optionAltCopy ? {
1551
+ name: "optionAltCopy",
1552
+ fn: M(({ altCopy: e }) => [A(t.$slots, "optionAltCopy", T(w({ altCopy: e })), void 0, !0)]),
1553
+ key: "10"
1554
+ } : void 0,
1555
+ t.$slots["custom-menu-before"] ? {
1556
+ name: "custom-menu-before",
1557
+ fn: M(() => [A(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1558
+ key: "11"
1559
+ } : void 0,
1560
+ t.$slots["custom-menu-after"] ? {
1561
+ name: "custom-menu-after",
1562
+ fn: M(() => [A(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1563
+ key: "12"
1564
+ } : void 0
1565
+ ]), 1032, /* @__PURE__ */ "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".split("."))) : x("", !0),
1566
+ C("div", rt, [(D(), S("svg", {
1567
+ ref_key: "svgRef",
1568
+ ref: B,
1569
+ xmlns: j(ce),
1570
+ "aria-describedby": `chart-instructions-${I.value}`,
1571
+ class: Ve({
1572
+ "vue-data-ui-fullscreen--on": ui.value,
1573
+ "vue-data-ui-fulscreen--off": !ui.value,
1574
+ "vue-data-ui-svg": !0
1575
+ }),
1576
+ viewBox: `0 0 ${H.value.width <= 0 ? 10 : H.value.width} ${H.value.height <= 0 ? 10 : H.value.height}`,
1577
+ style: E(`max-width:100%; overflow: visible; background:transparent;color:${R.value.style.chart.color};${yr.value.css}`),
1578
+ tabindex: "0",
1579
+ onFocus: Ni,
1580
+ onBlur: Pi,
1581
+ onKeydown: Fi
1582
+ }, [C("g", {
1583
+ ref_key: "G",
1584
+ ref: En,
1585
+ class: "vue-data-ui-g"
1586
+ }, [
1587
+ Le(j(yn)),
1588
+ t.$slots["chart-background"] ? (D(), S("foreignObject", {
1589
+ key: 0,
1590
+ x: 0,
1591
+ y: 0,
1592
+ width: H.value.width <= 0 ? 10 : H.value.width,
1593
+ height: H.value.height <= 0 ? 10 : H.value.height,
1594
+ style: { pointerEvents: "none" }
1595
+ }, [A(t.$slots, "chart-background", {}, void 0, !0)], 8, at)) : x("", !0),
1596
+ R.value.type === "classic" && !isNaN(Er.value / K.value) ? (D(), S("defs", ot, [R.value.style.chart.useGradient ? (D(), b(Te, {
1597
+ key: 0,
1598
+ t: "radial",
1599
+ id: `gradient_${I.value}`,
1600
+ stops: [
1601
+ [
1602
+ "0%",
1603
+ j(de)(R.value.style.chart.backgroundColor, 0),
1604
+ 0
1605
+ ],
1606
+ [
1607
+ `${(1 - Er.value / K.value) * 100}%`,
1608
+ j(de)("#FFFFFF", 0),
1609
+ 0
1610
+ ],
1611
+ [
1612
+ `${(1 - Er.value / K.value / 2) * 100}%`,
1613
+ j(de)("#FFFFFF", R.value.style.chart.gradientIntensity),
1614
+ 1
1615
+ ],
1616
+ [
1617
+ "100%",
1618
+ j(de)(R.value.style.chart.backgroundColor, 0),
1619
+ 0
1620
+ ]
1621
+ ]
1622
+ }, null, 8, ["id", "stops"])) : x("", !0)])) : x("", !0),
1623
+ R.value.type === "polar" ? (D(), S("defs", st, [(D(!0), S(v, null, k(Y.value, (e, t) => (D(), b(Te, {
1624
+ t: "radial",
1625
+ id: `polar_gradient_${t}_${I.value}`,
1626
+ key: `pg_${t}_${I.value}`,
1627
+ cx: (isNaN(e.middlePoint.x / H.value.width * 100) ? 0 : e.middlePoint.x / H.value.width * 100) + "%",
1628
+ cy: (isNaN(e.middlePoint.y / H.value.height * 100) ? 0 : e.middlePoint.y / H.value.height * 100) + "%",
1629
+ r: "62%",
1630
+ stops: [[
1631
+ "0%",
1632
+ j(i)(q.value[t].color, .05),
1633
+ R.value.style.chart.gradientIntensity / 100
1634
+ ], [
1635
+ "100%",
1636
+ q.value[t].color,
1637
+ 1
1638
+ ]]
1639
+ }, null, 8, [
1640
+ "id",
1641
+ "cx",
1642
+ "cy",
1643
+ "stops"
1644
+ ]))), 128))])) : x("", !0),
1645
+ C("defs", null, [
1646
+ C("filter", {
1647
+ id: `blur_${I.value}`,
1648
+ x: "-50%",
1649
+ y: "-50%",
1650
+ width: "200%",
1651
+ height: "200%"
1652
+ }, [C("feGaussianBlur", {
1653
+ in: "SourceGraphic",
1654
+ stdDeviation: 2,
1655
+ id: `blur_std_${I.value}`
1656
+ }, null, 8, lt), n[5] ||= C("feColorMatrix", {
1657
+ type: "saturate",
1658
+ values: "0"
1659
+ }, null, -1)], 8, ct),
1660
+ C("filter", {
1661
+ id: `shadow_${I.value}`,
1662
+ "color-interpolation-filters": "sRGB"
1663
+ }, [C("feDropShadow", {
1664
+ dx: "0",
1665
+ dy: "0",
1666
+ stdDeviation: "10",
1667
+ "flood-opacity": "0.5",
1668
+ "flood-color": R.value.style.chart.layout.donut.shadowColor
1669
+ }, null, 8, dt)], 8, ut),
1670
+ C("filter", {
1671
+ id: `drop_shadow_${I.value}`,
1672
+ "color-interpolation-filters": "sRGB",
1673
+ x: "-50%",
1674
+ y: "-50%",
1675
+ width: "200%",
1676
+ height: "200%"
1677
+ }, [C("feDropShadow", {
1678
+ dx: "0",
1679
+ dy: "0",
1680
+ stdDeviation: "3",
1681
+ "flood-opacity": "1",
1682
+ "flood-color": R.value.style.chart.layout.donut.shadowColor
1683
+ }, null, 8, pt)], 8, ft)
1684
+ ]),
1685
+ R.value.type === "classic" ? (D(!0), S(v, { key: 3 }, k(q.value.filter((e) => !e.ghost), (e, t) => (D(), S("g", null, [X(e) && V.value.dataLabels.show ? (D(), S("path", {
1686
+ key: 0,
1687
+ d: j(Z)[t]?.connectorPath || j(ae)(e, {
1688
+ x: H.value.width / 2,
1689
+ y: H.value.height / 2
1690
+ }, 16, 16, !1, !1, Er.value, 12, R.value.style.chart.layout.curvedMarkers),
1691
+ stroke: e.color,
1692
+ "stroke-width": "1",
1693
+ "stroke-linecap": "round",
1694
+ "stroke-linejoin": "round",
1695
+ fill: "none",
1696
+ filter: ai(t)
1697
+ }, null, 8, mt)) : x("", !0)]))), 256)) : x("", !0),
1698
+ R.value.type === "polar" ? (D(!0), S(v, { key: 4 }, k(q.value.filter((e) => !e.ghost), (e, t) => (D(), S("g", null, [X(e) && V.value.dataLabels.show ? (D(), S("path", {
1699
+ key: 0,
1700
+ d: `M ${j(_)({
1701
+ initX: Y.value[t].middlePoint.x,
1702
+ initY: Y.value[t].middlePoint.y,
1703
+ offset: 24,
1704
+ centerX: H.value.width / 2,
1705
+ centerY: H.value.height / 2
1706
+ }).x},${j(_)({
1707
+ initX: Y.value[t].middlePoint.x,
1708
+ initY: Y.value[t].middlePoint.y,
1709
+ offset: 24,
1710
+ centerX: H.value.width / 2,
1711
+ centerY: H.value.height / 2
1712
+ }).y} ${Y.value[t].middlePoint.x},${Y.value[t].middlePoint.y}`,
1713
+ stroke: e.color,
1714
+ "stroke-width": "1",
1715
+ "stroke-linecap": "round",
1716
+ "stroke-linejoin": "round",
1717
+ fill: "none",
1718
+ filter: ai(t),
1719
+ style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1720
+ }, null, 12, ht)) : x("", !0)]))), 256)) : x("", !0),
1721
+ R.value.type === "classic" && R.value.style.chart.layout.donut.useShadow ? (D(), S("circle", {
1722
+ key: 5,
1723
+ cx: H.value.width / 2,
1724
+ cy: H.value.height / 2,
1725
+ r: K.value <= 0 ? 10 : K.value,
1726
+ fill: R.value.style.chart.backgroundColor,
1727
+ filter: `url(#shadow_${I.value})`
1728
+ }, null, 8, gt)) : x("", !0),
1729
+ t.$slots.pattern ? (D(), S("g", _t, [(D(!0), S(v, null, k(e.dataset, (e, n) => (D(), S("defs", { key: `pattern-${e.patternIndex}` }, [A(t.$slots, "pattern", ze({ ref_for: !0 }, {
1730
+ seriesIndex: n,
1731
+ patternId: `pattern_${I.value}_${n}`
1732
+ }), void 0, !0)]))), 128))])) : x("", !0),
1733
+ Q.value && R.value.type === "classic" ? (D(), S(v, { key: 7 }, [
1734
+ (D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1735
+ stroke: R.value.style.chart.backgroundColor,
1736
+ d: e.arcSlice,
1737
+ fill: "#FFFFFF"
1738
+ }, null, 8, vt))), 256)),
1739
+ (D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1740
+ class: "vue-ui-donut-arc-path",
1741
+ d: e.arcSlice,
1742
+ fill: e.color,
1743
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1744
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth,
1745
+ filter: ai(t)
1746
+ }, null, 8, yt))), 256)),
1747
+ t.$slots.pattern ? (D(), S("g", bt, [(D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1748
+ class: "vue-ui-donut-arc-path",
1749
+ d: e.arcSlice,
1750
+ fill: `url(#${e.pattern})`,
1751
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1752
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth,
1753
+ filter: ai(t)
1754
+ }, null, 8, xt))), 256))])) : x("", !0)
1755
+ ], 64)) : x("", !0),
1756
+ Q.value && R.value.type === "polar" ? (D(), S(v, { key: 8 }, [q.value.length > 1 ? (D(), S("g", St, [
1757
+ (D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1758
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1759
+ d: Y.value[t].path,
1760
+ fill: "#FFFFFF",
1761
+ style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1762
+ }, null, 12, Ct))), 256)),
1763
+ R.value.style.chart.layout.donut.useShadow ? (D(), S("g", wt, [(D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1764
+ class: "vue-ui-donut-arc-path",
1765
+ d: Y.value[t].path,
1766
+ fill: "transparent",
1767
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1768
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth,
1769
+ filter: `url(#drop_shadow_${I.value})`,
1770
+ style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1771
+ }, null, 12, Tt))), 256))])) : x("", !0),
1772
+ t.$slots.pattern ? (D(), S("g", Et, [(D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1773
+ class: "vue-ui-donut-arc-path",
1774
+ d: Y.value[t].path,
1775
+ fill: `url(#${e.pattern})`,
1776
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1777
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth,
1778
+ filter: ai(t),
1779
+ style: E({
1780
+ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1781
+ transformOrigin: "center"
1782
+ })
1783
+ }, null, 12, Dt))), 256))])) : x("", !0),
1784
+ (D(!0), S(v, null, k(J.value, (e, t) => (D(), S("path", {
1785
+ class: "vue-ui-donut-arc-path",
1786
+ d: Y.value[t].path,
1787
+ fill: R.value.style.chart.useGradient ? `url(#polar_gradient_${t}_${I.value})` : e.color,
1788
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1789
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth,
1790
+ filter: ai(t),
1791
+ style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
1792
+ }, null, 12, Ot))), 256))
1793
+ ])) : (D(), S("g", kt, [t.$slots.pattern ? (D(), S("circle", {
1794
+ key: 0,
1795
+ cx: H.value.width / 2,
1796
+ cy: H.value.height / 2,
1797
+ r: K.value,
1798
+ fill: `url(#pattern_${I.value}_${q.value[0].patternIndex})`,
1799
+ stroke: R.value.style.chart.backgroundColor,
1800
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth
1801
+ }, null, 8, At)) : x("", !0), C("circle", {
1802
+ cx: H.value.width / 2,
1803
+ cy: H.value.height / 2,
1804
+ r: K.value,
1805
+ fill: R.value.style.chart.useGradient ? `url(#polar_gradient_0_${I.value})` : q.value[0].color,
1806
+ stroke: R.value.style.chart.backgroundColor,
1807
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth
1808
+ }, null, 8, jt)]))], 64)) : (D(), S(v, { key: 9 }, [R.value.type === "classic" && !Hr.value ? (D(), S("g", Mt, [(D(!0), S(v, null, k(Ur.value, (e, t) => (D(), S("path", {
1809
+ class: "vue-ui-donut-arc-path",
1810
+ d: e.arcSlice,
1811
+ fill: e.color,
1812
+ stroke: R.value.style.chart.backgroundColor,
1813
+ "stroke-width": R.value.style.chart.layout.donut.borderWidth
1814
+ }, null, 8, Nt))), 256))])) : x("", !0), C("circle", {
1815
+ cx: H.value.width / 2,
1816
+ cy: H.value.height / 2,
1817
+ r: K.value <= 0 ? 10 : K.value,
1818
+ fill: "transparent",
1819
+ stroke: R.value.style.chart.backgroundColor
1820
+ }, null, 8, Pt)], 64)),
1821
+ R.value.style.chart.useGradient && R.value.type === "classic" ? (D(), S("circle", {
1822
+ key: 10,
1823
+ cx: H.value.width / 2,
1824
+ cy: H.value.height / 2,
1825
+ r: K.value <= 0 ? 10 : K.value,
1826
+ fill: `url(#gradient_${I.value})`
1827
+ }, null, 8, Ft)) : x("", !0),
1828
+ C("circle", {
1829
+ ref_key: "circle_hollow",
1830
+ ref: On,
1831
+ style: { pointerEvents: "none" },
1832
+ fill: "none",
1833
+ cx: H.value.width / 2,
1834
+ cy: H.value.height / 2,
1835
+ r: Math.max(.1, Er.value * 1.7)
1836
+ }, null, 8, It),
1837
+ Q.value ? (D(), S(v, { key: 11 }, [q.value.length > 1 || R.value.type === "classic" ? (D(), S("g", Lt, [(D(!0), S(v, null, k(q.value.filter((e) => !e.ghost), (e, t) => (D(), S("path", {
1838
+ d: R.value.type === "classic" ? e.arcSlice : Y.value[t].path,
1839
+ stroke: R.value.style.chart.layout.donut.borderColorAuto ? R.value.style.chart.backgroundColor : R.value.style.chart.layout.donut.borderColor,
1840
+ fill: L.value === t ? R.value.style.chart.layout.donut.selectedColor : "transparent",
1841
+ onMouseenter: (n) => ti({
1842
+ datapoint: e,
1843
+ relativeIndex: t,
1844
+ seriesIndex: e.seriesIndex,
1845
+ show: !0
1846
+ }),
1847
+ onMouseleave: (t) => ei({
1848
+ datapoint: e,
1849
+ seriesIndex: e.seriesIndex
1850
+ }),
1851
+ onClick: (n) => $(e, t)
1852
+ }, null, 40, Rt))), 256))])) : (D(), S("g", zt, [C("circle", {
1853
+ cx: H.value.width / 2,
1854
+ cy: H.value.height / 2,
1855
+ r: K.value,
1856
+ fill: "transparent",
1857
+ onMouseenter: n[0] ||= (e) => ti({
1858
+ datapoint: q.value[0],
1859
+ relativeIndex: 0,
1860
+ seriesIndex: q.value[0].seriesIndex,
1861
+ show: !0
1862
+ }),
1863
+ onMouseleave: n[1] ||= (e) => ei({
1864
+ datapoint: q.value[0],
1865
+ seriesIndex: q.value[0].seriesIndex
1866
+ }),
1867
+ onClick: n[2] ||= (e) => $(q.value[0], t.i)
1868
+ }, null, 40, Bt)]))], 64)) : x("", !0),
1869
+ R.value.type === "classic" ? (D(), S("g", {
1870
+ key: 12,
1871
+ ref_key: "G_hollow",
1872
+ ref: Dn,
1873
+ class: "vue-data-ui-donut-hollow-labels"
1874
+ }, [
1875
+ R.value.style.chart.layout.labels.hollow.total.show ? (D(), S("text", {
1876
+ key: 0,
1877
+ "text-anchor": "middle",
1878
+ x: H.value.width / 2,
1879
+ y: H.value.height / 2 - (R.value.style.chart.layout.labels.hollow.average.show ? R.value.style.chart.layout.labels.hollow.total.fontSize : 0) + R.value.style.chart.layout.labels.hollow.total.offsetY,
1880
+ fill: R.value.style.chart.layout.labels.hollow.total.color,
1881
+ "font-size": R.value.style.chart.layout.labels.hollow.total.fontSize,
1882
+ style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
1883
+ }, Ke(R.value.style.chart.layout.labels.hollow.total.text), 13, Vt)) : x("", !0),
1884
+ R.value.style.chart.layout.labels.hollow.total.show ? (D(), S("text", {
1885
+ key: 1,
1886
+ "text-anchor": "middle",
1887
+ x: H.value.width / 2,
1888
+ y: H.value.height / 2 + R.value.style.chart.layout.labels.hollow.total.fontSize - (R.value.style.chart.layout.labels.hollow.average.show ? R.value.style.chart.layout.labels.hollow.total.fontSize : 0) + R.value.style.chart.layout.labels.hollow.total.value.offsetY,
1889
+ fill: R.value.style.chart.layout.labels.hollow.total.value.color,
1890
+ "font-size": R.value.style.chart.layout.labels.hollow.total.value.fontSize,
1891
+ style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
1892
+ }, Ke(j(g)(R.value.style.chart.layout.labels.hollow.total.value.formatter, Q.value, j(d)({
1893
+ p: R.value.style.chart.layout.labels.hollow.total.value.prefix,
1894
+ v: Q.value,
1895
+ s: R.value.style.chart.layout.labels.hollow.total.value.suffix
1896
+ }))), 13, Ht)) : x("", !0),
1897
+ R.value.style.chart.layout.labels.hollow.average.show ? (D(), S("text", {
1898
+ key: 2,
1899
+ "text-anchor": "middle",
1900
+ x: H.value.width / 2,
1901
+ y: H.value.height / 2 + (R.value.style.chart.layout.labels.hollow.total.show ? R.value.style.chart.layout.labels.hollow.average.fontSize : 0) + R.value.style.chart.layout.labels.hollow.average.offsetY,
1902
+ fill: R.value.style.chart.layout.labels.hollow.average.color,
1903
+ "font-size": R.value.style.chart.layout.labels.hollow.average.fontSize,
1904
+ style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
1905
+ }, Ke(R.value.style.chart.layout.labels.hollow.average.text), 13, Ut)) : x("", !0),
1906
+ R.value.style.chart.layout.labels.hollow.average.show ? (D(), S("text", {
1907
+ key: 3,
1908
+ "text-anchor": "middle",
1909
+ x: H.value.width / 2,
1910
+ y: H.value.height / 2 + (R.value.style.chart.layout.labels.hollow.total.show ? R.value.style.chart.layout.labels.hollow.average.fontSize : 0) + R.value.style.chart.layout.labels.hollow.average.fontSize + R.value.style.chart.layout.labels.hollow.average.value.offsetY,
1911
+ fill: R.value.style.chart.layout.labels.hollow.average.value.color,
1912
+ "font-size": R.value.style.chart.layout.labels.hollow.average.value.fontSize,
1913
+ style: E(`font-weight:${R.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
1914
+ }, Ke(kr.value || z.value ? "--" : j(g)(R.value.style.chart.layout.labels.hollow.average.value.formatter, j(f)(Xr.value), j(d)({
1915
+ p: R.value.style.chart.layout.labels.hollow.average.value.prefix,
1916
+ v: j(f)(Xr.value),
1917
+ s: R.value.style.chart.layout.labels.hollow.average.value.suffix,
1918
+ r: R.value.style.chart.layout.labels.hollow.average.value.rounding
1919
+ }))), 13, Wt)) : x("", !0)
1920
+ ], 512)) : x("", !0),
1921
+ (D(!0), S(v, null, k(J.value.filter((e) => !e.ghost), (e, n) => (D(), S("g", {
1922
+ filter: ai(n),
1923
+ class: Ve({ animated: R.value.useCssAnimation }),
1924
+ key: e.seriesIndex,
1925
+ opacity: oi(e)
1926
+ }, [R.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (D(), S("g", Kt, [(D(), S("foreignObject", {
1927
+ x: j(p)(e, !0).anchor === "end" ? j(p)(e).x - 120 : j(p)(e, !0).anchor === "middle" ? j(p)(e).x - 60 : j(p)(e).x,
1928
+ y: j(h)(e) - (fi.value ? 20 : 0),
1929
+ width: "120",
1930
+ height: "60",
1931
+ style: { overflow: "visible" }
1932
+ }, [C("div", null, [A(t.$slots, "dataLabel", ze({ ref_for: !0 }, {
1933
+ datapoint: e,
1934
+ isBlur: !R.value.useBlurOnHover || [null, void 0].includes(L.value) || L.value === n,
1935
+ isSafari: fi.value,
1936
+ isVisible: X(e) && V.value.dataLabels.show,
1937
+ textAlign: j(p)(e, !0, 16, !0).anchor,
1938
+ flexAlign: j(p)(e, !0, 16).anchor,
1939
+ percentage: qr(e, J.value)
1940
+ }), void 0, !0)])], 8, qt))])) : (D(), S("g", Jt, [R.value.type === "classic" ? (D(), S(v, { key: 0 }, [X(e) && V.value.dataLabels.show ? (D(), S("circle", {
1941
+ key: 0,
1942
+ cx: j(Z)[n]?.markerX ?? j(p)(e).x,
1943
+ cy: j(Z)[n]?.markerY ?? j(h)(e) - 3.5,
1944
+ fill: e.color,
1945
+ stroke: R.value.style.chart.backgroundColor,
1946
+ "stroke-width": 1,
1947
+ r: 3,
1948
+ filter: !R.value.useBlurOnHover || [null, void 0].includes(L.value) || L.value === n ? "" : `url(#blur_${I.value})`,
1949
+ onClick: (t) => $(e, n),
1950
+ onMouseenter: (t) => ti({
1951
+ datapoint: e,
1952
+ relativeIndex: n,
1953
+ seriesIndex: e.seriesIndex,
1954
+ show: !0
1955
+ }),
1956
+ onMouseleave: (t) => ei({
1957
+ datapoint: e,
1958
+ seriesIndex: e.seriesIndex
1959
+ })
1960
+ }, null, 40, Yt)) : x("", !0), R.value.style.chart.layout.labels.dataLabels.oneLine || j(Z)[n] ? Ze((D(), S("text", {
1961
+ key: 1,
1962
+ class: "vue-data-ui-datalabel-inline",
1963
+ "text-anchor": j(Z)[n]?.textAnchor || j(p)(e, !0, 12).anchor,
1964
+ x: j(Z)[n]?.labelX ?? j(p)(e, !0, 12).x,
1965
+ y: j(Z)[n]?.labelY ?? j(h)(e),
1966
+ onClick: (t) => $(e, n),
1967
+ onMouseenter: (t) => ti({
1968
+ datapoint: e,
1969
+ relativeIndex: n,
1970
+ seriesIndex: e.seriesIndex,
1971
+ show: !0
1972
+ }),
1973
+ onMouseleave: (t) => ei({
1974
+ datapoint: e,
1975
+ seriesIndex: e.seriesIndex
1976
+ }),
1977
+ innerHTML: ri(e, n, !!j(Z)[n])
1978
+ }, null, 40, Xt)), [[Ye, X(e) && V.value.dataLabels.show]]) : (D(), S(v, { key: 2 }, [Ze(C("text", {
1979
+ class: "vue-data-ui-datalabel-value",
1980
+ "text-anchor": j(Z)[n]?.textAnchor || j(p)(e, !0, 12).anchor,
1981
+ x: j(Z)[n]?.labelX ?? j(p)(e, !0, 12).x,
1982
+ y: j(Z)[n]?.labelY ?? j(h)(e),
1983
+ fill: R.value.style.chart.layout.labels.percentage.color,
1984
+ "font-size": qn.value + "px",
1985
+ style: E(`font-weight:${R.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1986
+ onClick: (t) => $(e, n),
1987
+ onMouseenter: (t) => ti({
1988
+ datapoint: e,
1989
+ relativeIndex: n,
1990
+ seriesIndex: e.seriesIndex,
1991
+ show: !0
1992
+ }),
1993
+ onMouseleave: (t) => ei({
1994
+ datapoint: e,
1995
+ seriesIndex: e.seriesIndex
1996
+ })
1997
+ }, Ke(hi(e)), 45, Zt), [[Ye, X(e) && V.value.dataLabels.show]]), Ze(C("text", {
1998
+ class: "vue-data-ui-datalabel-name",
1999
+ "text-anchor": j(Z)[n]?.textAnchor || j(p)(e).anchor,
2000
+ x: j(Z)[n]?.labelX ?? j(p)(e, !0, 12).x,
2001
+ y: (j(Z)[n]?.labelY ?? j(h)(e)) + F.value * 1.2,
2002
+ fill: R.value.style.chart.layout.labels.name.color,
2003
+ "font-size": F.value + "px",
2004
+ style: E(`font-weight:${R.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
2005
+ onClick: (t) => $(e, n),
2006
+ onMouseenter: (t) => ti({
2007
+ datapoint: e,
2008
+ relativeIndex: n,
2009
+ seriesIndex: e.seriesIndex,
2010
+ show: !0
2011
+ }),
2012
+ onMouseleave: (t) => ei({
2013
+ datapoint: e,
2014
+ seriesIndex: e.seriesIndex
2015
+ }),
2016
+ innerHTML: j(s)({
2017
+ content: e.name,
2018
+ fontSize: F.value,
2019
+ fill: R.value.style.chart.layout.labels.name.color,
2020
+ x: j(Z)[n]?.labelX ?? j(p)(e, !0, 12).x,
2021
+ y: (j(Z)[n]?.labelY ?? j(h)(e)) + F.value
2022
+ })
2023
+ }, null, 44, Qt), [[Ye, X(e, !0, 12) && V.value.dataLabels.show && R.value.style.chart.layout.labels.name.show]])], 64))], 64)) : x("", !0), R.value.type === "polar" ? (D(), S(v, { key: 1 }, [X(e) && V.value.dataLabels.show ? (D(), S("circle", {
2024
+ key: 0,
2025
+ cx: j(_)({
2026
+ initX: Y.value[n].middlePoint.x,
2027
+ initY: Y.value[n].middlePoint.y,
2028
+ offset: 24,
2029
+ centerX: H.value.width / 2,
2030
+ centerY: H.value.height / 2
2031
+ }).x,
2032
+ cy: j(_)({
2033
+ initX: Y.value[n].middlePoint.x,
2034
+ initY: Y.value[n].middlePoint.y,
2035
+ offset: 24,
2036
+ centerX: H.value.width / 2,
2037
+ centerY: H.value.height / 2
2038
+ }).y,
2039
+ fill: e.color,
2040
+ stroke: R.value.style.chart.backgroundColor,
2041
+ "stroke-width": 1,
2042
+ r: 3,
2043
+ filter: !R.value.useBlurOnHover || [null, void 0].includes(L.value) || L.value === n ? "" : `url(#blur_${I.value})`,
2044
+ onClick: (t) => $(e, n),
2045
+ onMouseenter: (t) => ti({
2046
+ datapoint: e,
2047
+ relativeIndex: n,
2048
+ seriesIndex: e.seriesIndex,
2049
+ show: !0
2050
+ }),
2051
+ onMouseleave: (t) => ei({
2052
+ datapoint: e,
2053
+ seriesIndex: e.seriesIndex
2054
+ }),
2055
+ style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` })
2056
+ }, null, 44, $t)) : x("", !0), R.value.style.chart.layout.labels.dataLabels.oneLine ? Ze((D(), S("text", {
2057
+ key: 1,
2058
+ class: "vue-data-ui-datalabel-inline",
2059
+ "text-anchor": Wr(Y.value[n].middlePoint),
2060
+ x: j(_)({
2061
+ initX: Y.value[n].middlePoint.x,
2062
+ initY: Y.value[n].middlePoint.y,
2063
+ offset: 42,
2064
+ centerX: H.value.width / 2,
2065
+ centerY: H.value.height / 2
2066
+ }).x,
2067
+ y: j(_)({
2068
+ initX: Y.value[n].middlePoint.x,
2069
+ initY: Y.value[n].middlePoint.y,
2070
+ offset: 42,
2071
+ centerX: H.value.width / 2,
2072
+ centerY: H.value.height / 2
2073
+ }).y,
2074
+ style: E({ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out` }),
2075
+ onClick: (t) => $(e, n),
2076
+ onMouseenter: (t) => ti({
2077
+ datapoint: e,
2078
+ relativeIndex: n,
2079
+ seriesIndex: e.seriesIndex,
2080
+ show: !0
2081
+ }),
2082
+ onMouseleave: (t) => ei({
2083
+ datapoint: e,
2084
+ seriesIndex: e.seriesIndex
2085
+ }),
2086
+ innerHTML: ii(e, n)
2087
+ }, null, 44, en)), [[Ye, X(e) && V.value.dataLabels.show]]) : (D(), S(v, { key: 2 }, [X(e) && V.value.dataLabels.show ? (D(), S("text", {
2088
+ key: 0,
2089
+ class: "vue-data-ui-datalabel-value",
2090
+ "text-anchor": Wr(Y.value[n].middlePoint),
2091
+ x: j(_)({
2092
+ initX: Y.value[n].middlePoint.x,
2093
+ initY: Y.value[n].middlePoint.y,
2094
+ offset: 42,
2095
+ centerX: H.value.width / 2,
2096
+ centerY: H.value.height / 2
2097
+ }).x,
2098
+ y: j(_)({
2099
+ initX: Y.value[n].middlePoint.x,
2100
+ initY: Y.value[n].middlePoint.y,
2101
+ offset: 42,
2102
+ centerX: H.value.width / 2,
2103
+ centerY: H.value.height / 2
2104
+ }).y,
2105
+ fill: R.value.style.chart.layout.labels.percentage.color,
2106
+ "font-size": qn.value,
2107
+ style: E({
2108
+ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2109
+ fontWeight: R.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
2110
+ }),
2111
+ onClick: (t) => $(e, n),
2112
+ onMouseenter: (t) => ti({
2113
+ datapoint: e,
2114
+ relativeIndex: n,
2115
+ seriesIndex: e.seriesIndex,
2116
+ show: !0
2117
+ }),
2118
+ onMouseleave: (t) => ei({
2119
+ datapoint: e,
2120
+ seriesIndex: e.seriesIndex
2121
+ })
2122
+ }, Ke(hi(e)), 45, tn)) : x("", !0), X(e, !0, 12) && V.value.dataLabels.show && R.value.style.chart.layout.labels.name.show ? (D(), S("text", {
2123
+ key: 1,
2124
+ class: "vue-data-ui-datalabel-name",
2125
+ "text-anchor": Wr(Y.value[n].middlePoint),
2126
+ x: j(_)({
2127
+ initX: Y.value[n].middlePoint.x,
2128
+ initY: Y.value[n].middlePoint.y,
2129
+ offset: 42,
2130
+ centerX: H.value.width / 2,
2131
+ centerY: H.value.height / 2
2132
+ }).x,
2133
+ y: j(_)({
2134
+ initX: Y.value[n].middlePoint.x,
2135
+ initY: Y.value[n].middlePoint.y,
2136
+ offset: 42,
2137
+ centerX: H.value.width / 2,
2138
+ centerY: H.value.height / 2
2139
+ }).y + F.value * 1.2,
2140
+ fill: R.value.style.chart.layout.labels.name.color,
2141
+ "font-size": F.value,
2142
+ style: E({
2143
+ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2144
+ fontWeight: R.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
2145
+ }),
2146
+ onClick: (t) => $(e, n),
2147
+ onMouseenter: (t) => ti({
2148
+ datapoint: e,
2149
+ relativeIndex: n,
2150
+ seriesIndex: e.seriesIndex,
2151
+ show: !0
2152
+ }),
2153
+ onMouseleave: (t) => ei({
2154
+ datapoint: e,
2155
+ seriesIndex: e.seriesIndex
2156
+ }),
2157
+ innerHTML: j(s)({
2158
+ content: e.name,
2159
+ fontSize: F.value,
2160
+ fill: R.value.style.chart.layout.labels.name.color,
2161
+ x: j(_)({
2162
+ initX: Y.value[n].middlePoint.x,
2163
+ initY: Y.value[n].middlePoint.y,
2164
+ offset: 42,
2165
+ centerX: H.value.width / 2,
2166
+ centerY: H.value.height / 2
2167
+ }).x,
2168
+ y: j(_)({
2169
+ initX: Y.value[n].middlePoint.x,
2170
+ initY: Y.value[n].middlePoint.y,
2171
+ offset: 42,
2172
+ centerX: H.value.width / 2,
2173
+ centerY: H.value.height / 2
2174
+ }).y + F.value * 1.2
2175
+ })
2176
+ }, null, 44, nn)) : x("", !0)], 64))], 64)) : x("", !0)])), V.value.dataLabels.show && R.value.style.chart.comments.show && e.comment ? (D(), S("g", rn, [X(e) && R.value.type === "classic" ? (D(), S("foreignObject", {
2177
+ key: 0,
2178
+ x: R.value.style.chart.comments.offsetX + (j(p)(e, !0).anchor === "end" ? j(p)(e).x - R.value.style.chart.comments.width : j(p)(e, !0).anchor === "middle" ? j(p)(e).x - R.value.style.chart.comments.width / 2 : j(p)(e).x),
2179
+ y: j(h)(e) + 24 + R.value.style.chart.comments.offsetY,
2180
+ width: R.value.style.chart.comments.width,
2181
+ height: "200",
2182
+ style: {
2183
+ overflow: "visible",
2184
+ "pointer-events": "none"
2185
+ }
2186
+ }, [C("div", null, [A(t.$slots, "plot-comment", { plot: {
2187
+ ...e,
2188
+ textAlign: j(p)(e, !0, 16, !0).anchor,
2189
+ flexAlign: j(p)(e, !0, 16).anchor,
2190
+ isFirstLoad: z.value
2191
+ } }, void 0, !0)])], 8, an)) : x("", !0), X(e) && R.value.type === "polar" ? (D(), S("foreignObject", {
2192
+ key: 1,
2193
+ x: R.value.style.chart.comments.offsetX + (Wr(Y.value[n].middlePoint) === "end" ? j(_)({
2194
+ initX: Y.value[n].middlePoint.x,
2195
+ initY: Y.value[n].middlePoint.y,
2196
+ offset: 42,
2197
+ centerX: H.value.width / 2,
2198
+ centerY: H.value.height / 2
2199
+ }).x - R.value.style.chart.comments.width : Wr(Y.value[n].middlePoint) === "middle" ? j(_)({
2200
+ initX: Y.value[n].middlePoint.x,
2201
+ initY: Y.value[n].middlePoint.y,
2202
+ offset: 42,
2203
+ centerX: H.value.width / 2,
2204
+ centerY: H.value.height / 2
2205
+ }).x - R.value.style.chart.comments.width / 2 : j(_)({
2206
+ initX: Y.value[n].middlePoint.x,
2207
+ initY: Y.value[n].middlePoint.y,
2208
+ offset: 42,
2209
+ centerX: H.value.width / 2,
2210
+ centerY: H.value.height / 2
2211
+ }).x),
2212
+ y: Gr(Y.value[n]) + R.value.style.chart.comments.offsetY,
2213
+ width: R.value.style.chart.comments.width,
2214
+ height: "200",
2215
+ style: E({
2216
+ transition: z.value || !R.value.serieToggleAnimation.show ? "none" : `all ${R.value.serieToggleAnimation.durationMs}ms ease-in-out`,
2217
+ overflow: "visible",
2218
+ pointerEvents: "none"
2219
+ })
2220
+ }, [C("div", null, [A(t.$slots, "plot-comment", { plot: {
2221
+ ...e,
2222
+ textAlign: Wr(Y.value[n].middlePoint),
2223
+ flexAlign: Wr(Y.value[n].middlePoint),
2224
+ isFirstLoad: z.value
2225
+ } }, void 0, !0)])], 12, on)) : x("", !0)])) : x("", !0)], 10, Gt))), 128)),
2226
+ A(t.$slots, "svg", { svg: {
2227
+ ...H.value,
2228
+ datapoints: q.value,
2229
+ isPrintingImg: j(br) || j(xr) || Vn.value,
2230
+ isPrintingSvg: Hn.value
2231
+ } }, void 0, !0)
2232
+ ], 512)], 46, it)), t.$slots.hint ? (D(), S("div", sn, [A(t.$slots, "hint", T(w({
2233
+ hint: R.value.a11y.translations.keyboardNavigation,
2234
+ isVisible: Kn.value
2235
+ })), void 0, !0)])) : x("", !0)]),
2236
+ t.$slots.watermark ? (D(), S("div", cn, [A(t.$slots, "watermark", T(w({ isPrinting: j(br) || j(xr) || Vn.value || Hn.value })), void 0, !0)])) : x("", !0),
2237
+ C("div", { id: `legend-bottom-${I.value}` }, null, 8, ln),
2238
+ Rn.value && (R.value.style.chart.legend.show || t.$slots.legend) ? (D(), b(Pe, {
2239
+ key: 6,
2240
+ to: R.value.style.chart.legend.position === "top" ? `#legend-top-${I.value}` : `#legend-bottom-${I.value}`
2241
+ }, [C("div", {
2242
+ ref_key: "chartLegend",
2243
+ ref: An
2244
+ }, [A(t.$slots, "legend", { legend: Br.value }, () => [R.value.style.chart.legend.show ? (D(), b(Ne, {
2245
+ key: `legend_${Ln.value}`,
2246
+ legendSet: Br.value,
2247
+ config: Vr.value,
2248
+ onClickMarker: n[3] ||= ({ i: e }) => Pr(e),
2249
+ isCursorPointer: ir.value
2250
+ }, Fe({
2251
+ item: M(({ legend: e, index: t }) => [C("div", {
2252
+ style: E(`opacity:${G.value.includes(t) ? .5 : 1}`),
2253
+ onClick: (t) => e.segregate()
2254
+ }, Ke(e.display), 13, un)]),
2255
+ legendToggle: M(() => [Br.value.length > 2 && R.value.style.chart.legend.selectAllToggle.show && !j(or) ? (D(), b(Ee, {
2256
+ key: 0,
2257
+ backgroundColor: R.value.style.chart.legend.selectAllToggle.backgroundColor,
2258
+ color: R.value.style.chart.legend.selectAllToggle.color,
2259
+ fontSize: R.value.style.chart.legend.fontSize,
2260
+ checked: G.value.length > 0,
2261
+ isCursorPointer: ir.value,
2262
+ onToggle: Nr
2263
+ }, null, 8, [
2264
+ "backgroundColor",
2265
+ "color",
2266
+ "fontSize",
2267
+ "checked",
2268
+ "isCursorPointer"
2269
+ ])) : x("", !0)]),
2270
+ _: 2
2271
+ }, [t.$slots.pattern ? {
2272
+ name: "legend-pattern",
2273
+ fn: M(({ legend: e, index: t }) => [Le(xe, {
2274
+ shape: e.shape,
2275
+ radius: 30,
2276
+ stroke: "none",
2277
+ plot: {
2278
+ x: 30,
2279
+ y: 30
2280
+ },
2281
+ fill: `url(#pattern_${I.value}_${t})`
2282
+ }, null, 8, ["shape", "fill"])]),
2283
+ key: "0"
2284
+ } : void 0]), 1032, [
2285
+ "legendSet",
2286
+ "config",
2287
+ "isCursorPointer"
2288
+ ])) : x("", !0)], !0)], 512)], 8, ["to"])) : x("", !0),
2289
+ t.$slots.source ? (D(), S("div", {
2290
+ key: 7,
2291
+ ref_key: "source",
2292
+ ref: Nn,
2293
+ dir: "auto"
2294
+ }, [A(t.$slots, "source", {}, void 0, !0)], 512)) : x("", !0),
2295
+ t.$slots.hollow ? (D(), S("div", dn, [A(t.$slots, "hollow", T(w({
2296
+ total: Q.value,
2297
+ average: Xr.value,
2298
+ dataset: U.value,
2299
+ ...H.value
2300
+ })), void 0, !0)])) : x("", !0),
2301
+ Le(j(pn), {
2302
+ teleportTo: R.value.style.chart.tooltip.teleportTo,
2303
+ show: V.value.showTooltip && er.value,
2304
+ backgroundColor: R.value.style.chart.tooltip.backgroundColor,
2305
+ color: R.value.style.chart.tooltip.color,
2306
+ fontSize: R.value.style.chart.tooltip.fontSize,
2307
+ borderRadius: R.value.style.chart.tooltip.borderRadius,
2308
+ borderColor: R.value.style.chart.tooltip.borderColor,
2309
+ borderWidth: R.value.style.chart.tooltip.borderWidth,
2310
+ backgroundOpacity: R.value.style.chart.tooltip.backgroundOpacity,
2311
+ position: R.value.style.chart.tooltip.position,
2312
+ offsetX: R.value.style.chart.tooltip.offsetX,
2313
+ offsetY: R.value.style.chart.tooltip.offsetY,
2314
+ parent: P.value,
2315
+ content: tr.value,
2316
+ isCustom: $r.value,
2317
+ isFullscreen: ui.value,
2318
+ smooth: R.value.style.chart.tooltip.smooth,
2319
+ backdropFilter: R.value.style.chart.tooltip.backdropFilter,
2320
+ smoothForce: R.value.style.chart.tooltip.smoothForce,
2321
+ smoothSnapThreshold: R.value.style.chart.tooltip.smoothSnapThrehsold,
2322
+ isA11yMode: Gn.value === "keyboard",
2323
+ a11yPosition: Wn.value
2324
+ }, {
2325
+ "tooltip-before": M(() => [A(t.$slots, "tooltip-before", T(w({ ...Qr.value })), void 0, !0)]),
2326
+ tooltip: M(() => [A(t.$slots, "tooltip", T(w({ ...Qr.value })), void 0, !0)]),
2327
+ "tooltip-after": M(() => [A(t.$slots, "tooltip-after", T(w({ ...Qr.value })), void 0, !0)]),
2328
+ _: 3
2329
+ }, 8, [
2330
+ "teleportTo",
2331
+ "show",
2332
+ "backgroundColor",
2333
+ "color",
2334
+ "fontSize",
2335
+ "borderRadius",
2336
+ "borderColor",
2337
+ "borderWidth",
2338
+ "backgroundOpacity",
2339
+ "position",
2340
+ "offsetX",
2341
+ "offsetY",
2342
+ "parent",
2343
+ "content",
2344
+ "isCustom",
2345
+ "isFullscreen",
2346
+ "smooth",
2347
+ "backdropFilter",
2348
+ "smoothForce",
2349
+ "smoothSnapThreshold",
2350
+ "isA11yMode",
2351
+ "a11yPosition"
2352
+ ]),
2353
+ Tn.value && R.value.userOptions.buttons.table ? (D(), b(We(Ci.value.component), ze({ key: 9 }, Ci.value.props, {
2354
+ ref_key: "tableUnit",
2355
+ ref: zn,
2356
+ onClose: wi
2357
+ }), Fe({
2358
+ content: M(() => [(D(), b(j(gn), {
2359
+ key: `table_${In.value}`,
2360
+ colNames: li.value.colNames,
2361
+ head: li.value.head,
2362
+ body: li.value.body,
2363
+ config: li.value.config,
2364
+ title: R.value.table.useDialog ? "" : Ci.value.title,
2365
+ withCloseButton: !R.value.table.useDialog,
2366
+ isCursorPointer: ir.value,
2367
+ onClose: wi
2368
+ }, {
2369
+ th: M(({ th: e }) => [C("div", {
2370
+ innerHTML: e,
2371
+ style: {
2372
+ display: "flex",
2373
+ "align-items": "center"
2374
+ }
2375
+ }, null, 8, fn)]),
2376
+ td: M(({ td: e }) => [Ie(Ke(e.name ? e.name : isNaN(Number(e)) ? e.includes("%") ? e : j(g)(R.value.style.chart.layout.labels.percentage.formatter, e, j(d)({
2377
+ v: e,
2378
+ s: "%",
2379
+ r: R.value.style.chart.layout.labels.percentage.rounding
2380
+ })) : j(g)(R.value.style.chart.layout.labels.value.formatter, e, j(d)({
2381
+ p: R.value.style.chart.layout.labels.dataLabels.prefix,
2382
+ v: e,
2383
+ s: R.value.style.chart.layout.labels.dataLabels.suffix,
2384
+ r: R.value.style.chart.layout.labels.value.rounding
2385
+ }))), 1)]),
2386
+ _: 1
2387
+ }, 8, [
2388
+ "colNames",
2389
+ "head",
2390
+ "body",
2391
+ "config",
2392
+ "title",
2393
+ "withCloseButton",
2394
+ "isCursorPointer"
2395
+ ]))]),
2396
+ _: 2
2397
+ }, [R.value.table.useDialog ? {
2398
+ name: "title",
2399
+ fn: M(() => [Ie(Ke(Ci.value.title), 1)]),
2400
+ key: "0"
2401
+ } : void 0, R.value.table.useDialog ? {
2402
+ name: "actions",
2403
+ fn: M(() => [C("button", {
2404
+ tabindex: "0",
2405
+ class: "vue-ui-user-options-button",
2406
+ onClick: n[4] ||= (e) => ci(R.value.userOptions.callbacks.csv),
2407
+ style: E({ cursor: ir.value ? "pointer" : "default" })
2408
+ }, [Le(j(mn), {
2409
+ name: "fileCsv",
2410
+ stroke: Ci.value.props.color
2411
+ }, null, 8, ["stroke"])], 4)]),
2412
+ key: "1"
2413
+ } : void 0]), 1040)) : x("", !0),
2414
+ A(t.$slots, "skeleton", {}, () => [j(or) ? (D(), b(he, { key: 0 })) : x("", !0)], !0)
2415
+ ], 46, et));
2416
+ }
2417
+ }, [["__scopeId", "data-v-66aefdf9"]]);
2418
+ //#endregion
2419
+ export { $e as n, pn as t };