vue-data-ui 2.7.2 → 2.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/dist/{Arrow-Cuf9zUpa.cjs → Arrow-Bslu6In_.cjs} +1 -1
  2. package/dist/{Arrow-SOQeOwmT.js → Arrow-Kbu7LT-f.js} +1 -1
  3. package/dist/{BaseIcon-DqYzMisq.js → BaseIcon-BLhJaEYy.js} +4 -3
  4. package/dist/{BaseIcon-C0unoacb.cjs → BaseIcon-WIhlX3LN.cjs} +1 -1
  5. package/dist/{ColorPicker-DyOTLjAA.js → ColorPicker-Dlg-p-yo.js} +3 -3
  6. package/dist/{ColorPicker-DLNc3kpl.cjs → ColorPicker-mXlj2N11.cjs} +1 -1
  7. package/dist/{DataTable-C_28ZqiP.js → DataTable-DOKlm7k4.js} +2 -2
  8. package/dist/{DataTable-ByOfBGEi.cjs → DataTable-c3nDhwbO.cjs} +1 -1
  9. package/dist/{Legend-mrAy7yUC.cjs → Legend-Bhl2d6oj.cjs} +1 -1
  10. package/dist/{Legend-CmKaL7xe.js → Legend-CIjMjfNk.js} +2 -2
  11. package/dist/{PackageVersion-39l3KkzC.js → PackageVersion-BCLALL_i.js} +1 -1
  12. package/dist/{PackageVersion-By81XV8X.cjs → PackageVersion-DFYAej2o.cjs} +1 -1
  13. package/dist/PenAndPaper-CAqWCUZx.cjs +1 -0
  14. package/dist/PenAndPaper-CZs431Nx.js +374 -0
  15. package/dist/{Shape-iIO-95sh.js → Shape-D9MuIPm8.js} +1 -1
  16. package/dist/{Shape-x7U3IhoM.cjs → Shape-wMij_bxG.cjs} +1 -1
  17. package/dist/{Slicer-C49MotZz.js → Slicer-CqYLlNlU.js} +2 -2
  18. package/dist/{Slicer-Ct66sqV1.cjs → Slicer-Duh-nBCD.cjs} +1 -1
  19. package/dist/{Title-BgVFZwZZ.cjs → Title-C5w8bVlo.cjs} +1 -1
  20. package/dist/{Title-Co3F59jq.js → Title-UjBqdYyD.js} +1 -1
  21. package/dist/{Tooltip-Cr89wMKa.js → Tooltip-3NNIdJ6N.js} +1 -1
  22. package/dist/{Tooltip-B8E9uCVm.cjs → Tooltip-Dbe23pmt.cjs} +1 -1
  23. package/dist/{dom-to-png-DtBlqZMR.js → dom-to-png-6NoDv4_U.js} +1 -1
  24. package/dist/{dom-to-png-D9eujpXB.cjs → dom-to-png-C-_IolaZ.cjs} +1 -1
  25. package/dist/{img-DQDP5JIH.js → img-BxGd_UqS.js} +1 -1
  26. package/dist/{img-DgRUFehB.cjs → img-DCkGlbCr.cjs} +1 -1
  27. package/dist/{index-gC66Se26.js → index-D3VntmA9.js} +1 -1
  28. package/dist/{index-BeJeDy5m.cjs → index-MIJJ8liG.cjs} +1 -1
  29. package/dist/{pdf-Bu1ahAX2.cjs → pdf-BGp1xMhT.cjs} +1 -1
  30. package/dist/{pdf-lJiGVhtL.js → pdf-BpVckOt1.js} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +2 -1
  33. package/dist/types/vue-data-ui.d.ts +2 -1
  34. package/dist/{useNestedProp-BusTOV-6.js → useNestedProp-DTlOqz2P.js} +1 -1
  35. package/dist/{useNestedProp-CF-iHhIC.cjs → useNestedProp-DwR4JSzw.cjs} +1 -1
  36. package/dist/{usePrinter-KMFl0n0s.js → usePrinter-H3tAjGXs.js} +3 -3
  37. package/dist/{usePrinter-Bz_kd3vb.cjs → usePrinter-U1x-RAEA.cjs} +1 -1
  38. package/dist/{vue-data-ui-Bak-lr4I.cjs → vue-data-ui-BuY9ggUz.cjs} +1 -1
  39. package/dist/{vue-data-ui-BApY_erH.js → vue-data-ui-DFwVHeO8.js} +60 -60
  40. package/dist/vue-data-ui.cjs +1 -1
  41. package/dist/vue-data-ui.js +1 -1
  42. package/dist/vue-ui-3d-bar-DeTBYGV_.cjs +19 -0
  43. package/dist/{vue-ui-3d-bar-BWjU0K3_.js → vue-ui-3d-bar-NNib9NTc.js} +30 -30
  44. package/dist/{vue-ui-accordion-j2beIma_.js → vue-ui-accordion-DGJQIcdB.js} +3 -3
  45. package/dist/{vue-ui-accordion-CZBJSHT_.cjs → vue-ui-accordion-cBSqrYy3.cjs} +1 -1
  46. package/dist/{vue-ui-age-pyramid-Cmw4WVB4.js → vue-ui-age-pyramid-DWG7C-nA.js} +22 -22
  47. package/dist/vue-ui-age-pyramid-DfGSS3SE.cjs +1 -0
  48. package/dist/{vue-ui-annotator-BVv5XkoE.cjs → vue-ui-annotator-Bpy0V7AA.cjs} +1 -1
  49. package/dist/{vue-ui-annotator-CKmqZjUD.js → vue-ui-annotator-D21j4NL0.js} +2 -2
  50. package/dist/vue-ui-bullet-CrgeKJBE.cjs +34 -0
  51. package/dist/{vue-ui-bullet-U_yJjO0m.js → vue-ui-bullet-MrNlqcTX.js} +36 -36
  52. package/dist/vue-ui-candlestick-DfEQ057F.cjs +2 -0
  53. package/dist/{vue-ui-candlestick-DhdlFIQE.js → vue-ui-candlestick-Dgwjzuq0.js} +11 -11
  54. package/dist/{vue-ui-carousel-table-BhC5cEe3.cjs → vue-ui-carousel-table-B9AHiJLA.cjs} +1 -1
  55. package/dist/{vue-ui-carousel-table-Ej7qzKkp.js → vue-ui-carousel-table-TOSDOJ0J.js} +4 -4
  56. package/dist/{vue-ui-chestnut-BzNHXzDj.cjs → vue-ui-chestnut-BQwGKI2l.cjs} +1 -1
  57. package/dist/{vue-ui-chestnut-L0bS5jtX.js → vue-ui-chestnut-DAlxKIqD.js} +32 -32
  58. package/dist/vue-ui-circle-pack-B9HW-E4V.cjs +1 -0
  59. package/dist/{vue-ui-circle-pack-DwCzeO3L.js → vue-ui-circle-pack-BjD7UG4l.js} +44 -44
  60. package/dist/{vue-ui-cursor-0mZP5nBc.cjs → vue-ui-cursor-Bv_hn_5f.cjs} +1 -1
  61. package/dist/{vue-ui-cursor-DwHdXwLS.js → vue-ui-cursor-CS0L4MjH.js} +2 -2
  62. package/dist/{vue-ui-dashboard-DILmOchy.js → vue-ui-dashboard-Cu4QabFb.js} +3 -3
  63. package/dist/{vue-ui-dashboard-CegApY8_.cjs → vue-ui-dashboard-DGJjS8TM.cjs} +1 -1
  64. package/dist/{vue-ui-digits-me8Nky0A.cjs → vue-ui-digits-BusMzORo.cjs} +1 -1
  65. package/dist/{vue-ui-digits-Dbwzk-sl.js → vue-ui-digits-CrqD5QXP.js} +2 -2
  66. package/dist/{vue-ui-donut-DwE-iZSV.js → vue-ui-donut-CbDkvk9s.js} +12 -12
  67. package/dist/{vue-ui-donut-evolution-DhFABvEv.js → vue-ui-donut-evolution-DKD_efmP.js} +69 -69
  68. package/dist/vue-ui-donut-evolution-Dul--Pi_.cjs +1 -0
  69. package/dist/vue-ui-donut-vqs5auMD.cjs +1 -0
  70. package/dist/{vue-ui-dumbbell-Cqq4iV6-.js → vue-ui-dumbbell-BGN-Rshy.js} +52 -52
  71. package/dist/{vue-ui-dumbbell-CL15d-aQ.cjs → vue-ui-dumbbell-CB6lYwMc.cjs} +1 -1
  72. package/dist/vue-ui-flow-CDPkL02l.cjs +1 -0
  73. package/dist/{vue-ui-flow-CU-orj9I.js → vue-ui-flow-g93Xo1mO.js} +75 -75
  74. package/dist/vue-ui-funnel-D1PhFKgP.cjs +1 -0
  75. package/dist/{vue-ui-funnel-DQmQmdNV.js → vue-ui-funnel-r_WI2IRS.js} +28 -28
  76. package/dist/{vue-ui-galaxy-nqyCbQ9j.js → vue-ui-galaxy-B4JnwjLW.js} +39 -39
  77. package/dist/vue-ui-galaxy-DSXcoM3k.cjs +1 -0
  78. package/dist/{vue-ui-gauge-BV3CJfqe.js → vue-ui-gauge-BPz7mbOb.js} +26 -26
  79. package/dist/vue-ui-gauge-Ct1Knstr.cjs +1 -0
  80. package/dist/{vue-ui-gizmo-CJwSAsxs.js → vue-ui-gizmo-BbUqDkQz.js} +3 -3
  81. package/dist/{vue-ui-gizmo-CNRAH2zT.cjs → vue-ui-gizmo-tet3qRDX.cjs} +1 -1
  82. package/dist/{vue-ui-heatmap-B1s7KejC.js → vue-ui-heatmap-BbmFxESu.js} +10 -10
  83. package/dist/vue-ui-heatmap-RHN_eSK2.cjs +1 -0
  84. package/dist/vue-ui-history-plot-B8_Kig_-.cjs +1 -0
  85. package/dist/{vue-ui-history-plot-z_KFt5z_.js → vue-ui-history-plot-CJFtY1Rm.js} +35 -35
  86. package/dist/{vue-ui-kpi-FaGp6_XP.cjs → vue-ui-kpi-C0IWPkaZ.cjs} +1 -1
  87. package/dist/{vue-ui-kpi-DabR5K70.js → vue-ui-kpi-CQo8VsEv.js} +3 -3
  88. package/dist/{vue-ui-mini-loader-w-BmywLJ.js → vue-ui-mini-loader-8wZYNxLC.js} +2 -2
  89. package/dist/{vue-ui-mini-loader-_plxZxma.cjs → vue-ui-mini-loader-DoOFKxep.cjs} +1 -1
  90. package/dist/{vue-ui-molecule-aiWG--to.js → vue-ui-molecule-DHb8Roml.js} +45 -45
  91. package/dist/{vue-ui-molecule-3ClCLk7L.cjs → vue-ui-molecule-HnReqNMq.cjs} +1 -1
  92. package/dist/vue-ui-mood-radar-BjmCUY0q.cjs +1 -0
  93. package/dist/{vue-ui-mood-radar-DwxCn06q.js → vue-ui-mood-radar-CdBmESCg.js} +40 -40
  94. package/dist/{vue-ui-nested-donuts-ONgAaLY-.js → vue-ui-nested-donuts-CO7sSeR-.js} +65 -65
  95. package/dist/vue-ui-nested-donuts-SBaCzHQP.cjs +17 -0
  96. package/dist/vue-ui-onion-BehdICTa.cjs +5 -0
  97. package/dist/{vue-ui-onion-DjoQuBo8.js → vue-ui-onion-Ci15BQ0y.js} +75 -75
  98. package/dist/{vue-ui-parallel-coordinate-plot-DWGVzaHE.js → vue-ui-parallel-coordinate-plot-BJbrb-Mp.js} +38 -38
  99. package/dist/vue-ui-parallel-coordinate-plot-BLLONfts.cjs +8 -0
  100. package/dist/{vue-ui-quadrant-CgiD9c7i.js → vue-ui-quadrant-BZTZY3LG.js} +54 -54
  101. package/dist/vue-ui-quadrant-ntmlYIVx.cjs +1 -0
  102. package/dist/{vue-ui-quick-chart-5NiRxtpD.js → vue-ui-quick-chart-B2OUF1Pk.js} +9 -9
  103. package/dist/vue-ui-quick-chart-BCdm0tx2.cjs +15 -0
  104. package/dist/vue-ui-radar-CUoLdojY.cjs +1 -0
  105. package/dist/{vue-ui-radar-CfKAy0nI.js → vue-ui-radar-D8DHrSPP.js} +55 -55
  106. package/dist/{vue-ui-rating-yiM_5H0W.cjs → vue-ui-rating-BWlmz08s.cjs} +1 -1
  107. package/dist/{vue-ui-rating-CbZvsZNv.js → vue-ui-rating-D4H6cT0d.js} +2 -2
  108. package/dist/{vue-ui-relation-circle-RRK2jhHr.js → vue-ui-relation-circle-CWvX8cvJ.js} +7 -7
  109. package/dist/vue-ui-relation-circle-DighSxmd.cjs +1 -0
  110. package/dist/vue-ui-rings-CPIzjzdm.cjs +2 -0
  111. package/dist/{vue-ui-rings-CiMKMEpp.js → vue-ui-rings-Dq5YT7h-.js} +62 -62
  112. package/dist/{vue-ui-scatter-9PFXuvoo.js → vue-ui-scatter-BMuJyp6q.js} +44 -44
  113. package/dist/vue-ui-scatter-BSgMQLjw.cjs +1 -0
  114. package/dist/{vue-ui-skeleton-KW-jcPRN.cjs → vue-ui-skeleton-DOE444ST.cjs} +1 -1
  115. package/dist/{vue-ui-skeleton-7Zfds6H1.js → vue-ui-skeleton-pHcbvN3-.js} +3 -3
  116. package/dist/{vue-ui-smiley-D0jhMBUh.js → vue-ui-smiley-BsPExuQ7.js} +2 -2
  117. package/dist/{vue-ui-smiley-BNQlshyY.cjs → vue-ui-smiley-bHv8hVve.cjs} +1 -1
  118. package/dist/{vue-ui-spark-trend-CLm12POW.cjs → vue-ui-spark-trend-S0FbKqDW.cjs} +1 -1
  119. package/dist/{vue-ui-spark-trend-D8nDY0fS.js → vue-ui-spark-trend-eJ5IZSRQ.js} +5 -5
  120. package/dist/{vue-ui-sparkbar-ChEbpWYC.cjs → vue-ui-sparkbar-B1pwFeeg.cjs} +1 -1
  121. package/dist/{vue-ui-sparkbar-wKlwMCph.js → vue-ui-sparkbar-B9E03kBf.js} +4 -4
  122. package/dist/{vue-ui-sparkgauge-DG824sGI.cjs → vue-ui-sparkgauge-BpAFpJN9.cjs} +1 -1
  123. package/dist/{vue-ui-sparkgauge-CvhIe_mP.js → vue-ui-sparkgauge-CbtRwF8H.js} +4 -4
  124. package/dist/{vue-ui-sparkhistogram-B8k8a538.cjs → vue-ui-sparkhistogram-4gAnz36n.cjs} +1 -1
  125. package/dist/{vue-ui-sparkhistogram-CVmbTFTc.js → vue-ui-sparkhistogram-BJfFPQ-X.js} +5 -5
  126. package/dist/{vue-ui-sparkline-7wnWuXDQ.cjs → vue-ui-sparkline-CJ8rlJiI.cjs} +1 -1
  127. package/dist/{vue-ui-sparkline-CtqAbSzZ.js → vue-ui-sparkline-CLz-PMi0.js} +4 -4
  128. package/dist/{vue-ui-sparkstackbar-DfwEeUC5.js → vue-ui-sparkstackbar-C5ZzOhRM.js} +5 -5
  129. package/dist/{vue-ui-sparkstackbar-57SONMGP.cjs → vue-ui-sparkstackbar-ja3t34Mt.cjs} +1 -1
  130. package/dist/{vue-ui-stackbar-CGSVPiPx.js → vue-ui-stackbar-BnuJOk6L.js} +86 -86
  131. package/dist/vue-ui-stackbar-DSWEq3Pa.cjs +6 -0
  132. package/dist/{vue-ui-strip-plot-fJFkn8_0.js → vue-ui-strip-plot-Cbr3Dkmd.js} +36 -36
  133. package/dist/vue-ui-strip-plot-CyiaXAxw.cjs +1 -0
  134. package/dist/{vue-ui-table-Das3959J.cjs → vue-ui-table-CPJeRMDV.cjs} +1 -1
  135. package/dist/{vue-ui-table-CliL2Wsp.js → vue-ui-table-Cr6jEi4z.js} +1 -1
  136. package/dist/{vue-ui-table-heatmap-C28ozf2S.cjs → vue-ui-table-heatmap-BfKruH6W.cjs} +1 -1
  137. package/dist/{vue-ui-table-heatmap-ZsJMMGpG.js → vue-ui-table-heatmap-C0J52xWN.js} +4 -4
  138. package/dist/{vue-ui-table-sparkline-CrQNShdH.js → vue-ui-table-sparkline-C9PHXjbW.js} +5 -5
  139. package/dist/{vue-ui-table-sparkline-0i9FAXug.cjs → vue-ui-table-sparkline-CGUs_6Ij.cjs} +1 -1
  140. package/dist/{vue-ui-thermometer-BaGL6WSb.js → vue-ui-thermometer-Cs8Xt7tQ.js} +50 -50
  141. package/dist/vue-ui-thermometer-DWC--OtD.cjs +1 -0
  142. package/dist/{vue-ui-timer-CFtgJ_Vi.cjs → vue-ui-timer-DD0VvMEs.cjs} +1 -1
  143. package/dist/{vue-ui-timer-Nk94fV-n.js → vue-ui-timer-DDZHmPLV.js} +5 -5
  144. package/dist/vue-ui-tiremarks-B_koqVkj.cjs +1 -0
  145. package/dist/{vue-ui-tiremarks-zYgdq_99.js → vue-ui-tiremarks-DHAdNbAA.js} +25 -25
  146. package/dist/vue-ui-treemap-C_yhbpyF.cjs +1 -0
  147. package/dist/{vue-ui-treemap-CAxPcxn-.js → vue-ui-treemap-CfH-P5Oh.js} +12 -12
  148. package/dist/vue-ui-vertical-bar-BRplGFjj.cjs +4 -0
  149. package/dist/{vue-ui-vertical-bar-Di3FBkwJ.js → vue-ui-vertical-bar-oBdc4YQS.js} +80 -80
  150. package/dist/vue-ui-waffle-Bg5T7RVn.cjs +1 -0
  151. package/dist/{vue-ui-waffle-DBJAQsEf.js → vue-ui-waffle-DZ2zIujl.js} +45 -45
  152. package/dist/{vue-ui-wheel-BTZEr2Vs.js → vue-ui-wheel-BerXCO4A.js} +27 -27
  153. package/dist/vue-ui-wheel-Bj3Z92nh.cjs +1 -0
  154. package/dist/{vue-ui-word-cloud-BEaRWIu-.cjs → vue-ui-word-cloud-BWQ1ogz9.cjs} +1 -1
  155. package/dist/{vue-ui-word-cloud-DBCVUkLM.js → vue-ui-word-cloud-U5KISxTe.js} +72 -72
  156. package/dist/{vue-ui-xy-DbN93Pcf.cjs → vue-ui-xy-C078AHoi.cjs} +2 -2
  157. package/dist/vue-ui-xy-canvas-BpblELcE.js +1672 -0
  158. package/dist/vue-ui-xy-canvas-C76OoGNJ.cjs +9 -0
  159. package/dist/{vue-ui-xy-aKaGgYGL.js → vue-ui-xy-y9zEQYMK.js} +16 -16
  160. package/package.json +1 -1
  161. package/dist/PenAndPaper-CmcfpltX.js +0 -243
  162. package/dist/PenAndPaper-DNbX5hR8.cjs +0 -1
  163. package/dist/vue-ui-3d-bar-CmbTiJVx.cjs +0 -19
  164. package/dist/vue-ui-age-pyramid-Sv-HbbDJ.cjs +0 -1
  165. package/dist/vue-ui-bullet-vcmTY4AX.cjs +0 -34
  166. package/dist/vue-ui-candlestick-DQT-8PRz.cjs +0 -2
  167. package/dist/vue-ui-circle-pack-CVLJs0XP.cjs +0 -1
  168. package/dist/vue-ui-donut-FoRYusUX.cjs +0 -1
  169. package/dist/vue-ui-donut-evolution-BIK2yfIJ.cjs +0 -1
  170. package/dist/vue-ui-flow-N825fjRf.cjs +0 -1
  171. package/dist/vue-ui-funnel-B6XMYl89.cjs +0 -1
  172. package/dist/vue-ui-galaxy-p-sbDnSY.cjs +0 -1
  173. package/dist/vue-ui-gauge-DsZFk8T_.cjs +0 -1
  174. package/dist/vue-ui-heatmap-VXgeMOwT.cjs +0 -1
  175. package/dist/vue-ui-history-plot-JmeGiR--.cjs +0 -1
  176. package/dist/vue-ui-mood-radar-CO5sPVVG.cjs +0 -1
  177. package/dist/vue-ui-nested-donuts-D0nALasd.cjs +0 -17
  178. package/dist/vue-ui-onion-CBqx4q4k.cjs +0 -5
  179. package/dist/vue-ui-parallel-coordinate-plot-uNCmnSvz.cjs +0 -8
  180. package/dist/vue-ui-quadrant-BOkyMgCm.cjs +0 -1
  181. package/dist/vue-ui-quick-chart-BRp_bNso.cjs +0 -15
  182. package/dist/vue-ui-radar-BpicgiWF.cjs +0 -1
  183. package/dist/vue-ui-relation-circle-Dg6rdyGP.cjs +0 -1
  184. package/dist/vue-ui-rings-A49lyv-J.cjs +0 -2
  185. package/dist/vue-ui-scatter-C_jHsy8M.cjs +0 -1
  186. package/dist/vue-ui-stackbar--0FZ_eBi.cjs +0 -6
  187. package/dist/vue-ui-strip-plot-C_ggDAQ-.cjs +0 -1
  188. package/dist/vue-ui-thermometer-h0rymM2v.cjs +0 -1
  189. package/dist/vue-ui-tiremarks-Cj8-XGcp.cjs +0 -1
  190. package/dist/vue-ui-treemap-CybL6mVf.cjs +0 -1
  191. package/dist/vue-ui-vertical-bar-D4IkwvAB.cjs +0 -4
  192. package/dist/vue-ui-waffle-7otLUrER.cjs +0 -1
  193. package/dist/vue-ui-wheel-BUJXtmeP.cjs +0 -1
  194. package/dist/vue-ui-xy-canvas-CF_lqLg-.cjs +0 -9
  195. package/dist/vue-ui-xy-canvas-CVQ__d4u.js +0 -1500
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BeJeDy5m.cjs"),ce=require("./Legend-mrAy7yUC.cjs"),de=require("./Title-BgVFZwZZ.cjs"),ve=require("./Tooltip-B8E9uCVm.cjs"),he=require("./DataTable-ByOfBGEi.cjs"),Y=require("./usePrinter-Bz_kd3vb.cjs"),pe=require("./vue-ui-skeleton-KW-jcPRN.cjs"),fe=require("./vue-ui-accordion-CZBJSHT_.cjs"),J=require("./useNestedProp-CF-iHhIC.cjs"),ye=require("./PackageVersion-By81XV8X.cjs"),ge=require("./PenAndPaper-DNbX5hR8.cjs"),me=require("./useUserOptionState-BgepsfED.cjs"),be=require("./useChartAccessibility-Cm7nkzTG.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},xe={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},$e=["xmlns","viewBox"],Be=["width","height"],Se=["id"],Te=["stdDeviation"],Ne=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],_e=["filter"],Ve=["d","stroke","stroke-width"],Ee=["d","stroke-width","onMouseenter","onClick"],Le={key:5,class:"vue-data-ui-watermark"},Oe=["onClick"],Ae={key:0},Fe={key:1},Ie={key:8,ref:"source",dir:"auto"},ze=["innerHTML"],De={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(K,{expose:Q,emit:Z}){const{vue_ui_galaxy:ee}=r.useConfig(),c=K,k=e.computed(()=>!!c.dataset&&c.dataset.length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):c.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const g=e.ref(r.createUid()),x=e.ref(null),te=e.ref(null),$=e.ref(!1),B=e.ref(""),d=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>z(),set:l=>l}),{userOptionsVisible:S,setUserOptionsVisibility:A,keepUserOptionState:F}=me.useUserOptionState({config:t.value}),{svgRef:I}=be.useChartAccessibility({config:t.value.style.chart.title});function z(){const l=J.useNestedProp({userConfig:c.config,defaultConfig:ee});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>c.config,l=>{t.value=z(),S.value=!t.value.userOptions.showOnChartHover,_(),E.value+=1,L.value+=1,O.value+=1,u.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,u.value.showTable=t.value.table.show,u.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:D,isImaging:q,generatePdf:M,generateImage:R}=Y.usePrinter({elementId:`galaxy_${g.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy",options:t.value.userOptions.print}),le=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),u=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),m=e.ref({height:180,width:250}),U=Z,i=e.ref([]);function T(l){i.value.includes(l.id)?i.value=i.value.filter(a=>a!==l.id):i.value.push(l.id),U("selectLegend",b.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>c.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||oe.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function ae(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const v=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),re=e.ref(190),G=e.computed(()=>p.value.filter(l=>!i.value.includes(l.id))),b=e.computed(()=>{const l=[];for(let a=0;a<G.value.length;a+=1){const o=G.value[a];let n=o.value/v.value*re.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/v.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!i.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),y=e.ref(!1);function ne(l){y.value=l,V.value+=1}const N=e.ref(null);function se({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},$.value=n,d.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?B.value=f({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(s+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),B.value=`<div>${s}</div>`)}const W=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/c.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:i.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:i.value.includes(l.id)}))),ue=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=b.value.map(o=>({name:o.name,color:o.color})),a=b.value.map(o=>o.value);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=h.value.head.map((n,s)=>[[n.name],[h.value.body[s]],[isNaN(h.value.body[s]/v.value)?"-":h.value.body[s]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:v.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((s,f)=>{const ie=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ie,isNaN(h.value.body[f]/v.value)?"-":r.dataLabel({v:h.value.body[f]/v.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function j(){u.value.showTable=!u.value.showTable}function X(){u.value.showTooltip=!u.value.showTooltip}const w=e.ref(!1);function P(){w.value=!w.value}return Q({getData:ae,generatePdf:M,generateCsv:H,generateImage:R,toggleTable:j,toggleTooltip:X,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:x,class:e.normalizeClass(`vue-ui-galaxy ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${g.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(A)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(A)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value&&(e.unref(F)||e.unref(S))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(q),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:u.value.showTooltip,isFullscreen:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ne,onGeneratePdf:e.unref(M),onGenerateCsv:H,onGenerateImage:e.unref(R),onToggleTable:j,onToggleTooltip:X,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(S)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${m.value.width} ${m.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ye._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:m.value.width,height:m.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${g.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,Te)],8,Se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Pe)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${g.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(d.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${d.value&&d.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ve)],8,_e)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>se({datapoint:o,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{$.value=!1,d.value=null}),onClick:s=>U("selectDatapoint",o)},null,40,Ee)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:m.value},void 0,!0)],14,$e)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(pe.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ce.Legend,{key:`legend_${O.value}`,legendSet:W.value,config:ue.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>T(o),style:e.normalizeStyle(`opacity:${i.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Fe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ae," ("+e.toDisplayString(isNaN(o.value/v.value)?"-":e.unref(r.dataLabel)({v:o.value/v.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Oe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:W.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ve._sfc_main,{show:u.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:x.value,content:B.value,isFullscreen:y.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),k.value?(e.openBlock(),e.createBlock(fe.default,{key:9,hideDetails:"",config:{open:u.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(he.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>u.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},qe=ke._export_sfc(De,[["__scopeId","data-v-41382c10"]]);exports.default=qe;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BeJeDy5m.cjs"),H=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./usePrinter-Bz_kd3vb.cjs"),he=require("./vue-ui-skeleton-KW-jcPRN.cjs"),me=require("./Title-BgVFZwZZ.cjs"),J=require("./useNestedProp-CF-iHhIC.cjs"),fe=require("./PackageVersion-By81XV8X.cjs"),ye=require("./PenAndPaper-DNbX5hR8.cjs"),pe=require("./useUserOptionState-BgepsfED.cjs"),ke=require("./useChartAccessibility-Cm7nkzTG.cjs"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be=["id"],Be={key:0},Se=["xmlns","viewBox"],_e=["width","height"],xe=["id"],Ce=["stop-color"],we=["stop-color"],Ne=["stop-color"],Fe=["id"],Ee=["stdDeviation"],$e={key:1},ze=["d","fill","stroke"],Pe=["d","fill","stroke"],Oe=["d","fill"],Me=["id","d"],Ve=["fill","font-size","font-weight"],Ie=["href","startOffset"],Xe=["x","y","text-anchor","fill","font-size","font-weight"],Ae=["d","filter"],Ye=["stroke","stroke-width"],Re=["stroke","stroke-width"],Le=["stroke","stroke-width"],De=["stroke","stroke-width"],qe={key:8},Ge=["x","y","text-anchor","font-size","font-weight","fill"],je=["x","y","font-size","font-weight","fill"],Te={key:0},Ue=["x1","y1","x2","y2","stroke","stroke-width"],We=["x1","y1","x2","y2","stroke","stroke-width"],He=["x1","y1","x2","y2","stroke-width","filter"],Ze={key:1},Je=["d","fill","stroke","stroke-width"],Ke=["cx","cy","fill","r","stroke-width","stroke"],Qe=["x","y","font-size","fill"],et={key:5,class:"vue-data-ui-watermark"},tt={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(w,{expose:K}){const{vue_ui_gauge:Q}=s.useConfig(),c=w,S=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length>0&&c.dataset.series&&c.dataset.series.length),m=e.ref(s.createUid()),ee=e.ref(null),$=e.ref(0),_=e.ref(null),z=e.ref(null),P=e.ref(null),O=e.ref(null),M=e.ref(null),V=e.ref(0),t=e.computed({get:()=>Y(),set:a=>a}),{userOptionsVisible:N,setUserOptionsVisibility:I,keepUserOptionState:X}=pe.useUserOptionState({config:t.value}),{svgRef:A}=ke.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,a=>{t.value=Y(),N.value=!t.value.userOptions.showOnChartHover,j(),V.value+=1},{deep:!0});function Y(){const a=J.useNestedProp({userConfig:c.config,defaultConfig:Q});return a.theme?{...J.useNestedProp({userConfig:s.themes.vue_ui_gauge[a.theme]||c.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}const{isPrinting:R,isImaging:L,generatePdf:D,generateImage:q}=Z.usePrinter({elementId:`vue-ui-gauge_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge",options:t.value.userOptions.print}),te=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ae=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),k=e.computed(()=>{if(!S.value||s.objectIsEmpty(c.dataset.series||{}))return{value:0,series:[{from:0,to:0}]};const a=[];(c.dataset.series||[]).forEach(r=>{a.push(r.from||1e-7),a.push(r.to||1e-7)});const n=Math.max(...a);return{...c.dataset,series:(c.dataset.series||[]).map((r,l)=>({...r,color:s.convertColorToHex(r.color)||ae.value[l]||s.palette[l],value:((r.to||0)-(r.from||0))/n*100}))}}),h=e.ref(512),o=e.ref({height:358.4,width:h.value,top:0,bottom:358.4,centerX:179.2,centerY:h.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3,segmentFontSize:t.value.style.chart.layout.segmentNames.fontSize}),b=e.ref(0),p=e.ref(0),v=e.ref(t.value.style.chart.animation.use?Math.min(...c.dataset.series.map(a=>a.from)):c.dataset.value);e.watch(()=>c.dataset.value,()=>{T(c.dataset.value)});const u=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI;return{x1:a,y1:n,x2:a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(r),y2:n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r)}}),G=e.computed(()=>{const a=o.value.width/2,n=i.value.base,r=Math.PI*((v.value+0-p.value)/(b.value-p.value))+Math.PI,l=a+i.value.pointerSize*o.value.pointerSize*.9*Math.cos(r),f=n+i.value.pointerSize*o.value.pointerSize*.9*Math.sin(r),y=o.value.pointerRadius,ie=a+y*Math.cos(r+Math.PI/2),ce=n+y*Math.sin(r+Math.PI/2),de=a+y*Math.cos(r-Math.PI/2),ve=n+y*Math.sin(r-Math.PI/2);return isNaN(l)?null:`M ${l},${f} ${ie},${ce} ${de},${ve} Z`}),F=e.computed(()=>{for(let a=0;a<k.value.series.length;a+=1){const{color:n,from:r,to:l}=k.value.series[a];if(v.value>=r&&v.value<=l)return n}return"#2D353C"}),x=e.ref(null);function j(){if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiGauge",type:"dataset"}):(s.getMissingDatasetAttributes({datasetObject:c.dataset,requiredAttributes:["value","series"]}).forEach(a=>{s.error({componentName:"VueUiGauge",type:"datasetAttribute",property:a})}),Object.hasOwn(c.dataset,"series")&&(c.dataset.series.length?c.dataset.series.forEach((a,n)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["from","to"]}).forEach(r=>{s.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:r,index:n})})}):s.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),T(c.dataset.value||0),t.value.responsive){const a=H.throttle(()=>{const{width:n,height:r}=H.useResponsive({chart:_.value,title:t.value.style.chart.title.text?z.value:null,legend:P.value,source:O.value,noTitle:M.value});requestAnimationFrame(()=>{o.value.width=n,o.value.height=r,o.value.centerX=n/2,o.value.centerY=h.value/2/358.4*r,o.value.bottom=r,o.value.labelFontSize=18/h.value*Math.min(r,n)<10?10:18/h.value*Math.min(r,n),o.value.legendFontSize=t.value.style.chart.legend.fontSize/h.value*Math.min(r,n)<14?14:t.value.style.chart.legend.fontSize/h.value*Math.min(r,n),o.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/h.value*Math.min(r,n),o.value.trackSize=t.value.style.chart.layout.track.size/h.value*Math.min(r,n),o.value.pointerStrokeWidth=s.translateSize({relator:Math.min(n,r),adjuster:h.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),o.value.markerOffset=s.translateSize({relator:Math.max(n,r),adjuster:h.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2}),o.value.segmentFontSize=s.translateSize({relator:Math.min(n,r),adjuster:h.value,source:t.value.style.chart.layout.segmentNames.fontSize,threshold:8,fallback:8})})});x.value=new ResizeObserver(a),x.value.observe(_.value.parentNode)}}e.onMounted(()=>{j()}),e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});function T(a){const n=[];(k.value.series||[]).forEach(y=>{n.push(y.from||0),n.push(y.to||0)}),b.value=Math.max(...n),p.value=Math.min(...n);let r=t.value.style.chart.animation.speed;const l=Math.abs(a-v.value)/(r*60);function f(){v.value<a?v.value=Math.min(v.value+l,a):v.value>a&&(v.value=Math.max(v.value-l,a)),v.value!==a&&requestAnimationFrame(f)}f()}const i=e.computed(()=>{const a=t.value.responsive?Math.min(o.value.width,o.value.height):o.value.width,n=2.5/t.value.style.chart.layout.radiusRatio;return{arcs:a/n,gradients:a/(n*1.1),base:t.value.responsive?o.value.height/2:o.value.height*.7,ratingBase:t.value.responsive?o.value.height/2+o.value.height/4:o.value.height*.9,pointerSize:t.value.responsive?Math.min(o.value.width,o.value.height)/3:o.value.width/3.2}}),d=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs,i.value.arcs,1,1,1,180,109.9495,40*o.value.trackSize)),re=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio,1,1,1,180,109.9495,40*o.value.trackSize)),g=e.computed(()=>d.value.map(a=>i.value.arcs*t.value.style.chart.layout.segmentNames.offsetRatio*(a.nameOffsetRatio||1))),U=e.computed(()=>{const{x:a,y:n}=s.offsetFromCenterPoint({initX:d.value[0].firstSeparator.x,initY:d.value[0].firstSeparator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:r,y:l}=s.offsetFromCenterPoint({initX:d.value[0].startX,initY:d.value[0].startY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:a,y1:n,x2:r,y2:l}}),W=e.computed(()=>d.value.map(a=>{const{x:n,y:r}=s.offsetFromCenterPoint({initX:a.separator.x,initY:a.separator.y,centerX:u.value.x1,centerY:u.value.y1,offset:-t.value.style.chart.layout.segmentSeparators.offsetIn}),{x:l,y:f}=s.offsetFromCenterPoint({initX:a.endX,initY:a.endY,centerX:u.value.x1,centerY:u.value.y1,offset:t.value.style.chart.layout.segmentSeparators.offsetOut});return{x1:n,y1:r,x2:l,y2:f}}));function oe(a){if(a.reduce((f,y)=>f+y,0)>100)throw new Error("Total % must not exceed 100");const r=50;let l=0;return a.map(f=>(l+=f,`${l/100*r-f/4}%`))}const le=e.computed(()=>oe(d.value.map(a=>a.proportion*100))),ne=e.computed(()=>s.makeDonut({series:k.value.series},o.value.width/2,i.value.base,i.value.gradients,i.value.gradients,.95,1,1,180,110.02,2*o.value.trackSize)),se=e.computed(()=>{const a=p.value>=0?-p.value:Math.abs(p.value);return s.createHalfCircleArc({radius:t.value.style.chart.layout.indicatorArc.radius*o.value.trackSize,centerX:o.value.width/2,centerY:i.value.base,percentage:(v.value+a)/(b.value+a)})}),B=e.ref(!1);function ue(a){B.value=a,$.value+=1}const C=e.ref(!1);function E(){C.value=!C.value}return K({generatePdf:D,generateImage:q,toggleAnnotator:E}),(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:_,id:`vue-ui-gauge_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:n[0]||(n[0]=()=>e.unref(I)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ye.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"gauge-div-title",...t.value.style.chart.title},subtitle:{cy:"gauge-div-subtitle",...t.value.style.chart.title.subtitle}}},{default:e.withCtx(()=>[t.value.translations.base&&w.dataset.base?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.value.translations.base)+": "+e.toDisplayString(w.dataset.base),1)):e.createCommentVNode("",!0)]),_:1},8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value&&(e.unref(X)||e.unref(N))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:ee,key:`user_options_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(L),isPrinting:e.unref(R),uid:m.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(q),onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:l})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:l})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:l})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:l})),void 0,!0)]),key:"3"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:l})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:l})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,_e)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${m.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ce),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(s.setOpacity)("#FFFFFF",t.value.style.chart.layout.track.gradientIntensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)("#FFFFFF",1)},null,8,Ne)],8,xe)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,Ee)],8,Fe)]),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l,patternId:`pattern_${m.value}_${l}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:r.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,ze))),128)),a.$slots.pattern?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:`url(#pattern_${m.value}_${l})`,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,Pe))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.indicatorArc.show?(e.openBlock(),e.createElementBlock("path",{key:3,d:se.value,fill:t.value.style.chart.layout.indicatorArc.fill},null,8,Oe)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&t.value.style.chart.layout.segmentNames.curved?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{id:`curve_${m.value}_${l}`,d:`M ${u.value.x1},${u.value.y1} m -${g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 ${2*g.value[l]},0 a ${g.value[l]},${g.value[l]} 0 1,1 -${2*g.value[l]},0`,fill:"transparent"},null,8,Me))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal","text-anchor":"middle"},[e.createElementVNode("textPath",{href:`#curve_${m.value}_${l}`,startOffset:le.value[l]},e.toDisplayString(r.name||""),9,Ie)],8,Ve))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentNames.show&&!t.value.style.chart.layout.segmentNames.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:5},e.renderList(re.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:r.center.endX,y:r.center.endY,"text-anchor":e.unref(s.calcMarkerOffsetX)(r,!1,12).anchor,fill:t.value.style.chart.layout.segmentNames.useSerieColor?r.color:t.value.style.chart.layout.segmentNames.color,"font-size":o.value.segmentFontSize,"font-weight":t.value.style.chart.layout.segmentNames.bold?"bold":"normal"},e.toDisplayString(r.name||""),9,Xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.layout.track.useGradient?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:6},e.renderList(ne.value,(r,l)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${l}`,d:r.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${m.value})`},null,8,Ae))),128)):e.createCommentVNode("",!0),t.value.style.chart.layout.segmentSeparators.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Ye),e.createElementVNode("line",e.mergeProps(U.value,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,Re),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth+2,"stroke-linecap":"round"}),null,16,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,r=>(e.openBlock(),e.createElementBlock("line",e.mergeProps({ref_for:!0},r,{stroke:t.value.style.chart.layout.segmentSeparators.stroke,"stroke-width":t.value.style.chart.layout.segmentSeparators.strokeWidth,"stroke-linecap":"round"}),null,16,De))),256))],64)):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(r,l)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:u.value.x1,centerY:i.value.base,initX:r.center.startX,initY:r.center.startY,offset:o.value.markerOffset}).y,"text-anchor":r.center.startX<u.value.x1-5?"end":r.center.startX>u.value.x1+5?"start":"middle","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,r.from,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:r.from,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.markers.show?(e.openBlock(),e.createElementBlock("text",{key:9,x:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).x,y:e.unref(s.offsetFromCenterPoint)({centerX:o.value.width/2,centerY:i.value.base,initX:d.value.at(-1).endX,initY:d.value.at(-1).endY,offset:o.value.markerOffset}).y,"text-anchor":"start","font-size":o.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.markers.formatter,b.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.markers.prefix,v:b.value,s:t.value.style.chart.layout.markers.suffix,r:t.value.style.chart.layout.markers.roundingValue}))),9,je)):e.createCommentVNode("",!0),t.value.style.chart.layout.pointer.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:10},[t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",Te,[isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":o.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,Ue)),isNaN(u.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.7},null,8,We)),!isNaN(u.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.x1,y1:u.value.y1,x2:u.value.x2,y2:u.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":o.value.pointerStrokeWidth*.3,filter:`url(#blur_${m.value})`},null,8,He)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",Ze,[G.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:G.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,Je)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:o.value.width/2,cy:i.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:o.value.pointerRadius<=0?1e-4:o.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,Ke)],64)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("text",{key:11,x:o.value.width/2,y:i.value.ratingBase,"text-anchor":"middle","font-size":o.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.legend.formatter,v.value,e.unref(s.dataLabel)({p:t.value.style.chart.legend.prefix+(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":""),v:v.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}))),9,Qe)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",et,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:6,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:P},[e.renderSlot(a.$slots,"legend",{legend:k.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],46,be))}},at=ge._export_sfc(tt,[["__scopeId","data-v-d85f8f4f"]]);exports.default=at;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BeJeDy5m.cjs"),me=require("./Title-BgVFZwZZ.cjs"),se=require("./usePrinter-Bz_kd3vb.cjs"),be=require("./Tooltip-B8E9uCVm.cjs"),ke=require("./vue-ui-skeleton-KW-jcPRN.cjs"),xe=require("./BaseIcon-C0unoacb.cjs"),we=require("./vue-ui-accordion-CZBJSHT_.cjs"),ue=require("./useNestedProp-CF-iHhIC.cjs"),Ce=require("./PackageVersion-By81XV8X.cjs"),_e=require("./PenAndPaper-DNbX5hR8.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Ee={key:2,style:"width:100%;background:transparent"},Te=["xmlns","viewBox"],Se=["width","height"],$e=["x","y","height","width","fill","stroke","stroke-width"],Ae=["x","y","height","width","fill","stroke","stroke-width"],ze=["x","y","width","height","fill","stroke","stroke-width"],Me=["x","y","width","height","fill","stroke","stroke-width"],Oe=["font-size","font-weight","fill","x","y"],Pe=["x","y","width","height","onMouseover"],Fe={key:0},De=["font-size","fill","x","y","font-weight"],Ie=["font-size","fill","x","y","font-weight"],Re={key:1},qe=["x","y","width","height","fill","stroke","stroke-width"],He=["x","y","width","height","fill","stroke","stroke-width"],Ue={key:2},Xe=["text-anchor","font-size","fill","font-weight","transform"],Ye=["text-anchor","font-size","fill","font-weight","transform"],Ge={key:4},je=["x","y","width","height","stroke","stroke-width"],We={key:5},Ke=["id"],Je=["stop-color"],Qe=["stop-color"],Ze=["x","y","font-size","fill"],el=["x","y","height","rx","fill"],ll=["x","y","font-size","fill"],tl=["stroke","x1","x2","y1","y2"],al=["fill","d"],ol={key:6},sl={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},ul=["stop-color"],nl=["stop-color"],rl=["x","y","width","height","rx"],il=["x","y","font-size","fill"],cl=["x","y","font-size","fill"],dl=["stroke","x1","x2","y1","y2"],vl=["fill","d"],yl={key:5,class:"vue-data-ui-watermark"},hl={key:6,ref:"source",dir:"auto"},pl={class:"vue-ui-data-table"},gl={key:0},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:ne}){e.useCssVars(t=>({"46dea1a0":t.tdo}));const{vue_ui_heatmap:re}=s.useConfig(),i=_,T=e.computed(()=>!!i.dataset&&i.dataset.length);s.objectIsEmpty(i.dataset)&&s.error({componentName:"VueUiHeatmap",type:"dataset"});const L=e.ref(s.createUid()),z=e.ref(null),ie=e.ref(null),M=e.ref(!1),O=e.ref(""),H=e.ref(void 0),N=e.ref(null),U=e.ref(0),X=e.ref(null),ce=e.ref(null),Y=e.ref(!1),G=e.ref(0),l=e.computed({get:()=>J(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:W}=Le.useUserOptionState({config:l.value}),{svgRef:K}=Ne.useChartAccessibility({config:l.value.style.title});function J(){const t=ue.useNestedProp({userConfig:i.config,defaultConfig:re});let u={};return t.theme?u={...ue.useNestedProp({userConfig:s.themes.vue_ui_heatmap[t.theme]||i.config,defaultConfig:t})}:u=t,i.config&&s.hasDeepProperty(i.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?u.style.layout.dataLabels.xAxis.showOnlyAtModulo=i.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:u.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,u}e.watch(()=>i.config,t=>{l.value=J(),P.value=!l.value.userOptions.showOnChartHover,F(),G.value+=1,g.value.showTable=l.value.table.show,g.value.showTooltip=l.value.style.tooltip.show},{deep:!0}),e.watch(()=>i.dataset,()=>{F()},{deep:!0});const{isPrinting:Q,isImaging:Z,generatePdf:ee,generateImage:le}=se.usePrinter({elementId:`heatmap__${L.value}`,fileName:l.value.style.title.text||"vue-ui-heatmap",options:l.value.userOptions.print}),de=e.computed(()=>l.value.userOptions.show&&!l.value.style.title.text),g=e.ref({showTable:l.value.table.show,showTooltip:l.value.style.tooltip.show}),ve=e.computed(()=>l.value.table.responsiveBreakpoint);function ye(){new ResizeObserver(u=>{u.forEach(r=>{Y.value=r.contentRect.width<ve.value})}).observe(X.value)}e.onMounted(F);function F(){ye()}const k=e.computed(()=>Math.max(...i.dataset.flatMap(t=>(t.values||[]).length))),f=e.computed(()=>{const t=l.value.style.layout.padding.top+l.value.style.layout.padding.bottom+i.dataset.length*l.value.style.layout.cells.height,u=l.value.style.layout.padding.left+l.value.style.layout.padding.right+(k.value<i.dataset.length?i.dataset.length:k.value)*l.value.style.layout.cells.height,r=t+(l.value.style.legend.show?l.value.style.legend.position==="right"?0:l.value.style.layout.cells.height*2:0);return{height:t,heightWithLegend:r,width:u}}),S=e.computed(()=>l.value.style.legend.position),a=e.computed(()=>({top:l.value.style.layout.padding.top,left:l.value.style.layout.padding.left,right:f.value.width-l.value.style.layout.padding.right-(S.value==="right"&&l.value.style.legend.show?92:0),bottom:f.value.height-l.value.style.layout.padding.bottom,height:f.value.height-l.value.style.layout.padding.top-l.value.style.layout.padding.bottom,width:f.value.width-l.value.style.layout.padding.right-l.value.style.layout.padding.left-(S.value==="right"&&l.value.style.legend.show?92:0)})),D=e.computed(()=>o.value.height*i.dataset.length),m=e.computed(()=>Math.max(...i.dataset.flatMap(t=>t.values))),x=e.computed(()=>Math.min(...i.dataset.flatMap(t=>t.values))),w=e.computed(()=>{const t=i.dataset.flatMap(r=>r.values);return t.reduce((r,n)=>r+n,0)/t.length}),o=e.computed(()=>({width:a.value.width/k.value,height:a.value.width/(k.value<i.dataset.length?i.dataset.length:k.value)})),v=e.computed(()=>{const t=l.value.style.layout.dataLabels.yAxis.values.length?l.value.style.layout.dataLabels.yAxis.values:i.dataset.map(d=>d.name),u=l.value.style.layout.dataLabels.xAxis.values,r=i.dataset.map(d=>d.values.reduce((h,q)=>h+q,0)),n=Math.max(...r),c=Math.min(...r),y=[];for(let d=0;d<k.value;d+=1)y.push(i.dataset.map(h=>h.values[d]||0).reduce((h,q)=>h+q,0));const p=Math.max(...y),R=Math.min(...y);return{yTotals:r.map(d=>{const h=isNaN(d/n)?0:d/n;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,c,n,d)}}),xTotals:y.map(d=>{const h=isNaN(d/p)?0:d/p;return{total:d,proportion:h,color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,R,p,d)}}),yLabels:t,xLabels:u.slice(0,k.value)}}),$=e.computed(()=>(i.dataset.forEach((t,u)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["values"]}).forEach(r=>{s.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:u})})}),i.dataset.map(t=>({...t,temperatures:(t.values||[]).map((u,r)=>u>=w.value?{side:"up",color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),ratio:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value))>1?1:Math.abs(Math.abs(u-w.value)/Math.abs(m.value-w.value)),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(u)/Math.abs(w.value))>1?1:Math.abs(1-Math.abs(u)/Math.abs(w.value)),color:s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,u),value:u,yAxisName:t.name,xAxisName:v.value.xLabels[r],id:`vue-data-ui-heatmap-cell-${s.createUid()}`})})))),b=e.ref(null),B=e.ref(null);function he(t,u,r,n){N.value={x:r,y:n};const{value:c,yAxisName:y,xAxisName:p,id:R}=t;H.value=R,b.value=c,B.value={datapoint:t,seriesIndex:u,series:$.value,config:l.value},M.value=!0;let d="";const h=l.value.style.tooltip.customFormat;s.isFunction(h)&&s.functionReturnsString(()=>h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}))?O.value=h({datapoint:t,seriesIndex:u,series:$.value,config:l.value}):(d+=`<div>${y} ${p?`${p}`:""}</div>`,d+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${l.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${s.interpolateColorHex(l.value.style.layout.cells.colors.cold,l.value.style.layout.cells.colors.hot,x.value,m.value,c)}">⬤</span><span>${isNaN(c)?"-":s.applyDataLabel(l.value.style.layout.cells.value.formatter,c,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:c,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.tooltip.roundingValue}),{datapoint:t,seriesIndex:u})}</span></div>`,O.value=`<div style="font-size:${l.value.style.tooltip.fontSize}px">${d}</div>`)}const V=e.computed(()=>a.value.top+D.value*(1-b.value/m.value)),E=e.computed(()=>a.value.left+(f.value.width-a.value.left-l.value.style.layout.padding.right)*(b.value/m.value));function pe(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.yTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.yTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.yTotals[t],rowIndex:t})}function ge(t){return s.applyDataLabel(l.value.style.layout.cells.value.formatter,v.value.xTotals[t].total,s.dataLabel({p:l.value.style.layout.dataLabels.prefix,v:v.value.xTotals[t].total,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:v.value.xTotals[t],colIndex:t})}e.computed(()=>{const t=i.dataset.map(r=>({name:r.name})),u=i.dataset.map(r=>r.values);return{head:t,body:u}});function te(){e.nextTick(()=>{const t=["",...i.dataset.map((c,y)=>c.name)],u=[];for(let c=0;c<v.value.xLabels.length;c+=1){const y=[v.value.xLabels[c]];for(let p=0;p<i.dataset.length;p+=1)y.push([i.dataset[p].values[c]]);u.push(y)}const r=[[l.value.style.title.text],[l.value.style.title.subtitle.text],[[""],[""],[""]]].concat([t]).concat(u),n=s.createCsvContent(r);s.downloadCsv({csvContent:n,title:l.value.style.title.text||"vue-ui-heatmap"})})}const C=e.ref(!1);function fe(t){C.value=t,U.value+=1}function ae(){g.value.showTable=!g.value.showTable}function oe(){g.value.showTooltip=!g.value.showTooltip}const A=e.ref(!1);function I(){A.value=!A.value}return ne({generatePdf:ee,generateCsv:te,generateImage:le,toggleTable:ae,toggleTooltip:oe,toggleAnnotator:I}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${C.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${l.value.style.fontFamily};width:100%; text-align:center;background:${l.value.style.backgroundColor}`),id:`heatmap__${L.value}`,onMouseenter:u[3]||(u[3]=()=>e.unref(j)(!0)),onMouseleave:u[4]||(u[4]=()=>e.unref(j)(!1))},[l.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,svgRef:e.unref(K),backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,active:A.value,onClose:I},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ce,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),l.value.style.title.text?(e.openBlock(),e.createElementBlock("div",Ee,[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"heatmap-div-title",...l.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...l.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),l.value.userOptions.show&&T.value&&(e.unref(W)||e.unref(P))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:ie,key:`user_options_${U.value}`,backgroundColor:l.value.style.backgroundColor,color:l.value.style.color,isImaging:e.unref(Z),isPrinting:e.unref(Q),uid:L.value,hasTooltip:l.value.userOptions.buttons.tooltip&&l.value.style.tooltip.show,hasPdf:l.value.userOptions.buttons.pdf,hasImg:l.value.userOptions.buttons.img,hasXls:l.value.userOptions.buttons.csv,hasTable:l.value.userOptions.buttons.table,hasFullscreen:l.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:g.value.showTooltip,titles:{...l.value.userOptions.buttonTitles},chartElement:z.value,position:l.value.userOptions.position,hasAnnotator:l.value.userOptions.buttons.annotator,isAnnotation:A.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(ee),onGenerateCsv:te,onGenerateImage:e.unref(le),onToggleTable:ae,onToggleTooltip:oe,onToggleAnnotator:I,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:r,color:n})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:r,color:n})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:n})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:K,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${f.value.width} ${f.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${l.value.style.color}`)},[e.createVNode(Ce._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:f.value.width,height:f.value.heightWithLegend,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.color.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,$e))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xTotals,(r,n)=>(e.openBlock(),e.createElementBlock("rect",{x:a.value.left+o.value.width*n+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top-o.value.height/3-l.value.style.layout.cells.spacing,height:o.value.height/3,width:o.value.width-l.value.style.layout.cells.spacing,fill:r.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Ae))),256))],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(r,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,ze),e.createElementVNode("rect",{x:a.value.left+o.value.width*y+l.value.style.layout.cells.spacing/2+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.width-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing,fill:c.color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,Me),l.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":l.value.style.layout.cells.value.fontSize,"font-weight":l.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(s.adaptColorToBackground)(c.color),x:a.value.left+o.value.width*y+o.value.width/2+ +(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,c.value,e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.value,s:l.value.style.layout.dataLabels.suffix,r:l.value.style.layout.cells.value.roundingValue}),{datapoint:c})),9,Oe)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.temperatures,(c,y)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+o.value.width*y+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:a.value.top+o.value.height*n,width:o.value.width,height:o.value.height,fill:"transparent",stroke:"none",onMouseover:p=>he(c,n,a.value.left+o.value.width*y,a.value.top+o.value.height*n),onMouseout:u[0]||(u[0]=p=>{M.value=!1,H.value=void 0,b.value=null,N.value=null})},null,40,Pe)]))),256)),l.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Fe,[e.createElementVNode("text",{class:"vue-ui-heatmap-row-name","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize/3+l.value.style.layout.dataLabels.yAxis.offsetY-(l.value.style.layout.cells.rowTotal.value.show?l.value.style.layout.dataLabels.yAxis.fontSize/1.5:0),"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(v.value.yLabels[n]),9,De),l.value.style.layout.cells.rowTotal.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-row-total","font-size":l.value.style.layout.dataLabels.yAxis.fontSize,fill:l.value.style.layout.dataLabels.yAxis.color,x:a.value.left+l.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+o.value.height*n+o.value.height/2+l.value.style.layout.dataLabels.yAxis.fontSize+l.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":l.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(pe(n)),9,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.layout.cells.rowTotal.color.show?(e.openBlock(),e.createElementBlock("g",Re,[e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:l.value.style.layout.cells.colors.underlayer,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,qe),e.createElementVNode("rect",{x:a.value.left,y:a.value.top+o.value.height*n+l.value.style.layout.cells.spacing/2,width:o.value.height/3,height:o.value.height-l.value.style.layout.cells.spacing,fill:v.value.yTotals[n].color,stroke:l.value.style.backgroundColor,"stroke-width":l.value.style.layout.cells.spacing},null,8,He)])):e.createCommentVNode("",!0)]))),256)),l.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&n%l.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,class:"vue-ui-heatmap-col-name","text-anchor":l.value.style.layout.dataLabels.xAxis.rotation===0?"middle":l.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${a.value.top+l.value.style.layout.dataLabels.xAxis.offsetY-6-(l.value.style.layout.cells.columnTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}), rotate(${l.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(r),9,Xe)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),l.value.style.layout.cells.columnTotal.value.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("text",{class:"vue-ui-heatmap-col-total","text-anchor":l.value.style.layout.cells.columnTotal.value.rotation===0?"middle":l.value.style.layout.cells.columnTotal.value.rotation<0?"end":"start","font-size":l.value.style.layout.dataLabels.xAxis.fontSize,fill:l.value.style.layout.dataLabels.xAxis.color,"font-weight":l.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+o.value.width/2+a.value.width/v.value.xLabels.length*n+l.value.style.layout.dataLabels.xAxis.offsetX+l.value.style.layout.cells.columnTotal.value.offsetX+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0)}, ${(o.value.height+l.value.style.layout.cells.spacing)*(_.dataset.length+1)+l.value.style.layout.cells.columnTotal.value.offsetY}), rotate(${l.value.style.layout.cells.columnTotal.value.rotation})`},e.toDisplayString(ge(n)),9,Ye))),256)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("g",Ge,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:N.value.x-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing+(l.value.style.layout.cells.rowTotal.color.show?o.value.height/3+l.value.style.layout.cells.spacing:0),y:N.value.y-l.value.style.layout.cells.selected.border/2+l.value.style.layout.cells.spacing,width:o.value.width-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,height:o.value.height-l.value.style.layout.cells.spacing+l.value.style.layout.cells.selected.border-l.value.style.layout.cells.spacing,fill:"transparent",stroke:l.value.style.layout.cells.selected.color,"stroke-width":l.value.style.layout.cells.selected.border,rx:1},null,8,je)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="right"?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${L.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.hot},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.cold},null,8,Qe)],8,Ke)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-l.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,Ze),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:D.value,rx:l.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${L.value})`},null,8,el),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+D.value+l.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,ll),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:V.value,y2:V.value},null,8,tl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${a.value.right+36},${V.value} ${a.value.right+26},${V.value-8} ${a.value.right+26},${V.value+8}z`},null,8,al)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),l.value.style.legend.show&&S.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",sl,[e.createElementVNode("stop",{offset:"0%","stop-color":l.value.style.layout.cells.colors.cold},null,8,ul),e.createElementVNode("stop",{offset:"100%","stop-color":l.value.style.layout.cells.colors.hot},null,8,nl)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height,width:f.value.width-a.value.left-l.value.style.layout.padding.right,height:l.value.style.layout.cells.height,rx:l.value.style.legend.scaleBorderRadius>l.value.style.layout.cells.height/2?l.value.style.layout.cells.height/2:l.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,rl),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"start","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(x.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(x.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,il),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+l.value.style.layout.cells.height*2+l.value.style.legend.fontSize*2,"text-anchor":"end","font-size":l.value.style.legend.fontSize*2,fill:l.value.style.legend.color},e.toDisplayString(e.unref(s.applyDataLabel)(l.value.style.layout.cells.value.formatter,e.unref(s.checkNaN)(m.value),e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:e.unref(s.checkNaN)(m.value),s:l.value.style.layout.dataLabels.suffix,r:l.value.style.legend.roundingValue}))),9,cl),b.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(s.adaptColorToBackground)(B.value.datapoint.color),"stroke-width":"2",x1:E.value,x2:E.value,y1:a.value.bottom+l.value.style.layout.cells.height,y2:a.value.bottom+l.value.style.layout.cells.height*2},null,8,dl)):e.createCommentVNode("",!0),b.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:l.value.style.color,stroke:"none",d:`M ${E.value},${a.value.bottom+l.value.style.layout.cells.height} ${E.value-12},${a.value.bottom+l.value.style.layout.cells.height-20} ${E.value+12},${a.value.bottom+l.value.style.layout.cells.height-20}z`},null,8,vl)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:f.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yl,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Q)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:7,config:{type:"heatmap",style:{backgroundColor:l.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(be._sfc_main,{show:g.value.showTooltip&&M.value,backgroundColor:l.value.style.tooltip.backgroundColor,color:l.value.style.tooltip.color,borderRadius:l.value.style.tooltip.borderRadius,borderColor:l.value.style.tooltip.borderColor,borderWidth:l.value.style.tooltip.borderWidth,fontSize:l.value.style.tooltip.fontSize,backgroundOpacity:l.value.style.tooltip.backgroundOpacity,position:l.value.style.tooltip.position,offsetY:l.value.style.tooltip.offsetY,parent:z.value,content:O.value,isFullscreen:C.value,isCustom:l.value.style.tooltip.customFormat&&typeof l.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(we.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color},head:{backgroundColor:l.value.style.backgroundColor,color:l.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:X,class:"vue-ui-heatmap-table atom-data-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":Y.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${l.value.table.th.backgroundColor};`),onClick:u[1]||(u[1]=r=>g.value.showTable=!1),onKeypress:u[2]||(u[2]=e.withKeys(r=>g.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:l.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",pl,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${l.value.table.th.backgroundColor};color:${l.value.table.th.color};outline:${l.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(l.value.style.title.text)+" ",1),l.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",gl,e.toDisplayString(l.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${l.value.table.th.backgroundColor};color:${l.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(r,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${l.value.table.th.outline};padding-right:6px`)},e.toDisplayString(r.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.xLabels,(r,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${l.value.table.td.backgroundColor};color:${l.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":l.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",ml,e.toDisplayString(r),1)],12,fl),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.dataset,(c,y)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":_.dataset[y].name,style:e.normalizeStyle(`outline:${l.value.table.td.outline}`)},[e.createElementVNode("div",kl,e.toDisplayString(isNaN(c.values[n])?"-":e.unref(s.dataLabel)({p:l.value.style.layout.dataLabels.prefix,v:c.values[n],s:l.value.style.layout.dataLabels.suffix,r:l.value.table.td.roundingValue})),1)],12,bl))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},wl=Be._export_sfc(xl,[["__scopeId","data-v-5e5b92b5"]]);exports.default=wl;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BeJeDy5m.cjs"),le=require("./useNestedProp-CF-iHhIC.cjs"),ae=require("./usePrinter-Bz_kd3vb.cjs"),Ce=require("./PackageVersion-By81XV8X.cjs"),we=require("./Legend-mrAy7yUC.cjs"),Be=require("./Title-BgVFZwZZ.cjs"),Se=require("./Tooltip-B8E9uCVm.cjs"),_e=require("./DataTable-ByOfBGEi.cjs"),Ne=require("./vue-ui-accordion-CZBJSHT_.cjs"),ze=require("./PenAndPaper-DNbX5hR8.cjs"),$e=require("./vue-ui-skeleton-KW-jcPRN.cjs"),oe=require("./useResponsive-DQmBAoBf.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["id"],Ae=["xmlns","viewBox"],Pe=["x","y","width","height"],Ve={key:1},Fe=["id"],Oe=["stop-color"],De=["stop-color"],Ie=["stop-color"],Xe={key:2},qe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:3},Re=["x","y","fill","font-size"],je=["transform","font-size","fill","font-weight"],Ue={key:5},He=["x1","x2","y1","y2","stroke","stroke-width"],We={key:6},Ge=["transform","fill","font-size","text-anchor"],Ze=["x","y","font-size","fill","font-weight"],Je=["x1","x2","y1","y2","stroke","stroke-width"],Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],et=["d","stroke","stroke-width"],tt=["cx","cy","fill","r"],lt=["cx","cy","fill","r","stroke","stroke-width"],at={key:1},ot=["x","y","font-size","fill","font-weight"],st={key:2},rt=["x","y","font-size","font-weight","fill"],nt=["cx","cy","r","onMouseenter","onClick"],it={key:5,class:"vue-data-ui-watermark"},ut=["onClick"],ct=["innerHTML"],vt={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(se,{expose:re,emit:ne}){const{vue_ui_history_plot:ie}=r.useConfig(),c=se,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),m=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=ne;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=oe.throttle(()=>{const{width:o,height:a}=oe.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function q(){const l=le.useNestedProp({userConfig:c.config,defaultConfig:ie});let o={};return l.theme?o={...le.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>q(),set:l=>l}),{userOptionsVisible:$,setUserOptionsVisibility:Y,keepUserOptionState:R}=Le.useUserOptionState({config:t.value}),{svgRef:j}=Ee.useChartAccessibility({config:t.value.style.chart.title});e.watch(()=>c.config,l=>{t.value=q(),$.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,f.value.showTable=t.value.table.show,f.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ae.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot",options:t.value.userOptions.print}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ce=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ce.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ve=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),de=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),he=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),ye=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?de.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ve.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?ye.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?he.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function fe(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function pe(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,p)=>({valueX:s.x,valueY:s.y,label:s.label,x:fe(s.x),y:pe(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function Z(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const J=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>Z(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),me=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function xe(l){I("selectDatapoint",l)}function K(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function ge(l){B.value=l,F.value+=1}const L=e.ref(null);function ke({datapoint:l,plotIndex:o,seriesIndex:a}){L.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},m.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:o,config:a,colNames:l}});function Q(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(p=>[[p.seriesName],[p.label],[p.valueX],[p.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function ee(){f.value.showTable=!f.value.showTable}function te(){f.value.showTooltip=!f.value.showTooltip}function be(){return g.value}return re({getData:be,generatePdf:W,generateCsv:Q,generateImage:G,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Y)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Y)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ze.PenAndPaper,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(R)||e.unref($))?(e.openBlock(),e.createBlock(ae.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:f.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:Q,onGenerateImage:e.unref(G),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(R)?e.unref($)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Oe),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ie)],8,Fe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,qe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Re))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,je)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,Ge))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,Ze)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Je)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ke)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:m.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Qe),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,et)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,lt))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,ot))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,p)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:m.value===null||m.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?p:p+1),15,rt))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:p=>ke({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=p=>{N.value=!1,m.value=null}),onClick:()=>xe(u)},null,40,nt))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Ae)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${P.value}`,legendSet:J.value,config:me.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{Z(a.seriesIndex),K(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),K(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,ut)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:J.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Se._sfc_main,{show:f.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(_e.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>f.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,ct)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Te))}},dt=Me._export_sfc(vt,[["__scopeId","data-v-56983f81"]]);exports.default=dt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BeJeDy5m.cjs"),oe=require("./Title-BgVFZwZZ.cjs"),q=require("./usePrinter-Bz_kd3vb.cjs"),le=require("./Legend-mrAy7yUC.cjs"),g=require("./BaseIcon-C0unoacb.cjs"),ae=require("./DataTable-ByOfBGEi.cjs"),re=require("./vue-ui-skeleton-KW-jcPRN.cjs"),ne=require("./vue-ui-accordion-CZBJSHT_.cjs"),z=require("./useNestedProp-CF-iHhIC.cjs"),se=require("./PackageVersion-By81XV8X.cjs"),ue=require("./PenAndPaper-DNbX5hR8.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Pe=["stroke"],Be=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),P=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:B,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,P.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const b=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(B)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(B)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(oe._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ge))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,$e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Oe),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Se),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ae),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),9,Te),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${P.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(g.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(g.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(g.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(g.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",qe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ae.DataTable,{colNames:b.value.colNames,head:b.value.head,body:b.value.body,config:b.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
@@ -1,17 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BeJeDy5m.cjs"),me=require("./useResponsive-DQmBAoBf.cjs"),Te=require("./Title-BgVFZwZZ.cjs"),be=require("./usePrinter-Bz_kd3vb.cjs"),Oe=require("./DataTable-ByOfBGEi.cjs"),Pe=require("./Tooltip-B8E9uCVm.cjs"),ze=require("./Legend-mrAy7yUC.cjs"),De=require("./vue-ui-skeleton-KW-jcPRN.cjs"),Ae=require("./vue-ui-accordion-CZBJSHT_.cjs"),ge=require("./useNestedProp-CF-iHhIC.cjs"),Ie=require("./PackageVersion-By81XV8X.cjs"),Me=require("./PenAndPaper-DNbX5hR8.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Xe=["xmlns","viewBox"],Ge=["width","height"],He=["id"],We=["offset","stop-color"],Je=["offset","stop-opacity"],Ke=["id"],Qe=["id"],Ze=["id"],je=["flood-color"],et=["d","fill","stroke","stroke-width","filter"],tt={key:1},lt=["d","fill"],at={key:2},ot=["x","y","font-size","font-weight","fill"],nt={key:3},rt=["filter"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["text-anchor","x","y","fill","font-size","font-weight"],ct=["d","fill","onMouseenter","onClick"],dt={key:5,class:"vue-data-ui-watermark"},vt={key:0,class:"vue-ui-nested-donuts-legend-title"},ft=["onClick"],pt=["innerHTML"],ht={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ke,{expose:Ce,emit:we}){const{vue_ui_nested_donuts:Le}=s.useConfig(),k=ke,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(s.createUid()),F=e.ref(!1),T=e.ref(""),Be=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function xe(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Re.useUserOptionState({config:t.value}),{svgRef:Q}=Ue.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=ge.useNestedProp({userConfig:k.config,defaultConfig:Le});return l.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,ee(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const j=e.computed(()=>{const{top:l,right:r,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${l}px ${r}px ${o}px ${n}px`,top:l,right:r,bottom:o,left:n}}),$=e.ref(null);e.onMounted(()=>{ee()});function ee(){if(s.objectIsEmpty(k.dataset)&&s.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=me.throttle(()=>{const{width:r,height:o}=me.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value,padding:j.value});requestAnimationFrame(()=>{c.value.width=r,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:te,isImaging:le,generatePdf:ae,generateImage:oe}=be.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),$e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ne=we;function Se({datapoint:l,index:r}){ne("selectDatapoint",{datapoint:l,index:r})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(l.series)?s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:r}):l.series.length===0?s.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${r}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,r)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>s.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:r,id:`${h.value}_${r}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${r}`,id:`${h.value}_${r}_${n}`,seriesIndex:n,datasetIndex:r,color:s.convertColorToHex(o.color)||Ne.value[n]||s.palette[n]||s.palette[n%s.palette.length],value:s.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),re=e.computed(()=>[...m.value].map((l,r)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function _e(l,r,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<r}const d=e.ref(re.value);e.watch(()=>re.value,l=>d.value=l);const se=e.ref(null),ue=e.ref(null);function z(l){ne("selectLegend",l);const r=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===r.arcOfId).series.map(i=>i.id),p=_e(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>r.value?(cancelAnimationFrame(se.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:r.value}:g)}))):(a+=r.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),se.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(ue.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),ue.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ie=e.computed(()=>d.value.map((l,r)=>b.value-r*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,r)=>{const o=r*b.value/m.value.length;return{...l,radius:b.value-o,donut:s.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ce=e.computed(()=>[...m.value].map((l,r)=>{const o=r*b.value/m.value.length;return{sizeRatio:o,donut:s.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),de=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Ve({datapoint:l,_relativeIndex:r,seriesIndex:o}){de.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(s.isFunction(n)&&s.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
2
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
- <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
5
- <circle cx="10" cy="10" r="10" fill="${p.color}"/>
6
- </svg>
7
- <span>
8
- ${p.arcOf??""} - ${p.name}
9
- </span>
10
- </div>
11
- <span>
12
- ${t.value.style.chart.tooltip.showValue?`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}
13
- </b>`:""}
14
- ${t.value.style.chart.tooltip.showPercentage?`(${s.dataLabel({v:p.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
15
- </span>
16
- </div>
17
- `})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${s.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${s.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ve(l,r){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===r?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,r)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:r,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),Ee=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),r=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:r}});function fe(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=s.createCsvContent(r);s.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],r=C.value.head.map((a,u)=>{const p=s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":s.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:r,config:o}});function Fe(){return m.value}function pe(){v.value.showTable=!v.value.showTable}function he(){v.value.dataLabels.show=!v.value.dataLabels.show}function ye(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function R(){E.value=!E.value}return Ce({getData:Fe,generatePdf:ae,generateCsv:fe,generateImage:oe,toggleTable:pe,toggleLabels:he,toggleTooltip:ye,toggleAnnotator:R}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:B,class:e.normalizeClass(`vue-ui-nested-donuts ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:r[3]||(r[3]=()=>e.unref(J)(!0)),onMouseleave:r[4]||(r[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:q},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(be.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(le),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ae),onGenerateCsv:fe,onGenerateImage:e.unref(oe),onToggleTable:pe,onToggleLabels:he,onToggleTooltip:ye,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Q,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${j.value.css}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[r[5]||(r[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/ie.value[n])*100}%`,"stop-color":e.unref(s.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,We),e.createElementVNode("stop",{offset:`${(1-D.value/ie.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Je),r[6]||(r[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,He))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Qe),r[7]||(r[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,Ke),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,je)],8,Ze)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(s.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ve(a,u)},null,8,et)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,lt)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(s.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,ot)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ve(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,st)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,ut)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,it)):e.createCommentVNode("",!0)],8,rt))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:Be.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>Ve({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>Se({datapoint:a,index:u}),onMouseleave:r[0]||(r[0]=p=>{F.value=!1,de.value=null,S.value=null,_.value=null})},null,40,ct)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(le)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Pe._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:T.value,isFullscreen:L.value,isCustom:e.unref(s.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(ze.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:Ee.value,onClickMarker:r[1]||(r[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(s.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,ft)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae.default,{key:10,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,pt)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ye))}},yt=qe._export_sfc(ht,[["__scopeId","data-v-23284122"]]);exports.default=yt;
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BeJeDy5m.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),$e=require("./Title-BgVFZwZZ.cjs"),oe=require("./usePrinter-Bz_kd3vb.cjs"),xe=require("./Legend-mrAy7yUC.cjs"),Be=require("./DataTable-ByOfBGEi.cjs"),Te=require("./Tooltip-B8E9uCVm.cjs"),Se=require("./vue-ui-skeleton-KW-jcPRN.cjs"),Pe=require("./vue-ui-accordion-CZBJSHT_.cjs"),re=require("./useNestedProp-CF-iHhIC.cjs"),Oe=require("./PackageVersion-By81XV8X.cjs"),Ne=require("./PenAndPaper-DNbX5hR8.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Ie=["xmlns","viewBox"],Ee=["width","height"],Re=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Le=["id"],ze=["stdDeviation"],De=["filter"],qe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ue=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ye={key:2},Xe=["onMouseenter"],Ge=["x","y","font-size","fill","font-weight"],He={key:5,class:"vue-data-ui-watermark"},je=["onClick"],We=["innerHTML"],Je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const{vue_ui_onion:ie}=u.useConfig(),f=ne,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ce=e.ref(null),I=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),b=e.ref(null),E=e.ref(null),R=e.ref(null),M=e.ref(null),L=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=_e.useUserOptionState({config:t.value}),{svgRef:X}=Ve.useChartAccessibility({config:t.value.style.chart.title});function G(){const l=re.useNestedProp({userConfig:f.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,K(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:H,isImaging:j,generatePdf:W,generateImage:J}=oe.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion",options:t.value.userOptions.print}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ve=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{K()});function K(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=ae.throttle(()=>{const{width:a,height:o}=ae.useResponsive({chart:b.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:M.value,noTitle:L.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||ve.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>Q(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),he=e.computed(()=>t.value.useStartAnimation),pe=e.ref(null),fe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,ge,{immediate:!0});function ge(){if(he.value&&!O.value){let r=function(){l>=fe.value?(cancelAnimationFrame(pe.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const me=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ye=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ye.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:be(a,l.percentage||0)}}));function be(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
2
- M ${s.value.centerX},${s.value.centerY-l}
3
- A ${l},${l} 0 1 1
4
- ${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
5
- `.trim()}}const ke=se;function Q(l){d.value.includes(l)?d.value=d.value.filter(r=>r!==l):d.value.push(l),ke("selectLegend",h.value)}function we(){return h.value}const N=e.computed(()=>{const l=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=h.value.map(a=>[a.name,a.percentage,a.value]);return{head:l,body:r}}),B=e.computed(()=>{const l=N.value.head,r=h.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:r,config:a,colNames:l}});function Z(){e.nextTick(()=>{const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=N.value.head,a=N.value.body,o=l.concat([r]).concat(a),c=u.createCsvContent(o);u.downloadCsv({csvContent:c,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const p=e.ref(void 0),y=e.ref(!1);function Ce(l){y.value=l,I.value+=1}const _=e.ref(null);function ee({datapoint:l,seriesIndex:r,show:a=!0}){const o=l.absoluteIndex;p.value=r,_.value={datapoint:l,seriesIndex:o,series:i.value,config:t.value},$.value=a;let c="";const w=t.value.style.chart.tooltip.customFormat;if(u.isFunction(w)&&u.functionReturnsString(()=>w({seriesIndex:o,datapoint:l,series:i.value,config:t.value})))S.value=w({seriesIndex:o,datapoint:l,series:i.value,config:t.value});else{const A=t.value.style.chart.tooltip.showPercentage,F=t.value.style.chart.tooltip.showValue;c+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span></span>${l.name}</span></div>`,c+=`<div style="width:100%;text-align:left;"><b>${A?u.dataLabel({p:"",v:l.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${A&&F?"(":""}${F?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,l.value,u.dataLabel({p:l.prefix||"",v:l.value,s:l.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:r}):""}${A&&F?")":""}</div>`,S.value=`<div>${c}</div>`}}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const T=e.ref(!1);function V(){T.value=!T.value}return ue({getData:we,generatePdf:W,generateCsv:Z,generateImage:J,toggleTable:te,toggleTooltip:le,toggleAnnotator:V}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:b,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:r[4]||(r[4]=()=>e.unref(U)(!0)),onMouseleave:r[5]||(r[5]=()=>e.unref(U)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:T.value,onClose:V},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:L,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(Y)||e.unref(P))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(j),isPrinting:e.unref(H),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:T.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(W),onGenerateCsv:Z,onGenerateImage:e.unref(J),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:o})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:o})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:X,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Oe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ee)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Re))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<0?1e-4:a.radius,stroke:`${a.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Me))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ze)],8,Le)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,qe))),256))],8,De)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=c=>{p.value=void 0,$.value=!1})},null,40,Ue))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=c=>{p.value=void 0,$.value=!1})},[d.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:a.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value===o?a.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:a.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&a.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})})`:""}`),9,Ge))],40,Xe))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:6,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${q.value}`,legendSet:i.value,config:me.value,onClickMarker:r[2]||(r[2]=({legend:a})=>Q(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString((a.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,je)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:v.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:S.value,isFullscreen:y.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,We)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},Ke=Ae._export_sfc(Je,[["__scopeId","data-v-c097b7d4"]]);exports.default=Ke;