vue-data-ui 3.25.2 → 3.25.4

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