vue-data-ui 3.28.7 → 3.28.9

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 (225) hide show
  1. package/dist/BaseDraggableDialog-BK7dj9O6.js +1 -0
  2. package/dist/BaseIcon-CoY0vuL3.js +1 -0
  3. package/dist/{BaseLegendToggle-aT9fOoGO.js → BaseLegendToggle-BIzyyI1h.js} +1 -1
  4. package/dist/{BaseZoomControls-1OdFWrHW.js → BaseZoomControls-JSk9zW3D.js} +1 -1
  5. package/dist/ColorPicker-CwYfNvwH.js +1 -0
  6. package/dist/{DataTable-5Ug6gMAX.js → DataTable-Dof6yhO7.js} +1 -1
  7. package/dist/{HillActions-C8am4I5c.js → HillActions-BMH9pSmQ.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-CawVDtNj.js → NonSvgPenAndPaper-DXdAh1Sz.js} +1 -1
  9. package/dist/{PackageVersion-CHQWwTik.js → PackageVersion-D6_O7PmZ.js} +1 -1
  10. package/dist/PenAndPaper-DoNTA-SV.js +1 -0
  11. package/dist/{SlicerPreview-D7gm-OsZ.js → SlicerPreview-ChKbdZSU.js} +1 -1
  12. package/dist/UserOptions-B9EyfU9n.js +1 -0
  13. package/dist/XyAnalysisOptions-djGOJdKc.js +1 -0
  14. package/dist/annotationSlots-OLiW25XN.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-icon.js +1 -1
  45. package/dist/components/vue-ui-kpi.js +1 -1
  46. package/dist/components/vue-ui-label.js +1 -1
  47. package/dist/components/vue-ui-mini-loader.js +1 -1
  48. package/dist/components/vue-ui-molecule.js +1 -1
  49. package/dist/components/vue-ui-mood-radar.js +1 -1
  50. package/dist/components/vue-ui-nested-donuts.js +1 -1
  51. package/dist/components/vue-ui-onion.js +1 -1
  52. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  53. package/dist/components/vue-ui-quadrant.js +1 -1
  54. package/dist/components/vue-ui-quick-chart.js +1 -1
  55. package/dist/components/vue-ui-radar.js +1 -1
  56. package/dist/components/vue-ui-rating.js +1 -1
  57. package/dist/components/vue-ui-relation-circle.js +1 -1
  58. package/dist/components/vue-ui-ridgeline.js +1 -1
  59. package/dist/components/vue-ui-rings.js +1 -1
  60. package/dist/components/vue-ui-scatter.js +1 -1
  61. package/dist/components/vue-ui-skeleton.js +1 -1
  62. package/dist/components/vue-ui-smiley.js +1 -1
  63. package/dist/components/vue-ui-spark-trend.js +1 -1
  64. package/dist/components/vue-ui-sparkbar.js +1 -1
  65. package/dist/components/vue-ui-sparkgauge.js +1 -1
  66. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  67. package/dist/components/vue-ui-sparkline.js +1 -1
  68. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  69. package/dist/components/vue-ui-stackbar.js +1 -1
  70. package/dist/components/vue-ui-stackline.js +1 -1
  71. package/dist/components/vue-ui-strip-plot.js +1 -1
  72. package/dist/components/vue-ui-table-heatmap.js +1 -1
  73. package/dist/components/vue-ui-table-sparkline.js +1 -1
  74. package/dist/components/vue-ui-table.js +1 -1
  75. package/dist/components/vue-ui-thermometer.js +1 -1
  76. package/dist/components/vue-ui-timer.js +1 -1
  77. package/dist/components/vue-ui-tiremarks.js +1 -1
  78. package/dist/components/vue-ui-treemap.js +1 -1
  79. package/dist/components/vue-ui-vertical-bar.js +1 -1
  80. package/dist/components/vue-ui-waffle.js +1 -1
  81. package/dist/components/vue-ui-wheel.js +1 -1
  82. package/dist/components/vue-ui-word-cloud.js +1 -1
  83. package/dist/components/vue-ui-world.js +1 -1
  84. package/dist/components/vue-ui-xy-canvas.js +1 -1
  85. package/dist/components/vue-ui-xy.js +1 -1
  86. package/dist/package-BEq7yyhf.js +1 -0
  87. package/dist/{render-common-_8VmVGgq.js → render-common-BbY81Ao2.js} +1 -1
  88. package/dist/ssr/vue-ui-donut.js +1 -1
  89. package/dist/ssr/vue-ui-xy.js +1 -1
  90. package/dist/ssr.js +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +96 -0
  93. package/dist/types/vue-ui-xy.d.ts +4 -0
  94. package/dist/useConfig-By3Vb5kz.js +1 -0
  95. package/dist/{useObjectBindings-BCi3Az41.js → useObjectBindings-0vvvimYP.js} +1 -1
  96. package/dist/utils.js +1 -1
  97. package/dist/vue-data-ui-BwiGr37w.js +1 -0
  98. package/dist/vue-data-ui.js +1 -1
  99. package/dist/vue-ui-3d-bar-C2igj6OX.js +19 -0
  100. package/dist/{vue-ui-accordion-D4FHxzsL.js → vue-ui-accordion-DFxSW8ET.js} +1 -1
  101. package/dist/vue-ui-age-pyramid-DOG_ZOgO.js +1 -0
  102. package/dist/{vue-ui-annotator-DuAQovkf.js → vue-ui-annotator-BnR2XnsL.js} +1 -1
  103. package/dist/vue-ui-bullet-HUKP90GR.js +34 -0
  104. package/dist/vue-ui-bump-BuHuxEzm.js +8 -0
  105. package/dist/vue-ui-candlestick-CZkyowA5.js +22 -0
  106. package/dist/{vue-ui-carousel-table-Uik-OwJI.js → vue-ui-carousel-table-B73USTMi.js} +1 -1
  107. package/dist/vue-ui-chestnut-VdMHjsWk.js +1 -0
  108. package/dist/vue-ui-chord-DfWjMAuo.js +21 -0
  109. package/dist/vue-ui-circle-pack-ByV3SOkF.js +13 -0
  110. package/dist/{vue-ui-cursor-Cn4I6C1F.js → vue-ui-cursor-D3E3f7Lc.js} +1 -1
  111. package/dist/vue-ui-dag-DlllVyCV.js +9 -0
  112. package/dist/vue-ui-dashboard-C9aGsEAi.js +1 -0
  113. package/dist/{vue-ui-digits-DD5Ehw6Z.js → vue-ui-digits-p2met3a2.js} +1 -1
  114. package/dist/vue-ui-donut-BlQXnf7O.js +47 -0
  115. package/dist/{vue-ui-donut-B4RYYl9y.js → vue-ui-donut-CZbBq7bs.js} +1 -1
  116. package/dist/vue-ui-donut-evolution-Csq1sqhK.js +2 -0
  117. package/dist/vue-ui-dumbbell-ChLfyyGq.js +9 -0
  118. package/dist/vue-ui-flow-DfEHi_Cq.js +3 -0
  119. package/dist/vue-ui-funnel-QCG-rmsx.js +1 -0
  120. package/dist/vue-ui-galaxy-DFTeXUse.js +1 -0
  121. package/dist/vue-ui-gauge-XTx--A-H.js +1 -0
  122. package/dist/vue-ui-geo-BXB5xFcV.js +1 -0
  123. package/dist/{vue-ui-gizmo-ByT8Q0Mm.js → vue-ui-gizmo-COJHVo7O.js} +1 -1
  124. package/dist/vue-ui-graph-BqnyGn9p.js +7 -0
  125. package/dist/vue-ui-heatmap-CPq3bcnS.js +1 -0
  126. package/dist/vue-ui-hill-DKm3PjHT.js +1 -0
  127. package/dist/vue-ui-history-plot-B5OPsHZ1.js +2 -0
  128. package/dist/vue-ui-horizontal-bar-C8SymyhN.js +4 -0
  129. package/dist/{vue-ui-kpi-w-6ZJ7A1.js → vue-ui-kpi-D1Ps7D_O.js} +1 -1
  130. package/dist/{vue-ui-label-0lSeoxvv.js → vue-ui-label-W0oz08pp.js} +1 -1
  131. package/dist/{vue-ui-mini-loader-C6vhrfx3.js → vue-ui-mini-loader-OLYDdN3T.js} +1 -1
  132. package/dist/vue-ui-molecule-f-GNAQ0p.js +1 -0
  133. package/dist/vue-ui-mood-radar-kp-jOb4S.js +1 -0
  134. package/dist/vue-ui-nested-donuts-DCCSKIGa.js +19 -0
  135. package/dist/vue-ui-onion-KqzGj1z_.js +5 -0
  136. package/dist/vue-ui-parallel-coordinate-plot-dn_41Wv5.js +9 -0
  137. package/dist/vue-ui-quadrant-CP8n4v5B.js +2 -0
  138. package/dist/vue-ui-quick-chart-D8PbGpSw.js +17 -0
  139. package/dist/vue-ui-radar-ybR3N44-.js +1 -0
  140. package/dist/{vue-ui-rating-7RAJA7I4.js → vue-ui-rating-B9HeTCLa.js} +1 -1
  141. package/dist/vue-ui-relation-circle-B0PwfFpT.js +1 -0
  142. package/dist/vue-ui-ridgeline-BnslUzA-.js +2 -0
  143. package/dist/vue-ui-rings-B-cOW0Dw.js +1 -0
  144. package/dist/vue-ui-scatter-BX5cTC01.js +9 -0
  145. package/dist/{vue-ui-skeleton-D7PLCXgR.js → vue-ui-skeleton-98OnGJ2N.js} +1 -1
  146. package/dist/{vue-ui-smiley-BdhxsPGW.js → vue-ui-smiley-Cht1imV-.js} +1 -1
  147. package/dist/{vue-ui-spark-trend-DwiVMTjG.js → vue-ui-spark-trend-C4uYyXEy.js} +1 -1
  148. package/dist/{vue-ui-sparkbar-DO5fcy40.js → vue-ui-sparkbar-BcZyqPB9.js} +1 -1
  149. package/dist/{vue-ui-sparkgauge-jbsycjzU.js → vue-ui-sparkgauge-dBZzMqn5.js} +1 -1
  150. package/dist/{vue-ui-sparkhistogram-BXO6RMNA.js → vue-ui-sparkhistogram-DcbAY6vr.js} +1 -1
  151. package/dist/{vue-ui-sparkline-BwiQOUi0.js → vue-ui-sparkline-BizzsAR5.js} +1 -1
  152. package/dist/{vue-ui-sparkstackbar-3hDYCDkU.js → vue-ui-sparkstackbar-xlg048YB.js} +1 -1
  153. package/dist/vue-ui-stackbar-2AX-m3Pb.js +29 -0
  154. package/dist/vue-ui-stackline-GKaZJh8y.js +39 -0
  155. package/dist/vue-ui-strip-plot-BhxIrd67.js +2 -0
  156. package/dist/{vue-ui-table-fYf1nuff.js → vue-ui-table-D9FJBxrk.js} +1 -1
  157. package/dist/{vue-ui-table-heatmap-qU0Mk0US.js → vue-ui-table-heatmap-SGJGI5Wq.js} +1 -1
  158. package/dist/{vue-ui-table-sparkline-EIvf8kjn.js → vue-ui-table-sparkline-B6ynMUGE.js} +1 -1
  159. package/dist/vue-ui-thermometer-SE_c51TO.js +1 -0
  160. package/dist/{vue-ui-timer-Dw7ycl6H.js → vue-ui-timer-B1JNZk6j.js} +2 -2
  161. package/dist/vue-ui-tiremarks-Cr8EG4T5.js +1 -0
  162. package/dist/vue-ui-treemap-DKJVe7v7.js +1 -0
  163. package/dist/vue-ui-waffle-DSq3l2sE.js +1 -0
  164. package/dist/vue-ui-wheel-CcYOzS05.js +1 -0
  165. package/dist/vue-ui-word-cloud-gogYiwIU.js +4 -0
  166. package/dist/vue-ui-world-C2zGhq_U.js +19 -0
  167. package/dist/{vue-ui-xy-D4R3bhnl.js → vue-ui-xy-B2lrTGG4.js} +1 -1
  168. package/dist/vue-ui-xy-CpS-ASnd.js +27 -0
  169. package/dist/{vue-ui-xy-canvas-D3TCqFzz.js → vue-ui-xy-canvas-CXBsRU35.js} +1 -1
  170. package/package.json +1 -1
  171. package/dist/BaseDraggableDialog-9d30Yx8c.js +0 -1
  172. package/dist/BaseIcon-fYK0iID8.js +0 -1
  173. package/dist/ColorPicker-DEJOjcmD.js +0 -1
  174. package/dist/PenAndPaper-r50tK3S4.js +0 -1
  175. package/dist/UserOptions-BUXg7qOC.js +0 -1
  176. package/dist/annotationSlots-RvQBEO9-.js +0 -1
  177. package/dist/package-Dbb7W156.js +0 -1
  178. package/dist/useConfig-D3ZfFSE5.js +0 -1
  179. package/dist/vue-data-ui-Bkohx9Cs.js +0 -1
  180. package/dist/vue-ui-3d-bar-CT0QhtL7.js +0 -19
  181. package/dist/vue-ui-age-pyramid-CkZqtIdC.js +0 -1
  182. package/dist/vue-ui-bullet-DEJJEz65.js +0 -34
  183. package/dist/vue-ui-bump-Bk4KKRas.js +0 -8
  184. package/dist/vue-ui-candlestick-CLB_sBqP.js +0 -22
  185. package/dist/vue-ui-chestnut-y3HrgMF1.js +0 -1
  186. package/dist/vue-ui-chord-B_N2fsWI.js +0 -21
  187. package/dist/vue-ui-circle-pack-D66Nfd--.js +0 -13
  188. package/dist/vue-ui-dag-CDDz8tXx.js +0 -9
  189. package/dist/vue-ui-dashboard-B3mEQdok.js +0 -1
  190. package/dist/vue-ui-donut-BD1mPA4G.js +0 -47
  191. package/dist/vue-ui-donut-evolution-B8SGQL4s.js +0 -2
  192. package/dist/vue-ui-dumbbell-BuvzG3Tl.js +0 -9
  193. package/dist/vue-ui-flow-IowFhHnI.js +0 -3
  194. package/dist/vue-ui-funnel-gYtcHX9x.js +0 -1
  195. package/dist/vue-ui-galaxy-CnCTZrbX.js +0 -1
  196. package/dist/vue-ui-gauge-BKrgEDiX.js +0 -1
  197. package/dist/vue-ui-geo-C-gc9jm2.js +0 -1
  198. package/dist/vue-ui-graph-C5p4Zie1.js +0 -7
  199. package/dist/vue-ui-heatmap-BEj47GVD.js +0 -1
  200. package/dist/vue-ui-hill-C10eL0jq.js +0 -1
  201. package/dist/vue-ui-history-plot-BgnJx2mW.js +0 -2
  202. package/dist/vue-ui-horizontal-bar-D1ko4Ir0.js +0 -4
  203. package/dist/vue-ui-molecule-C4xemEWm.js +0 -1
  204. package/dist/vue-ui-mood-radar-Db-Y54f9.js +0 -1
  205. package/dist/vue-ui-nested-donuts-rcZDqWJr.js +0 -19
  206. package/dist/vue-ui-onion-ChgJz_7Y.js +0 -5
  207. package/dist/vue-ui-parallel-coordinate-plot-PI7nplGP.js +0 -9
  208. package/dist/vue-ui-quadrant-BJeocB2S.js +0 -2
  209. package/dist/vue-ui-quick-chart-C4d0hcRJ.js +0 -17
  210. package/dist/vue-ui-radar-gUERUZrP.js +0 -1
  211. package/dist/vue-ui-relation-circle-Ci_6Orcb.js +0 -1
  212. package/dist/vue-ui-ridgeline-9LPlODqi.js +0 -2
  213. package/dist/vue-ui-rings-Ccd4RdGu.js +0 -1
  214. package/dist/vue-ui-scatter-BsyczCTX.js +0 -9
  215. package/dist/vue-ui-stackbar-CPb7WvxK.js +0 -29
  216. package/dist/vue-ui-stackline-Dv2So8hb.js +0 -39
  217. package/dist/vue-ui-strip-plot-t6XVuFen.js +0 -2
  218. package/dist/vue-ui-thermometer-DrcMnnAa.js +0 -1
  219. package/dist/vue-ui-tiremarks-BHainFYD.js +0 -1
  220. package/dist/vue-ui-treemap-B8vm7e8w.js +0 -1
  221. package/dist/vue-ui-waffle-CyoTLAoh.js +0 -1
  222. package/dist/vue-ui-wheel-TN4hPSqT.js +0 -1
  223. package/dist/vue-ui-word-cloud-BOMaVinm.js +0 -4
  224. package/dist/vue-ui-world-BCzP1m1G.js +0 -19
  225. package/dist/vue-ui-xy-NkwuuQv8.js +0 -24
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{X as a}from"./lib-rPeBMZrn.js";import{n as ee,t as te}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ne}from"./useNestedProp-DnGoh-XS.js";import{n as re,t as ie}from"./userOptionsSlots-DYuo-E5m.js";import{t as ae}from"./usePrinter-DVf3YcG5.js";import{t as oe}from"./useUserOptionState-CXlFnwPv.js";import{t as se}from"./UserOptions-B9EyfU9n.js";import{n as ce}from"./PenAndPaper-DoNTA-SV.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as p,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as g,normalizeClass as le,normalizeProps as _,normalizeStyle as v,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as ue,unref as C,useCssVars as de,watch as w,withCtx as T}from"vue";var fe=/* @__PURE__ */ e({default:()=>D}),pe=[`id`],me=[`onMousedown`,`onTouchstart`],he=[`onMousedown`,`onTouchstart`],ge=[`onMousedown`,`onTouchstart`],_e=[`onMousedown`,`onTouchstart`],ve=[`onMousedown`,`onTouchstart`],E=1,D=/*#__PURE__*/ o({__name:`vue-ui-dashboard`,props:{dataset:Array,config:Object},emits:[`change`,`copyAlt`],setup(e,{expose:o,emit:fe}){de(e=>({v59c7b0d3:Ne.value,v5277b0e7:Pe.value}));let D={VueDataUi:m(()=>import(`./vue-data-ui-BwiGr37w.js`).then(e=>e.n)),VueUi3dBar:m(()=>import(`./vue-ui-3d-bar-C2igj6OX.js`).then(e=>e.n)),VueUiAccordion:m(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),VueUiAgePyramid:m(()=>import(`./vue-ui-age-pyramid-DOG_ZOgO.js`).then(e=>e.n)),VueUiAnnotator:m(()=>import(`./vue-ui-annotator-BnR2XnsL.js`).then(e=>e.n)),VueUiCandlestick:m(()=>import(`./vue-ui-candlestick-CZkyowA5.js`).then(e=>e.n)),VueUiChestnut:m(()=>import(`./vue-ui-chestnut-VdMHjsWk.js`).then(e=>e.n)),VueUiDigits:m(()=>import(`./vue-ui-digits-p2met3a2.js`).then(e=>e.n)),VueUiDonut:m(()=>import(`./vue-ui-donut-BlQXnf7O.js`).then(e=>e.n)),VueUiDonutEvolution:m(()=>import(`./vue-ui-donut-evolution-Csq1sqhK.js`).then(e=>e.n)),VueUiDumbbell:m(()=>import(`./vue-ui-dumbbell-ChLfyyGq.js`).then(e=>e.n)),VueUiFlow:m(()=>import(`./vue-ui-flow-DfEHi_Cq.js`).then(e=>e.n)),VueUiGalaxy:m(()=>import(`./vue-ui-galaxy-DFTeXUse.js`).then(e=>e.n)),VueUiGauge:m(()=>import(`./vue-ui-gauge-XTx--A-H.js`).then(e=>e.n)),VueUiHeatmap:m(()=>import(`./vue-ui-heatmap-CPq3bcnS.js`).then(e=>e.n)),VueUiKpi:m(()=>import(`./vue-ui-kpi-D1Ps7D_O.js`).then(e=>e.n)),VueUiMiniLoader:m(()=>import(`./vue-ui-mini-loader-OLYDdN3T.js`).then(e=>e.n)),VueUiMolecule:m(()=>import(`./vue-ui-molecule-f-GNAQ0p.js`).then(e=>e.n)),VueUiMoodRadar:m(()=>import(`./vue-ui-mood-radar-kp-jOb4S.js`).then(e=>e.n)),VueUiNestedDonuts:m(()=>import(`./vue-ui-nested-donuts-DCCSKIGa.js`).then(e=>e.n)),VueUiOnion:m(()=>import(`./vue-ui-onion-KqzGj1z_.js`).then(e=>e.n)),VueUiParallelCoordinatePlot:m(()=>import(`./vue-ui-parallel-coordinate-plot-dn_41Wv5.js`).then(e=>e.n)),VueUiQuadrant:m(()=>import(`./vue-ui-quadrant-CP8n4v5B.js`).then(e=>e.n)),VueUiQuickChart:m(()=>import(`./vue-ui-quick-chart-D8PbGpSw.js`).then(e=>e.n)),VueUiRadar:m(()=>import(`./vue-ui-radar-ybR3N44-.js`).then(e=>e.n)),VueUiRating:m(()=>import(`./vue-ui-rating-B9HeTCLa.js`).then(e=>e.n)),VueUiRelationCircle:m(()=>import(`./vue-ui-relation-circle-B0PwfFpT.js`).then(e=>e.n)),VueUiRings:m(()=>import(`./vue-ui-rings-B-cOW0Dw.js`).then(e=>e.n)),VueUiScatter:m(()=>import(`./vue-ui-scatter-BX5cTC01.js`).then(e=>e.n)),VueUiSkeleton:m(()=>import(`./vue-ui-skeleton-98OnGJ2N.js`).then(e=>e.n)),VueUiSmiley:m(()=>import(`./vue-ui-smiley-Cht1imV-.js`).then(e=>e.n)),VueUiSparkHistogram:m(()=>import(`./vue-ui-sparkhistogram-DcbAY6vr.js`).then(e=>e.n)),VueUiSparkStackbar:m(()=>import(`./vue-ui-sparkstackbar-xlg048YB.js`).then(e=>e.n)),VueUiSparkTrend:m(()=>import(`./vue-ui-spark-trend-C4uYyXEy.js`).then(e=>e.n)),VueUiSparkbar:m(()=>import(`./vue-ui-sparkbar-BcZyqPB9.js`).then(e=>e.n)),VueUiSparkgauge:m(()=>import(`./vue-ui-sparkgauge-dBZzMqn5.js`).then(e=>e.n)),VueUiSparkline:m(()=>import(`./vue-ui-sparkline-BizzsAR5.js`).then(e=>e.n)),VueUiStripPlot:m(()=>import(`./vue-ui-strip-plot-BhxIrd67.js`).then(e=>e.n)),VueUiTable:m(()=>import(`./vue-ui-table-D9FJBxrk.js`).then(e=>e.n)),VueUiTableHeatmap:m(()=>import(`./vue-ui-table-heatmap-SGJGI5Wq.js`).then(e=>e.n)),VueUiTableSparkline:m(()=>import(`./vue-ui-table-sparkline-B6ynMUGE.js`).then(e=>e.n)),VueUiThermometer:m(()=>import(`./vue-ui-thermometer-SE_c51TO.js`).then(e=>e.n)),VueUiTimer:m(()=>import(`./vue-ui-timer-B1JNZk6j.js`).then(e=>e.n)),VueUiTiremarks:m(()=>import(`./vue-ui-tiremarks-Cr8EG4T5.js`).then(e=>e.n)),VueUiTreemap:m(()=>import(`./vue-ui-treemap-DKJVe7v7.js`).then(e=>e.n)),VueUiVerticalBar:m(()=>import(`./vue-ui-horizontal-bar-C8SymyhN.js`).then(e=>e.n)),VueUiHorizontalBar:m(()=>import(`./vue-ui-horizontal-bar-C8SymyhN.js`).then(e=>e.n)),VueUiWaffle:m(()=>import(`./vue-ui-waffle-DSq3l2sE.js`).then(e=>e.n)),VueUiWheel:m(()=>import(`./vue-ui-wheel-CcYOzS05.js`).then(e=>e.n)),VueUiWordCloud:m(()=>import(`./vue-ui-word-cloud-gogYiwIU.js`).then(e=>e.n)),VueUiXy:m(()=>import(`./vue-ui-xy-CpS-ASnd.js`).then(e=>e.n)),VueUiXyCanvas:m(()=>import(`./vue-ui-xy-canvas-CXBsRU35.js`).then(e=>e.n)),VueUiCarouselTable:m(()=>import(`./vue-ui-carousel-table-B73USTMi.js`).then(e=>e.n)),VueUiGizmo:m(()=>import(`./vue-ui-gizmo-COJHVo7O.js`).then(e=>e.n)),VueUiStackbar:m(()=>import(`./vue-ui-stackbar-2AX-m3Pb.js`).then(e=>e.n)),VueUiStackline:m(()=>import(`./vue-ui-stackline-GKaZJh8y.js`).then(e=>e.n)),VueUiBullet:m(()=>import(`./vue-ui-bullet-HUKP90GR.js`).then(e=>e.n)),VueUiFunnel:m(()=>import(`./vue-ui-funnel-QCG-rmsx.js`).then(e=>e.n)),VueUiHistoryPlot:m(()=>import(`./vue-ui-history-plot-B5OPsHZ1.js`).then(e=>e.n)),VueUiCirclePack:m(()=>import(`./vue-ui-circle-pack-ByV3SOkF.js`).then(e=>e.n)),VueUiWorld:m(()=>import(`./vue-ui-world-C2zGhq_U.js`).then(e=>e.n)),VueUiChord:m(()=>import(`./vue-ui-chord-DfWjMAuo.js`).then(e=>e.n)),VueUiRidgeline:m(()=>import(`./vue-ui-ridgeline-BnslUzA-.js`).then(e=>e.n)),VueUiDag:m(()=>import(`./vue-ui-dag-DlllVyCV.js`).then(e=>e.n))},{vue_ui_dashboard:ye}=i(),be=b(null),xe=b(null),O=b(null),k=e,A=c(()=>ne({userConfig:k.config,defaultConfig:ye}));ee({config:()=>A.value,dataset:()=>k.dataset,component:`VueUiDashboard`,rules:[te.noHint]});let j=c(()=>A.value.userOptions.useCursorPointer),M=b(a()),N=b(A.value.locked);function Se(){N.value=!N.value}w(()=>k.config,()=>{N.value=A.value.locked,ze.value=!A.value.userOptions.showOnChartHover});function P(){return k.dataset.map((e,t)=>({...e,index:t}))}let F=b(P());w(()=>k.dataset,()=>{F.value=P()});let I=c(()=>F.value.map(e=>({...e,resolvedComponent:typeof e.component==`string`?D[e.component]:e.component}))),L=b(null),R=b(null),z=b({x:0,y:0}),B=b({x:0,y:0}),V=b(null),H=b(!1),U=b(null),W=b(!1);function G(e){let t=e.target;(t.tagName===`INPUT`&&t.type===`range`||t.classList.contains(`range-handle`))&&(W.value=!0)}function K(e){let t=e.target;t.tagName===`INPUT`&&t.type===`range`&&(W.value=!1)}let{isPrinting:Ce,isImaging:we,generatePdf:q,generateImage:Te}=ae({elementId:`vue-ui-dashboard_${M.value}`,fileName:A.value.userOptions.print.filename||`dashboard`,options:{...A.value.userOptions.print,aspectRatio:A.value.style.board.aspectRatio}});function Ee(e){if(!N.value&&(H.value=!0,U.value=e,R.value===null)){L.value=e,z.value={x:event.clientX,y:event.clientY};let t=F.value[e],n=100-t.width,r=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>n&&(t.left=n),t.top>r&&(t.top=r),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function J(e,t){H.value=!0,U.value=e,R.value={index:e,direction:t};let n=F.value[e];B.value={x:event.clientX,y:event.clientY,initialWidth:n.width,initialHeight:n.height}}function De(e,t,n){if(R.value.direction.includes(`top`)){let t=e.height-n/V.value.offsetHeight*100;t>=E&&(e.top+=n/V.value.offsetHeight*100,e.height=t)}if(R.value.direction.includes(`bottom`)){let t=e.height+n/V.value.offsetHeight*100;t>=E&&(e.height=t)}if(R.value.direction.includes(`left`)){let n=e.width-t/V.value.offsetWidth*100;n>=E&&(e.left+=t/V.value.offsetWidth*100,e.width=n)}if(R.value.direction.includes(`right`)){let n=e.width+t/V.value.offsetWidth*100;n>=E&&(e.width=n)}}function Oe(e){if(!(N.value||W.value)){if(H.value=!0,L.value!==null){let t=F.value[L.value],n=e.clientX-z.value.x,r=e.clientY-z.value.y,i=t.left+n/V.value.offsetWidth*100,a=t.top+r/V.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),z.value={x:e.clientX,y:e.clientY}}if(R.value!==null){let t=F.value[R.value.index];De(t,e.clientX-B.value.x,e.clientY-B.value.y),B.value={x:e.clientX,y:e.clientY}}}}let ke=fe;w(F,e=>{e&&!H.value&&ke(`change`,F.value)},{deep:!0});function Ae(){L.value=null,R.value=null,H.value=!1,U.value=null,F.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function je(e){N.value||W.value||(H.value=!0,U.value=e,R.value===null&&(L.value=e,z.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function Y(e,t,n){if(H.value=!0,U.value=e,R.value===null){R.value={index:e,direction:t};let r=F.value[e];B.value={x:n.touches[0].clientX,y:n.touches[0].clientY,initialWidth:r.width,initialHeight:r.height}}}function X(e){if(H.value=!0,e.preventDefault(),R.value!==null){let t=F.value[R.value.index];De(t,e.touches[0].clientX-B.value.x,e.touches[0].clientY-B.value.y),B.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Me(e){if(!(N.value||W.value)&&(H.value=!0,e.preventDefault(),L.value!==null)){let t=F.value[L.value],n=e.touches[0].clientX-z.value.x,r=e.touches[0].clientY-z.value.y,i=t.left+n/V.value.offsetWidth*100,a=t.top+r/V.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),z.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Z(){H.value=!1,U.value=null,L.value=null,R.value=null,F.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}let Ne=c(()=>A.value.style.item.borderColor),Pe=c(()=>A.value.style.resizeHandles.backgroundColor),Fe=c(()=>A.value.style.board.aspectRatio),Ie=c(()=>A.value.style.board.backgroundColor),Le=c(()=>A.value.style.board.border);function Re(){return F.value}let{userOptionsVisible:ze,setUserOptionsVisibility:Be,keepUserOptionState:Ve}=oe({config:A.value}),Q=b(!1);function He(){Q.value=!Q.value}function Ue(){Be(!0)}function We(){Be(!1)}async function $(){ke(`copyAlt`,{config:A.value,dataset:I.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:I.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return o({generatePdf:q,getItemsPositions:Re,toggleLock:Se,copyAlt:$}),(e,i)=>(y(),d(`div`,{id:`vue-ui-dashboard_${M.value}`,onMousedown:G,onMouseup:K,onTouchstart:G,onTouchend:K,onMouseenter:Ue,onMouseleave:We,ref_key:`dashboardRef`,ref:be,style:{position:`relative`},class:`vue-data-ui-component`},[f(`div`,{class:`vue-ui-dashboard-container`,ref_key:`dashboardContainer`,ref:V,style:v(`outline:${Le.value}; background:${Ie.value}; aspect-ratio:${Fe.value};${Q.value?`pointer-events:none`:``}`)},[f(`div`,{class:`vue-ui-dashboard-grid-container`,ref:`container`,onMousemove:Oe,onMouseup:Ae,onTouchmove:Me,onTouchend:Z,style:v(`background:${A.value.style.board.backgroundColor}`)},[i[4]||=f(`div`,{class:`vue-ui-dashboard-grid`},null,-1),(y(!0),d(s,null,x(I.value,(t,n)=>(y(),d(`div`,{key:t.id,class:le({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":N.value}),style:v({width:`${t.width}%`,height:`${t.height}%`,left:`${t.left}%`,top:`${t.top}%`,cursor:`move`,boxShadow:U.value===n?`0 6px 12px -3px rgba(0,0,0,0.3)`:``,zIndex:U.value===n?I.value.length+1:t.index,backgroundColor:A.value.style.item.backgroundColor}),onMousedown:e=>Ee(n),onTouchstart:e=>je(n,t)},[N.value?u(``,!0):(y(),d(s,{key:0},[f(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left`,onMousedown:e=>J(n,`top-left`),onTouchstart:e=>Y(n,`top-left`,e),onTouchmove:i[0]||=e=>X(e),onTouchend:Z},null,40,he),f(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right`,onMousedown:e=>J(n,`top-right`),onTouchstart:e=>Y(n,`top-right`,e),onTouchmove:i[1]||=e=>X(e),onTouchend:Z},null,40,ge),f(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left`,onMousedown:e=>J(n,`bottom-left`),onTouchstart:e=>Y(n,`bottom-left`,e),onTouchmove:i[2]||=e=>X(e),onTouchend:Z},null,40,_e),f(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right`,onMousedown:e=>J(n,`bottom-right`),onTouchstart:e=>Y(n,`bottom-right`,e),onTouchmove:i[3]||=e=>X(e),onTouchend:Z},null,40,ve)],64)),S(e.$slots,`top`,{item:t,index:n},void 0,!0),t.resolvedComponent?(y(),l(ue(t.resolvedComponent),g({key:1,ref_for:!0},t.props),null,16)):S(e.$slots,`content`,{item:t,index:n,left:t.left,top:t.top,height:t.height,width:t.width},void 0,!0,2),S(e.$slots,`bottom`,{item:t,index:n},void 0,!0)],46,me))),128))],36)],4),(y(),d(`svg`,{style:v({width:`100%`,height:`100%`,pointerEvents:`none`,position:`absolute`,top:0,left:0,zIndex:I.value.length+1}),ref_key:`svgRef`,ref:O},null,4)),A.value.userOptions.buttons.annotator&&V.value&&O.value?(y(),l(ce,g({key:0},C(n)(A.value.userOptions.annotator),{color:A.value.style.board.color,backgroundColor:A.value.style.board.backgroundColor,active:Q.value,svgRef:O.value,isCursorPointer:j.value,onClose:He,style:{zIndex:I.value.length+1},palette:A.value.userOptions.annotatorPalette}),p({_:2},[x(C(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,_(h(C(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`style`,`palette`])):u(``,!0),(A.value.allowPrint||A.value.userOptions.show)&&(A.value.userOptions.buttons.pdf||A.value.userOptions.buttons.img)?(y(),l(se,{key:1,ref_key:`userOptionsRef`,ref:xe,backgroundColor:A.value.style.board.backgroundColor,color:A.value.style.board.color,isPrinting:C(Ce),isImaging:C(we),uid:M.value,position:A.value.userOptions.position,hasTooltip:!1,hasPdf:A.value.userOptions.buttons.pdf,hasImg:A.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:!1,hasAltCopy:A.value.userOptions.buttons.altCopy,chartElement:V.value,callbacks:A.value.userOptions.callbacks,hasAnnotator:A.value.userOptions.buttons.annotator,isAnnotation:Q.value,printScale:A.value.userOptions.print.scale,titles:{...A.value.userOptions.buttonTitles},isCursorPointer:j.value,onGeneratePdf:C(q),onGenerateImage:C(Te),onToggleAnnotator:He,onCopyAlt:$,style:v({visibility:C(Ve)?C(ze)?`visible`:`hidden`:`visible`,zIndex:I.value.length+1})},p({_:2},[x(C(re)(e.$slots,`menuIcon optionPdf optionImg optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(C(ie)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`position`,`hasPdf`,`hasImg`,`hasAltCopy`,`chartElement`,`callbacks`,`hasAnnotator`,`isAnnotation`,`printScale`,`titles`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`style`])):u(``,!0)],40,pe))}},[[`__scopeId`,`data-v-cda62ea6`]]);export{fe as n,D as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-D3ZfFSE5.js";import{X as n,t as r}from"./lib-rPeBMZrn.js";import{n as i,t as a}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{n as c}from"./PackageVersion-CHQWwTik.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{X as n,t as r}from"./lib-rPeBMZrn.js";import{n as i,t as a}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as s}from"./useNestedProp-DnGoh-XS.js";import{n as c}from"./PackageVersion-D6_O7PmZ.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
2
2
  L ${e.x+r.value} ${e.y-r.value}
3
3
  L ${e.x+26-r.value} ${e.y-r.value}
4
4
  L ${e.x+26} ${e.y}
@@ -0,0 +1,47 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Bt as o,D as s,Dt as c,Ht as l,It as u,Jt as ee,S as te,X as ne,Y as d,Yt as re,Zt as ie,at as f,b as p,dt as ae,f as m,h as oe,i as h,in as se,it as ce,j as le,nn as ue,nt as de,p as g,s as fe,t as pe,ut as me,w as he,yt as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./BaseScanner-8NdoBs7B.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Ce}from"./useNestedProp-DnGoh-XS.js";import{t as we}from"./useThemeCheck-BKNRbGeC.js";import{t as Te}from"./chartImage-DPGnEuYM.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./useChartExport-BZts4KFb.js";import{n as Oe,t as ke}from"./tableIntegration-CNoJ1CIY.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./Shape-CRe8woTu.js";import{c as Pe}from"./canvas-lib-22VpOI4_.js";import{t as Fe}from"./useResponsive-CENUxfEL.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ve,t as He}from"./labelUtils-CdtU-yB_.js";import{t as Ue}from"./vue_ui_donut-T5PeOqvf.js";import{t as We}from"./Legend-DM0ClX3D.js";import{Fragment as _,Teleport as Ge,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as Xe,mergeProps as Ze,nextTick as Qe,normalizeClass as $e,normalizeProps as et,normalizeStyle as C,onBeforeUnmount as tt,onMounted as nt,openBlock as w,ref as T,renderList as E,renderSlot as D,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as O,toRefs as at,unref as k,useSlots as ot,vShow as st,watch as ct,withCtx as A,withDirectives as lt}from"vue";function ut(e){let{FINAL_CONFIG:t,noGhostDonut:n,svg:r,padding:i,labels_inline_fontSize:a,minSize:o,findArcMidpoint:s,calcMarkerOffsetX:c,calcMarkerOffsetY:l,animatingIndex:u,segregated:ee,isSmallArc:te}=e;return{smallArcLayoutsClassic:v(()=>{if(t.value.type!==`classic`)return{};let e={},ne=n.value||[];if(!ne.length)return e;let d=r.value.width/2,re=r.value.height/2,ie=i.value.top+16,f=r.value.height-i.value.bottom-16,p=a.value,ae=p/3,m=p*1.5,oe=d-(o.value+6),h=d+(o.value+6),se=!!t.value.style.chart.layout.curvedMarkers;function ce({midX:e,midY:t,bandX:n,bandY:r}){if(!se)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<d?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-d,l=t-re,u=Math.sqrt(c*c+l*l)||1,ee=c/u,te=l/u,ne=u+9;function ie({x:e,y:t}){let n=e-d,r=t-re,i=Math.sqrt(n*n+r*r)||1;if(i>=ne)return{x:e,y:t};let a=ne/i;return{x:d+n*a,y:re+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,ne=(t+r)*.5,f=u+c,p=ne+l,ae=(f-d)*(f-d)+(p-re)*(p-re),m=u-c,oe=ne-l;(m-d)*(m-d)+(oe-re)*(oe-re)>ae&&(c=-c,l=-l);let h=.78,se=e+a*h,ce=t+o*h,le=Math.max(0,Math.min(1,(s-18)/44)),ue=le*le*(3-2*le),de=2.5+ue*4,g=1+ue*2.5;de*=.9;let fe=ie({x:se+c*de+ee*g,y:ce+l*de+te*g});return`M ${e} ${t} Q ${fe.x} ${fe.y} ${n} ${r}`}let f=s*.34;f<20&&(f=20),f>46&&(f=46);let p=s*.46;p<22&&(p=22),p>70&&(p=70);let ae={x:e+ee*f,y:t+te*f},m=d+i*Math.max(Math.abs(n-d),ne),oe={x:n-i*Math.min(p,Math.abs(m-n)*.75),y:r},h=ie(ae),ce=ie(oe);return`M ${e} ${t} C ${h.x} ${h.y} ${ce.x} ${ce.y} ${n} ${r}`}function le(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(p*1.2);return m+n}function ue({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:le(e.name)}}function de(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||ee.value.includes(n)?!1:te(t,n)}function g(e){let t=e.inlineMarkerY<re,n=e.inlineMarkerX<d;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function fe(e,t){t.startsWith(`T`)?e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index):e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function pe({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+ae,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function me({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let ee=u,te=ce({midX:s,midY:c,bandX:r,bandY:ee});e[i]=pe({side:n,markerX:r,markerY:ee,labelY:u,connectorPath:te})})}let he=ne.map((e,t)=>ue({arc:e,index:t})).filter(de),ge={TL:[],TR:[],BL:[],BR:[]};return he.forEach(e=>{ge[g(e)].push(e)}),Object.keys(ge).forEach(e=>{fe(ge[e],e)}),me({candidateList:ge.TL,side:`left`,bandMarkerX:oe,startY:ie,direction:`down`}),me({candidateList:ge.TR,side:`right`,bandMarkerX:h,startY:ie,direction:`down`}),ge.BL.length>1&&me({candidateList:ge.BL,side:`left`,bandMarkerX:oe,startY:f,direction:`up`}),ge.BR.length>1&&me({candidateList:ge.BR,side:`right`,bandMarkerX:h,startY:f,direction:`up`}),e})}}var dt=/* @__PURE__ */ e({default:()=>En}),ft=[`id`],pt=[`id`],mt=[`id`],ht={style:{position:`relative`}},gt=[`xmlns`,`aria-describedby`,`viewBox`],_t=[`width`,`height`],vt={key:1},yt={key:2},bt=[`id`],xt=[`id`],St=[`id`],Ct=[`flood-color`],wt=[`id`],Tt=[`flood-color`],Et=[`d`,`stroke`,`filter`],Dt=[`d`,`stroke`,`filter`],Ot=[`cx`,`cy`,`r`,`fill`,`filter`],kt={key:6},At=[`stroke`,`d`],jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Pt={key:0},Ft=[`stroke`,`d`],It={key:0},Lt=[`d`,`stroke`,`stroke-width`,`filter`],Rt={key:1},zt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt={key:1},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt={key:0},Gt=[`d`,`fill`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`r`,`stroke`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`cx`,`cy`,`r`],Yt={key:0},Xt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Zt={key:1},Qt=[`cx`,`cy`,`r`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`filter`,`opacity`],an={key:0},on=[`x`,`y`],sn={key:1},cn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],gn={key:2},_n=[`x`,`y`,`width`],vn=[`x`,`y`,`width`],yn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bn={key:5,class:`vue-data-ui-watermark`},xn=[`id`],Sn=[`onClick`],Cn={key:8,class:`vue-ui-donut-hollow`},wn={key:0},Tn={key:1},En=/*#__PURE__*/ Se({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Se,emit:dt}){let En=Ye(()=>import(`./Tooltip-C1q0Qoh7.js`)),Dn=Ye(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),On=Ye(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),kn=Ye(()=>import(`./DataTable-Dof6yhO7.js`)),An=Ye(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),jn=Ye(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Mn=Ye(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Nn=Ye(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_donut:Pn}=i(),{isThemeValid:Fn,warnInvalidTheme:In}=we(),Ln=ot(),j=e,Rn=v({get(){return!!j.dataset&&j.dataset.length},set(e){return e}}),zn=it(null),Bn=T(null),Vn=T(null),Hn=T(null),Un=it(null),Wn=it(null),Gn=it(null),Kn=it(null),qn=it(null),Jn=it(null),Yn=T(0),Xn=T(0),Zn=T(0),Qn=T(!1),$n=T(null),er=T(null),tr=T(null),nr=T({x:0,y:0}),rr=T(`pointer`),ir=T(!1),ar=v({get:()=>F.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),M=v({get:()=>F.value.style.chart.layout.labels.name.fontSize,set:e=>e}),or=v({get:()=>F.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),sr=!1,cr=()=>{F.value.autoSize&&!sr&&(sr=!0,requestAnimationFrame(()=>{sr=!1;let e=F.value,t=Bn.value,n=B.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:I.value.percentage.fontSize,minSize:I.value.percentage.minFontSize,sizeRef:ar},{selector:`.vue-data-ui-datalabel-name`,baseSize:I.value.name.fontSize,minSize:I.value.name.minFontSize,sizeRef:M},{selector:`.vue-data-ui-datalabel-inline`,baseSize:I.value.dataLabels.smallArcClusterFontSize,minSize:I.value.name.minFontSize,sizeRef:or}];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})=>{t.querySelectorAll(e).forEach(e=>{i.value=fe({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};nt(async()=>{Qn.value=!0,dr(),requestAnimationFrame(cr)});let lr;nt(()=>{zn.value&&(lr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){cr();break}}}),lr.observe(zn.value.parentElement))}),tt(()=>{lr?.disconnect()}),tt(()=>{Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect())});let ur=v(()=>F.value.debug);function dr(){if(_e(j.dataset)?(f({componentName:`VueUiDonut`,type:`dataset`,debug:ur.value}),Rn.value=!1,xr.value=!0):(j.dataset.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{f({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:ur.value}),Rn.value=!1,xr.value=!0})}),ur.value&&j.dataset.forEach((e,t)=>{e.name&&e.name!==``||f({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),_e(j.dataset)||(xr.value=F.value.loading),F.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:zn.value,title:F.value.style.chart.title.text?Un.value:null,legend:F.value.style.chart.legend.show?Wn.value:null,source:qn.value,noTitle:Jn.value,padding:F.value.autoSize?void 0:Nr.value});requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,cr()})});Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect()),Gn.value=new ResizeObserver(e),Kn.value=zn.value.parentNode,Gn.value.observe(Kn.value)}}let N=T(ne()),fr=T(!1),pr=T(``),P=T(null),mr=T(0);function hr(){let e=Ce({userConfig:j.config,defaultConfig:Pn}),t={},n=e.theme;if(!n)t=e;else if(!Fn.value(e))In(e),t=e;else{let r=Ce({userConfig:Ue[n]||j.config,defaultConfig:e});t={...Ce({userConfig:j.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ue[n]||l}}return t}let F=T(hr()),I=v(()=>F.value.style.chart.layout.labels),L=v(()=>F.value.style.chart.layout.donut),gr=v(()=>F.value.style.chart.layout),R=v(()=>F.value.style.chart);be({config:()=>F.value,dataset:()=>j.dataset,component:`VueUiDonut`,rules:[xe.singleSeries,xe.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let _r=v(()=>F.value.userOptions.useCursorPointer),vr=v(()=>se({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:F.value.skeletonConfig??{}})),{loading:yr,FINAL_DATASET:br,manualLoading:xr,skeletonDataset:Sr}=ve({...at(j),FINAL_CONFIG:F,prepareConfig:hr,skeletonDataset:j.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:se({defaultConfig:F.value,userConfig:vr.value})}),z=T(!0),Cr=T(0),wr=T(!1),Tr=null;function Er(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=ce(o);Cr.value=s,o<1?Tr=requestAnimationFrame(r):(Cr.value=1,Tr=null,t())}Tr!==null&&cancelAnimationFrame(Tr),Cr.value=0,Tr=requestAnimationFrame(r)})}ct(()=>yr.value,async e=>{if(e||wr.value)return;let t=br.value===Sr,n=F.value.startAnimation?.show;!t&&n?(wr.value=!0,await Er(F.value.startAnimation.durationMs||1e3)):Cr.value=1,z.value=!1},{immediate:!0});let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=ze({config:F.value}),{svgRef:B}=Be({config:R.value.title});function Ar(){Or(!0)}function jr(){Or(!1)}let Mr=ie(j.config);ct(()=>j.config,(e,t)=>{let n=ie(e),r=n!==Mr;Mr=n;let i=hr();r?(yr.value||(F.value=i),Dr.value=!F.value.userOptions.showOnChartHover,dr(),Yn.value+=1,Xn.value+=1,Zn.value+=1,V.value.dataLabels.show=I.value.dataLabels.show,V.value.showTable=F.value.table.show,V.value.showTooltip=R.value.tooltip.show,H.value.height=R.value.height,H.value.width=R.value.width):(F.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=F.value.style.chart.tooltip.show)},{deep:!0});let Nr=v(()=>{let{top:e,right:t,bottom:n,left:r}=R.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Pr,isImaging:Fr,generatePdf:Ir,generateImage:Lr}=Me({elementId:`donut__${N.value}`,fileName:R.value.title.text||`vue-ui-donut`,options:F.value.userOptions.print}),Rr=v(()=>F.value.userOptions.show&&!R.value.title.text),zr=v(()=>he(F.value.customPalette)),V=T({dataLabels:{show:I.value.dataLabels.show},showTable:F.value.table.show,showTooltip:R.value.tooltip.show});ct(F,()=>{V.value={dataLabels:{show:I.value.dataLabels.show},showTable:F.value.table.show,showTooltip:R.value.tooltip.show}},{immediate:!0});let H=T({height:R.value.height,width:R.value.width}),Br=v(()=>{if(F.value.pie)return K.value;let e=L.value.strokeWidth/512,t=Math.min(H.value.width,H.value.height)*e,n=t>K.value?K.value:t;return Math.max(n,12*(1+e))}),Vr=dt,U=v(()=>br.value.sort((e,t)=>{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;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:te(e.color)||zr.value[t]||l[t]||l[t%l.length],value:p(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${N.value}_${t}`})));ct(()=>j.dataset,e=>{Array.isArray(e)&&e.length>0&&(xr.value=!1)},{immediate:!0});let W=it(U.value);ct(()=>U.value,e=>{W.value=e,requestAnimationFrame(cr)});function Hr(){return U.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let G=T([]),Ur=T(!1),Wr=T(null);function Gr(){Vr(`selectLegend`,$r.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Kr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=ce}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function qr(){G.value.length?G.value=[]:ei.value.forEach((e,t)=>{G.value.push(t)}),Gr()}function Jr(e){let t=U.value.find((t,n)=>n===e),n=W.value.find((t,n)=>n===e).value;if(G.value.includes(e)){G.value=G.value.filter(t=>t!==e);let r=t.value;function i(){W.value=W.value.map((t,n)=>e===n?{...t,value:r}:t),Gr()}function a(){Ur.value=!0,Wr.value=e,Kr({from:n,to:r,duration:F.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{W.value=W.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{i(),Ur.value=!1,Wr.value=null}})}F.value.serieToggleAnimation.show&&F.value.type===`classic`?a():(i(),requestAnimationFrame(cr))}else if(G.value.length<U.value.length-1){function t(){G.value.push(e),W.value=W.value.map((t,n)=>e===n?{...t,value:0}:t),Gr()}function r(){Ur.value=!0,Wr.value=e,Kr({from:n,to:0,duration:F.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{W.value=W.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{t(),requestAnimationFrame(cr),Ur.value=!1,Wr.value=null}})}F.value.serieToggleAnimation.show&&F.value.type===`classic`?r():t()}}function Yr(e){return U.value.length?U.value.find(t=>t.name===e)||(ur.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(ur.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Xr(e){let t=Yr(e);t!==null&&G.value.includes(t.seriesIndex)&&Jr(t.seriesIndex)}function Zr(e){let t=Yr(e);t!==null&&(G.value.includes(t.seriesIndex)||Jr(t.seriesIndex))}let Qr=v(()=>br.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),$r=v(()=>{if(z.value&&!yr.value){let e=Cr.value,t=U.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Qr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return W.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),W.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!G.value.includes(t))}),ei=v(()=>br.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/br.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:te(e.color)||zr.value[t]||l[t]||l[t%l.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let n=h(I.value.value.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:R.value.legend.roundingValue}),{datapoint:e,index:t}),r=h(I.value.percentage.formatter,di(e),a({v:di(e),s:`%`,r:R.value.legend.roundingPercentage})),i=Oi({val:n,percentage:G.value.includes(t)?`${Di(e.proportion*100)}%`:r,showVal:R.value.legend.showValue,showPercentage:R.value.legend.showPercentage,config:R.value.legend});return{...e,opacity:G.value.includes(t)?.5:1,segregate:()=>!Ur.value&&Jr(t),isSegregated:G.value.includes(t),display:`${e.name}${R.value.legend.showPercentage||R.value.legend.showValue?`: `:``}${i}`}})),ti=v(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),K=v(()=>{let e=L.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(H.value.width*t,H.value.height*t);return Math.max(12,n)}),q=v(()=>u({series:$r.value},H.value.width/2,H.value.height/2,K.value,K.value,1.99999,2,1,360,105.25,Br.value)),ni=v(()=>Math.abs($r.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ri=v(()=>u({series:[{value:1,color:L.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},H.value.width/2,H.value.height/2,K.value,K.value,1.99999,2,1,360,105.25,Br.value)),J=v(()=>q.value.filter(e=>!e.ghost)),Y=v(()=>{let e=Math.max(...$r.value.map(e=>e.value)),t=$r.value.map(t=>t.value/e);return le({series:t,center:{x:H.value.width/2,y:H.value.height/2},maxRadius:Math.min(H.value.width,H.value.height)/3,hasGhost:z.value})});function ii(e){return e.x>H.value.width/2+6?`start`:e.x<H.value.width/2-6?`end`:`middle`}function ai(e){return e.middlePoint.y>H.value.height/2?o({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:H.value.width/2,centerY:H.value.height/2}).y:o({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:H.value.width/2,centerY:H.value.height/2}).y-100}function X(e){return e.proportion*100>I.value.dataLabels.hideUnderValue}function oi(e,t){let n=I.value.dataLabels.hideUnderValue,r=I.value.dataLabels.smallArcClusterThreshold,i=(li.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:Z}=ut({FINAL_CONFIG:F,noGhostDonut:J,svg:H,padding:Nr,labels_inline_fontSize:or,minSize:K,findArcMidpoint:me,calcMarkerOffsetX:m,calcMarkerOffsetY:g,animatingIndex:Wr,segregated:G,isSmallArc:oi});function si(e,t){let n=e.value/ci(t);return isNaN(n)?0:h(I.value.percentage.formatter,n*100,a({v:n*100,s:`%`,r:I.value.percentage.rounding}),{datapoint:e})}function ci(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Q=v(()=>$r.value.map(e=>e.value).reduce((e,t)=>e+t,0)),li=v(()=>{let e=U.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:U.value.map(t=>t.value/e)}),ui=v(()=>Q.value/$r.value.length);function di(e){return Ur.value?e.proportion*100:e.value/Q.value*100}let fi=T(null),pi=T(!1);function mi({datapoint:e,seriesIndex:t}){F.value.events.datapointLeave&&F.value.events.datapointLeave({datapoint:e,seriesIndex:t}),fr.value=!1,P.value=null,tr.value=null,rr.value=`pointer`}function hi({datapoint:e,relativeIndex:t,seriesIndex:n,show:r=!1,triggerMode:i=`pointer`}){F.value.events.datapointEnter&&F.value.events.datapointEnter({datapoint:e,seriesIndex:n}),rr.value=i,tr.value=t,fi.value={datapoint:e,seriesIndex:n,config:F.value,series:U.value},fr.value=r,P.value=t;let o=``,s=R.value.tooltip.customFormat;if(pi.value=!1,c(s))try{let t=s({seriesIndex:n,datapoint:e,series:U.value,config:F.value});typeof t==`string`&&(pr.value=t,pi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pi.value=!1}pi.value||(o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.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}"/>${Ln.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${N.value}_${n})"/>`:``}</svg>`,o+=`<b>${Oi({showVal:R.value.tooltip.showValue,showPercentage:R.value.tooltip.showPercentage,val:`<span>${h(I.value.value.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:R.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:n})}</span>`,percentage:h(I.value.percentage.formatter,e.proportion*100,a({v:e.proportion*100,s:`%`,r:R.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:n}),config:R.value.tooltip})}</b></div>`,R.value.comments.showInTooltip&&e.comment&&(o+=`<div class="vue-data-ui-tooltip-comment" style="background:${ee(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),pr.value=`<div>${o}</div>`)}function gi(e,t){let n=Z.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=m(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:g(e)}}function _i(e,t,n){let{textAnchor:r,x:i}=gi(e,t),a=ki(e),o=`
2
+ <tspan
3
+ class="vue-data-ui-datalabel-inline"
4
+ fill="${I.value.percentage.color}"
5
+ font-size="${n?or.value:ar.value}px"
6
+ style="font-weight:${I.value.percentage.bold?`bold`:``}"
7
+ >${a}</tspan>
8
+ `,s=String(e.name??``).split(/\n/g),c=``;return s.forEach((e,t)=>{c+=t===0?`
9
+ <tspan
10
+ class="${n?`vue-data-ui-datalabel-inline`:`vue-data-ui-datalabel-name`}"
11
+ fill="${I.value.name.color}"
12
+ font-size="${n?or.value:M.value}px"
13
+ style="font-weight:${I.value.name.bold?`bold`:``}"
14
+ >${e}</tspan>
15
+ `:`
16
+ <tspan
17
+ class="${n?`vue-data-ui-datalabel-inline`:`vue-data-ui-datalabel-name`}"
18
+ x="${i}"
19
+ dy="${(n?or.value:M.value)*1.2}"
20
+ fill="${I.value.name.color}"
21
+ font-size="${n?or.value:M.value}px"
22
+ style="font-weight:${I.value.name.bold?`bold`:``}"
23
+ >${e}</tspan>
24
+ `}),r===`end`?`${I.value.name.show?c:``}${o}`:`${o}${I.value.name.show?c:``}`}function vi(e,t){let n=Y.value[t].middlePoint,r=ii(n),i=o({initX:n.x,initY:n.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}),a=i.x;i.y;let s=ki(e),c=`
25
+ <tspan
26
+ class="vue-data-ui-datalabel-value"
27
+ fill="${I.value.percentage.color}"
28
+ font-size="${ar.value}px"
29
+ style="font-weight:${I.value.percentage.bold?`bold`:`normal`}"
30
+ >${s}</tspan>
31
+ `,l=String(e.name??``).split(/\n/g),u=``;return l.forEach((e,t)=>{u+=t===0?`
32
+ <tspan
33
+ class="vue-data-ui-datalabel-name"
34
+ fill="${I.value.name.color}"
35
+ font-size="${M.value}px"
36
+ style="font-weight:${I.value.name.bold?`bold`:`normal`}"
37
+ >${e}</tspan>
38
+ `:`
39
+ <tspan
40
+ class="vue-data-ui-datalabel-name"
41
+ x="${a}"
42
+ dy="${M.value*1.2}"
43
+ fill="${I.value.name.color}"
44
+ font-size="${M.value}px"
45
+ style="font-weight:${I.value.name.bold?`bold`:`normal`}"
46
+ >${e}</tspan>
47
+ `}),r===`end`?`${I.value.name.show?u:``}${c}`:`${c}${I.value.name.show?u:``}`}function yi(e){return F.value.useBlurOnHover&&![null,void 0].includes(P.value)&&P.value!==e?`url(#blur_${N.value})`:``}function bi(e){if(!Ur.value||Wr.value===null||e.seriesIndex!==Wr.value)return 1;let t=(e.proportion??0)*100,n=I.value.dataLabels.hideUnderValue,r=I.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let xi=v(()=>({head:$r.value.map(e=>({name:e.name,color:e.color})),body:$r.value.map(e=>e.value)}));function Si(e=null){Qe(()=>{let t=xi.value.head.map((e,t)=>[[e.name],[xi.value.body[t]],[isNaN(xi.value.body[t]/Q.value)?`-`:xi.value.body[t]/Q.value*100]]),n=[[R.value.title.text],[R.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=s(n);e?e(r):de({csvContent:r,title:R.value.title.text||`vue-ui-donut`})})}let Ci=v(()=>{let e=[`__SUM__`,a({p:I.value.dataLabels.prefix,v:Q.value,s:I.value.dataLabels.suffix,r:F.value.table.td.roundingValue}),`100%`],t=xi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},xi.value.body[t],isNaN(xi.value.body[t]/Q.value)?`-`:(xi.value.body[t]/Q.value*100).toFixed(F.value.table.td.roundingPercentage)+`%`]),n=t.map(e=>e.map((e,t)=>t===0?e.name:e)),r={th:{backgroundColor:F.value.table.th.backgroundColor,color:F.value.table.th.color,outline:F.value.table.th.outline},td:{backgroundColor:F.value.table.td.backgroundColor,color:F.value.table.td.color,outline:F.value.table.td.outline},breakpoint:F.value.table.responsiveBreakpoint};return{colNames:[F.value.table.columnNames.series,F.value.table.columnNames.value,F.value.table.columnNames.percentage],head:e,body:t,a11yBody:n,config:r}}),wi=T(!1);function Ti(e){wi.value=e,mr.value+=1}let Ei=v(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Di(e){return Ve({num:e,rounding:R.value.legend.roundingPercentage})}function Oi({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function ki(e){return Oi({val:h(I.value.value.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:I.value.value.rounding}),{datapoint:e}),percentage:si(e,J.value),showVal:I.value.value.show,showPercentage:I.value.percentage.show,config:I.value.dataLabels})}function $(e,t){F.value.events.datapointClick&&F.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Vr(`selectDatapoint`,{datapoint:e,index:t})}function Ai(){V.value.showTable=!V.value.showTable}function ji(){V.value.dataLabels.show=!V.value.dataLabels.show}function Mi(){V.value.showTooltip=!V.value.showTooltip}let Ni=T(!1);function Pi(){Ni.value=!Ni.value}let Fi=Te(zn,()=>R.value.title.text);function Ii(){if(!Bn.value)return;let{x:e,y:t,width:n,height:r}=Bn.value.getBBox();B.value&&B.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Li=v(()=>ke({config:F,style:R,mutableConfig:V,dialog:Nn,accordion:On,isFullscreen:wi,parent:zn,maxWidth:500,isCursorPointer:_r}));ct(()=>V.value.showTable,e=>Oe(e,F,$n));function Ri(){V.value.showTable=!1,er.value&&er.value.setTableIconState(!1)}let zi=v(()=>ei.value.map(e=>({...e,name:e.display}))),Bi=v(()=>R.value.backgroundColor),Vi=v(()=>R.value.legend),Hi=v(()=>R.value.title),{isCallbackImaging:Ui,isCallbackSvg:Wi,generateSvg:Gi,onGenerateImage:Ki}=De({svg:B,title:Hi,legend:Vi,legendItems:zi,backgroundColor:Bi,getSvgCallback:()=>F.value.userOptions.callbacks.svg,generateImage:Lr});async function qi(){Vr(`copyAlt`,{config:F.value,dataset:W.value}),F.value.userOptions.callbacks.altCopy?await Promise.resolve(F.value.userOptions.callbacks.altCopy({config:F.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Ji(){tr.value=null,ir.value=!0}function Yi(){tr.value=null,rr.value=`pointer`,fr.value=!1,P.value=null,ir.value=!1}function Xi(e){if(!B.value||Ni.value||document.activeElement!==B.value||!J.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){tr.value=null,rr.value=`pointer`,fr.value=!1,P.value=null;return}if(r){if(tr.value===null)return;let e=J.value[tr.value];if(!e)return;$(e,tr.value);return}let a=tr.value,o=P.value,s=a!==null&&a>=0&&a<J.value.length,c=o!==null&&o>=0&&o<J.value.length;s?n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1)):c?(a=n?o+1:o-1,a>=J.value.length&&(a=0),a<0&&(a=J.value.length-1)):a=n?0:J.value.length-1;let l=J.value[a];l&&(tr.value=a,Zi(a),hi({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Zi(e){if(!Number.isFinite(e)||!B.value)return;let t=H.value.width/2,n=H.value.height/2;if(F.value.type===`classic`){let r=J.value[e];if(!r?.arcSlice)return;let i=me(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=Y.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=B.value.getBoundingClientRect();nr.value={x:r.left+t/H.value.width*r.width,y:r.top+n/H.value.height*r.height}}let Qi=v(()=>({headers:Ci.value?.colNames??[],rows:Ci.value?.a11yBody??[]}));return Se({autoSize:Ii,getData:Hr,getImage:Fi,generatePdf:Ir,generateCsv:Si,generateImage:Lr,generateSvg:Gi,hideSeries:Zr,showSeries:Xr,toggleTable:Ai,toggleLabels:ji,toggleTooltip:Mi,toggleAnnotator:Pi,toggleFullscreen:Ti,copyAlt:qi}),(i,s)=>(w(),x(`div`,{ref_key:`donutChart`,ref:zn,class:$e(`vue-data-ui-component vue-ui-donut ${wi.value?`vue-data-ui-wrapper-fullscreen`:``} ${F.value.useCssAnimation?``:`vue-ui-dna`}`),style:C(`font-family:${F.value.style.fontFamily};width:100%; ${F.value.responsive?`height:100%;`:``} text-align:center;background:${R.value.backgroundColor}`),id:`donut__${N.value}`,onMouseenter:Ar,onMouseleave:jr},[S(`div`,{id:`chart-instructions-${N.value}`,class:`sr-only`},[S(`p`,null,O(F.value.a11y.translations.keyboardNavigation),1)],8,pt),Qi.value?.rows?.length?(w(),y(Re,{key:0,uid:N.value,head:Qi.value.headers,body:Qi.value.rows,notice:F.value.a11y.translations.tableAvailable,caption:F.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),F.value.userOptions.buttons.annotator&&k(B)?(w(),y(k(An),Ze({key:1},k(n)(F.value.userOptions.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Ni.value,svgRef:k(B),isCursorPointer:_r.value,palette:F.value.userOptions.annotatorPalette,onClose:Pi}),Ke({_:2},[E(k(r),e=>({name:e,fn:A(n=>[D(i.$slots,e,et(Xe(k(t)(e,n))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):b(``,!0),D(i.$slots,`userConfig`,{},void 0,!0),Rr.value?(w(),x(`div`,{key:2,ref_key:`noTitle`,ref:Jn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),R.value.title.text?(w(),x(`div`,{key:3,ref_key:`chartTitle`,ref:Un,style:`width:100%;background:transparent;padding-bottom:24px`},[(w(),y(Ee,{key:`title_${Yn.value}`,config:{title:{cy:`donut-div-title`,...R.value.title},subtitle:{cy:`donut-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${N.value}`},null,8,mt),F.value.userOptions.show&&Rn.value&&(k(kr)||k(Dr))?(w(),y(k(jn),{ref_key:`userOptionsRef`,ref:er,key:`user_option_${mr.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:k(Pr),isImaging:k(Fr),uid:N.value,hasTooltip:R.value.tooltip.show&&F.value.userOptions.buttons.tooltip,hasPdf:F.value.userOptions.buttons.pdf,hasImg:F.value.userOptions.buttons.img,hasSvg:F.value.userOptions.buttons.svg,hasXls:F.value.userOptions.buttons.csv,hasTable:F.value.userOptions.buttons.table,hasLabel:F.value.userOptions.buttons.labels,hasFullscreen:F.value.userOptions.buttons.fullscreen,hasAltCopy:F.value.userOptions.buttons.altCopy,isFullscreen:wi.value,chartElement:zn.value,position:F.value.userOptions.position,callbacks:F.value.userOptions.callbacks,isTooltip:V.value.showTooltip,titles:{...F.value.userOptions.buttonTitles},hasAnnotator:F.value.userOptions.buttons.annotator,isAnnotation:Ni.value,printScale:F.value.userOptions.print.scale,tableDialog:F.value.table.useDialog,isCursorPointer:_r.value,onToggleFullscreen:Ti,onGeneratePdf:k(Ir),onGenerateCsv:Si,onGenerateImage:k(Ki),onGenerateSvg:k(Gi),onToggleTable:Ai,onToggleLabels:ji,onToggleTooltip:Mi,onToggleAnnotator:Pi,onCopyAlt:qi,style:C({visibility:k(kr)?k(Dr)?`visible`:`hidden`:`visible`})},Ke({_:2},[E(k(Ae)(i.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:A(t=>[D(i.$slots,e,et(Xe(k(je)(e,t))),void 0,!0)])}))]),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(`.`))):b(``,!0),S(`div`,ht,[(w(),x(`svg`,{ref_key:`svgRef`,ref:B,xmlns:k(pe),"aria-describedby":`chart-instructions-${N.value}`,class:$e({"vue-data-ui-fullscreen--on":wi.value,"vue-data-ui-fulscreen--off":!wi.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`,style:C(`max-width:100%; overflow: visible; background:transparent;color:${R.value.color};${Nr.value.css}`),tabindex:`0`,onFocus:Ji,onBlur:Yi,onKeydown:Xi},[S(`g`,{ref_key:`G`,ref:Bn,class:`vue-data-ui-g`},[Je(k(Mn)),D(i.$slots,`svg-underlayer`,{svg:{...H.value,datapoints:q.value,isPrintingImg:k(Pr)||k(Fr)||k(Ui),isPrintingSvg:k(Wi)}},void 0,!0),i.$slots[`chart-background`]?(w(),x(`foreignObject`,{key:0,x:0,y:0,width:H.value.width<=0?10:H.value.width,height:H.value.height<=0?10:H.value.height,style:{pointerEvents:`none`}},[D(i.$slots,`chart-background`,{},void 0,!0)],8,_t)):b(``,!0),F.value.type===`classic`&&!isNaN(Br.value/K.value)?(w(),x(`defs`,vt,[R.value.useGradient?(w(),y(Ie,{key:0,t:`radial`,id:`gradient_${N.value}`,stops:[[`0%`,k(ee)(R.value.backgroundColor,0),0],[`${(1-Br.value/K.value)*100}%`,k(ee)(`#FFFFFF`,0),0],[`${(1-Br.value/K.value/2)*100}%`,k(ee)(`#FFFFFF`,R.value.gradientIntensity),1],[`100%`,k(ee)(R.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):b(``,!0)])):b(``,!0),F.value.type===`polar`?(w(),x(`defs`,yt,[(w(!0),x(_,null,E(Y.value,(e,t)=>(w(),y(Ie,{t:`radial`,id:`polar_gradient_${t}_${N.value}`,key:`pg_${t}_${N.value}`,cx:(isNaN(e.middlePoint.x/H.value.width*100)?0:e.middlePoint.x/H.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/H.value.height*100)?0:e.middlePoint.y/H.value.height*100)+`%`,r:`62%`,stops:[[`0%`,k(re)(q.value[t].color,.05),R.value.gradientIntensity/100],[`100%`,q.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):b(``,!0),S(`defs`,null,[S(`filter`,{id:`blur_${N.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[S(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${N.value}`},null,8,xt),s[5]||=S(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,bt),S(`filter`,{id:`shadow_${N.value}`,"color-interpolation-filters":`sRGB`},[S(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":L.value.shadowColor},null,8,Ct)],8,St),S(`filter`,{id:`drop_shadow_${N.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[S(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":L.value.shadowColor},null,8,Tt)],8,wt)]),F.value.type===`classic`?(w(!0),x(_,{key:3},E(q.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`g`,null,[X(e)&&V.value.dataLabels.show?(w(),x(`path`,{key:0,d:k(Z)[t]?.connectorPath||k(oe)(e,{x:H.value.width/2,y:H.value.height/2},16,16,!1,!1,Br.value,12,gr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:yi(t)},null,8,Et)):b(``,!0)]))),256)):b(``,!0),F.value.type===`polar`?(w(!0),x(_,{key:4},E(q.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`g`,null,[X(e)&&V.value.dataLabels.show?(w(),x(`path`,{key:0,d:`M ${k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).x},${k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).y} ${Y.value[t].middlePoint.x},${Y.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:yi(t),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Dt)):b(``,!0)]))),256)):b(``,!0),F.value.type===`classic`&&L.value.useShadow?(w(),x(`circle`,{key:5,cx:H.value.width/2,cy:H.value.height/2,r:K.value<=0?10:K.value,fill:R.value.backgroundColor,filter:`url(#shadow_${N.value})`},null,8,Ot)):b(``,!0),i.$slots.pattern?(w(),x(`g`,kt,[(w(!0),x(_,null,E(e.dataset,(e,t)=>(w(),x(`defs`,{key:`pattern-${e.patternIndex}`},[D(i.$slots,`pattern`,Ze({ref_for:!0},{seriesIndex:t,patternId:`pattern_${N.value}_${t}`}),void 0,!0)]))),128))])):b(``,!0),Q.value&&F.value.type===`classic`?(w(),x(_,{key:7},[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{stroke:R.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,At))),256)),(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,"stroke-width":L.value.borderWidth,filter:yi(t)},null,8,jt))),256)),i.$slots.pattern?(w(),x(`g`,Mt,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,"stroke-width":L.value.borderWidth,filter:yi(t)},null,8,Nt))),256))])):b(``,!0)],64)):b(``,!0),Q.value&&F.value.type===`polar`?(w(),x(_,{key:8},[q.value.length>1?(w(),x(`g`,Pt,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,d:Y.value[t].path,fill:`#FFFFFF`,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256)),L.value.useShadow?(w(),x(`g`,It,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:Y.value[t].path,fill:`transparent`,stroke:L.value.borderColorAuto?R.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":L.value.borderWidth,filter:`url(#drop_shadow_${N.value})`,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256))])):b(``,!0),i.$slots.pattern?(w(),x(`g`,Rt,[(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:Y.value[t].path,fill:`url(#${e.pattern})`,stroke:L.value.borderColorAuto?R.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":L.value.borderWidth,filter:yi(t),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,zt))),256))])):b(``,!0),(w(!0),x(_,null,E(J.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:Y.value[t].path,fill:R.value.useGradient?`url(#polar_gradient_${t}_${N.value})`:e.color,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,"stroke-width":L.value.borderWidth,filter:yi(t),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Bt))),256))])):(w(),x(`g`,Vt,[i.$slots.pattern?(w(),x(`circle`,{key:0,cx:H.value.width/2,cy:H.value.height/2,r:K.value,fill:`url(#pattern_${N.value}_${q.value[0].patternIndex})`,stroke:R.value.backgroundColor,"stroke-width":L.value.borderWidth},null,8,Ht)):b(``,!0),S(`circle`,{cx:H.value.width/2,cy:H.value.height/2,r:K.value,fill:R.value.useGradient?`url(#polar_gradient_0_${N.value})`:q.value[0].color,stroke:R.value.backgroundColor,"stroke-width":L.value.borderWidth},null,8,Ut)]))],64)):(w(),x(_,{key:9},[F.value.type===`classic`&&!ni.value?(w(),x(`g`,Wt,[(w(!0),x(_,null,E(ri.value,(e,t)=>(w(),x(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:R.value.backgroundColor,"stroke-width":L.value.borderWidth},null,8,Gt))),256))])):b(``,!0),S(`circle`,{cx:H.value.width/2,cy:H.value.height/2,r:K.value<=0?10:K.value,fill:`transparent`,stroke:R.value.backgroundColor},null,8,Kt)],64)),R.value.useGradient&&F.value.type===`classic`?(w(),x(`circle`,{key:10,cx:H.value.width/2,cy:H.value.height/2,r:K.value<=0?10:K.value,fill:`url(#gradient_${N.value})`},null,8,qt)):b(``,!0),S(`circle`,{ref_key:`circle_hollow`,ref:Hn,style:{pointerEvents:`none`},fill:`none`,cx:H.value.width/2,cy:H.value.height/2,r:Math.max(.1,Br.value*1.7)},null,8,Jt),Q.value?(w(),x(_,{key:11},[q.value.length>1||F.value.type===`classic`?(w(),x(`g`,Yt,[(w(!0),x(_,null,E(q.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`path`,{d:F.value.type===`classic`?e.arcSlice:Y.value[t].path,stroke:L.value.borderColorAuto?R.value.backgroundColor:L.value.borderColor,fill:P.value===t?L.value.selectedColor:`transparent`,onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Xt))),256))])):(w(),x(`g`,Zt,[S(`circle`,{cx:H.value.width/2,cy:H.value.height/2,r:K.value,fill:`transparent`,onMouseenter:s[0]||=e=>hi({datapoint:q.value[0],relativeIndex:0,seriesIndex:q.value[0].seriesIndex,show:!0}),onMouseleave:s[1]||=e=>mi({datapoint:q.value[0],seriesIndex:q.value[0].seriesIndex}),onClick:s[2]||=e=>$(q.value[0],i.i)},null,40,Qt)]))],64)):b(``,!0),F.value.type===`classic`?(w(),x(`g`,{key:12,ref_key:`G_hollow`,ref:Vn,class:`vue-data-ui-donut-hollow-labels`},[I.value.hollow.total.show?(w(),x(`text`,{key:0,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2-(I.value.hollow.average.show?I.value.hollow.total.fontSize:0)+I.value.hollow.total.offsetY,fill:I.value.hollow.total.color,"font-size":I.value.hollow.total.fontSize,style:C(`font-weight:${I.value.hollow.total.bold?`bold`:``}`)},O(I.value.hollow.total.text),13,$t)):b(``,!0),I.value.hollow.total.show?(w(),x(`text`,{key:1,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2+I.value.hollow.total.fontSize-(I.value.hollow.average.show?I.value.hollow.total.fontSize:0)+I.value.hollow.total.value.offsetY,fill:I.value.hollow.total.value.color,"font-size":I.value.hollow.total.value.fontSize,style:C(`font-weight:${I.value.hollow.total.value.bold?`bold`:``}`)},O(k(h)(I.value.hollow.total.value.formatter,Q.value,k(a)({p:I.value.hollow.total.value.prefix,v:Q.value,s:I.value.hollow.total.value.suffix}))),13,en)):b(``,!0),I.value.hollow.average.show?(w(),x(`text`,{key:2,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2+(I.value.hollow.total.show?I.value.hollow.average.fontSize:0)+I.value.hollow.average.offsetY,fill:I.value.hollow.average.color,"font-size":I.value.hollow.average.fontSize,style:C(`font-weight:${I.value.hollow.average.bold?`bold`:``}`)},O(I.value.hollow.average.text),13,tn)):b(``,!0),I.value.hollow.average.show?(w(),x(`text`,{key:3,"text-anchor":`middle`,x:H.value.width/2,y:H.value.height/2+(I.value.hollow.total.show?I.value.hollow.average.fontSize:0)+I.value.hollow.average.fontSize+I.value.hollow.average.value.offsetY,fill:I.value.hollow.average.value.color,"font-size":I.value.hollow.average.value.fontSize,style:C(`font-weight:${I.value.hollow.average.value.bold?`bold`:``}`)},O(Ur.value||z.value?`--`:k(h)(I.value.hollow.average.value.formatter,k(ae)(ui.value),k(a)({p:I.value.hollow.average.value.prefix,v:k(ae)(ui.value),s:I.value.hollow.average.value.suffix,r:I.value.hollow.average.value.rounding}))),13,nn)):b(``,!0)],512)):b(``,!0),(w(!0),x(_,null,E(J.value.filter(e=>!e.ghost),(e,t)=>(w(),x(`g`,{filter:yi(t),key:e.seriesIndex,opacity:bi(e)},[I.value.dataLabels.useLabelSlots?(w(),x(`g`,an,[(w(),x(`foreignObject`,{x:k(m)(e,!0).anchor===`end`?k(m)(e).x-120:k(m)(e,!0).anchor===`middle`?k(m)(e).x-60:k(m)(e).x,y:k(g)(e)-(Ei.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[S(`div`,null,[D(i.$slots,`dataLabel`,Ze({ref_for:!0},{datapoint:e,isBlur:!F.value.useBlurOnHover||[null,void 0].includes(P.value)||P.value===t,isSafari:Ei.value,isVisible:X(e)&&V.value.dataLabels.show,textAlign:k(m)(e,!0,16,!0).anchor,flexAlign:k(m)(e,!0,16).anchor,percentage:si(e,J.value)}),void 0,!0)])],8,on))])):(w(),x(`g`,sn,[F.value.type===`classic`?(w(),x(_,{key:0},[X(e)&&V.value.dataLabels.show?(w(),x(`circle`,{key:0,cx:k(Z)[t]?.markerX??k(m)(e).x,cy:k(Z)[t]?.markerY??k(g)(e)-3.5,fill:e.color,stroke:R.value.backgroundColor,"stroke-width":1,r:3,filter:!F.value.useBlurOnHover||[null,void 0].includes(P.value)||P.value===t?``:`url(#blur_${N.value})`,onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,cn)):b(``,!0),I.value.dataLabels.oneLine||k(Z)[t]?lt((w(),x(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":k(Z)[t]?.textAnchor||k(m)(e,!0,12).anchor,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:k(Z)[t]?.labelY??k(g)(e),onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:_i(e,t,!!k(Z)[t])},null,40,ln)),[[st,X(e)&&V.value.dataLabels.show]]):(w(),x(_,{key:2},[lt(S(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":k(Z)[t]?.textAnchor||k(m)(e,!0,12).anchor,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:k(Z)[t]?.labelY??k(g)(e),fill:I.value.percentage.color,"font-size":ar.value+`px`,style:C(`font-weight:${I.value.percentage.bold?`bold`:``}`),onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},O(ki(e)),45,un),[[st,X(e)&&V.value.dataLabels.show]]),lt(S(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":k(Z)[t]?.textAnchor||k(m)(e).anchor,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:(k(Z)[t]?.labelY??k(g)(e))+M.value*1.2,fill:I.value.name.color,"font-size":M.value+`px`,style:C(`font-weight:${I.value.name.bold?`bold`:``}`),onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:k(d)({content:e.name,fontSize:M.value,fill:I.value.name.color,x:k(Z)[t]?.labelX??k(m)(e,!0,12).x,y:(k(Z)[t]?.labelY??k(g)(e))+M.value})},null,44,dn),[[st,X(e,!0,12)&&V.value.dataLabels.show&&I.value.name.show]])],64))],64)):b(``,!0),F.value.type===`polar`?(w(),x(_,{key:1},[X(e)&&V.value.dataLabels.show?(w(),x(`circle`,{key:0,cx:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).x,cy:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:24,centerX:H.value.width/2,centerY:H.value.height/2}).y,fill:e.color,stroke:R.value.backgroundColor,"stroke-width":1,r:3,filter:!F.value.useBlurOnHover||[null,void 0].includes(P.value)||P.value===t?``:`url(#blur_${N.value})`,onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,fn)):b(``,!0),I.value.dataLabels.oneLine?lt((w(),x(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ii(Y.value[t].middlePoint),x:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:vi(e,t)},null,44,pn)),[[st,X(e)&&V.value.dataLabels.show]]):(w(),x(_,{key:2},[X(e)&&V.value.dataLabels.show?(w(),x(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ii(Y.value[t].middlePoint),x:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y,fill:I.value.percentage.color,"font-size":ar.value,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:I.value.percentage.bold?`bold`:`normal`}),onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},O(ki(e)),45,mn)):b(``,!0),X(e,!0,12)&&V.value.dataLabels.show&&I.value.name.show?(w(),x(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ii(Y.value[t].middlePoint),x:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y+M.value*1.2,fill:I.value.name.color,"font-size":M.value,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:I.value.name.bold?`bold`:`normal`}),onClick:n=>$(e,t),onMouseenter:n=>hi({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:k(d)({content:e.name,fontSize:M.value,fill:I.value.name.color,x:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x,y:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).y+M.value*1.2})},null,44,hn)):b(``,!0)],64))],64)):b(``,!0)])),V.value.dataLabels.show&&R.value.comments.show&&e.comment?(w(),x(`g`,gn,[X(e)&&F.value.type===`classic`?(w(),x(`foreignObject`,{key:0,x:R.value.comments.offsetX+(k(m)(e,!0).anchor===`end`?k(m)(e).x-R.value.comments.width:k(m)(e,!0).anchor===`middle`?k(m)(e).x-R.value.comments.width/2:k(m)(e).x),y:k(g)(e)+24+R.value.comments.offsetY,width:R.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[S(`div`,null,[D(i.$slots,`plot-comment`,{plot:{...e,textAlign:k(m)(e,!0,16,!0).anchor,flexAlign:k(m)(e,!0,16).anchor,isFirstLoad:z.value}},void 0,!0)])],8,_n)):b(``,!0),X(e)&&F.value.type===`polar`?(w(),x(`foreignObject`,{key:1,x:R.value.comments.offsetX+(ii(Y.value[t].middlePoint)===`end`?k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x-R.value.comments.width:ii(Y.value[t].middlePoint)===`middle`?k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x-R.value.comments.width/2:k(o)({initX:Y.value[t].middlePoint.x,initY:Y.value[t].middlePoint.y,offset:42,centerX:H.value.width/2,centerY:H.value.height/2}).x),y:ai(Y.value[t])+R.value.comments.offsetY,width:R.value.comments.width,height:`200`,style:C({transition:z.value||!F.value.serieToggleAnimation.show?`none`:`all ${F.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[S(`div`,null,[D(i.$slots,`plot-comment`,{plot:{...e,textAlign:ii(Y.value[t].middlePoint),flexAlign:ii(Y.value[t].middlePoint),isFirstLoad:z.value}},void 0,!0)])],12,vn)):b(``,!0)])):b(``,!0)],8,rn))),128)),D(i.$slots,`svg`,{svg:{...H.value,datapoints:q.value,isPrintingImg:k(Pr)||k(Fr)||k(Ui),isPrintingSvg:k(Wi)}},void 0,!0)],512)],46,gt)),i.$slots.hint?(w(),x(`div`,yn,[D(i.$slots,`hint`,et(Xe({hint:F.value.a11y.translations.keyboardNavigation,isVisible:ir.value})),void 0,!0)])):b(``,!0)]),i.$slots.watermark?(w(),x(`div`,bn,[D(i.$slots,`watermark`,et(Xe({isPrinting:k(Pr)||k(Fr)||k(Ui)||k(Wi)})),void 0,!0)])):b(``,!0),S(`div`,{id:`legend-bottom-${N.value}`},null,8,xn),Qn.value&&(R.value.legend.show||i.$slots.legend)?(w(),y(Ge,{key:6,to:R.value.legend.position===`top`?`#legend-top-${N.value}`:`#legend-bottom-${N.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Wn},[D(i.$slots,`legend`,{legend:ei.value},()=>[R.value.legend.show?(w(),y(We,{key:`legend_${Zn.value}`,legendSet:ei.value,config:ti.value,onClickMarker:s[3]||=({i:e})=>Jr(e),isCursorPointer:_r.value},Ke({item:A(({legend:e,index:t})=>[S(`div`,{style:C(`opacity:${G.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},O(e.display),13,Sn)]),legendToggle:A(()=>[ei.value.length>2&&R.value.legend.selectAllToggle.show&&!k(yr)?(w(),y(Le,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:_r.value,onToggle:qr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):b(``,!0)]),_:2},[i.$slots.pattern?{name:`legend-pattern`,fn:A(({legend:e,index:t})=>[Je(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${N.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),i.$slots.source?(w(),x(`div`,{key:7,ref_key:`source`,ref:qn,dir:`auto`},[D(i.$slots,`source`,{},void 0,!0)],512)):b(``,!0),i.$slots.hollow?(w(),x(`div`,Cn,[D(i.$slots,`hollow`,et(Xe({total:Q.value,average:ui.value,dataset:U.value,...H.value})),void 0,!0)])):b(``,!0),Je(k(En),{teleportTo:R.value.tooltip.teleportTo,show:V.value.showTooltip&&fr.value,backgroundColor:R.value.tooltip.backgroundColor,color:R.value.tooltip.color,fontSize:R.value.tooltip.fontSize,borderRadius:R.value.tooltip.borderRadius,borderColor:R.value.tooltip.borderColor,borderWidth:R.value.tooltip.borderWidth,backgroundOpacity:R.value.tooltip.backgroundOpacity,position:R.value.tooltip.position,offsetX:R.value.tooltip.offsetX,offsetY:R.value.tooltip.offsetY,parent:zn.value,content:pr.value,isCustom:pi.value,isFullscreen:wi.value,smooth:R.value.tooltip.smooth,backdropFilter:R.value.tooltip.backdropFilter,smoothForce:R.value.tooltip.smoothForce,smoothSnapThreshold:R.value.tooltip.smoothSnapThrehsold,isA11yMode:rr.value===`keyboard`,a11yPosition:nr.value},{"tooltip-before":A(()=>[D(i.$slots,`tooltip-before`,et(Xe({...fi.value})),void 0,!0)]),tooltip:A(()=>[D(i.$slots,`tooltip`,et(Xe({...fi.value})),void 0,!0)]),"tooltip-after":A(()=>[D(i.$slots,`tooltip-after`,et(Xe({...fi.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Rn.value&&F.value.userOptions.buttons.table?(w(),y(rt(Li.value.component),Ze({key:9},Li.value.props,{ref_key:`tableUnit`,ref:$n,onClose:Ri}),Ke({content:A(()=>[(w(),y(k(kn),{key:`table_${Xn.value}`,colNames:Ci.value.colNames,head:Ci.value.head,body:Ci.value.body,config:Ci.value.config,title:F.value.table.useDialog?``:Li.value.title,withCloseButton:!F.value.table.useDialog,isCursorPointer:_r.value,onClose:Ri},{th:A(({th:e})=>[e===`__SUM__`?(w(),x(`div`,wn,[Je(k(Dn),{name:`sigma`,stroke:Ci.value.config.th.color,size:16},null,8,[`stroke`])])):(w(),x(`div`,Tn,O(e),1))]),td:A(({td:e})=>[qe(O(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:k(h)(I.value.percentage.formatter,e,k(a)({v:e,s:`%`,r:I.value.percentage.rounding})):k(h)(I.value.value.formatter,e,k(a)({p:I.value.dataLabels.prefix,v:e,s:I.value.dataLabels.suffix,r:I.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[F.value.table.useDialog?{name:`title`,fn:A(()=>[qe(O(Li.value.title),1)]),key:`0`}:void 0,F.value.table.useDialog?{name:`actions`,fn:A(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[4]||=e=>Si(F.value.userOptions.callbacks.csv),style:C({cursor:_r.value?`pointer`:`default`})},[Je(k(Dn),{name:`fileCsv`,stroke:Li.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),D(i.$slots,`skeleton`,{},()=>[k(yr)?(w(),y(ye,{key:0})):b(``,!0)],!0)],46,ft))}},[[`__scopeId`,`data-v-a4bbb1f1`]]);export{dt as n,En as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./useConfig-D3ZfFSE5.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-rPeBMZrn.js";import{t as y}from"./vue_ui_donut-T5PeOqvf.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-_8VmVGgq.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=p({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=p({userConfig:y[i]||{},defaultConfig:n}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||r}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(i){let i=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":a(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":a(I(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function q(e,n){let{config:r}=e,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=t({v:a,s:`%`,r:b(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Z(e);function _(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??g(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(s.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),s.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":m,fill:O(s.color,A(e.config))},c({content:_(String(t.name??``)),fontSize:d,fill:O(s.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=d(t).x,c=g(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),u=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${u} Q${f} ${p}`:`M${u} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??g(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,t,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(e,n,r){if(T(e.config,`type`,`classic`)!==`classic`||B(e.config)||!n)return``;let i=x(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),d=f(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:O(a.color,A(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=b(u.fontSize,i),p=f(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(e,n){let{config:r,center:i}=e,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=f(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}).percentage??{},a=Le(e,n),o=t({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return j(`title`,{},_(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
1
+ import{t as e}from"./useConfig-By3Vb5kz.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-rPeBMZrn.js";import{t as y}from"./vue_ui_donut-T5PeOqvf.js";import{_ as b,a as x,c as S,d as C,g as w,i as T,l as E,n as D,o as O,p as k,r as A,s as ee,t as te,u as j,v as M}from"./render-common-BbY81Ao2.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=p({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=p({userConfig:y[i]||{},defaultConfig:n}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||r}}function N(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function P(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+N(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+N(t,0),0):N(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:N(P(o,`chart.padding.top`,24),24),right:N(P(o,`chart.padding.right`,24),24),bottom:N(P(o,`chart.padding.bottom`,24),24),left:N(P(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=N(P(o,`chart.donut.radius`,f),f),m=N(P(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:N(P(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function F(){return ue}function I(e){return O(x(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return b(e?.value??e?.absoluteValue??0,0)}function L(e){return w(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:O(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function R(e){return e.reduce((e,t)=>e+Math.abs(b(t.value,0)),0)}function fe(e){let t=x(e,`title`,{}),n=k(t,`subtitle`,{});if(!t.text)return 0;let r=b(t.fontSize,20),i=n.show!==!1&&n.text?b(n.fontSize,14):0;return b(t.paddingTop,12)+r+(i?i+12:0)+b(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=x(n,`legend`,{}),a=b(i.fontSize,12),o=b(i.markerSize,10),s=b(i.itemGap,24),c=b(i.rowGap,8),l=b(i.padding,8),u=b(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Be(e,t),r=D(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function z(e,t){return!x(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function B(e){return!!T(e,`pie`,x(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=z(e,t),s=x(n,`legend.show`,!0),c=x(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=b(x(n,`padding.top`,24),24),f=b(x(n,`padding.right`,24),24),p=b(x(n,`padding.bottom`,24),24),m=b(x(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?b(T(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=b(x(n,`layout.donut.radiusRatio`,.35),.35),S=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*S),w=x(n,`layout.donut.radius`,null),E=w==null?C:Math.min(C,b(w,C)),D=b(x(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(E*D*2,E),12*(1+D)),k=x(n,`layout.donut.thickness`,x(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(E-1,k==null?O:b(k,O)));return{...e,drawingArea:h,center:v,radius:E,thickness:A,innerRadius:B(n)?0:Math.max(0,E-A)}}function he(e,t){let n=b(x(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,B(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:O(e.color,t[n]?.color),value:b(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(b(e.value,0)))),r=t.map(e=>Math.abs(b(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function V(e){return`gradient_${F()}`}function H(e,t){return`polar_gradient_${t}_${F()}`}function _e(e){return T(e.config,`type`,`classic`)!==`classic`||!x(e.config,`useGradient`,!1)?``:C(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${V(e)})`})}function U(e){return`drop_shadow_${F()}`}function ve(e){let{config:t,width:n}=e,r=x(t,`title`,{}),i=k(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?b(r.paddingLeft,12):a===`right`?n-b(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=b(r.fontSize,20),l=b(i.fontSize,14),u=b(r.paddingTop,12)+c,d=[M(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:O(r.color,A(t))})];return i.text&&d.push(M(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:O(i.color||r.color,A(t))})),j(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!x(n,`useGradient`,!1),o=!!x(n,`layout.donut.useShadow`,!1);if(i){let i=T(n,`type`,`classic`),o=b(x(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=B(n)?1:e.thickness/e.radius;r.push(j(`radialGradient`,{id:V(e)},[C(`stop`,{offset:`0%`,"stop-color":a(I(n),0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),C(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),C(`stop`,{offset:`100%`,"stop-color":a(I(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(j(`radialGradient`,{id:H(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[C(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),C(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=O(x(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=b(x(n,`layout.donut.shadowOpacity`,.2),.2),a=b(x(n,`layout.donut.shadowBlur`,6),6),o=b(x(n,`layout.donut.shadowOffsetY`,3),3);r.push(j(`filter`,{id:U(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[C(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?j(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return x(e.config,`useGradient`,!1)?`url(#${H(e,n)})`:t.color}function W(e){let{config:t}=e;return x(t,`layout.donut.borderColorAuto`,!0)?I(t):O(x(t,`layout.donut.borderColor`,I(t)),I(t))}function G(e){return x(e.config,`layout.donut.useShadow`,!1)?`url(#${U(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=W(e),r=b(x(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{b(t.proportion,0)<=0||(i.push(C(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:I(e.config)})),i.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:G(e)})))}),j(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=W(e),i=b(x(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(C(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(C(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:G(e)})))}),j(`g`,{"data-layer":`polar-slices`},a.join(``))}function K(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=x(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:b(x(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function q(e,n){let{config:r}=e,i=x(r,`layout.labels.percentage`,{}),a=b(n.proportion,0)*100,o=t({v:a,s:`%`,r:b(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function J(e,t){let n=x(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?K(e,t):``,percentage:a?q(e,t):``}}function we(e,t){let{value:n,percentage:r}=J(e,t);return r&&n?`${r} (${n})`:r||n||``}function Y(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?K(e,t):``,s=a?q(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function X(e,t){let n=x(e.config,`layout.labels`,{}).dataLabels??{};if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=b(n.hideUnderValue,0);return b(t.proportion,0)*100>r}function Te(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r=b(n.smallArcClusterThreshold,0),i=b(n.hideUnderValue,0),a=b(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Z(e){return!!x(e.config,`layout.curvedMarkers`,x(e.config,`layout.donut.curvedMarkers`,!1))}function Q(e,t){let n=x(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=b(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Z(e);function _(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function S({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>S({arc:e,index:t})).filter(({arc:t})=>X(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function Ee({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=x(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??g(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=J(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:O(s.color,A(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return j(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${v}`)}function De(e,t){let n=x(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!T(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=b(r.fontSize??n.value?.fontSize??12,12);O(r.color??n.value?.color??A(e.config),A(e.config)),r.bold??n.value?.bold;let a=b(r.offset,16),o=Q(e,t),s=[];return t.forEach((t,n)=>{if(!X(e,t))return;let c=o[n];Y(e,t),c?s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:b(r.smallArcClusterFontSize,i)})):s.push(Ee({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?j(`g`,{"data-layer":`data-labels`},s.join(``)):``}function Oe(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function ke(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function Ae(e,t,n,r){let i=x(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=b(a.fontSize,i.dataLabels?.fontSize??12),c=b(o.fontSize,i.dataLabels?.fontSize??12),l=j(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:O(a.color,A(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(Y(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>j(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:O(o.color,A(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function je(e,t,n){let r=x(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=b(a.fontSize,i.fontSize??12),d=b(s.fontSize,i.fontSize??12),f=O(o.color,A(e.config)),p=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!X(e,t))return;let a=Oe(e,i,42),m=ke(e,a);l?p.push(j(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":m},Ae(e,t,a.x,m))):(p.push(j(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":m,fill:f},te({content:Y(e,t),x:a.x,fontSize:u,fill:f,textAnchor:m}))),s.show&&p.push(j(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":m,fill:O(s.color,A(e.config))},c({content:_(String(t.name??``)),fontSize:d,fill:O(s.color,A(e.config)),x:a.x}))))}),p.length?j(`g`,{"data-layer":`polar-data-labels`},p.join(``)):``}function Me(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=x(e.config,`layout.labels.dataLabels`,{}),i=b(r.offset,16),a=b(r.markerFlatLength,12),o=Z(e),s=d(t).x,c=g(t,i,i)-4,l=s+(t.center.endX>t.cx?-a:a),u=`${s},${c}`,f=`${l},${c}`,p=`${t.center.endX},${t.center.endY}`;return o?`M${u} Q${f} ${p}`:`M${u} ${f} ${p}`}function Ne(e,t){let n=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Q(e,t),i=[];return t.forEach((t,a)=>{if(!X(e,t))return;let o=r[a],s=Me(e,t,o);s&&(i.push(C(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":b(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(C(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??g(t)-3.5,r:b(n.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1})))}),i.length?j(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Pe(e,t,r){let i=x(e.config,`layout.labels.dataLabels`,{});if(!T(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!X(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(C(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":b(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(C(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:b(i.markerRadius,3),fill:t.color,stroke:I(e.config),"stroke-width":1}))}),a.length?j(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:M(e,{"text-anchor":`middle`,...t})}function Fe(e,n,r){if(T(e.config,`type`,`classic`)!==`classic`||B(e.config)||!n)return``;let i=x(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=b(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+b(a.offsetY,0),l=a.value??{},u=b(l.fontSize,r),d=f(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:b(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:O(a.color,A(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+b(l.offsetY,0),fill:O(l.color,O(a.color,A(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=b(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=b(u.fontSize,i),p=f(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:b(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+b(o.offsetY,0),fill:O(o.color,A(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+b(u.offsetY,0),fill:O(u.color,O(o.color,A(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?j(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Ie(e,n){let{config:r,center:i}=e,a=x(r,`layout.donut.labels.total`,x(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=x(r,`layout.labels.dataLabels`,{}),s=b(a.fontSize,20),c=O(a.color,A(r)),l=f(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:b(a.rounding,0)}),{total:n});return M(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Le(e,t){let n=R(L(e));return n?b(t.value,0)/n*100:0}function Re(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:b(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function ze(e,n){let r=x(e.config,`legend`,{}),i=x(e.config,`layout.labels`,{}).percentage??{},a=Le(e,n),o=t({v:a,s:`%`,r:b(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Be(e,t){let n=x(e.config,`legend`,{}),r=[],i=n.showPercentage?ze(e,t):``,a=n.showValue?Re(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function Ve(e,t){let n=x(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=z(e,t),i=O(n.color,A(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(C(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(M(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),j(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function He(e){return j(`g`,{"data-layer":`no-data`},[C(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:O(x(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function Ue(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function We(e,t,n){let r=`${T(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return j(`title`,{},_(r))}async function Ge(e){let t=e.config,n=b(e.width,x(t,`width`,512)),r=b(e.height,x(t,`height`,512)),i=L(e),a=R(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=T(t,`type`,`classic`),u=a>0&&s.some(e=>b(e.proportion,0)>0);return`
2
2
  <svg
3
3
  xmlns="${v}"
4
4
  width="100%"
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,$t as o,At as s,D as c,Ht as ee,It as te,J as ne,Jt as re,Kt as ie,S as ae,X as oe,_ as se,at as ce,f as le,h as ue,i as de,in as fe,nn as pe,nt as me,p as he,t as ge,tt as _e,w as ve,y as ye,yt as be,zt as xe}from"./lib-rPeBMZrn.js";import{n as Se,t as Ce}from"./BaseScanner-8NdoBs7B.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as De}from"./useNestedProp-DnGoh-XS.js";import{t as Oe}from"./useThemeCheck-BKNRbGeC.js";import{t as ke}from"./chartImage-DPGnEuYM.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{n as Me,t as Ne}from"./tableIntegration-CNoJ1CIY.js";import{n as Pe,t as Fe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ie}from"./useTimeLabels-Das5O74F.js";import{t as Le}from"./usePrinter-DVf3YcG5.js";import{t as Re}from"./useTransitions-ChGGrtrv.js";import{t as ze}from"./useStableElementSize-CegFbRlF.js";import{t as Be}from"./useSvgLabelLayout-42Kats14.js";import{t as Ve}from"./useTimeLabelCollider-BTybMUFi.js";import{t as He}from"./useResponsive-CENUxfEL.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./SlicerPreview-ChKbdZSU.js";import{t as Ge}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ke}from"./A11yDataTable-DWNlWXzs.js";import{t as qe}from"./useUserOptionState-CXlFnwPv.js";import{t as Je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ye}from"./annotationViewport-X8fvs7pz.js";import{t as Xe}from"./Legend-DM0ClX3D.js";import{t as Ze}from"./vue_ui_donut_evolution-CVoh3twl.js";import{Fragment as l,Teleport as Qe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as $e,createTextVNode as et,createVNode as tt,defineAsyncComponent as h,guardReactiveProps as nt,mergeProps as rt,nextTick as it,normalizeClass as g,normalizeProps as at,normalizeStyle as ot,onBeforeUnmount as st,onMounted as ct,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as lt,shallowRef as ut,toDisplayString as x,toRefs as dt,unref as S,watch as ft,watchEffect as pt,withCtx as C}from"vue";var mt=/* @__PURE__ */ e({default:()=>rn}),ht=[`id`],gt=[`id`],_t=[`id`],vt={style:{position:`relative`}},yt=[`xmlns`,`aria-describedby`,`viewBox`],bt=[`x`,`y`,`width`,`height`],xt={key:1},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt={key:0},Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`font-size`,`fill`,`transform`],Dt=[`x`,`y`,`font-size`,`fill`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],At={key:0},jt=[`text-anchor`,`font-size`,`fill`,`transform`],Mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Nt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Pt={key:1},Ft=[`cx`,`cy`,`r`,`fill`],It={key:0},Lt={key:0},Rt=[`d`,`stroke`],zt=[`text-anchor`,`x`,`y`,`fill`],Bt=[`cx`,`cy`,`r`,`fill`],Vt={key:0},Ht=[`cx`,`cy`,`fill`],Ut={key:1},Wt=[`d`,`fill`,`stroke`],Gt={key:2},Kt=[`d`,`fill`,`stroke`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`width`,`height`,`fill`],Yt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Xt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Qt={key:5,class:`vue-data-ui-watermark`},$t=[`id`],en=[`onClick`],tn={key:0},nn={key:1},rn=/*#__PURE__*/ Ee({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Ee,emit:mt}){let rn=h(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),an=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),on=h(()=>import(`./DataTable-Dof6yhO7.js`)),sn=h(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),cn=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ln=h(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),un=h(()=>import(`./vue-ui-donut-BlQXnf7O.js`).then(e=>e.n)),dn=h(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_donut_evolution:fn}=i(),{isThemeValid:pn,warnInvalidTheme:mn}=Oe(),w=e,T=v(oe()),E=v([]),D=v(null),O=v(null),hn=v(!1),k=v(null),A=v(null),gn=v(null),_n=v(0),vn=v(0),yn=v(0),bn=v(0),xn=v(0),Sn=v(null),Cn=v(null),wn=v(null),Tn=v(null),En=v(!1),Dn=v(null),On=v(null),kn=ut(null),An=v(0),jn=v(0),Mn=v(!1);function Nn(){kn.value=A.value?.parentNode??null}function Pn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Fn(){let e=++jn.value;await it(),await Pn(),await Pn(),e===jn.value&&(An.value+=1)}function In(){Mn.value||(Mn.value=!0,it(()=>{Mn.value=!1,Nn(),Fn()}))}let Ln=ze({elementRef:kn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Fn()}}),Rn=v(null),zn=v(null),Bn=v(null),Vn=v(null),Hn=v(null),Un=v(!1),j=ut(null),Wn=ut(null),Gn=v(null),M=v(null),Kn=v(!1),N=mt,qn=u(()=>!!w.dataset&&w.dataset.length),Jn=v(!1),Yn=0;ct(()=>{En.value=!0,Nn(),Ln.start(),Zn(),Fn()});let Xn=u(()=>P.value.debug);function Zn(){xe(w.dataset)?(ce({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:Xn.value}),rr.value=!0):w.dataset.length&&w.dataset.forEach((e,t)=>{be({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:Xn.value}),rr.value=!0})}),xe(w.dataset)||(rr.value=P.value.loading),setTimeout(()=>{Un.value=!0},10),Sr(),P.value.responsive&&(j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect()),j.value=new ResizeObserver(()=>{Un.value=!1;let{width:e,height:t}=He({chart:A.value,title:P.value.style.chart.title.text?Rn.value:null,legend:P.value.style.chart.legend.show?zn.value:null,slicer:P.value.style.chart.zoom.show&&ir.value>1?Hn.value:null,source:Bn.value});cancelAnimationFrame(Yn),Yn=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,Jn.value=!0,In(),clearTimeout(Gn.value),Gn.value=setTimeout(()=>{Un.value=!0},10)})}),Wn.value=A.value.parentNode,j.value.observe(Wn.value)),In()}let P=v(Ar()),F=u(()=>I.value.grid),I=u(()=>P.value.style.chart.layout),Qn=u(()=>P.value.style.chart.dialog),L=u(()=>P.value.style.chart);we({config:()=>P.value,dataset:()=>w.dataset,component:`VueUiDonutEvolution`,rules:[Te.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:$n}=Re({config:()=>P.value.transitions,dataset:()=>w.dataset}),R=u(()=>P.value.userOptions.useCursorPointer),er=u(()=>fe({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:P.value.skeletonConfig??{}})),{loading:tr,FINAL_DATASET:nr,manualLoading:rr}=Se({...dt(w),FINAL_CONFIG:P,prepareConfig:Ar,callback:()=>{Promise.resolve().then(async()=>{await Sr()})},skeletonDataset:w.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:fe({defaultConfig:P.value,userConfig:er.value})}),z=v({width:I.value.width,height:I.value.height}),ir=u(()=>Math.max(...nr.value.map(e=>e.values.length))),B=v({start:0,end:ir.value}),V=v(!1),ar=v(!1),or=v(null),H=v(null),U=v(null),sr=v(!1),cr=v({time:0,x:0,y:0,pointerType:null}),lr=u(()=>P.value.style.chart.zoom?.dragToZoom),W=u(()=>lr.value.show&&qn.value&&dr.value&&Y.value>1&&!tr.value),ur=v(!1),dr=v(!1),fr=v(!1),pr=null,mr={};function hr(e,t=B.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function gr(e){let t=hr(e);t&&N(`update:zoomState`,t)}function _r(){pr&&=(cancelAnimationFrame(pr),null),mr={}}function vr(e,t=B.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function yr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){B.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(B.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(B.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),B.value={start:t,end:n},Vn.value&&Vn.value.setRangeValues(t,n)}function br(e){let t=hr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(B.value.start)||r!==Number(B.value.end))&&(_r(),B.value={start:n,end:r},yr(),In()),{start:Number(B.value.start),end:Number(B.value.end)}}function xr(e){let t=br(e);return t?(gr(t),t):null}async function Sr(e=!0){if(!ur.value){ur.value=!0;try{await it(),await it();let{startIndex:t,endIndex:n}=L.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){B.value={start:0,end:0},dr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:vr(Number(n)+1,i);fr.value=!0,B.value={start:i,end:a},yr(),dr.value=!0,e&&w.zoomState&&br(w.zoomState)}finally{queueMicrotask(()=>{fr.value=!1}),ur.value=!1,In()}}}async function Cr({force:e=!1,publish:t=!1}={}){await Sr(!e),t&&(gr({start:Number(B.value.start),end:Number(B.value.end)}),N(`zoomReset`))}ft([()=>w.zoomState,dr],([e,t])=>{t&&e&&br(e)},{deep:!0,immediate:!0});function wr(e){mr={...mr,...e},pr&&cancelAnimationFrame(pr),pr=requestAnimationFrame(()=>{let e={...B.value,...mr};mr={},pr=null,B.value=e,yr(),In(),gr({start:Number(B.value.start),end:Number(B.value.end)})})}function Tr(e){if(ur.value||fr.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==B.value.start&&wr({start:t}))}function Er(e){if(ur.value||fr.value)return;let t=mr.start===void 0?B.value.start:mr.start,n=vr(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==B.value.end||mr.start!==void 0)&&wr({end:n}))}let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=qe({config:P.value}),{svgRef:G}=Je({config:L.value.title});function Ar(){let e=De({userConfig:w.config,defaultConfig:fn}),t={},n=e.theme;if(n){if(!pn.value(e))mn(e),t=e;else{let r=De({userConfig:Ze[n]||w.config,defaultConfig:e});t={...De({userConfig:w.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:pe[n]||ee}}}else t=e;return t}ft(()=>w.config,e=>{tr.value||(P.value=Ar()),Dr.value=!P.value.userOptions.showOnChartHover,Zn(),yn.value+=1,bn.value+=1,xn.value+=1,Lr.value.showTable=P.value.table.show},{deep:!0}),ft(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rr.value=!1),Cr()},{deep:!0});let{isPrinting:jr,isImaging:Mr,generatePdf:Nr,generateImage:Pr}=Le({elementId:T.value,fileName:L.value.title.text||`vue-ui-donut-evolution`,options:P.value.userOptions.print}),Fr=u(()=>P.value.userOptions.show&&!L.value.title.text),Ir=u(()=>ve(P.value.customPalette)),Lr=v({showTable:P.value.table.show});ft(P,()=>{Lr.value={showTable:P.value.table.show}},{immediate:!0});let Rr=u(()=>({top:I.value.padding.top,right:I.value.padding.right,bottom:I.value.padding.bottom,left:I.value.padding.left})),K=u(()=>F.value.yAxis.position===`right`),{metrics:zr,ready:Br,settling:Vr,update:Hr}=Be({svgRef:G,canMeasure:()=>(!P.value.responsive||Jn.value)&&(!F.value.xAxis.dataLabels.show||Kr.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(Sn.value).textWidth,yAxisLabelWidth:e(Tn.value).rotatedWidth,xAxisLabelHeight:e(wn.value).height,timeLabelsHeight:e(Cn.value).height})});function Ur(){let e=zr.value.scaleLabelsWidth,t=Tn.value?zr.value.yAxisLabelWidth+F.value.axis.yLabelOffsetX+F.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}st(()=>{cancelAnimationFrame(Yn),Ln.stop(),clearTimeout(Gn.value),_r(),yi(),ai(),j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect(),j.value=null,Wn.value=null)});let Wr=u(()=>zr.value.xAxisLabelHeight+zr.value.timeLabelsHeight+F.value.axis.fontSize+F.value.xAxis.dataLabels.offsetY),q=u(()=>{let e=Ur(),t=I.value.dataLabels.fontSize*3,n=z.value.width,r=z.value.height,i=Rr.value.left+e.left,a=n-Rr.value.right-e.right,o=n-i-Rr.value.right-e.right,s=r-Rr.value.top-Rr.value.bottom-t-Wr.value,c=Rr.value.top+t;return{top:c,left:i,right:a,bottom:r-Rr.value.bottom-Wr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(Xn.value&&nr.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),nr.value.map((e,t)=>({...e,values:ie(e.values),color:ae(e.color)||Ir.value[t]||ee[t]||ee[t%ee.length],length:(e.values||[]).length,uid:oe()})))),Gr=u(()=>J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=B.value.start&&t<=B.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=v([]),Kr=v(!1),qr=0;pt(()=>{let e=++qr;(async()=>{let t=await Ie({values:F.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:F.value.xAxis.dataLabels.datetimeFormatter,start:B.value.start,end:B.value.end});e===qr&&(X.value=t,Kr.value=!0)})()});let Z=u(()=>q.value.width/(B.value.end-B.value.start)),Jr=u(()=>{let e=[];for(let t=0;t<B.value.end-B.value.start;t+=1){let n=Gr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Yr=u(()=>{let e=Math.max(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??1,t=Math.min(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??0,n=Math.max(F.value.yAxis.scaleMax??0,e),r;return r=F.value.yAxis.scaleMin==null?0:Math.min(t,F.value.yAxis.scaleMin),F.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Jr.value.length===1?Yr.value.max*2:Yr.value.max;return se(Yr.value.min,e,F.value.yAxis.dataLabels.steps)});ft(()=>Q.value.ticks.join(`|`),()=>{In()},{flush:`post`});function Xr(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Zr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Xr(e),value:e}))),$=u(()=>{let e=Jr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=D.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Xr(t.subtotal),c=Gr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:te({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:te({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:te({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Qr(e,t,n){return de(I.value.dataLabels.formatter,e,a({p:I.value.dataLabels.prefix,v:e,s:I.value.dataLabels.suffix,r:I.value.dataLabels.rounding}),{datapoint:t,index:n})}function $r(e,t){return isNaN(e.value/o(t,`value`))?0:(e.value/o(t,`value`)*100).toFixed(0)+`%`}function ei(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}let ti=u(()=>!V.value||or.value==null||H.value==null?null:{x:Math.min(or.value,H.value),y:q.value.top,width:Math.abs(H.value-or.value),height:q.value.height}),ni=u(()=>dr.value?Number(B.value.start)!==0||Number(B.value.end)!==Number(Y.value):!1);function ri(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ii(){D.value=null,O.value=null,M.value=null}function ai(e){let t=e?.pointerId==null?U.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),V.value=!1,or.value=null,H.value=null,U.value=null}function oi(){sr.value=!0,setTimeout(()=>{sr.value=!1},0)}function si(e){sr.value&&(sr.value=!1,e.preventDefault(),e.stopPropagation())}function ci(e){if(!W.value||!ni.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=cr.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(cr.value={time:0,x:0,y:0,pointerType:null},oi(),yi(),ai(e),Hi(),Cr({force:!0,publish:!0}),!0):(cr.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function li(e){let t=Number(B.value.end)-Number(B.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((ri(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function ui(e,t){let n=li(e),r=li(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(B.value.start)+i,end:Number(B.value.start)+a+1}}function di(e){let t=xr(e);return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function fi(e){if(!W.value||Ii.value||e.button!==void 0&&e.button!==0||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(B.value.end)-Number(B.value.start)<=1)return;ar.value=!0,G.value?.focus?.({preventScroll:!0}),yi(),ii();let n=ri(t.x);U.value=e.pointerId,V.value=!0,or.value=n,H.value=n}function pi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x),ii(),or.value!=null&&Math.abs(H.value-or.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function mi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x));let n=or.value,r=H.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(ci(e))return;ai(e);return}let i=ui(Math.min(n,r),Math.max(n,r));i?(ai(e),di(i)&&(cr.value={time:0,x:0,y:0,pointerType:null},ii(),oi())):ai(e)}function hi(e){V.value||(D.value=null,O.value=null,M.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+B.value.start}))}function gi(e){V.value||(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+B.value.start}),D.value=e.index,O.value=e,M.value=e.index)}let _i=v(null),vi=null;function yi(){vi&&=(clearTimeout(vi),null)}function bi(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.index+B.value.start}),e.subtotal&&Qn.value.show&&(O.value=null,D.value=null,hn.value=!0,k.value=e,Ui(e),[null,void 0].includes(t)||(_i.value=t))}function xi(e,t){if(yi(),!W.value||!ni.value){bi(e,t);return}let n=cr.value.pointerType===`touch`?480:380;vi=setTimeout(()=>{vi=null,bi(e,t)},n)}let Si=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(B.value.start,B.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:E.value.includes(e.uid)?.5:1,segregate:()=>Ei(e.uid),isSegregated:E.value.includes(e.uid),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${L.value.legend.showValue?de(I.value.dataLabels.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${L.value.legend.showPercentage?E.value.includes(e.uid)?`${L.value.legend.showValue?` (`:``}- %${L.value.legend.showValue?`)`:``}`:`${L.value.legend.showValue?` (`:``}${isNaN(e.value/Ci.value)?`-`:a({v:e.value/Ci.value*100,s:`%`,r:L.value.legend.roundingPercentage})}${L.value.legend.showValue?`)`:``}`:``}`}))),Ci=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),wi=u(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function Ti(){E.value.length?E.value=[]:Si.value.forEach(e=>{E.value.push(e.uid)}),N(`selectLegend`,Gr.value)}function Ei(e){if(E.value.includes(e))E.value=E.value.filter(t=>t!==e),N(`selectLegend`,Gr.value);else{if(E.value.length===J.value.length-1)return;E.value.push(e),N(`selectLegend`,Gr.value)}k.value&&bi($.value.find((e,t)=>t===_i.value))}function Di(e){return J.value.length?J.value.find(t=>t.name===e)||(Xn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(Xn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function Oi(e){let t=Di(e);t!==null&&E.value.includes(t.uid)&&Ei(t.uid)}function ki(e){let t=Di(e);t!==null&&(E.value.includes(t.uid)||Ei(t.uid))}let Ai=u(()=>{let e=[``].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!E.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${I.value.dataLabels.prefix}${Number(n.toFixed(P.value.table.td.roundingValue))}${I.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Qr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:[P.value.table.columnNames.period].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>e.name),P.value.table.columnNames.total)}});function ji(){return J.value}function Mi(e=null){it(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[...Ai.value.head.map(e=>e.name??e)],r=[...Ai.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=c(i);e?e(a):me({csvContent:a,title:L.value.title.text||`vue-ui-donut-evolution`})})}let Ni=v(!1);function Pi(e){Ni.value=e,_n.value+=1}function Fi(){Lr.value.showTable=!Lr.value.showTable}let Ii=v(!1);function Li(){Ii.value=!Ii.value}function Ri(e){return e.proportion*100>L.value.donuts.hover.hideLabelsUnderValue}let zi=v([]),Bi=v({}),Vi=v(null);function Hi(){Vi.value?.close?.(),k.value=null,_i.value=null,hn.value=!1,O.value=null,D.value=null,M.value=null}function Ui(e){zi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Bi.value=_e({...Qn.value.donutChart,responsive:!0,theme:P.value.theme}),Vi.value&&Vi.value.open()}let Wi=ke(A,()=>L.value.title.text),Gi=u(()=>z.value.width),Ki=u(()=>z.value.height);Ve({timeLabelsEls:Cn,timeLabels:X,slicer:B,configRef:P,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Gi,height:Ki,rotation:F.value.xAxis.dataLabels.autoRotate.angle});let qi=u(()=>Ne({config:P,style:L,mutableConfig:Lr,dialog:dn,accordion:rn,isFullscreen:Ni,parent:A,maxWidth:800,isCursorPointer:R}));ft(()=>Lr.value.showTable,e=>Me(e,P,Dn));function Ji(){Lr.value.showTable=!1,On.value&&On.value.setTableIconState(!1)}let Yi=u(()=>Si.value.map(e=>({...e,name:e.display}))),Xi=u(()=>L.value.backgroundColor),Zi=u(()=>L.value.legend),Qi=u(()=>L.value.title),{isCallbackImaging:$i,isCallbackSvg:ea,generateSvg:ta,onGenerateImage:na}=je({svg:G,title:Qi,legend:Zi,legendItems:Yi,backgroundColor:Xi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Pr});async function ra(){N(`copyAlt`,{config:P.value,dataset:$.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ia(){M.value=null,Kn.value=!0}function aa(){ar.value=!1,M.value=null,D.value=null,O.value=null,Kn.value=!1}function oa(e){if(!G.value||Ii.value||document.activeElement!==G.value||(ar.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(W.value&&(ni.value||V.value)){yi(),ai(),Hi(),Cr({force:!0,publish:!0});return}M.value=null,D.value=null,O.value=null;return}if(r){if(M.value===null)return;let e=$.value[M.value];if(!e)return;bi(e,M.value);return}let a=M.value,o=D.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ee=$.value[a];ee&&gi(ee)}let sa=u(()=>({headers:Ai.value?.colNames??[],rows:Ai.value?.bodyA11y??[]}));Ee({getData:ji,getImage:Wi,generatePdf:Nr,generateCsv:Mi,generateImage:Pr,generateSvg:ta,hideSeries:ki,showSeries:Oi,toggleTable:Fi,toggleAnnotator:Li,toggleFullscreen:Pi,copyAlt:ra,resetZoom:()=>Cr({force:!0,publish:!0}),setZoomState:xr}),ft(()=>[z.value.width,z.value.height,An.value,X.value,Kr.value,B.value.start,B.value.end,F.value,I.value,P.value.style.fontFamily,w.dataset,Jn.value,Sn.value,Cn.value,wn.value,Tn.value],Hr,{flush:`post`,deep:!0});let ca=u(()=>Ye({enabled:P.value.userOptions?.annotator?.followZoom,area:q.value,range:B.value,ticks:Zr.value}));return(e,i)=>(_(),p(`div`,{ref_key:`donutEvolutionChart`,ref:A,class:g(`vue-data-ui-component vue-ui-donut-evolution ${Ni.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:ot(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor}`),id:T.value,onMouseenter:i[4]||=()=>S(Or)(!0),onMouseleave:i[5]||=()=>S(Or)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,x(P.value.a11y.translations.keyboardNavigation),1)],8,gt),sa.value?.rows?.length?(_(),d(Ke,{key:0,uid:T.value,head:sa.value.headers,body:sa.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(_(),d(S(cn),rt({key:1},S(n)(P.value.userOptions.annotator),{svgRef:S(G),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:ca.value,backgroundColor:L.value.backgroundColor,color:L.value.color,active:Ii.value,isCursorPointer:R.value,palette:P.value.userOptions.annotatorPalette,onClose:Li}),$e({_:2},[y(S(r),n=>({name:n,fn:C(r=>[b(e.$slots,n,at(nt(S(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Fr.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:gn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),L.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rn,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:hi},[(_(),d(Ae,{key:`title_${yn.value}`,config:{title:{cy:`donut-evolution-div-title`,...L.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${T.value}`},null,8,_t),P.value.userOptions.show&&qn.value&&(S(kr)||S(Dr))?(_(),d(S(ln),{ref_key:`userOptionsRef`,ref:On,key:`user_options_${_n.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:S(jr),isImaging:S(Mr),uid:T.value,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ni.value,titles:{...P.value.userOptions.buttonTitles},chartElement:A.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Ii.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Pi,onGeneratePdf:S(Nr),onGenerateCsv:Mi,onGenerateImage:S(na),onGenerateSvg:S(ta),onToggleTable:Fi,onToggleAnnotator:Li,onCopyAlt:ra,style:ot({visibility:S(kr)?S(Dr)?`visible`:`hidden`:`visible`})},$e({_:2},[y(S(Pe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,at(nt(S(Fe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,vt,[(_(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:S(ge),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ni.value,"vue-data-ui-fulscreen--off":!Ni.value,"vue-data-ui-no-transition":!S($n)||S(Vr),"vue-ui-donut-evolution-chart-zoom-pointer-focus":W.value&&ar.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:ot({maxWidth:`100%`,visibility:S(Br)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:L.value.color,cursor:W.value?V.value?`col-resize`:`crosshair`:void 0,touchAction:W.value?`pan-y`:void 0,userSelect:W.value?`none`:void 0}),tabindex:`0`,onFocus:ia,onBlur:aa,onKeydown:oa,onPointerdown:fi,onPointermove:pi,onPointerup:mi,onPointercancel:ai,onClickCapture:si},[tt(S(sn)),b(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,bt)):f(``,!0),m(`defs`,null,[tt(Ue,{t:`linear`,id:`hover_${T.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,S(re)(L.value.backgroundColor,I.value.highlighter.opacity),1],[`100%`,S(re)(I.value.highlighter.color,I.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),tt(Ue,{t:`radial`,id:`focus_${T.value}`,stops:[[`0%`,S(re)(S(ae)(L.value.backgroundColor),0),1],[`77%`,S(re)(`#FFFFFF`,30),1],[`100%`,S(re)(S(ae)(L.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),F.value.show?(_(),p(`g`,xt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,St),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Ct),F.value.showVerticalLines?(_(),p(`g`,wt,[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Tt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[F.value.axis.yLabel?(_(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:Tn,"font-size":F.value.axis.fontSize,fill:F.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-F.value.axis.fontSize/2-F.value.axis.yLabelOffsetX:F.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},x(F.value.axis.yLabel),9,Et)):f(``,!0),F.value.axis.xLabel?(_(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:wn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":F.value.axis.fontSize,fill:F.value.axis.color},x(F.value.axis.xLabel),9,Dt)):f(``,!0)]),F.value.yAxis.dataLabels.show?(_(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:Sn,class:g({"donut-opacity":!0,"donut-behind":D.value!==null})},[(_(!0),p(l,null,y(Zr.value,(e,t)=>(_(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`path`,{key:0,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,10,Ot)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`text`,{key:1,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),transform:`translate(${K.value?q.value.right-F.value.yAxis.dataLabels.offsetX+7:q.value.left+F.value.yAxis.dataLabels.offsetX-7}, ${e.y+F.value.yAxis.dataLabels.fontSize/3})`,"font-size":F.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:F.value.yAxis.dataLabels.color,"font-weight":F.value.yAxis.dataLabels.bold?`bold`:`normal`},x(S(ye)(e.value)?S(de)(I.value.dataLabels.formatter,e.value,S(a)({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:I.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,kt)):f(``,!0)]))),128))],2)):f(``,!0),F.value.xAxis.dataLabels.show?(_(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Cn,class:g({"donut-opacity":!0})},[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`g`,null,[(F.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!F.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(_(),p(`g`,At,[String(X.value[t].text).includes(`
2
+ `)?(_(),p(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":F.value.xAxis.dataLabels.rotation>0?`start`:F.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":F.value.xAxis.dataLabels.fontSize,fill:F.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+F.value.xAxis.dataLabels.fontSize+F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`,innerHTML:S(ne)({content:String(X.value[t].text),fontSize:F.value.xAxis.dataLabels.fontSize,fill:I.value.grid.xAxis.dataLabels.color,x:0,y:0})},null,8,Mt)):(_(),p(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":F.value.xAxis.dataLabels.rotation>0?`start`:F.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":F.value.xAxis.dataLabels.fontSize,fill:F.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+F.value.xAxis.dataLabels.fontSize+F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`},x(X.value[t].text||``),9,jt))])):f(``,!0)]))),256))],512)):f(``,!0),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,null,[I.value.line.show&&t<$.value.length-1&&![e.subtotal,$.value[t+1].subtotal].includes(null)?(_(),p(`line`,{key:0,class:g({"donut-opacity":!0,"donut-behind":D.value!==null}),x1:e.x,y1:e.y,x2:$.value[t+1].x,y2:$.value[t+1].y,stroke:I.value.line.stroke,"stroke-width":I.value.line.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Nt)):f(``,!0),e.subtotal===null?f(``,!0):(_(),p(`g`,Pt,[e.subtotal?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:e.activeRadius,fill:L.value.backgroundColor},null,8,Ft)):f(``,!0)]))]))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal?(_(),p(`g`,It,[D.value!==null&&D.value===t?(_(),p(`g`,Lt,[(_(!0),p(l,null,y(e.donutHover,t=>(_(),p(`g`,null,[Ri(t)?(_(),p(`path`,{key:0,d:S(ue)(t,{x:t.center.endX,y:t.center.endY},12,12,{x:e.x,y:e.y},!1,20),stroke:t.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt)):f(``,!0)]))),256)),(_(!0),p(l,null,y(e.donutHover,(t,n)=>(_(),p(`g`,null,[Ri(t)?(_(),p(`text`,{key:0,"data-cy-hover-label":``,"text-anchor":S(le)(t,!0,0).anchor,x:S(le)(t,!0,9).x,y:S(he)(t,14,10),fill:F.value.yAxis.dataLabels.color,"font-size":8,"font-weight":`bold`},x(t.name)+`: `+x($r(t,e.donut))+` (`+x(t.value===null?`-`:Qr(t.value,t,n))+`) `,9,zt)):f(``,!0)]))),256)),m(`g`,null,[m(`circle`,{cx:e.x,cy:e.y,r:e.hoverRadius,fill:L.value.backgroundColor},null,8,Bt)])])):f(``,!0)])):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal===null?f(``,!0):(_(),p(`g`,Vt,[e.subtotal===0?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:3,fill:L.value.color},null,8,Ht)):D.value!==null&&D.value===t?(_(),p(`g`,Ut,[(_(!0),p(l,null,y(e.donutHover,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":1,stroke:L.value.backgroundColor},null,8,Wt))),256))])):(_(),p(`g`,Gt,[(_(!0),p(l,null,y(e.donut,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":.5,stroke:L.value.backgroundColor},null,8,Kt))),256))]))]))],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null||hn.value&&t!==k.value.index})},[e.subtotal!==null&&I.value.dataLabels.show?(_(),p(`text`,{key:0,"text-anchor":`middle`,x:e.x,y:D.value===e.index&&e.subtotal?e.y+I.value.dataLabels.fontSize/3:e.y-e.radius-I.value.dataLabels.fontSize+I.value.dataLabels.offsetY,"font-size":I.value.dataLabels.fontSize,"font-weight":`bold`,fill:I.value.dataLabels.color},x(Qr(e.subtotal,e,t)),9,qt)):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:[D.value,_i.value].includes(e.index)?`url(#hover_${T.value})`:`transparent`,class:g({"donut-hover":R.value&&e.subtotal&&[D.value,_i.value].includes(e.index)}),style:{pointerEvents:`none`}},null,10,Jt))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{"data-cy-trap":``,x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:`transparent`,onMouseenter:t=>gi(e),onMouseleave:t=>hi(e),onClick:n=>xi(e,t),style:ot({cursor:W.value?V.value?`col-resize`:`crosshair`:void 0}),class:g({"donut-hover":R.value&&D.value===e.index&&e.subtotal})},null,46,Yt))),256)),ti.value?(_(),p(`rect`,{key:4,x:ti.value.x,y:ti.value.y,width:ti.value.width,height:ti.value.height,fill:lr.value.selection.fill,"fill-opacity":lr.value.selection.fillOpacity,stroke:lr.value.selection.stroke,"stroke-opacity":lr.value.selection.strokeOpacity,"stroke-width":lr.value.selection.strokeWidth,"stroke-dasharray":lr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Xt)):f(``,!0),b(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0)],46,yt)),e.$slots.hint?(_(),p(`div`,Zt,[b(e.$slots,`hint`,at(nt({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Kn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,Qt,[b(e.$slots,`watermark`,at(nt({isPrinting:S(jr)||S(Mr)||S($i)||S(ea)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartSlicer`,ref:Hn,style:ot(`width:100%;background:${L.value.backgroundColor}`),"data-dom-to-png-ignore":``},[Y.value>1&&L.value.zoom.show?(_(),d(We,{ref_key:`slicerComponent`,ref:Vn,key:`slicer_${vn.value}`,background:L.value.zoom.color,borderColor:L.value.backgroundColor,fontSize:L.value.zoom.fontSize,useResetSlot:L.value.zoom.useResetSlot,timeLabels:X.value,textColor:L.value.color,inputColor:L.value.zoom.color,selectColor:L.value.zoom.highlightColor,max:Y.value,min:0,valueStart:B.value.start,valueEnd:B.value.end,refreshStartPoint:L.value.zoom.startIndex===null?0:L.value.zoom.startIndex,refreshEndPoint:L.value.zoom.endIndex===null?Y.value:L.value.zoom.endIndex+1,enableRangeHandles:L.value.zoom.enableRangeHandles,enableSelectionDrag:L.value.zoom.enableSelectionDrag,focusOnDrag:L.value.zoom.focusOnDrag,focusRangeRatio:L.value.zoom.focusRangeRatio,isCursorPointer:R.value,maxWidth:L.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.absoluteWidth>0&&L.value.zoom.autoFit?q.value.left/q.value.absoluteWidth:null,minimapRightInsetRatio:q.value.absoluteWidth>0&&L.value.zoom.autoFit?(q.value.absoluteWidth-q.value.right)/q.value.absoluteWidth:null,"onUpdate:start":Tr,"onUpdate:end":Er,onReset:i[0]||=()=>Cr({force:!0,publish:!0})},{"reset-action":C(({reset:t})=>[b(e.$slots,`reset-action`,at(nt({reset:t})),void 0,!0)]),_:3},8,[`background`,`borderColor`,`fontSize`,`useResetSlot`,`timeLabels`,`textColor`,`inputColor`,`selectColor`,`max`,`valueStart`,`valueEnd`,`refreshStartPoint`,`refreshEndPoint`,`enableRangeHandles`,`enableSelectionDrag`,`focusOnDrag`,`focusRangeRatio`,`isCursorPointer`,`maxWidth`,`minimapLeftInsetRatio`,`minimapRightInsetRatio`])):f(``,!0)],4),m(`div`,{id:`legend-bottom-${T.value}`},null,8,$t),En.value&&(L.value.legend.show||e.$slots.legend)?(_(),d(Qe,{key:6,to:L.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[m(`div`,{ref_key:`chartLegend`,ref:zn},[b(e.$slots,`legend`,{legend:Si.value},()=>[L.value.legend.show?(_(),d(Xe,{key:`legend_${xn.value}`,legendSet:Si.value,config:wi.value,onClickMarker:i[1]||=({legend:e})=>Ei(e.uid)},{item:C(({legend:e,index:t})=>[m(`div`,{onClick:t=>Ei(e.uid),style:ot(`opacity:${E.value.includes(e.uid)?.5:1}`)},x(e.display),13,en)]),legendToggle:C(()=>[Si.value.length>2&&L.value.legend.selectAllToggle.show&&!S(tr)?(_(),d(Ge,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:E.value.length>0,onToggle:Ti},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):f(``,!0)]),_:1},8,[`legendSet`,`config`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(_(),p(`div`,{key:7,ref_key:`source`,ref:Bn,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),qn.value&&P.value.userOptions.buttons.table?(_(),d(lt(qi.value.component),rt({key:8},qi.value.props,{ref_key:`tableUnit`,ref:Dn,onClose:Ji}),$e({content:C(()=>[(_(),d(S(on),{key:`table_${bn.value}`,colNames:Ai.value.colNames,head:Ai.value.head,body:Ai.value.body,config:Ai.value.config,title:P.value.table.useDialog?``:qi.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:R.value,onClose:Ji},{th:C(({th:e})=>[et(x(e.name??e),1)]),td:C(({td:e})=>[e.value===null?(_(),p(`span`,tn,`-`)):(_(),p(`b`,nn,x(isNaN(e.value)?``:I.value.dataLabels.prefix)+x(!isNaN(e.value)&&e.value!==null?Number(e.value.toFixed(P.value.table.td.roundingValue)).toLocaleString():e)+x(isNaN(e.value)?``:I.value.dataLabels.suffix),1)),m(`span`,null,x(e.percentage&&!isNaN(e.percentage)?`(${Number(e.percentage.toFixed(P.value.table.td.roundingPercentage)).toLocaleString()}%)`:``),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:C(()=>[et(x(qi.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:C(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[2]||=e=>Mi(P.value.userOptions.callbacks.csv),style:ot({cursor:R.value?`cursor`:`default`})},[tt(S(an),{name:`fileCsv`,stroke:qi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),Qn.value.show?(_(),d(S(dn),{key:9,ref_key:`dialog`,ref:Vi,onClose:i[3]||=e=>{k.value=null,hn.value=!1,O.value=null,D.value=null,_i.value=null},backgroundColor:Qn.value.backgroundColor,color:Qn.value.color,headerBg:Qn.value.header.backgroundColor,headerColor:Qn.value.header.color,isFullscreen:Ni.value,fullscreenParent:A.value},{title:C(()=>[et(x(X.value[Number(k.value.index)]?X.value[Number(k.value.index)].text:``),1)]),content:C(()=>[k.value?(_(),d(S(un),{key:0,config:Bi.value,dataset:zi.value},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`])):f(``,!0),S(tr)?(_(),d(Ce,{key:10})):f(``,!0)],46,ht))}},[[`__scopeId`,`data-v-124ecc8a`]]);export{mt as n,rn as t};
@@ -0,0 +1,9 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ft as s,Jt as ee,Q as c,X as te,_ as ne,at as re,b as ie,i as l,in as ae,nt as oe,t as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useSvgLabelLayout-42Kats14.js";import{t as Te}from"./useTimeLabelCollider-BTybMUFi.js";import{c as Ee}from"./canvas-lib-22VpOI4_.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as u}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./Legend-DM0ClX3D.js";import{t as Me}from"./usePrefersMotion-XLHwega2.js";import{t as Ne}from"./vue_ui_dumbbell-BMcxK0N3.js";import{Fragment as d,Teleport as Pe,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Fe,createTextVNode as Ie,createVNode as _,defineAsyncComponent as v,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as Ve,normalizeStyle as y,onBeforeUnmount as He,onMounted as Ue,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as We,shallowRef as Ge,toDisplayString as w,toRefs as Ke,unref as T,vShow as qe,watch as Je,withCtx as E,withDirectives as Ye}from"vue";var Xe=/* @__PURE__ */ e({default:()=>Ft}),Ze=[`id`],Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`viewBox`,`aria-describedby`],nt=[`x`,`y`,`width`,`height`],rt={key:1},it=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],at={key:2},ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],st=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ct=[`transform`,`font-size`,`fill`],lt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`onMouseenter`,`onMouseleave`,`onClick`],ut=[`x`,`y`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],dt=[`x`,`y`,`font-size`,`fill`],ft=[`transform`,`font-size`,`fill`,`font-weight`,`text-anchor`],pt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x`,`y`,`height`,`width`,`fill`],gt=[`transform`,`fill`,`font-size`],_t={key:0},vt={key:0},yt=[`d`,`fill`],bt={key:1},xt=[`x`,`y`,`height`,`width`,`fill`],St=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ct=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],wt={key:7},Tt=[`x`,`y`,`fill`,`font-size`],Et={key:8},Dt=[`x`,`y`,`fill`,`font-size`],Ot=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],kt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},At={key:5,class:`vue-data-ui-watermark`},jt=[`id`],Mt=[`xmlns`,`height`,`width`],Nt=[`fill`],Pt={style:{display:`flex`,"align-items":`center`}},Ft=/*#__PURE__*/ me({__name:`vue-ui-dumbbell`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:me,emit:Xe}){let Ft=v(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),It=v(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Lt=v(()=>import(`./DataTable-Dof6yhO7.js`)),Rt=v(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),zt=v(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Bt=v(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Vt=v(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_dumbbell:Ht}=i(),Ut=Me(),D=e,Wt=Xe,Gt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(te()),Kt=x(0),k=x(null),qt=x(null),Jt=x(null),Yt=x(null),Xt=x(null),Zt=x(0),Qt=x(0),$t=x(0),en=x(!1),tn=x(null),nn=x(null),rn=x(null),an=x(null),on=x(null),sn=x(null),A=x(null),j=x(null),M=x(null),cn=x(!1),N=x(!1),P=x(vn()),F=f(()=>P.value.style.chart.grid.horizontalGrid),ln=f(()=>P.value.style.chart.grid.verticalGrid),I=f(()=>P.value.style.chart.labels);f(()=>P.value.style.chart.grid);let L=f(()=>P.value.style.chart.plots),R=f(()=>P.value.style.chart.comparisonLines),z=f(()=>P.value.style.chart);fe({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiDumbbell`,rules:[pe.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the component to display related series.`]}]});let un=f(()=>P.value.userOptions.useCursorPointer),dn=f(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},useAnimation:!1,style:{chart:{backgroundColor:`#99999930`,padding:{top:12,right:12,bottom:12,left:12},grid:{horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},labels:{axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1},endLabels:{show:!1},startLabels:{show:!1}},legend:{backgroundColor:`transparent`},plots:{endColor:`#969696`,startColor:`#DBDBDB`,stroke:`#6A6A6A`,evaluationColors:{enable:!1}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:fn,FINAL_DATASET:pn,manualLoading:mn}=ue({...Ke(D),FINAL_CONFIG:P,prepareConfig:vn,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,start:21,end:34},{name:`_`,start:13,end:21},{name:`_`,start:8,end:13},{name:`_`,start:5,end:8},{name:`_`,start:3,end:5}],skeletonConfig:ae({defaultConfig:P.value,userConfig:dn.value})}),{userOptionsVisible:hn,setUserOptionsVisibility:gn,keepUserOptionState:_n}=ke({config:P.value}),{svgRef:B}=Ae({config:z.value.title});function vn(){return he(D.config,Ht,Ne)}Je(()=>D.config,e=>{fn.value||(P.value=vn()),hn.value=!P.value.userOptions.showOnChartHover,Sn(),Zt.value+=1,Qt.value+=1,$t.value+=1,P.value.responsive||(K.value=z.value.rowHeight,q.value=z.value.width),U.value.showTable=P.value.table.show},{deep:!0}),Je(()=>pn.value,e=>{Array.isArray(e)&&e.length>0&&(mn.value=!1),Rn(),zn()},{deep:!0});let V=Ge(null),H=Ge(null),yn=x(!1),bn=0;Ue(()=>{en.value=!0,Sn()});let xn=f(()=>P.value.debug);function Sn(){le(D.dataset)?re({componentName:`VueUiDumbbell`,type:`dataset`,debug:xn.value}):D.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`start`,`end`]}).forEach(e=>{Gt.value=!1,re({componentName:`VueUiDumbbell`,type:`datasetSerieAttribute`,property:e,index:t,debug:xn.value})})}),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:k.value,title:z.value.title.text?qt.value:null,legend:z.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value}),n=z.value.title.text?24:0,r=z.value.legend.show?24:0;cancelAnimationFrame(bn),bn=requestAnimationFrame(async()=>{q.value=Math.max(.1,e),K.value=Math.max(.1,(Math.max(.1,t)-(n+r))/pn.value.length),er(),yn.value=!0})}),H.value=k.value.parentNode,V.value.observe(H.value)),er()}He(()=>{cancelAnimationFrame(bn),Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:Cn,isImaging:wn,generatePdf:Tn,generateImage:En}=Ce({elementId:`dumbbell_${O.value}`,fileName:z.value.title.text||`vue-ui-dumbbell`,options:P.value.userOptions.print}),Dn=f(()=>P.value.userOptions.show&&!z.value.title.text),U=x({showTable:P.value.table.show});Je(P,()=>{U.value={showTable:P.value.table.show}},{immediate:!0});let W=f(()=>pn.value.map((e,t)=>({...e,start:ie(e.start),end:ie(e.end),id:e.id??`${String(e.name)}__${String(e.start)}__${String(e.end)}__${te()}`}))),On=f(()=>{let e=z.value.grid,t=W.value.flatMap(e=>[e.start,e.end]).map(e=>Number(e)).filter(e=>Number.isFinite(e)),n=t.length?Math.min(...t):0,r=t.length?Math.max(...t):0;return{min:e.scaleMin??Math.min(n,0),max:e.scaleMax??r}}),G=f(()=>ne(On.value.min,On.value.max,z.value.grid.scaleSteps)),K=x(z.value.rowHeight),q=x(z.value.width),{metrics:kn,ready:An,settling:jn,update:Mn}=we({svgRef:B,canMeasure:()=>!P.value.responsive||yn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(an.value).textWidth,yAxisLabelWidth:e(rn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(on.value).height})});function Nn(){let e=kn.value.scaleLabelsWidth,t=kn.value.yAxisLabelWidth;return e+t+(t?24+I.value.axis.yLabelOffsetX:0)}let Pn=f(()=>kn.value.xAxisLabelHeight+kn.value.timeLabelsHeight),Fn=f(()=>W.value.length);function In(e,t,n){let r=Number(e),i=Number(t.min),a=Number(t.max),o=Number(n.width);if(!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o))return n.left;let s=a-i;return s<=0?n.left:n.left+(r-i)/s*o}let J=f(()=>{N.value;let e=Nn(),t=z.value.padding,n=I.value.axis.xLabel?I.value.axis.xLabelOffsetY:0,r=K.value*Fn.value-Pn.value-t.top-t.bottom-n,i=r/Fn.value,a=K.value*Fn.value,o=q.value-e-t.left-t.right,s=G.value.ticks.length*(o/G.value.ticks.length);return{left:z.value.padding.left+e,right:q.value-z.value.padding.right,top:z.value.padding.top,bottom:a-z.value.padding.bottom-Pn.value-n,width:o,height:r,rowHeight:i,absoluteHeight:a,widthPlotReference:s}}),Y=f(()=>Math.min(K.value/2*.7,L.value.radius)),Ln=x([]),X=f({get(){let e=J.value,t=G.value;return Ln.value.map((n,r)=>{let i=In(n.start,t,e),a=In(n.endVal,t,e),o=i+(a-i)/2,s=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end>n.start,ee=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end<n.start,c=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end===n.start||[null,void 0].includes(n.start)||[null,void 0].includes(n.end),te=s?L.value.evaluationColors.positive:ee?L.value.evaluationColors.negative:L.value.evaluationColors.neutral;return{...n,isPositive:s,isNegative:ee,isNeutral:c,evaluationColor:te,evaluationGrad:`url(#${s?`positive`:ee?`negative`:`neutral`}_grad_${O.value})`,startX:i,endX:a,centerX:o,y:e.top+r*e.rowHeight+e.rowHeight/2}})},set(e){Ln.value=e}});function Rn(){Ln.value=W.value.map(e=>{let t=Number(e.start);return{...e,endVal:Number.isFinite(t)?t:0}})}let Z=x(null);Ue(()=>{zn()});function zn(){if(Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),Rn(),!P.value.useAnimation||Ut.value){X.value=Ln.value.map(e=>{let t=Number(e.end);return{...e,endVal:Number.isFinite(t)?t:e.endVal}});return}let e=Math.max(1,Math.min(100,P.value.animationSpeed||100))/100,t=W.value.map(e=>{let t=Number(e.start),n=Number(e.end),r=Number.isFinite(t)?t:0;return(Number.isFinite(n)?n:r)-r}),n=()=>{let r=!0;X.value=Ln.value.map((n,i)=>{let a=Number.isFinite(Number(n.end))?Number(n.end):n.endVal,o=n.endVal+t[i]*e,s=t[i]>=0?Math.min(o,a):Math.max(o,a);return s!==a&&(r=!1),{...n,endVal:s}}),r?Z.value=null:Z.value=requestAnimationFrame(n)};Z.value=requestAnimationFrame(n)}let Bn=f(()=>L.value.evaluationColors.enable?[{name:z.value.legend.labelNegative,color:L.value.gradient.show?`url(#negative_grad_${O.value})`:L.value.evaluationColors.negative},{name:z.value.legend.labelNeutral,color:L.value.gradient.show?`url(#neutral_grad_${O.value})`:L.value.evaluationColors.neutral},{name:z.value.legend.labelPositive,color:L.value.gradient.show?`url(#positive_grad_${O.value})`:L.value.evaluationColors.positive}]:[{name:z.value.legend.labelStart,color:L.value.gradient.show?`url(#start_grad_${O.value})`:L.value.startColor},{name:z.value.legend.labelEnd,color:L.value.gradient.show?`url(#end_grad_${O.value})`:L.value.endColor}]),Vn=f(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:z.value.legend.bold?`bold`:``})),Q=f(()=>({head:X.value.map(e=>({name:e.name})),body:X.value.map(e=>({start:e.start,end:e.end}))})),$=f(()=>{let e=[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],t=Q.value.head.map((e,t)=>{let n=a({p:I.value.prefix,v:Q.value.body[t].start,s:I.value.suffix,r:P.value.table.td.roundingValue}),r=a({p:I.value.prefix,v:Q.value.body[t].end,s:I.value.suffix,r:P.value.table.td.roundingValue}),i=a({v:100*(Q.value.body[t].end/Q.value.body[t].start-1),s:`%`,r:P.value.table.td.roundingPercentage});return[{name:e.name},n,r,i]}),n={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],head:e,body:t,config:n}});function Hn(e=null){ze(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t].start],[Q.value.body[t].end]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[P.value.table.columnNames.series],[P.value.table.columnNames.start],[P.value.table.columnNames.end]]].concat(t),r=o(n);e?e(r):oe({csvContent:r,title:z.value.title.text||`vue-ui-dumbbell`})})}let Un=x(!1);function Wn(e){Un.value=e,Kt.value+=1}function Gn(){return W.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=x(!1);function Jn(){qn.value=!qn.value}let Yn=ge(k,()=>z.value.title.text),Xn=f(()=>G.value.ticks),Zn=f(()=>({start:0,end:Xn.value.length}));Te({timeLabelsEls:on,timeLabels:Xn,slicer:Zn,configRef:P,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:q,height:K,targetClass:`.vue-ui-dumbbell-scale-label`,rotation:I.value.xAxisLabels.autoRotate.angle});function Qn({rowHeight:e,fontSize:t,showProgression:n}){if(!n)return!1;let r=e/3,i=e/1.3;return Math.abs(i-r)<t*1.2}let $n=(()=>{let e=null,t=0;return n=>{n===N.value?(e=null,t=0):e===null||e!==n?(e=n,t=1):(t+=1,t>=1&&(N.value=n,e=null,t=0))}})(),er=Ee(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=Qn({rowHeight:J.value.rowHeight,fontSize:I.value.yAxisLabels.fontSize,showProgression:I.value.yAxisLabels.showProgression});$n(e)})})},100);function tr({datapoint:e,seriesIndex:t}){A.value=t,j.value=e,P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function nr({datapoint:e,seriesIndex:t}){A.value=null,j.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function rr({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),Wt(`selectDatapoint`,{...e,seriesIndex:t})}let ir=f(()=>{if(j.value===null)return 0;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end);return e&&t?Math.min(j.value.startX,j.value.endX)+Math.abs(j.value.startX-j.value.endX)/2:e&&!t?j.value.startX:t&&!e?j.value.endX:null}),ar=f(()=>{if(j.value===null)return``;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end),n=``,r=``;return e&&(n=l(I.value.formatter,j.value.start,a({p:I.value.prefix,v:j.value.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),t&&(r=l(I.value.formatter,j.value.end,a({p:I.value.prefix,v:j.value.end,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),e&&t?`${n} → ${r}`:e&&!t?n:t&&!e?r:``}),or=f(()=>be({config:P,style:z,mutableConfig:U,dialog:Vt,accordion:It,isFullscreen:Un,parent:k,maxWidth:800,isCursorPointer:un}));Je(()=>U.value.showTable,e=>ye(e,P,tn));function sr(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let cr=f(()=>Bn.value.map(e=>({...e,shape:`circle`}))),lr=f(()=>z.value.backgroundColor),ur=f(()=>z.value.legend),dr=f(()=>z.value.title),{isCallbackImaging:fr,isCallbackSvg:pr,generateSvg:mr,onGenerateImage:hr}=ve({svg:B,title:dr,legend:ur,legendItems:cr,backgroundColor:lr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:En});async function gr(){Wt(`copyAlt`,{config:P.value,dataset:X.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function _r(e){let t=X.value.length;return t?(e%t+t)%t:null}function vr(){if(M.value!==null){let e=X.value[M.value];e&&nr({datapoint:e,seriesIndex:M.value})}M.value=null,A.value=null,j.value=null}function yr(){M.value=null,cn.value=!0}function br(){vr(),cn.value=!1}function xr(e){if(!B.value||qn.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){vr();return}if(r){if(M.value===null)return;let e=X.value[M.value];if(!e)return;rr({datapoint:e,seriesIndex:M.value});return}let a=M.value;a=a===null?n?0:X.value.length-1:_r(a+(n?1:-1));let o=X.value[a];o&&(M.value=a,tr({datapoint:o,seriesIndex:a}))}let Sr=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,e[1],e[2],e[3]]),caption:P.value.a11y.translations.tableCaption,notice:P.value.a11y.translations.tableAvailable}));return me({getData:Gn,getImage:Yn,generatePdf:Tn,generateCsv:Hn,generateImage:En,generateSvg:mr,toggleTable:Kn,toggleAnnotator:Jn,toggleFullscreen:Wn,copyAlt:gr}),Je(()=>[q.value,K.value,N.value,I.value,z.value,P.value.style.fontFamily,D.dataset,yn.value,an.value,on.value,sn.value,rn.value],Mn,{flush:`post`,deep:!0}),(e,i)=>(b(),h(`div`,{ref_key:`dumbbellChart`,ref:k,class:Be(`vue-data-ui-component vue-ui-dumbbell ${Un.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:y(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),id:`dumbbell_${O.value}`,onMouseenter:i[1]||=()=>T(gn)(!0),onMouseleave:i[2]||=()=>T(gn)(!1)},[g(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[g(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,Qe),Sr.value.body.length?(b(),p(Oe,{key:0,uid:O.value,head:Sr.value.head,body:Sr.value.body,caption:Sr.value.caption,notice:Sr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),P.value.userOptions.buttons.annotator?(b(),p(T(Rt),Re({key:1},T(n)(P.value.userOptions.annotator),{svgRef:T(B),backgroundColor:z.value.backgroundColor,color:z.value.color,active:qn.value,isCursorPointer:un.value,palette:P.value.userOptions.annotatorPalette,onClose:Jn}),Fe({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,Ve(Le(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Dn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),z.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),p(_e,{key:`title_${Zt.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${O.value}`},null,8,$e),P.value.userOptions.show&&Gt.value&&(T(_n)||T(hn))?(b(),p(T(zt),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Kt.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:T(Cn),isImaging:T(wn),uid:O.value,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Un.value,titles:{...P.value.userOptions.buttonTitles},chartElement:k.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:qn.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:un.value,onToggleFullscreen:Wn,onGeneratePdf:T(Tn),onGenerateCsv:Hn,onGenerateImage:T(hr),onGenerateSvg:T(mr),onToggleTable:Kn,onToggleAnnotator:Jn,onCopyAlt:gr,style:y({visibility:T(_n)?T(hn)?`visible`:`hidden`:`visible`})},Fe({_:2},[S(T(xe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,Ve(Le(T(Se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,et,[(b(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:T(se),class:Be({"vue-data-ui-fullscreen--on":Un.value,"vue-data-ui-fulscreen--off":!Un.value}),viewBox:`0 0 ${q.value} ${J.value.absoluteHeight<=0?10:J.value.absoluteHeight}`,style:y(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};visibility:${T(An)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,onFocus:yr,onBlur:br,onKeydown:xr},[_(T(Bt)),C(e.$slots,`svg-underlayer`,{svg:{...J.value,isPrintingImg:T(Cn)||T(wn)||T(fr),isPrintingSvg:T(pr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.height),style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,nt)):m(``,!0),ln.value.show?(b(),h(`g`,rt,[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`line`,{x1:J.value.left+t*J.value.width/(G.value.ticks.length-1),x2:J.value.left+t*J.value.width/(G.value.ticks.length-1),y1:J.value.top,y2:J.value.bottom,stroke:ln.value.stroke,"stroke-width":ln.value.strokeWidth,"stroke-dasharray":ln.value.strokeDasharray},null,8,it))),256))])):m(``,!0),F.value.show?(b(),h(`g`,at,[(b(!0),h(d,null,S(W.value,(e,t)=>(b(),h(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.top+t*J.value.rowHeight,y2:J.value.top+t*J.value.rowHeight,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,ot))),256)),g(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.bottom,y2:J.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,st)])):m(``,!0),I.value.axis.yLabel?(b(),h(`text`,{key:3,ref_key:`yAxisLabel`,ref:rn,transform:`translate(${I.value.axis.fontSize}, ${J.value.absoluteHeight/2}), rotate(-90)`,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.yLabel),9,ct)):m(``,!0),I.value.yAxisLabels.show?(b(),h(`g`,{key:4,ref_key:`serieLabels`,ref:an},[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-name`,key:`serieLabel_${e.id}_${t}`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+(!I.value.yAxisLabels.showProgression||N.value?J.value.rowHeight/2:J.value.rowHeight/3)+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"font-weight":I.value.yAxisLabels.bold?`bold`:`normal`,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w(e.name)+` `+w(N.value&&I.value.yAxisLabels.showProgression?[null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:`(${T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})})`:``),41,lt))),128)),I.value.yAxisLabels.showProgression&&!N.value?(b(!0),h(d,{key:0},S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-value`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+J.value.rowHeight/1.3+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w([null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})),41,ut))),256)):m(``,!0)],512)):m(``,!0),I.value.axis.xLabel?(b(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:sn,x:J.value.left+J.value.width/2,y:J.value.absoluteHeight-I.value.axis.fontSize/3,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.xLabel),9,dt)):m(``,!0),I.value.xAxisLabels.show?(b(),h(`g`,{key:6,ref_key:`scaleLabels`,ref:on},[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-scale-label`,key:`tick_${t}`,transform:`translate(${J.value.left+t*(J.value.width/(G.value.ticks.length-1))}, ${J.value.bottom+I.value.xAxisLabels.fontSize+I.value.xAxisLabels.offsetY}), rotate(${I.value.xAxisLabels.rotation})`,"font-size":I.value.xAxisLabels.fontSize,fill:I.value.xAxisLabels.color,"font-weight":I.value.xAxisLabels.bold?`bold`:`normal`,"text-anchor":I.value.xAxisLabels.rotation>0?`start`:I.value.xAxisLabels.rotation<0?`end`:`middle`},w(T(l)(I.value.formatter,e,T(a)({p:I.value.prefix,v:e,s:I.value.suffix,r:I.value.xAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),9,ft))),128))],512)):m(``,!0),Ye(g(`g`,null,[Ye(g(`path`,{d:`M ${j.value?j.value.startX:J.value.left},${J.value.top} ${j.value?j.value.startX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.startColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,pt),[[qe,j.value!==null&&![null,void 0].includes(j.value.start)]]),Ye(g(`path`,{d:`M ${j.value?j.value.endX:J.value.left},${J.value.top} ${j.value?j.value.endX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.endColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,mt),[[qe,j.value!==null&&![null,void 0].includes(j.value.end)]]),Ye(g(`rect`,{x:j.value?Math.min(j.value.startX,j.value.endX):J.value.left,y:J.value.top,height:Math.max(.1,J.value.height),width:j.value?Math.max(.1,Math.abs(j.value.endX-j.value.startX)):0,fill:j.value?T(ee)(R.value.rectColor,R.value.rectOpacity):`transparent`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,ht),[[qe,R.value.showRect&&j.value!==null&&![null,void 0].includes(j.value.start)&&![null,void 0].includes(j.value.end)]]),Ye(g(`text`,{transform:`translate(${ir.value==null?0:ir.value}, ${J.value.top-6})`,fill:R.value.labelColor,"font-size":R.value.labelFontSize,"text-anchor":`middle`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},w(ar.value),13,gt),[[qe,j.value!==null&&ir.value!==null&&R.value.showLabel]])],512),[[qe,R.value.show&&A.value!==null]]),g(`defs`,null,[_(u,{t:`radial`,id:`start_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.startColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.startColor,.1),1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`end_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.endColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.endColor,.1),1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`positive_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.positive,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.positive,.1),1],[`100%`,L.value.evaluationColors.positive,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`negative_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.negative,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.negative,.1),1],[`100%`,L.value.evaluationColors.negative,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`neutral_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.neutral,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.neutral,.1),1],[`100%`,L.value.evaluationColors.neutral,1]]},null,8,[`id`,`stops`])]),(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`plot_${t}_${e.id}`},[g(`defs`,null,[_(u,{t:`linear`,id:`grad_pos_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.startColor,1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`linear`,id:`grad_neg_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.endColor,1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`])]),![void 0,null].includes(e.end)&&![void 0,null].includes(e.start)?(b(),h(`g`,_t,[L.value.link.type===`curved`?(b(),h(`g`,vt,[g(`path`,{d:`M
2
+ ${e.startX},${e.y+Y.value/2}
3
+ C ${e.centerX},${e.y} ${e.centerX},${e.y}
4
+ ${e.endX},${e.y+Y.value/2}
5
+ L ${e.endX},${e.y-Y.value/2}
6
+ C ${e.centerX},${e.y} ${e.centerX},${e.y}
7
+ ${e.startX},${e.y-Y.value/2}
8
+ Z
9
+ `,fill:L.value.evaluationColors.enable?e.evaluationColor:e.endX>e.startX?`url(#grad_pos_${O.value})`:`url(#grad_neg_${O.value})`},null,8,yt)])):(b(),h(`g`,bt,[g(`rect`,{x:e.endX>e.startX?e.startX:e.endX,y:e.y-L.value.link.strokeWidth/2,height:Math.max(.01,L.value.link.strokeWidth),width:Math.max(.01,Math.abs(e.endX-e.startX)),fill:L.value.evaluationColors.enable?e.evaluationColor:e.endX>e.startX?`url(#grad_pos_${O.value})`:`url(#grad_neg_${O.value})`},null,8,xt)]))])):m(``,!0),[null,void 0].includes(e.start)?m(``,!0):(b(),h(`circle`,{key:1,cx:e.startX,cy:e.y,r:Y.value,fill:L.value.gradient.show?L.value.evaluationColors.enable?e.evaluationGrad:`url(#start_grad_${O.value})`:L.value.evaluationColors.enable?e.evaluationColor:L.value.startColor,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth},null,8,St)),[null,void 0].includes(e.end)?m(``,!0):(b(),h(`circle`,{key:2,cx:e.endX,cy:e.y,r:Y.value,fill:L.value.gradient.show?L.value.evaluationColors.enable?e.evaluationGrad:`url(#end_grad_${O.value})`:L.value.evaluationColors.enable?e.evaluationColor:L.value.endColor,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth},null,8,Ct))]))),128)),I.value.startLabels.show?(b(),h(`g`,wt,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`start_label_${t}_${e.id}`},[[null,void 0].includes(e.start)?m(``,!0):(b(),h(`text`,{key:0,x:e.startX,y:e.y+Y.value*2+I.value.startLabels.fontSize/2,fill:L.value.evaluationColors.enable&&I.value.startLabels.useEvaluationColor?e.evaluationColor:I.value.startLabels.useStartColor?L.value.startColor:I.value.startLabels.color,"font-size":I.value.startLabels.fontSize,"text-anchor":`middle`},w(T(l)(I.value.formatter,e.start,T(a)({p:I.value.prefix,v:e.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:e,seriesIndex:t})),9,Tt))]))),128))])):m(``,!0),I.value.endLabels.show?(b(),h(`g`,Et,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`end_label_${t}_${e.id}`},[[null,void 0].includes(e.end)?m(``,!0):(b(),h(`text`,{key:0,x:e.endX,y:e.y-(Y.value*2-I.value.startLabels.fontSize/3),fill:L.value.evaluationColors.enable&&I.value.endLabels.useEvaluationColor?e.evaluationColor:I.value.endLabels.useEndColor?L.value.endColor:I.value.endLabels.color,"font-size":I.value.endLabels.fontSize,"text-anchor":`middle`},w(T(l)(I.value.formatter,e.end,T(a)({p:I.value.prefix,v:e.end,s:I.value.suffix,r:I.value.endLabels.rounding}),{datapoint:e,seriesIndex:t})),9,Dt))]))),128))])):m(``,!0),g(`g`,null,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`rect`,{x:J.value.left,y:J.value.top+t*Math.max(.1,J.value.rowHeight),width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.rowHeight),fill:A.value===null?`transparent`:A.value===t?T(ee)(z.value.highlighter.color,z.value.highlighter.opacity):`transparent`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},null,40,Ot))),256))]),C(e.$slots,`svg`,{svg:{...J.value,isPrintingImg:T(Cn)||T(wn)||T(fr),isPrintingSvg:T(pr)}},void 0,!0)],46,tt)),e.$slots.hint?(b(),h(`div`,kt,[C(e.$slots,`hint`,Ve(Le({hint:P.value.a11y.translations.keyboardNavigation,isVisible:cn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(b(),h(`div`,At,[C(e.$slots,`watermark`,Ve(Le({isPrinting:T(Cn)||T(wn)||T(fr)||T(pr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${O.value}`},null,8,jt),en.value&&(z.value.legend.show||e.$slots.legend)?(b(),p(Pe,{key:6,to:z.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[g(`div`,{ref_key:`chartLegend`,ref:Jt},[C(e.$slots,`legend`,{legend:Bn.value},()=>[z.value.legend.show&&Gt.value?(b(),p(je,{key:`legend_${$t.value}`,legendSet:Bn.value,config:Vn.value,clickable:!1},{item:E(({legend:e})=>[g(`div`,{style:y(`display:flex;align-items:center;gap:4px;font-size:${z.value.legend.fontSize}px`)},[(b(),h(`svg`,{xmlns:T(se),viewBox:`0 0 20 20`,height:z.value.legend.fontSize,width:z.value.legend.fontSize},[g(`circle`,{cx:10,cy:10,r:9,fill:e.color},null,8,Nt)],8,Mt)),T(fn)?m(``,!0):(b(),h(d,{key:0},[Ie(w(e.name),1)],64))],4)]),_:1},8,[`legendSet`,`config`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(b(),h(`div`,{key:7,ref_key:`source`,ref:Yt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Gt.value&&P.value.userOptions.buttons.table?(b(),p(We(or.value.component),Re({key:8},or.value.props,{ref_key:`tableUnit`,ref:tn,onClose:sr}),Fe({content:E(()=>[(b(),p(T(Lt),{key:`table_${Qt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:P.value.table.useDialog?``:or.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:un.value,onClose:sr},{th:E(({th:e})=>[g(`div`,Pt,w(e),1)]),td:E(({td:e})=>[Ie(w(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Ie(w(or.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[0]||=e=>Hn(P.value.userOptions.callbacks.csv),style:y({cursor:un.value?`pointer`:`default`})},[_(T(Ft),{name:`fileCsv`,stroke:or.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),C(e.$slots,`skeleton`,{},()=>[T(fn)?(b(),p(de,{key:0})):m(``,!0)],!0)],46,Ze))}},[[`__scopeId`,`data-v-24ac57e2`]]);export{Xe as n,Ft as t};